libmicrohttpd

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

commit 9d7457a50da919532717a9b5531e38d2d2f65083
parent b9a1777c15389049d3b2b3ba777dd84009e10dcc
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Tue,  7 Sep 2021 21:00:34 +0300

microhttpd.h: changed macros MHD_CONTENT_READER_*

Macros are used with ssize_t values and described in doxy as "-1" and "-2"
Let's define them as described.

Diffstat:
Msrc/include/microhttpd.h | 11+++--------
1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h @@ -96,7 +96,7 @@ extern "C" * they are parsed as decimal numbers. * Example: 0x01093001 = 1.9.30-1. */ -#define MHD_VERSION 0x00097311 +#define MHD_VERSION 0x00097312 /* If generic headers don't work on your platform, include headers which define 'va_list', 'size_t', 'ssize_t', 'intptr_t', @@ -184,13 +184,8 @@ enum MHD_Result #define MHD_SIZE_UNKNOWN ((uint64_t) -1LL) #endif -#ifdef SIZE_MAX -#define MHD_CONTENT_READER_END_OF_STREAM SIZE_MAX -#define MHD_CONTENT_READER_END_WITH_ERROR (SIZE_MAX - 1) -#else -#define MHD_CONTENT_READER_END_OF_STREAM ((size_t) -1LL) -#define MHD_CONTENT_READER_END_WITH_ERROR (((size_t) -1LL) - 1) -#endif +#define MHD_CONTENT_READER_END_OF_STREAM ((ssize_t) -1) +#define MHD_CONTENT_READER_END_WITH_ERROR ((ssize_t) -2) #ifndef _MHD_EXTERN #if defined(_WIN32) && defined(MHD_W32LIB)