aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd')
-rw-r--r--src/microhttpd/daemon.c2
-rw-r--r--src/microhttpd/md5.c2
-rw-r--r--src/microhttpd/memorypool.c2
-rw-r--r--src/microhttpd/mhd_align.h6
-rw-r--r--src/microhttpd/mhd_byteorder.h6
-rw-r--r--src/microhttpd/mhd_mono_clock.c4
-rw-r--r--src/microhttpd/mhd_send.c8
-rw-r--r--src/microhttpd/mhd_sockets.c2
-rw-r--r--src/microhttpd/mhd_sockets.h6
-rw-r--r--src/microhttpd/mhd_str.h2
-rw-r--r--src/microhttpd/test_options.c6
-rw-r--r--src/microhttpd/test_shutdown_select.c2
-rw-r--r--src/microhttpd/test_start_stop.c2
13 files changed, 25 insertions, 25 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 086453d8..17cf8393 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -7750,7 +7750,7 @@ MHD_stop_daemon (struct MHD_Daemon *daemon)
7750 mhd_assert (NULL == daemon->cleanup_head); 7750 mhd_assert (NULL == daemon->cleanup_head);
7751 mhd_assert (NULL == daemon->suspended_connections_head); 7751 mhd_assert (NULL == daemon->suspended_connections_head);
7752 mhd_assert (NULL == daemon->new_connections_head); 7752 mhd_assert (NULL == daemon->new_connections_head);
7753#if defined(UPGRADE_SUPPORT) && defined (HTTPS_SUPPORT) 7753#if defined(UPGRADE_SUPPORT) && defined(HTTPS_SUPPORT)
7754 mhd_assert (NULL == daemon->urh_head); 7754 mhd_assert (NULL == daemon->urh_head);
7755#endif /* UPGRADE_SUPPORT && HTTPS_SUPPORT */ 7755#endif /* UPGRADE_SUPPORT && HTTPS_SUPPORT */
7756 7756
diff --git a/src/microhttpd/md5.c b/src/microhttpd/md5.c
index d267e803..8ac56793 100644
--- a/src/microhttpd/md5.c
+++ b/src/microhttpd/md5.c
@@ -150,7 +150,7 @@ MD5Transform (uint32_t state[4],
150 const uint32_t *in; 150 const uint32_t *in;
151 151
152#if (_MHD_BYTE_ORDER == _MHD_LITTLE_ENDIAN) || \ 152#if (_MHD_BYTE_ORDER == _MHD_LITTLE_ENDIAN) || \
153 ! defined (_MHD_GET_32BIT_LE_UNALIGNED) 153 ! defined(_MHD_GET_32BIT_LE_UNALIGNED)
154 if (0 != (((uintptr_t) block) % _MHD_UINT32_ALIGN)) 154 if (0 != (((uintptr_t) block) % _MHD_UINT32_ALIGN))
155 { 155 {
156 /* Copy data to the aligned buffer */ 156 /* Copy data to the aligned buffer */
diff --git a/src/microhttpd/memorypool.c b/src/microhttpd/memorypool.c
index 4408378c..b6f9d63a 100644
--- a/src/microhttpd/memorypool.c
+++ b/src/microhttpd/memorypool.c
@@ -47,7 +47,7 @@
47#endif /* HAVE_SYSCONF */ 47#endif /* HAVE_SYSCONF */
48#include "mhd_limits.h" /* for SIZE_MAX, PAGESIZE / PAGE_SIZE */ 48#include "mhd_limits.h" /* for SIZE_MAX, PAGESIZE / PAGE_SIZE */
49 49
50#if defined(MHD_USE_PAGESIZE_MACRO) || defined (MHD_USE_PAGE_SIZE_MACRO) 50#if defined(MHD_USE_PAGESIZE_MACRO) || defined(MHD_USE_PAGE_SIZE_MACRO)
51#ifndef HAVE_SYSCONF /* Avoid duplicate include */ 51#ifndef HAVE_SYSCONF /* Avoid duplicate include */
52#include <unistd.h> 52#include <unistd.h>
53#endif /* HAVE_SYSCONF */ 53#endif /* HAVE_SYSCONF */
diff --git a/src/microhttpd/mhd_align.h b/src/microhttpd/mhd_align.h
index a4cba166..46fcb0b0 100644
--- a/src/microhttpd/mhd_align.h
+++ b/src/microhttpd/mhd_align.h
@@ -46,10 +46,10 @@
46#endif /* !_MHD_ALIGNOF */ 46#endif /* !_MHD_ALIGNOF */
47 47
48#ifdef _MHD_ALIGNOF 48#ifdef _MHD_ALIGNOF
49#if (defined (__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 9 && \ 49#if (defined(__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 9 && \
50 ! defined(__clang__)) || \ 50 ! defined(__clang__)) || \
51 (defined (__clang__) && __clang_major__ < 8) || \ 51 (defined(__clang__) && __clang_major__ < 8) || \
52 (defined (__clang__) && __clang_major__ < 11 && \ 52 (defined(__clang__) && __clang_major__ < 11 && \
53 defined(__apple_build_version__)) 53 defined(__apple_build_version__))
54/* GCC before 4.9 and clang before 8.0 have incorrect implementation of 'alignof()' 54/* GCC before 4.9 and clang before 8.0 have incorrect implementation of 'alignof()'
55 which returns preferred alignment instead of minimal required alignment */ 55 which returns preferred alignment instead of minimal required alignment */
diff --git a/src/microhttpd/mhd_byteorder.h b/src/microhttpd/mhd_byteorder.h
index 73c14240..3543803f 100644
--- a/src/microhttpd/mhd_byteorder.h
+++ b/src/microhttpd/mhd_byteorder.h
@@ -87,7 +87,7 @@
87#elif defined(__PDP_ENDIAN) && __BYTE_ORDER == __PDP_ENDIAN 87#elif defined(__PDP_ENDIAN) && __BYTE_ORDER == __PDP_ENDIAN
88#define _MHD_BYTE_ORDER _MHD_PDP_ENDIAN 88#define _MHD_BYTE_ORDER _MHD_PDP_ENDIAN
89#endif /* __BYTE_ORDER == __PDP_ENDIAN */ 89#endif /* __BYTE_ORDER == __PDP_ENDIAN */
90#elif defined (BYTE_ORDER) 90#elif defined(BYTE_ORDER)
91#if defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN 91#if defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
92#define _MHD_BYTE_ORDER _MHD_BIG_ENDIAN 92#define _MHD_BYTE_ORDER _MHD_BIG_ENDIAN
93#elif defined(LITTLE_ENDIAN) && BYTE_ORDER == LITTLE_ENDIAN 93#elif defined(LITTLE_ENDIAN) && BYTE_ORDER == LITTLE_ENDIAN
@@ -95,7 +95,7 @@
95#elif defined(PDP_ENDIAN) && BYTE_ORDER == PDP_ENDIAN 95#elif defined(PDP_ENDIAN) && BYTE_ORDER == PDP_ENDIAN
96#define _MHD_BYTE_ORDER _MHD_PDP_ENDIAN 96#define _MHD_BYTE_ORDER _MHD_PDP_ENDIAN
97#endif /* __BYTE_ORDER == _PDP_ENDIAN */ 97#endif /* __BYTE_ORDER == _PDP_ENDIAN */
98#elif defined (_BYTE_ORDER) 98#elif defined(_BYTE_ORDER)
99#if defined(_BIG_ENDIAN) && _BYTE_ORDER == _BIG_ENDIAN 99#if defined(_BIG_ENDIAN) && _BYTE_ORDER == _BIG_ENDIAN
100#define _MHD_BYTE_ORDER _MHD_BIG_ENDIAN 100#define _MHD_BYTE_ORDER _MHD_BIG_ENDIAN
101#elif defined(_LITTLE_ENDIAN) && _BYTE_ORDER == _LITTLE_ENDIAN 101#elif defined(_LITTLE_ENDIAN) && _BYTE_ORDER == _LITTLE_ENDIAN
@@ -122,7 +122,7 @@
122 defined(_M_X64) || defined(_M_AMD64) || defined(i386) || defined(__i386) || \ 122 defined(_M_X64) || defined(_M_AMD64) || defined(i386) || defined(__i386) || \
123 defined(__i386__) || defined(__i486__) || defined(__i586__) || \ 123 defined(__i386__) || defined(__i486__) || defined(__i586__) || \
124 defined(__i686__) || \ 124 defined(__i686__) || \
125 defined(_M_IX86) || defined(_X86_) || defined (__THW_INTEL__) 125 defined(_M_IX86) || defined(_X86_) || defined(__THW_INTEL__)
126/* x86 family is little endian */ 126/* x86 family is little endian */
127#define _MHD_BYTE_ORDER _MHD_LITTLE_ENDIAN 127#define _MHD_BYTE_ORDER _MHD_LITTLE_ENDIAN
128#elif defined(__ARMEB__) || defined(__THUMBEB__) || defined(__AARCH64EB__) || \ 128#elif defined(__ARMEB__) || defined(__THUMBEB__) || defined(__AARCH64EB__) || \
diff --git a/src/microhttpd/mhd_mono_clock.c b/src/microhttpd/mhd_mono_clock.c
index b04153f8..4efddd1b 100644
--- a/src/microhttpd/mhd_mono_clock.c
+++ b/src/microhttpd/mhd_mono_clock.c
@@ -345,7 +345,7 @@ MHD_monotonic_sec_counter_init (void)
345 else 345 else
346 gettime_start = 0; 346 gettime_start = 0;
347 } 347 }
348#elif defined (HAVE_GETTIMEOFDAY) 348#elif defined(HAVE_GETTIMEOFDAY)
349 if (1) 349 if (1)
350 { 350 {
351 struct timeval tv; 351 struct timeval tv;
@@ -488,7 +488,7 @@ MHD_monotonic_msec_counter (void)
488 if (TIME_UTC == timespec_get (&ts, TIME_UTC)) 488 if (TIME_UTC == timespec_get (&ts, TIME_UTC))
489 return (uint64_t) (((uint64_t) (ts.tv_sec - gettime_start)) * 1000 489 return (uint64_t) (((uint64_t) (ts.tv_sec - gettime_start)) * 1000
490 + (ts.tv_nsec / 1000000)); 490 + (ts.tv_nsec / 1000000));
491#elif defined (HAVE_GETTIMEOFDAY) 491#elif defined(HAVE_GETTIMEOFDAY)
492 if (1) 492 if (1)
493 { 493 {
494 struct timeval tv; 494 struct timeval tv;
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 009283d6..18328e7e 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -55,9 +55,9 @@
55#include "mhd_limits.h" 55#include "mhd_limits.h"
56 56
57#ifdef MHD_VECT_SEND 57#ifdef MHD_VECT_SEND
58#if (! defined (HAVE_SENDMSG) || ! defined(MSG_NOSIGNAL)) && \ 58#if (! defined(HAVE_SENDMSG) || ! defined(MSG_NOSIGNAL)) && \
59 defined (MHD_SEND_SPIPE_SUPPRESS_POSSIBLE) && \ 59 defined(MHD_SEND_SPIPE_SUPPRESS_POSSIBLE) && \
60 defined (MHD_SEND_SPIPE_SUPPRESS_NEEDED) 60 defined(MHD_SEND_SPIPE_SUPPRESS_NEEDED)
61#define _MHD_VECT_SEND_NEEDS_SPIPE_SUPPRESSED 1 61#define _MHD_VECT_SEND_NEEDS_SPIPE_SUPPRESSED 1
62#endif /* (!HAVE_SENDMSG || !MSG_NOSIGNAL) && 62#endif /* (!HAVE_SENDMSG || !MSG_NOSIGNAL) &&
63 MHD_SEND_SPIPE_SUPPRESS_POSSIBLE && MHD_SEND_SPIPE_SUPPRESS_NEEDED */ 63 MHD_SEND_SPIPE_SUPPRESS_POSSIBLE && MHD_SEND_SPIPE_SUPPRESS_NEEDED */
@@ -1065,7 +1065,7 @@ MHD_send_hdr_and_body_ (struct MHD_Connection *connection,
1065 msg.msg_iovlen = 2; 1065 msg.msg_iovlen = 2;
1066 1066
1067 ret = sendmsg (s, &msg, MSG_NOSIGNAL_OR_ZERO); 1067 ret = sendmsg (s, &msg, MSG_NOSIGNAL_OR_ZERO);
1068#elif defined (HAVE_WRITEV) 1068#elif defined(HAVE_WRITEV)
1069 ret = writev (s, vector, 2); 1069 ret = writev (s, vector, 2);
1070#endif /* HAVE_WRITEV */ 1070#endif /* HAVE_WRITEV */
1071#endif /* HAVE_SENDMSG || HAVE_WRITEV */ 1071#endif /* HAVE_SENDMSG || HAVE_WRITEV */
diff --git a/src/microhttpd/mhd_sockets.c b/src/microhttpd/mhd_sockets.c
index 064f1aa8..ba459ce5 100644
--- a/src/microhttpd/mhd_sockets.c
+++ b/src/microhttpd/mhd_sockets.c
@@ -526,7 +526,7 @@ MHD_socket_create_listen_ (int pf)
526 nosigpipe_set = (SOCK_NOSIGPIPE_OR_ZERO != 0); 526 nosigpipe_set = (SOCK_NOSIGPIPE_OR_ZERO != 0);
527#endif /* SOCK_NOSIGPIPE || MHD_socket_nosignal_ */ 527#endif /* SOCK_NOSIGPIPE || MHD_socket_nosignal_ */
528 } 528 }
529#elif defined(MHD_WINSOCK_SOCKETS) && defined (WSA_FLAG_NO_HANDLE_INHERIT) 529#elif defined(MHD_WINSOCK_SOCKETS) && defined(WSA_FLAG_NO_HANDLE_INHERIT)
530 fd = WSASocketW (pf, 530 fd = WSASocketW (pf,
531 SOCK_STREAM, 531 SOCK_STREAM,
532 0, 532 0,
diff --git a/src/microhttpd/mhd_sockets.h b/src/microhttpd/mhd_sockets.h
index fb404891..89f7d161 100644
--- a/src/microhttpd/mhd_sockets.h
+++ b/src/microhttpd/mhd_sockets.h
@@ -45,7 +45,7 @@
45#ifdef HAVE_STDDEF_H 45#ifdef HAVE_STDDEF_H
46#include <stddef.h> 46#include <stddef.h>
47#endif /* HAVE_STDDEF_H */ 47#endif /* HAVE_STDDEF_H */
48#if defined(_MSC_FULL_VER) && ! defined (_SSIZE_T_DEFINED) 48#if defined(_MSC_FULL_VER) && ! defined(_SSIZE_T_DEFINED)
49# include <stdint.h> 49# include <stdint.h>
50# define _SSIZE_T_DEFINED 50# define _SSIZE_T_DEFINED
51typedef intptr_t ssize_t; 51typedef intptr_t ssize_t;
@@ -715,10 +715,10 @@ const char *MHD_W32_strerror_winsock_ (int err);
715# define MHD_socket_set_error_(err) ( (MHD_SCKT_MISSING_ERR_CODE_ == (err)) ? \ 715# define MHD_socket_set_error_(err) ( (MHD_SCKT_MISSING_ERR_CODE_ == (err)) ? \
716 (errno = EOPNOTSUPP) : (errno = \ 716 (errno = EOPNOTSUPP) : (errno = \
717 (err)) ) 717 (err)) )
718# elif defined (EFAULT) 718# elif defined(EFAULT)
719# define MHD_socket_set_error_(err) ( (MHD_SCKT_MISSING_ERR_CODE_ == (err)) ? \ 719# define MHD_socket_set_error_(err) ( (MHD_SCKT_MISSING_ERR_CODE_ == (err)) ? \
720 (errno = EFAULT) : (errno = (err)) ) 720 (errno = EFAULT) : (errno = (err)) )
721# elif defined (EINVAL) 721# elif defined(EINVAL)
722# define MHD_socket_set_error_(err) ( (MHD_SCKT_MISSING_ERR_CODE_ == (err)) ? \ 722# define MHD_socket_set_error_(err) ( (MHD_SCKT_MISSING_ERR_CODE_ == (err)) ? \
723 (errno = EINVAL) : (errno = (err)) ) 723 (errno = EINVAL) : (errno = (err)) )
724# else /* !EOPNOTSUPP && !EFAULT && !EINVAL */ 724# else /* !EOPNOTSUPP && !EFAULT && !EINVAL */
diff --git a/src/microhttpd/mhd_str.h b/src/microhttpd/mhd_str.h
index 6455d84e..cdf92067 100644
--- a/src/microhttpd/mhd_str.h
+++ b/src/microhttpd/mhd_str.h
@@ -38,7 +38,7 @@
38#include <stdbool.h> 38#include <stdbool.h>
39#endif /* HAVE_STDBOOL_H */ 39#endif /* HAVE_STDBOOL_H */
40 40
41#if defined(_MSC_FULL_VER) && ! defined (_SSIZE_T_DEFINED) 41#if defined(_MSC_FULL_VER) && ! defined(_SSIZE_T_DEFINED)
42#define _SSIZE_T_DEFINED 42#define _SSIZE_T_DEFINED
43typedef intptr_t ssize_t; 43typedef intptr_t ssize_t;
44#endif /* !_SSIZE_T_DEFINED */ 44#endif /* !_SSIZE_T_DEFINED */
diff --git a/src/microhttpd/test_options.c b/src/microhttpd/test_options.c
index b79ddb01..9283c2e1 100644
--- a/src/microhttpd/test_options.c
+++ b/src/microhttpd/test_options.c
@@ -84,7 +84,7 @@ test_ip_addr_option ()
84{ 84{
85 struct MHD_Daemon *d; 85 struct MHD_Daemon *d;
86 struct sockaddr_in daemon_ip_addr; 86 struct sockaddr_in daemon_ip_addr;
87#if HAVE_INET6 && defined (USE_IPV6_TESTING) 87#if HAVE_INET6 && defined(USE_IPV6_TESTING)
88 struct sockaddr_in6 daemon_ip_addr6; 88 struct sockaddr_in6 daemon_ip_addr6;
89#endif 89#endif
90 90
@@ -93,7 +93,7 @@ test_ip_addr_option ()
93 daemon_ip_addr.sin_port = 0; 93 daemon_ip_addr.sin_port = 0;
94 daemon_ip_addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK); 94 daemon_ip_addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
95 95
96#if HAVE_INET6 && defined (USE_IPV6_TESTING) 96#if HAVE_INET6 && defined(USE_IPV6_TESTING)
97 memset (&daemon_ip_addr6, 0, sizeof (struct sockaddr_in6)); 97 memset (&daemon_ip_addr6, 0, sizeof (struct sockaddr_in6));
98 daemon_ip_addr6.sin6_family = AF_INET6; 98 daemon_ip_addr6.sin6_family = AF_INET6;
99 daemon_ip_addr6.sin6_port = 0; 99 daemon_ip_addr6.sin6_port = 0;
@@ -109,7 +109,7 @@ test_ip_addr_option ()
109 109
110 MHD_stop_daemon (d); 110 MHD_stop_daemon (d);
111 111
112#if HAVE_INET6 && defined (USE_IPV6_TESTING) 112#if HAVE_INET6 && defined(USE_IPV6_TESTING)
113 d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_IPv6, 0, 113 d = MHD_start_daemon (MHD_USE_ERROR_LOG | MHD_USE_IPv6, 0,
114 NULL, NULL, &ahc_echo, NULL, MHD_OPTION_SOCK_ADDR, 114 NULL, NULL, &ahc_echo, NULL, MHD_OPTION_SOCK_ADDR,
115 &daemon_ip_addr6, MHD_OPTION_END); 115 &daemon_ip_addr6, MHD_OPTION_END);
diff --git a/src/microhttpd/test_shutdown_select.c b/src/microhttpd/test_shutdown_select.c
index 0841589c..7c345333 100644
--- a/src/microhttpd/test_shutdown_select.c
+++ b/src/microhttpd/test_shutdown_select.c
@@ -135,7 +135,7 @@ start_socket_listen (int domain)
135#if defined(MHD_POSIX_SOCKETS) && defined(SOCK_CLOEXEC) 135#if defined(MHD_POSIX_SOCKETS) && defined(SOCK_CLOEXEC)
136 fd = socket (domain, SOCK_STREAM | SOCK_CLOEXEC, 0); 136 fd = socket (domain, SOCK_STREAM | SOCK_CLOEXEC, 0);
137 cloexec_set = 1; 137 cloexec_set = 1;
138#elif defined(MHD_WINSOCK_SOCKETS) && defined (WSA_FLAG_NO_HANDLE_INHERIT) 138#elif defined(MHD_WINSOCK_SOCKETS) && defined(WSA_FLAG_NO_HANDLE_INHERIT)
139 fd = WSASocketW (domain, SOCK_STREAM, 0, NULL, 0, WSA_FLAG_NO_HANDLE_INHERIT); 139 fd = WSASocketW (domain, SOCK_STREAM, 0, NULL, 0, WSA_FLAG_NO_HANDLE_INHERIT);
140 cloexec_set = 1; 140 cloexec_set = 1;
141#else /* !SOCK_CLOEXEC */ 141#else /* !SOCK_CLOEXEC */
diff --git a/src/microhttpd/test_start_stop.c b/src/microhttpd/test_start_stop.c
index 34372090..fec35e2c 100644
--- a/src/microhttpd/test_start_stop.c
+++ b/src/microhttpd/test_start_stop.c
@@ -134,7 +134,7 @@ main (int argc,
134 errorCount += testMultithreadedPoolGet (0); 134 errorCount += testMultithreadedPoolGet (0);
135#endif 135#endif
136 errorCount += testExternalGet (); 136 errorCount += testExternalGet ();
137#if defined (MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) 137#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
138 if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_POLL)) 138 if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_POLL))
139 { 139 {
140 errorCount += testInternalGet (MHD_USE_POLL); 140 errorCount += testInternalGet (MHD_USE_POLL);