diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-09-01 10:19:16 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-09-01 10:19:16 +0300 |
commit | a64a0ac77ee5dcfa40c727c53f86fe9c62ff12be (patch) | |
tree | 5760cda170358c1092dc54fc6f1789344c502dc9 | |
parent | ec09d0a88b84508b103aa8d8c826695429d3565d (diff) | |
download | libmicrohttpd-a64a0ac77ee5dcfa40c727c53f86fe9c62ff12be.tar.gz libmicrohttpd-a64a0ac77ee5dcfa40c727c53f86fe9c62ff12be.zip |
Test for stdlib.h presence
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/include/platform.h | 2 | ||||
-rw-r--r-- | src/microhttpd/memorypool.c | 2 | ||||
-rw-r--r-- | src/microhttpd/mhd_compat.h | 2 | ||||
-rw-r--r-- | src/microhttpd/mhd_itc.h | 4 | ||||
-rw-r--r-- | src/microhttpd/mhd_locks.h | 4 | ||||
-rw-r--r-- | src/microhttpd/mhd_threads.c | 2 | ||||
-rw-r--r-- | src/microhttpd/mhd_threads.h | 6 | ||||
-rw-r--r-- | src/microhttpd/sysfdsetsize.c | 2 | ||||
-rw-r--r-- | src/microhttpd/tsearch.c | 2 |
10 files changed, 23 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 6478b67c..a332fca5 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1057,7 +1057,7 @@ AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h time.h sys/mman.h sys/ioctl.h | |||
1057 | sys/socket.h sys/select.h netdb.h netinet/in.h netinet/ip.h netinet/tcp.h arpa/inet.h \ | 1057 | sys/socket.h sys/select.h netdb.h netinet/in.h netinet/ip.h netinet/tcp.h arpa/inet.h \ |
1058 | endian.h machine/endian.h sys/endian.h sys/param.h sys/machine.h sys/byteorder.h machine/param.h sys/isa_defs.h \ | 1058 | endian.h machine/endian.h sys/endian.h sys/param.h sys/machine.h sys/byteorder.h machine/param.h sys/isa_defs.h \ |
1059 | signal.h \ | 1059 | signal.h \ |
1060 | inttypes.h stddef.h unistd.h \ | 1060 | inttypes.h stddef.h stdlib.h unistd.h \ |
1061 | sockLib.h inetLib.h net/if.h], [], [], [AC_INCLUDES_DEFAULT]) | 1061 | sockLib.h inetLib.h net/if.h], [], [], [AC_INCLUDES_DEFAULT]) |
1062 | 1062 | ||
1063 | AC_CHECK_HEADER([[search.h]], | 1063 | AC_CHECK_HEADER([[search.h]], |
diff --git a/src/include/platform.h b/src/include/platform.h index 05fe1cd4..716f23ab 100644 --- a/src/include/platform.h +++ b/src/include/platform.h | |||
@@ -37,7 +37,9 @@ | |||
37 | #include "mhd_options.h" | 37 | #include "mhd_options.h" |
38 | 38 | ||
39 | #include <stdio.h> | 39 | #include <stdio.h> |
40 | #ifdef HAVE_STDLIB_H | ||
40 | #include <stdlib.h> | 41 | #include <stdlib.h> |
42 | #endif /* HAVE_STDLIB_H */ | ||
41 | #include <stdint.h> | 43 | #include <stdint.h> |
42 | #include <string.h> | 44 | #include <string.h> |
43 | #ifdef HAVE_UNISTD_H | 45 | #ifdef HAVE_UNISTD_H |
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 @@ | |||
25 | * @author Karlson2k (Evgeny Grin) | 25 | * @author Karlson2k (Evgeny Grin) |
26 | */ | 26 | */ |
27 | #include "memorypool.h" | 27 | #include "memorypool.h" |
28 | #ifdef HAVE_STDLIB_H | ||
28 | #include <stdlib.h> | 29 | #include <stdlib.h> |
30 | #endif /* HAVE_STDLIB_H */ | ||
29 | #include <string.h> | 31 | #include <string.h> |
30 | #include <stdint.h> | 32 | #include <stdint.h> |
31 | #include "mhd_assert.h" | 33 | #include "mhd_assert.h" |
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 @@ | |||
35 | #define MHD_COMPAT_H 1 | 35 | #define MHD_COMPAT_H 1 |
36 | 36 | ||
37 | #include "mhd_options.h" | 37 | #include "mhd_options.h" |
38 | #ifdef HAVE_STDLIB_H | ||
38 | #include <stdlib.h> | 39 | #include <stdlib.h> |
40 | #endif /* HAVE_STDLIB_H */ | ||
39 | #ifdef HAVE_STRING_H /* for strerror() */ | 41 | #ifdef HAVE_STRING_H /* for strerror() */ |
40 | #include <string.h> | 42 | #include <string.h> |
41 | #endif /* HAVE_STRING_H */ | 43 | #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 @@ | |||
38 | 38 | ||
39 | #ifndef MHD_PANIC | 39 | #ifndef MHD_PANIC |
40 | # include <stdio.h> | 40 | # include <stdio.h> |
41 | # include <stdlib.h> | 41 | # ifdef HAVE_STDLIB_H |
42 | # include <stdlib.h> | ||
43 | # endif /* HAVE_STDLIB_H */ | ||
42 | /* Simple implementation of MHD_PANIC, to be used outside lib */ | 44 | /* Simple implementation of MHD_PANIC, to be used outside lib */ |
43 | # define MHD_PANIC(msg) do { fprintf (stderr, \ | 45 | # define MHD_PANIC(msg) do { fprintf (stderr, \ |
44 | "Abnormal termination at %d line in file %s: %s\n", \ | 46 | "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 @@ | |||
58 | 58 | ||
59 | #ifndef MHD_PANIC | 59 | #ifndef MHD_PANIC |
60 | # include <stdio.h> | 60 | # include <stdio.h> |
61 | # include <stdlib.h> | 61 | # ifdef HAVE_STDLIB_H |
62 | # include <stdlib.h> | ||
63 | # endif /* HAVE_STDLIB_H */ | ||
62 | /* Simple implementation of MHD_PANIC, to be used outside lib */ | 64 | /* Simple implementation of MHD_PANIC, to be used outside lib */ |
63 | # define MHD_PANIC(msg) do { fprintf (stderr, \ | 65 | # define MHD_PANIC(msg) do { fprintf (stderr, \ |
64 | "Abnormal termination at %d line in file %s: %s\n", \ | 66 | "Abnormal termination at %d line in file %s: %s\n", \ |
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 @@ | |||
30 | #include <process.h> | 30 | #include <process.h> |
31 | #endif | 31 | #endif |
32 | #ifdef MHD_USE_THREAD_NAME_ | 32 | #ifdef MHD_USE_THREAD_NAME_ |
33 | #ifdef HAVE_STDLIB_H | ||
33 | #include <stdlib.h> | 34 | #include <stdlib.h> |
35 | #endif /* HAVE_STDLIB_H */ | ||
34 | #ifdef HAVE_PTHREAD_NP_H | 36 | #ifdef HAVE_PTHREAD_NP_H |
35 | #include <pthread_np.h> | 37 | #include <pthread_np.h> |
36 | #endif /* HAVE_PTHREAD_NP_H */ | 38 | #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 @@ | |||
39 | #include "mhd_options.h" | 39 | #include "mhd_options.h" |
40 | #ifdef HAVE_STDDEF_H | 40 | #ifdef HAVE_STDDEF_H |
41 | # include <stddef.h> /* for size_t */ | 41 | # include <stddef.h> /* for size_t */ |
42 | #else /* ! HAVE_STDDEF_H */ | 42 | #elif defined(HAVE_STDLIB_H) |
43 | # include <stdlib.h> /* for size_t */ | 43 | # include <stdlib.h> /* for size_t */ |
44 | #endif /* ! HAVE_STDDEF_H */ | 44 | #else /* ! HAVE_STDLIB_H */ |
45 | # include <stdio.h> /* for size_t */ | ||
46 | #endif /* ! HAVE_STDLIB_H */ | ||
45 | 47 | ||
46 | #if defined(MHD_USE_POSIX_THREADS) | 48 | #if defined(MHD_USE_POSIX_THREADS) |
47 | # undef HAVE_CONFIG_H | 49 | # undef HAVE_CONFIG_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 @@ | |||
33 | #undef FD_SETSIZE | 33 | #undef FD_SETSIZE |
34 | #endif /* FD_SETSIZE */ | 34 | #endif /* FD_SETSIZE */ |
35 | 35 | ||
36 | #ifdef HAVE_STDLIB_H | ||
36 | #include <stdlib.h> | 37 | #include <stdlib.h> |
38 | #endif /* HAVE_STDLIB_H */ | ||
37 | #if defined(__VXWORKS__) || defined(__vxworks) || defined(OS_VXWORKS) | 39 | #if defined(__VXWORKS__) || defined(__vxworks) || defined(OS_VXWORKS) |
38 | #include <sockLib.h> | 40 | #include <sockLib.h> |
39 | #endif /* OS_VXWORKS */ | 41 | #endif /* OS_VXWORKS */ |
diff --git a/src/microhttpd/tsearch.c b/src/microhttpd/tsearch.c index 1d74dcce..971ec276 100644 --- a/src/microhttpd/tsearch.c +++ b/src/microhttpd/tsearch.c | |||
@@ -10,7 +10,9 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "tsearch.h" | 12 | #include "tsearch.h" |
13 | #ifdef HAVE_STDLIB_H | ||
13 | #include <stdlib.h> | 14 | #include <stdlib.h> |
15 | #endif /* HAVE_STDLIB_H */ | ||
14 | 16 | ||
15 | 17 | ||
16 | typedef struct node | 18 | typedef struct node |