libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit e52e1575df8f09bfa50ffd0847e37ceb646540f3
parent d474f26d159b4ba9d84ca8100f98cab4ff2e2eef
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Wed,  3 Jun 2015 21:28:05 +0000

microhttpd.h: add defines for deprecating functions

Diffstat:
Msrc/include/microhttpd.h | 19+++++++++++++++++++
1 file changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h @@ -198,6 +198,7 @@ typedef SOCKET MHD_socket; */ #ifdef MHD_NO_DEPRECATION #define _MHD_DEPR_MACRO(msg) +#define _MHD_DEPR_FUNC(msg) #endif /* MHD_NO_DEPRECATION */ #ifndef _MHD_DEPR_MACRO @@ -221,6 +222,24 @@ typedef SOCKET MHD_socket; #endif #endif /* _MHD_DEPR_MACRO */ +#ifndef _MHD_DEPR_FUNC +#if defined(_MSC_FULL_VER) && _MSC_VER+0 >= 1400 +#define _MHD_DEPR_FUNC(msg) __declspec(deprecated(msg)) +#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)) +#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 */ +#define _MHD_DEPR_FUNC(msg) __attribute__((__deprecated__)) +/* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if required */ +#else /* other compilers */ +#define _MHD_DEPR_FUNC(msg) +#endif +#endif /* _MHD_DEPR_FUNC */ + /** * Not all architectures and `printf()`'s support the `long long` type. * This gives the ability to replace `long long` with just a `long`,