diff options
Diffstat (limited to 'src/include/microhttpd.h')
-rw-r--r-- | src/include/microhttpd.h | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index 838fe65a..5bcb58ec 100644 --- a/src/include/microhttpd.h +++ b/src/include/microhttpd.h | |||
@@ -198,6 +198,9 @@ typedef SOCKET MHD_socket; | |||
198 | */ | 198 | */ |
199 | #ifdef MHD_NO_DEPRECATION | 199 | #ifdef MHD_NO_DEPRECATION |
200 | #define _MHD_DEPR_MACRO(msg) | 200 | #define _MHD_DEPR_MACRO(msg) |
201 | #define _MHD_NO_DEPR_IN_MACRO 1 | ||
202 | #define _MHD_DEPR_IN_MACRO(msg) | ||
203 | #define _MHD_NO_DEPR_FUNC 1 | ||
201 | #define _MHD_DEPR_FUNC(msg) | 204 | #define _MHD_DEPR_FUNC(msg) |
202 | #endif /* MHD_NO_DEPRECATION */ | 205 | #endif /* MHD_NO_DEPRECATION */ |
203 | 206 | ||
@@ -227,12 +230,14 @@ typedef SOCKET MHD_socket; | |||
227 | /* clang handles inline pragmas better than GCC */ | 230 | /* clang handles inline pragmas better than GCC */ |
228 | #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg) | 231 | #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg) |
229 | #endif /* clang >= 2.9 */ | 232 | #endif /* clang >= 2.9 */ |
230 | #endif | 233 | #endif /* older clang or GCC */ |
231 | /* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if required */ | 234 | /* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if required */ |
232 | #else /* other compilers */ | 235 | #endif /* clang || GCC >= 3.0 */ |
236 | #endif /* !_MHD_DEPR_MACRO */ | ||
237 | |||
238 | #ifndef _MHD_DEPR_MACRO | ||
233 | #define _MHD_DEPR_MACRO(msg) | 239 | #define _MHD_DEPR_MACRO(msg) |
234 | #endif | 240 | #endif /* !_MHD_DEPR_MACRO */ |
235 | #endif /* _MHD_DEPR_MACRO */ | ||
236 | 241 | ||
237 | #ifndef _MHD_DEPR_IN_MACRO | 242 | #ifndef _MHD_DEPR_IN_MACRO |
238 | #define _MHD_NO_DEPR_IN_MACRO 1 | 243 | #define _MHD_NO_DEPR_IN_MACRO 1 |
@@ -255,10 +260,13 @@ typedef SOCKET MHD_socket; | |||
255 | /* old GCC-style deprecation do not support custom messages */ | 260 | /* old GCC-style deprecation do not support custom messages */ |
256 | #define _MHD_DEPR_FUNC(msg) __attribute__((__deprecated__)) | 261 | #define _MHD_DEPR_FUNC(msg) __attribute__((__deprecated__)) |
257 | /* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if required */ | 262 | /* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if required */ |
258 | #else /* other compilers */ | 263 | #endif /* clang < 2.9 || GCC >= 3.1 */ |
264 | #endif /* !_MHD_DEPR_FUNC */ | ||
265 | |||
266 | #ifndef _MHD_DEPR_FUNC | ||
267 | #define _MHD_NO_DEPR_FUNC 1 | ||
259 | #define _MHD_DEPR_FUNC(msg) | 268 | #define _MHD_DEPR_FUNC(msg) |
260 | #endif | 269 | #endif /* !_MHD_DEPR_FUNC */ |
261 | #endif /* _MHD_DEPR_FUNC */ | ||
262 | 270 | ||
263 | /** | 271 | /** |
264 | * Not all architectures and `printf()`'s support the `long long` type. | 272 | * Not all architectures and `printf()`'s support the `long long` type. |
@@ -2161,13 +2169,13 @@ MHD_create_response_from_fd_at_offset (size_t size, | |||
2161 | int fd, | 2169 | int fd, |
2162 | off_t offset); | 2170 | off_t offset); |
2163 | 2171 | ||
2164 | #ifndef _MHD_NO_DEPR_IN_MACRO | 2172 | #if !defined(_MHD_NO_DEPR_IN_MACRO) || defined(_MHD_NO_DEPR_FUNC) |
2165 | /* Substitute MHD_create_response_from_fd_at_offset64() instead of MHD_create_response_from_fd_at_offset() | 2173 | /* Substitute MHD_create_response_from_fd_at_offset64() instead of MHD_create_response_from_fd_at_offset() |
2166 | to minimize possible problems with different off_t options */ | 2174 | to minimize potential problems with different off_t sizes */ |
2167 | #define MHD_create_response_from_fd_at_offset(size,fd,offset) \ | 2175 | #define MHD_create_response_from_fd_at_offset(size,fd,offset) \ |
2168 | _MHD_DEPR_IN_MACRO("Usage of MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \ | 2176 | _MHD_DEPR_IN_MACRO("Usage of MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \ |
2169 | MHD_create_response_from_fd_at_offset64((size),(fd),(offset)) | 2177 | MHD_create_response_from_fd_at_offset64((size),(fd),(offset)) |
2170 | #endif /* ! _MHD_NO_DEPR_IN_MACRO */ | 2178 | #endif /* !_MHD_NO_DEPR_IN_MACRO || _MHD_NO_DEPR_FUNC */ |
2171 | 2179 | ||
2172 | 2180 | ||
2173 | /** | 2181 | /** |