gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] branch master updated (e42ec8f5 -> 99f31f05)


From: gnunet
Subject: [libmicrohttpd] branch master updated (e42ec8f5 -> 99f31f05)
Date: Wed, 01 Sep 2021 10:23:33 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from e42ec8f5 Switched internal timers to milliseconds resolutions.
     new ec09d0a8 mhd_mono_clock: clarified doxy
     new a64a0ac7 Test for stdlib.h presence
     new f66a23d2 Guard stddef.h includes with '#ifdef HAVE_STDDEF_H'
     new 2ec7a17a configure: removed check for unused math.h header
     new 6942c692 configure: removed check for unused locale.h header
     new b21d5bba configure: moved sys/stat.h to optional headers
     new 2452f03c configure: removed sys/types.h duplicated check
     new 99f31f05 configure: added stdint.h to the list of required headers

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 configure.ac                    | 7 ++++---
 src/include/platform.h          | 4 ++++
 src/microhttpd/md5.h            | 2 ++
 src/microhttpd/memorypool.c     | 2 ++
 src/microhttpd/memorypool.h     | 2 ++
 src/microhttpd/mhd_compat.h     | 2 ++
 src/microhttpd/mhd_itc.h        | 4 +++-
 src/microhttpd/mhd_locks.h      | 4 +++-
 src/microhttpd/mhd_mono_clock.c | 5 +++--
 src/microhttpd/mhd_mono_clock.h | 5 +++--
 src/microhttpd/mhd_sockets.h    | 2 ++
 src/microhttpd/mhd_str.h        | 4 ++++
 src/microhttpd/mhd_threads.c    | 2 ++
 src/microhttpd/mhd_threads.h    | 6 ++++--
 src/microhttpd/sha1.h           | 4 +++-
 src/microhttpd/sha256.h         | 4 +++-
 src/microhttpd/sysfdsetsize.c   | 2 ++
 src/microhttpd/tsearch.c        | 7 ++++++-
 18 files changed, 54 insertions(+), 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6478b67c..b73f3cc3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1050,14 +1050,15 @@ fd = epoll_create1(EPOLL_CLOEXEC);]])],
     AC_DEFINE([[HAVE_EPOLL_CREATE1]], [[1]], [Define if you have epoll_create1 
function.])]))
 
 # Check for headers that are ALWAYS required
-AC_CHECK_HEADERS_ONCE([fcntl.h math.h errno.h limits.h stdio.h locale.h 
sys/stat.h sys/types.h], [], [AC_MSG_ERROR([Compiling libmicrohttpd requires 
standard UNIX headers files])], [AC_INCLUDES_DEFAULT])
+AC_CHECK_HEADERS_ONCE([fcntl.h errno.h limits.h stdio.h stdint.h], [],
+  [AC_MSG_ERROR([Compiling libmicrohttpd requires standard UNIX headers 
files])], [AC_INCLUDES_DEFAULT])
 
 # Check for optional headers
 AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h time.h sys/mman.h 
sys/ioctl.h \
   sys/socket.h sys/select.h netdb.h netinet/in.h netinet/ip.h netinet/tcp.h 
arpa/inet.h \
   endian.h machine/endian.h sys/endian.h sys/param.h sys/machine.h 
