[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 03/08: Guard stddef.h includes with '#ifdef HAVE_STDDEF_
From: |
gnunet |
Subject: |
[libmicrohttpd] 03/08: Guard stddef.h includes with '#ifdef HAVE_STDDEF_H' |
Date: |
Wed, 01 Sep 2021 10:23:36 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit f66a23d27116ade5876d7e23d8c077091cd572e9
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Sep 1 10:47:40 2021 +0300
Guard stddef.h includes with '#ifdef HAVE_STDDEF_H'
---
src/include/platform.h | 2 ++
src/microhttpd/md5.h | 2 ++
src/microhttpd/memorypool.h | 2 ++
src/microhttpd/mhd_sockets.h | 2 ++
src/microhttpd/mhd_str.h | 2 ++
src/microhttpd/sha1.h | 4 +++-
src/microhttpd/sha256.h | 4 +++-
src/microhttpd/tsearch.c | 9 ++++++---
8 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/src/include/platform.h b/src/include/platform.h
index 716f23ab..b5861d25 100644
--- 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
index 6c2a33f5..14cee305 100644
--- 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
index 11355a87..955fea4d 100644
--- 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
index 18f831a9..c8c1df2e 100644
--- 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
index b21ae256..a03dc49f 100644
--- 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
index 3464f268..851a4429 100644
--- 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
index 3b866af2..cac3cb28 100644
--- 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
index 971ec276..0a65ce94 100644
--- 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
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] branch master updated (e42ec8f5 -> 99f31f05), gnunet, 2021/09/01
- [libmicrohttpd] 01/08: mhd_mono_clock: clarified doxy, gnunet, 2021/09/01
- [libmicrohttpd] 03/08: Guard stddef.h includes with '#ifdef HAVE_STDDEF_H',
gnunet <=
- [libmicrohttpd] 06/08: configure: moved sys/stat.h to optional headers, gnunet, 2021/09/01
- [libmicrohttpd] 04/08: configure: removed check for unused math.h header, gnunet, 2021/09/01
- [libmicrohttpd] 07/08: configure: removed sys/types.h duplicated check, gnunet, 2021/09/01
- [libmicrohttpd] 05/08: configure: removed check for unused locale.h header, gnunet, 2021/09/01
- [libmicrohttpd] 08/08: configure: added stdint.h to the list of required headers, gnunet, 2021/09/01
- [libmicrohttpd] 02/08: Test for stdlib.h presence, gnunet, 2021/09/01