[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r36593 - libmicrohttpd/src/include
From: |
gnunet |
Subject: |
[GNUnet-SVN] r36593 - libmicrohttpd/src/include |
Date: |
Tue, 27 Oct 2015 13:23:40 +0100 |
Author: Karlson2k
Date: 2015-10-27 13:23:39 +0100 (Tue, 27 Oct 2015)
New Revision: 36593
Modified:
libmicrohttpd/src/include/microhttpd.h
Log:
Fix deprecation macros resulting in compilation errors with old GCC versions
Modified: libmicrohttpd/src/include/microhttpd.h
===================================================================
--- libmicrohttpd/src/include/microhttpd.h 2015-10-27 11:12:14 UTC (rev
36592)
+++ libmicrohttpd/src/include/microhttpd.h 2015-10-27 12:23:39 UTC (rev
36593)
@@ -207,6 +207,7 @@
#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))
+#define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg)
#elif defined(__clang__) || defined (__GNUC_PATCHLEVEL__)
#define _MHD_GCC_PRAG(x) _Pragma (#x)
#if __clang_major__+0 >= 5 || \
@@ -213,6 +214,7 @@
(!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)
+#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)
#endif
@@ -222,6 +224,11 @@
#endif
#endif /* _MHD_DEPR_MACRO */
+#ifndef _MHD_DEPR_IN_MACRO
+#define _MHD_NO_DEPR_IN_MACRO 1
+#define _MHD_DEPR_IN_MACRO(msg)
+#endif /* !_MHD_DEPR_IN_MACRO */
+
#ifndef _MHD_DEPR_FUNC
#if defined(_MSC_FULL_VER) && _MSC_VER+0 >= 1400
#define _MHD_DEPR_FUNC(msg) __declspec(deprecated(msg))
@@ -305,7 +312,7 @@
#define MHD_HTTP_NOT_ACCEPTABLE 406
/** @deprecated */
#define MHD_HTTP_METHOD_NOT_ACCEPTABLE \
- _MHD_DEPR_MACRO("Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use
MHD_HTTP_NOT_ACCEPTABLE") 406
+ _MHD_DEPR_IN_MACRO("Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use
MHD_HTTP_NOT_ACCEPTABLE") 406
#define MHD_HTTP_PROXY_AUTHENTICATION_REQUIRED 407
#define MHD_HTTP_REQUEST_TIMEOUT 408
#define MHD_HTTP_CONFLICT 409
@@ -2134,11 +2141,13 @@
int fd,
off_t offset);
+#ifndef _MHD_NO_DEPR_IN_MACRO
/* 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 */
#define MHD_create_response_from_fd_at_offset(size,fd,offset) \
- _MHD_DEPR_MACRO("Usage of MHD_create_response_from_fd_at_offset() is
deprecated, use MHD_create_response_from_fd_at_offset64()") \
+ _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 */
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r36593 - libmicrohttpd/src/include,
gnunet <=