libmicrohttpd

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

commit f66a23d27116ade5876d7e23d8c077091cd572e9
parent a64a0ac77ee5dcfa40c727c53f86fe9c62ff12be
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Wed,  1 Sep 2021 10:47:40 +0300

Guard stddef.h includes with '#ifdef HAVE_STDDEF_H'

Diffstat:
Msrc/include/platform.h | 2++
Msrc/microhttpd/md5.h | 2++
Msrc/microhttpd/memorypool.h | 2++
Msrc/microhttpd/mhd_sockets.h | 2++
Msrc/microhttpd/mhd_str.h | 2++
Msrc/microhttpd/sha1.h | 4+++-
Msrc/microhttpd/sha256.h | 4+++-
Msrc/microhttpd/tsearch.c | 9++++++---
8 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/src/include/platform.h b/src/include/platform.h @@ -49,7 +49,9 @@ #include <errno.h> #include <fcntl.h> #include <signal.h> +#ifdef HAVE_STDDEF_H #include <stddef.h> +#endif /* HAVE_STDDEF_H */ /* different OSes have fd_set in a broad range of header files; diff --git a/src/microhttpd/md5.h b/src/microhttpd/md5.h @@ -20,7 +20,9 @@ #include "mhd_options.h" #include <stdint.h> +#ifdef HAVE_STDDEF_H #include <stddef.h> +#endif /* HAVE_STDDEF_H */ #define MD5_BLOCK_SIZE 64 #define MD5_DIGEST_SIZE 16 diff --git a/src/microhttpd/memorypool.h b/src/microhttpd/memorypool.h @@ -31,7 +31,9 @@ #define MEMORYPOOL_H #include "mhd_options.h" +#ifdef HAVE_STDDEF_H #include <stddef.h> +#endif /* HAVE_STDDEF_H */ #ifdef HAVE_STDBOOL_H #include <stdbool.h> #endif diff --git a/src/microhttpd/mhd_sockets.h b/src/microhttpd/mhd_sockets.h @@ -115,7 +115,9 @@ # include <poll.h> #endif +#ifdef HAVE_STDDEF_H #include <stddef.h> +#endif /* HAVE_STDDEF_H */ #if defined(_MSC_FULL_VER) && ! defined (_SSIZE_T_DEFINED) # include <stdint.h> # define _SSIZE_T_DEFINED diff --git a/src/microhttpd/mhd_str.h b/src/microhttpd/mhd_str.h @@ -28,7 +28,9 @@ #include "mhd_options.h" #include <stdint.h> +#ifdef HAVE_STDDEF_H #include <stddef.h> +#endif /* HAVE_STDDEF_H */ #include <sys/types.h> #ifdef HAVE_STDBOOL_H #include <stdbool.h> diff --git a/src/microhttpd/sha1.h b/src/microhttpd/sha1.h @@ -28,7 +28,9 @@ #include "mhd_options.h" #include <stdint.h> -#include <stddef.h> /* for size_t */ +#ifdef HAVE_STDDEF_H +#include <stddef.h> /* for size_t */ +#endif /* HAVE_STDDEF_H */ /** * SHA-1 digest is kept internally as 5 32-bit words. diff --git a/src/microhttpd/sha256.h b/src/microhttpd/sha256.h @@ -28,7 +28,9 @@ #include "mhd_options.h" #include <stdint.h> -#include <stddef.h> +#ifdef HAVE_STDDEF_H +#include <stddef.h> /* for size_t */ +#endif /* HAVE_STDDEF_H */ /** diff --git a/src/microhttpd/tsearch.c b/src/microhttpd/tsearch.c @@ -10,9 +10,12 @@ */ #include "tsearch.h" -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif /* HAVE_STDLIB_H */ +#include "mhd_options.h" +#ifdef HAVE_STDDEF_H +#include <stddef.h> +#else /* ! HAVE_STDDEF_H */ +#define NULL ((void*)0) +#endif /* ! HAVE_STDDEF_H */ typedef struct node