From b3b89ab95e626286ad2fe9ccf5b589f153e5aa37 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 5 Dec 2008 11:34:45 +0100 Subject: [PATCH] More explicit use of #if HAVE_...header's. --- src/ber_int.c | 3 ++- src/daemon.c | 3 ++- src/log.c | 2 ++ src/tcpdchk.c | 16 +++++++--------- src/tcpip.c | 11 ++++++++--- src/tpath.c | 4 ++++ 6 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/ber_int.c b/src/ber_int.c index f0680fb..5524096 100644 --- a/src/ber_int.c +++ b/src/ber_int.c @@ -23,7 +23,8 @@ #ifdef WIN32 #include -#else +#endif +#if HAVE_NETINET_IN_H #include #endif diff --git a/src/daemon.c b/src/daemon.c index 1824ef0..f0ccd3e 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -19,12 +19,13 @@ #include #endif #include -#include #if HAVE_SYS_WAIT_H #include #endif +#if HAVE_SYS_TYPES_H #include +#endif #if HAVE_SYS_STAT_H #include diff --git a/src/log.c b/src/log.c index 47464fe..40baf7f 100644 --- a/src/log.c +++ b/src/log.c @@ -16,7 +16,9 @@ #include #endif +#if HAVE_SYS_STAT_H #include +#endif #include #include #include diff --git a/src/tcpdchk.c b/src/tcpdchk.c index d19f8f6..98bdc2b 100644 --- a/src/tcpdchk.c +++ b/src/tcpdchk.c @@ -10,24 +10,22 @@ #include #include +#ifdef WIN32 +#include +#endif + #if HAVE_SYS_TYPES_H #include #endif -#ifdef WIN32 -#include -#else +#if HAVE_NETINET_IN_H #include -#include -#include -#include #endif -#if HAVE_SYS_SOCKET_H -#include +#if HAVE_NETDB_H +#include #endif -#include #include #include #include diff --git a/src/tcpip.c b/src/tcpip.c index fcdcce1..add2d32 100644 --- a/src/tcpip.c +++ b/src/tcpip.c @@ -25,7 +25,6 @@ #endif #ifdef WIN32 - /* VS 2003 or later has getaddrinfo; older versions do not */ #include #if _MSC_VER >= 1300 @@ -34,14 +33,20 @@ #else #define HAVE_GETADDRINFO 0 #endif +#endif -#else +#if HAVE_NETINET_IN_H #include +#endif +#if HAVE_NETDB_H #include +#endif +#if HAVE_ARPA_INET_H #include +#endif +#if HAVE_NETINET_TCP_H #include #endif - #if HAVE_SYS_SOCKET_H #include #endif diff --git a/src/tpath.c b/src/tpath.c index d4eb5b5..3599ddc 100644 --- a/src/tpath.c +++ b/src/tpath.c @@ -17,8 +17,12 @@ #include #include #include +#if HAVE_SYS_TYPES_H #include +#endif +#if HAVE_SYS_STAT_H #include +#endif #if HAVE_UNISTD_H #include #endif -- 1.7.10.4