gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r36594 - in libmicrohttpd: . src/include


From: gnunet
Subject: [GNUnet-SVN] r36594 - in libmicrohttpd: . src/include
Date: Tue, 27 Oct 2015 13:23:42 +0100

Author: Karlson2k
Date: 2015-10-27 13:23:42 +0100 (Tue, 27 Oct 2015)
New Revision: 36594

Modified:
   libmicrohttpd/ChangeLog
   libmicrohttpd/src/include/microhttpd.h
Log:
Update deprecation macros for new GCC, better support old clang

Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog     2015-10-27 12:23:39 UTC (rev 36593)
+++ libmicrohttpd/ChangeLog     2015-10-27 12:23:42 UTC (rev 36594)
@@ -1,3 +1,7 @@
+Tue Oct 27 12:08:02 CET 2015
+       Rework deprecation maros: fix errors with old GCC versions,
+       improved support for old clang and new GCC. -EG
+
 Sun Oct 25 23:05:32 CET 2015
        Return correct header kind in MHD_get_connection_values()
        even if a bitmask is used for the "kind" argument. -FC/CG

Modified: libmicrohttpd/src/include/microhttpd.h
===================================================================
--- libmicrohttpd/src/include/microhttpd.h      2015-10-27 12:23:39 UTC (rev 
36593)
+++ libmicrohttpd/src/include/microhttpd.h      2015-10-27 12:23:42 UTC (rev 
36594)
@@ -217,6 +217,10 @@
 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg)
 #else /* older clang or GCC */
 #define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG(message msg)
+#if (__clang_major__+0  > 2 || (__clang_major__+0 == 2 && __clang_minor__ >= 
9)) /* FIXME: earlier versions not tested */
+/* clang handles inline pragmas better than GCC */
+#define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg)
+#endif /* clang >= 2.9 */
 #endif
 /* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if 
required */
 #else /* other compilers */
@@ -235,11 +239,11 @@
 #elif defined(_MSC_FULL_VER) && _MSC_VER+0 >= 1310
 /* VS .NET 2003 deprecation do not support custom messages */
 #define _MHD_DEPR_FUNC(msg) __declspec(deprecated)
-#elif defined (__clang__) && \
-  (__clang_major__+0 >= 4 || (!defined(__apple_build_version__) && 
__clang_major__+0 >= 3))
+#elif (__GNUC__+0 >= 5) || (defined (__clang__) && \
+  (__clang_major__+0 >= 4 || (!defined(__apple_build_version__) && 
__clang_major__+0 >= 3)))
 #define _MHD_DEPR_FUNC(msg) __attribute__((deprecated(msg)))
 #elif defined (__clang__) || __GNUC__+0 > 3 || (__GNUC__+0 == 3 && 
__GNUC_MINOR__+0 >= 1)
-/* GCC-style deprecation do not support custom messages */
+/* old GCC-style deprecation do not support custom messages */
 #define _MHD_DEPR_FUNC(msg) __attribute__((__deprecated__))
 /* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if 
required */
 #else /* other compilers */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]