sys/byteorder.h machine/param.h sys/isa_defs.h \
-  signal.h \
-  inttypes.h stddef.h unistd.h \
+  signal.h sys/stat.h \
+  inttypes.h stddef.h stdlib.h unistd.h \
   sockLib.h inetLib.h net/if.h], [], [], [AC_INCLUDES_DEFAULT])
 
 AC_CHECK_HEADER([[search.h]],
diff --git a/src/include/platform.h b/src/include/platform.h
index 05fe1cd4..b5861d25 100644
--- a/src/include/platform.h
+++ b/src/include/platform.h
@@ -37,7 +37,9 @@
 #include "mhd_options.h"
 
 #include <stdio.h>
+#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
+#endif /* HAVE_STDLIB_H */
 #include <stdint.h>
 #include <string.h>
 #ifdef HAVE_UNISTD_H
@@ -47,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.c b/src/microhttpd/memorypool.c
index adda0e98..f6883b08 100644
--- a/src/microhttpd/memorypool.c
+++ b/src/microhttpd/memorypool.c
@@ -25,7 +25,9 @@
  * @author Karlson2k (Evgeny Grin)
  */
 #include "memorypool.h"
+#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
+#endif /* HAVE_STDLIB_H */
 #include <string.h>
 #include <stdint.h>
 #include "mhd_assert.h"
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_compat.h b/src/microhttpd/mhd_compat.h
index 4062c101..37b9744d 100644
--- a/src/microhttpd/mhd_compat.h
+++ b/src/microhttpd/mhd_compat.h
@@ -35,7 +35,9 @@
 #define MHD_COMPAT_H 1
 
 #include "mhd_options.h"
+#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
+#endif /* HAVE_STDLIB_H */
 #ifdef HAVE_STRING_H /* for strerror() */
 #include <string.h>
 #endif /* HAVE_STRING_H */
diff --git a/src/microhttpd/mhd_itc.h b/src/microhttpd/mhd_itc.h
index a7cad0e1..27b36392 100644
--- a/src/microhttpd/mhd_itc.h
+++ b/src/microhttpd/mhd_itc.h
@@ -38,7 +38,9 @@
 
 #ifndef MHD_PANIC
 #  include <stdio.h>
-#  include <stdlib.h>
+#  ifdef HAVE_STDLIB_H
+#    include <stdlib.h>
+#  endif /* HAVE_STDLIB_H */
 /* Simple implementation of MHD_PANIC, to be used outside lib */
 #  define MHD_PANIC(msg) do { fprintf (stderr,           \
                                        "Abnormal termination at %d line in 
file %s: %s\n", \
diff --git a/src/microhttpd/mhd_locks.h b/src/microhttpd/mhd_locks.h
index 2ef7747e..654ecb6c 100644
--- a/src/microhttpd/mhd_locks.h
+++ b/src/microhttpd/mhd_locks.h
@@ -58,7 +58,9 @@
 
 #ifndef MHD_PANIC
 #  include <stdio.h>
-#  include <stdlib.h>
+#  ifdef HAVE_STDLIB_H
+#    include <stdlib.h>
+#  endif /* HAVE_STDLIB_H */
 /* Simple implementation of MHD_PANIC, to be used outside lib */
 #  define MHD_PANIC(msg) do { fprintf (stderr,           \
                                        "Abnormal termination at %d line in 
file %s: %s\n", \
diff --git a/src/microhttpd/mhd_mono_clock.c b/src/microhttpd/mhd_mono_clock.c
index cc93ddfb..8af998fa 100644
--- a/src/microhttpd/mhd_mono_clock.c
+++ b/src/microhttpd/mhd_mono_clock.c
@@ -132,7 +132,7 @@ enum _MHD_mono_clock_source
 
 
 /**
- * Initialise monotonic seconds counter.
+ * Initialise monotonic seconds and milliseconds counters.
  */
 void
 MHD_monotonic_sec_counter_init (void)
@@ -356,7 +356,8 @@ MHD_monotonic_sec_counter_init (void)
 
 
 /**
- * Deinitialise monotonic seconds counter by freeing any allocated resources
+ * Deinitialise monotonic seconds  and milliseconds counters by freeing
+ * any allocated resources
  */
 void
 MHD_monotonic_sec_counter_finish (void)
diff --git a/src/microhttpd/mhd_mono_clock.h b/src/microhttpd/mhd_mono_clock.h
index 5f048e7e..f7a3d4a8 100644
--- a/src/microhttpd/mhd_mono_clock.h
+++ b/src/microhttpd/mhd_mono_clock.h
@@ -35,14 +35,15 @@
 #include <stdint.h>
 
 /**
- * Initialise monotonic seconds counter.
+ * Initialise monotonic seconds and milliseconds counters.
  */
 void
 MHD_monotonic_sec_counter_init (void);
 
 
 /**
- * Deinitialise monotonic seconds counter by freeing any allocated resources
+ * Deinitialise monotonic seconds  and milliseconds counters by freeing
+ * any allocated resources
  */
 void
 MHD_monotonic_sec_counter_finish (void);
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..4a72e35e 100644
--- a/src/microhttpd/mhd_str.h
+++ b/src/microhttpd/mhd_str.h
@@ -28,8 +28,12 @@
 
 #include "mhd_options.h"
 #include <stdint.h>
+#ifdef HAVE_STDDEF_H
 #include <stddef.h>
+#endif /* HAVE_STDDEF_H */
+#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
 #ifdef HAVE_STDBOOL_H
 #include <stdbool.h>
 #endif /* HAVE_STDBOOL_H */
diff --git a/src/microhttpd/mhd_threads.c b/src/microhttpd/mhd_threads.c
index 3a63cff1..52aba875 100644
--- a/src/microhttpd/mhd_threads.c
+++ b/src/microhttpd/mhd_threads.c
@@ -30,7 +30,9 @@
 #include <process.h>
 #endif
 #ifdef MHD_USE_THREAD_NAME_
+#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
+#endif /* HAVE_STDLIB_H */
 #ifdef HAVE_PTHREAD_NP_H
 #include <pthread_np.h>
 #endif /* HAVE_PTHREAD_NP_H */
diff --git a/src/microhttpd/mhd_threads.h b/src/microhttpd/mhd_threads.h
index dcc7b09a..14612ded 100644
--- a/src/microhttpd/mhd_threads.h
+++ b/src/microhttpd/mhd_threads.h
@@ -39,9 +39,11 @@
 #include "mhd_options.h"
 #ifdef HAVE_STDDEF_H
 #  include <stddef.h> /* for size_t */
-#else  /* ! HAVE_STDDEF_H */
+#elif defined(HAVE_STDLIB_H)
 #  include <stdlib.h> /* for size_t */
-#endif /* ! HAVE_STDDEF_H */
+#else /* ! HAVE_STDLIB_H */
+#  include <stdio.h>  /* for size_t */
+#endif /* ! HAVE_STDLIB_H */
 
 #if defined(MHD_USE_POSIX_THREADS)
 #  undef HAVE_CONFIG_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/sysfdsetsize.c b/src/microhttpd/sysfdsetsize.c
index 4929b3d2..8268e274 100644
--- a/src/microhttpd/sysfdsetsize.c
+++ b/src/microhttpd/sysfdsetsize.c
@@ -33,7 +33,9 @@
 #undef FD_SETSIZE
 #endif /* FD_SETSIZE */
 
+#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
+#endif /* HAVE_STDLIB_H */
 #if defined(__VXWORKS__) || defined(__vxworks) || defined(OS_VXWORKS)
 #include <sockLib.h>
 #endif /* OS_VXWORKS */
diff --git a/src/microhttpd/tsearch.c b/src/microhttpd/tsearch.c
index 1d74dcce..0a65ce94 100644
--- a/src/microhttpd/tsearch.c
+++ b/src/microhttpd/tsearch.c
@@ -10,7 +10,12 @@
  */
 
 #include "tsearch.h"
-#include <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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]