gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r36817 - libmicrohttpd/src/include
Date: Sat, 16 Jan 2016 18:10:49 +0100

Author: Karlson2k
Date: 2016-01-16 18:10:49 +0100 (Sat, 16 Jan 2016)
New Revision: 36817

Modified:
   libmicrohttpd/src/include/microhttpd.h
Log:
microhttpd.h: A little bit clarified deprecation macros.

Modified: libmicrohttpd/src/include/microhttpd.h
===================================================================
--- libmicrohttpd/src/include/microhttpd.h      2016-01-15 22:12:31 UTC (rev 
36816)
+++ libmicrohttpd/src/include/microhttpd.h      2016-01-16 17:10:49 UTC (rev 
36817)
@@ -198,6 +198,9 @@
  */
 #ifdef MHD_NO_DEPRECATION
 #define _MHD_DEPR_MACRO(msg)
+#define _MHD_NO_DEPR_IN_MACRO 1
+#define _MHD_DEPR_IN_MACRO(msg)
+#define _MHD_NO_DEPR_FUNC 1
 #define _MHD_DEPR_FUNC(msg)
 #endif /* MHD_NO_DEPRECATION */
 
@@ -227,12 +230,14 @@
 /* clang handles inline pragmas better than GCC */
 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg)
 #endif /* clang >= 2.9 */
-#endif
+#endif  /* older clang or GCC */
 /* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if 
required */
-#else /* other compilers */
+#endif /* clang || GCC >= 3.0 */
+#endif /* !_MHD_DEPR_MACRO */
+
+#ifndef _MHD_DEPR_MACRO
 #define _MHD_DEPR_MACRO(msg)
-#endif
-#endif /* _MHD_DEPR_MACRO */
+#endif /* !_MHD_DEPR_MACRO */
 
 #ifndef _MHD_DEPR_IN_MACRO
 #define _MHD_NO_DEPR_IN_MACRO 1
@@ -255,10 +260,13 @@
 /* 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 */
+#endif /* clang < 2.9 || GCC >= 3.1 */
+#endif /* !_MHD_DEPR_FUNC */
+
+#ifndef _MHD_DEPR_FUNC
+#define _MHD_NO_DEPR_FUNC 1
 #define _MHD_DEPR_FUNC(msg)
-#endif
-#endif /* _MHD_DEPR_FUNC */
+#endif /* !_MHD_DEPR_FUNC */
 
 /**
  * Not all architectures and `printf()`'s support the `long long` type.
@@ -2161,13 +2169,13 @@
                                        int fd,
                                        off_t offset);
 
-#ifndef _MHD_NO_DEPR_IN_MACRO
+#if !defined(_MHD_NO_DEPR_IN_MACRO) || defined(_MHD_NO_DEPR_FUNC)
 /* Substitute MHD_create_response_from_fd_at_offset64() instead of 
MHD_create_response_from_fd_at_offset()
-   to minimize possible problems with different off_t options */
+   to minimize potential problems with different off_t sizes */
 #define MHD_create_response_from_fd_at_offset(size,fd,offset) \
   _MHD_DEPR_IN_MACRO("Usage of MHD_create_response_from_fd_at_offset() is 
deprecated, use MHD_create_response_from_fd_at_offset64()") \
   MHD_create_response_from_fd_at_offset64((size),(fd),(offset))
-#endif /* ! _MHD_NO_DEPR_IN_MACRO */
+#endif /* !_MHD_NO_DEPR_IN_MACRO || _MHD_NO_DEPR_FUNC */
 
 
 /**




reply via email to

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