gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r35858 - libmicrohttpd/src/include


From: gnunet
Subject: [GNUnet-SVN] r35858 - libmicrohttpd/src/include
Date: Wed, 3 Jun 2015 23:27:51 +0200

Author: Karlson2k
Date: 2015-06-03 23:27:51 +0200 (Wed, 03 Jun 2015)
New Revision: 35858

Modified:
   libmicrohttpd/src/include/microhttpd.h
Log:
microhttpd.h: add defines for deprecating macros

Modified: libmicrohttpd/src/include/microhttpd.h
===================================================================
--- libmicrohttpd/src/include/microhttpd.h      2015-06-03 20:22:32 UTC (rev 
35857)
+++ libmicrohttpd/src/include/microhttpd.h      2015-06-03 21:27:51 UTC (rev 
35858)
@@ -194,6 +194,34 @@
 #endif /* MHD_SOCKET_DEFINED */
 
 /**
+ * Define MHD_NO_DEPRECATION before including "microhttpd.h" to disable 
deprecation messages
+ */
+#ifdef MHD_NO_DEPRECATION
+#define _MHD_DEPR_MACRO(msg)
+#endif /* MHD_NO_DEPRECATION */
+
+#ifndef _MHD_DEPR_MACRO
+#if defined(_MSC_FULL_VER) && _MSC_VER+0 >= 1500
+/* Stringify macros */
+#define _MHD_INSTRMACRO(a) #a
+#define _MHD_STRMACRO(a) _MHD_INSTRMACRO(a)
+#define _MHD_DEPR_MACRO(msg) __pragma(message(__FILE__ "(" 
_MHD_STRMACRO(__LINE__)"): warning: " msg))
+#elif defined(__clang__) || defined (__GNUC_PATCHLEVEL__)
+#define _MHD_GCC_PRAG(x) _Pragma (#x)
+#if __clang_major__+0 >= 5 || \
+  (!defined(__apple_build_version__) && (__clang_major__+0  > 3 || 
(__clang_major__+0 == 3 && __clang_minor__ >= 3))) || \
+  __GNUC__+0 > 4 || (__GNUC__+0 == 4 && __GNUC_MINOR__+0 >= 8)
+#define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG(GCC warning msg)
+#else /* older clang or GCC */
+#define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG(message msg)
+#endif 
+/* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if 
required */
+#else /* other compilers */
+#define _MHD_DEPR_MACRO(msg)
+#endif
+#endif /* _MHD_DEPR_MACRO */
+
+/**
  * Not all architectures and `printf()`'s support the `long long` type.
  * This gives the ability to replace `long long` with just a `long`,
  * standard `int` or a `short`.




reply via email to

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