mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
use ifdef for several HAVE header macros
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -70,32 +70,32 @@
|
||||
#endif /* HAVE_INETLIB_H */
|
||||
#endif /* __VXWORKS__ */
|
||||
|
||||
#if HAVE_MEMORY_H
|
||||
#ifdef HAVE_MEMORY_H
|
||||
#include <memory.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_SELECT_H
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_SYS_TIME_H
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#if HAVE_SYS_STAT_H
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#if HAVE_SYS_MSG_H
|
||||
#ifdef HAVE_SYS_MSG_H
|
||||
#include <sys/msg.h>
|
||||
#endif
|
||||
#if HAVE_SYS_MMAN_H
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
#if HAVE_TIME_H
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#if defined(_WIN32) && ! defined(__CYGWIN__)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
#include "internal.h"
|
||||
#include "daemon_ip_limit.h"
|
||||
#if HAVE_SEARCH_H
|
||||
#ifdef HAVE_SEARCH_H
|
||||
#include <search.h>
|
||||
#else
|
||||
#include "tsearch.h"
|
||||
@@ -50,7 +50,7 @@ struct MHD_IPCount
|
||||
* IPv4 address.
|
||||
*/
|
||||
struct in_addr ipv4;
|
||||
#if HAVE_INET6
|
||||
#ifdef HAVE_INET6
|
||||
/**
|
||||
* IPv6 address.
|
||||
*/
|
||||
@@ -154,7 +154,7 @@ MHD_ip_addr_to_key (const struct sockaddr *addr,
|
||||
return MHD_YES;
|
||||
}
|
||||
|
||||
#if HAVE_INET6
|
||||
#ifdef HAVE_INET6
|
||||
/* IPv6 addresses */
|
||||
if (sizeof (struct sockaddr_in6) == addrlen)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* @author Christian Grothoff
|
||||
*/
|
||||
#include "internal.h"
|
||||
#if HAVE_DLFCN_H
|
||||
#ifdef HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ open_listen_socket (struct MHD_Daemon *daemon)
|
||||
} /* switch on ss_family */
|
||||
break; /* MHD_AF_NONE */
|
||||
case MHD_AF_AUTO:
|
||||
#if HAVE_INET6
|
||||
#ifdef HAVE_INET6
|
||||
pf = PF_INET6;
|
||||
use_v6 = true;
|
||||
#else
|
||||
@@ -213,7 +213,7 @@ open_listen_socket (struct MHD_Daemon *daemon)
|
||||
break;
|
||||
case MHD_AF_INET6:
|
||||
case MHD_AF_DUAL:
|
||||
#if HAVE_INET6
|
||||
#ifdef HAVE_INET6
|
||||
pf = PF_INET6;
|
||||
use_v6 = true;
|
||||
break;
|
||||
@@ -296,7 +296,7 @@ try_open_listen_socket:
|
||||
else
|
||||
{
|
||||
/* Compute bind address based on port and AF */
|
||||
#if HAVE_INET6
|
||||
#ifdef HAVE_INET6
|
||||
if (use_v6)
|
||||
{
|
||||
#ifdef IN6ADDR_ANY_INIT
|
||||
@@ -633,7 +633,7 @@ MHD_polling_thread (void *cls)
|
||||
MHD_YES);
|
||||
break;
|
||||
case MHD_ELS_POLL:
|
||||
#if HAVE_POLL
|
||||
#ifdef HAVE_POLL
|
||||
MHD_daemon_poll_ (daemon,
|
||||
MHD_YES);
|
||||
#else
|
||||
@@ -834,7 +834,7 @@ MHD_daemon_start (struct MHD_Daemon *daemon)
|
||||
daemon->event_loop_syscall = MHD_ELS_POLL;
|
||||
else
|
||||
daemon->event_loop_syscall = MHD_ELS_EPOLL;
|
||||
#elif HAVE_POLL
|
||||
#elif defined(HAVE_POLL)
|
||||
daemon->event_loop_syscall = MHD_ELS_POLL;
|
||||
#else
|
||||
daemon->event_loop_syscall = MHD_ELS_SELECT;
|
||||
|
||||
@@ -28,39 +28,39 @@
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
#if HAVE_ENDIAN_H
|
||||
#ifdef HAVE_ENDIAN_H
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_PARAM_H
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_MACHINE_ENDIAN_H
|
||||
#ifdef HAVE_MACHINE_ENDIAN_H
|
||||
#include <machine/endian.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_ENDIAN_H
|
||||
#ifdef HAVE_SYS_ENDIAN_H
|
||||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_BYTEORDER_H
|
||||
#ifdef HAVE_SYS_BYTEORDER_H
|
||||
#include <sys/byteorder.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_MACHINE_H
|
||||
#ifdef HAVE_SYS_MACHINE_H
|
||||
#include <sys/machine.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_MACHINE_PARAM_H
|
||||
#ifdef HAVE_MACHINE_PARAM_H
|
||||
#include <machine/param.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_ISA_DEFS_H
|
||||
#ifdef HAVE_SYS_ISA_DEFS_H
|
||||
#include <sys/isa_defs.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -37,22 +37,22 @@
|
||||
#if defined(__VXWORKS__) || defined(__vxworks) || defined(OS_VXWORKS)
|
||||
#include <sockLib.h>
|
||||
#endif /* OS_VXWORKS */
|
||||
#if HAVE_SYS_SELECT_H
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif /* HAVE_SYS_SELECT_H */
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif /* HAVE_SYS_TYPES_H */
|
||||
#if HAVE_SYS_TIME_H
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif /* HAVE_SYS_TIME_H */
|
||||
#if HAVE_TIME_H
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif /* HAVE_TIME_H */
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif /* HAVE_UNISTD_H */
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif /* HAVE_SYS_SOCKET_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user