mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-26 04:09:30 +03:00
microhttpd.h: add defines for deprecating functions
This commit is contained in:
@@ -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`,
|
||||
|
||||
Reference in New Issue
Block a user