From: Ronnie Sahlberg Date: Sun, 14 Apr 2013 17:11:48 +0000 (-0700) Subject: more header include cleanups X-Git-Tag: upstream/1.9.6^2~216 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=00748f36c57324ccc2cb21ac9af45d15821cf675;p=deb_libnfs.git more header include cleanups --- diff --git a/aros/aros_compat.h b/aros/aros_compat.h index 528fdf7..e882967 100644 --- a/aros/aros_compat.h +++ b/aros/aros_compat.h @@ -1,6 +1,9 @@ #ifndef AROS_COMPAT_H #define AROS_COMPAT_H +#include +#include +#include #include #include #include diff --git a/configure.ac b/configure.ac index 7578ef5..70e451b 100644 --- a/configure.ac +++ b/configure.ac @@ -85,6 +85,14 @@ esac dnl Check for poll.h AC_CHECK_HEADERS([poll.h]) +# check for unistd.h +dnl Check for unistd.h +AC_CHECK_HEADERS([unistd.h]) + +# check for sys/ioctl.h +dnl Check for sys/ioctl.h +AC_CHECK_HEADERS([sys/ioctl.h]) + # check for SA_LEN dnl Check if sockaddr data structure includes a "sa_len" AC_CHECK_MEMBER([struct sockaddr.sa_len], diff --git a/examples/nfsclient-async.c b/examples/nfsclient-async.c index d386959..d2b92e3 100644 --- a/examples/nfsclient-async.c +++ b/examples/nfsclient-async.c @@ -17,14 +17,24 @@ /* Example program using the highlevel async interface. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef WIN32 #include "win32_compat.h" #else #include -#include -#include #endif +#ifdef HAVE_POLL_H +#include +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif + #define SERVER "10.1.1.27" #define EXPORT "/VIRTUAL" #define NFSFILE "/BOOKS/Classics/Dracula.djvu" @@ -34,7 +44,7 @@ #include #include #include -#include +#include #include "libnfs-zdr.h" #include "libnfs.h" #include "libnfs-raw.h" diff --git a/examples/nfsclient-bcast.c b/examples/nfsclient-bcast.c index e73cfaf..9f7076b 100644 --- a/examples/nfsclient-bcast.c +++ b/examples/nfsclient-bcast.c @@ -17,19 +17,35 @@ /* Example program using the lowlevel raw broadcast interface. */ - +#ifdef HAVE_CONFIG_H #include "config.h" -#include +#endif + +#ifdef WIN32 +#include "win32_compat.h" +#endif + +#ifdef HAVE_POLL_H +#include +#endif + +#ifdef HAVE_UNISTD_H #include +#endif + +#include #include #include -#include #include #include -#include #include #include #include + +#ifdef HAVE_SYS_IOCTL_H +#include +#endif + #include "libnfs-zdr.h" #include "libnfs.h" #include "libnfs-raw.h" diff --git a/examples/nfsclient-raw.c b/examples/nfsclient-raw.c index 2e55d53..2d5104f 100644 --- a/examples/nfsclient-raw.c +++ b/examples/nfsclient-raw.c @@ -18,15 +18,20 @@ /* Example program using the lowlevel raw interface. * This allow accurate control of the exact commands that are being used. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #ifdef WIN32 #include "win32_compat.h" -#else -#include #endif #define SERVER "10.1.1.27" #define EXPORT "/shared" +#ifdef HAVE_POLL_H +#include +#endif + #include #include #include diff --git a/examples/nfsclient-sync.c b/examples/nfsclient-sync.c index 4bd2c0b..70bd77a 100644 --- a/examples/nfsclient-sync.c +++ b/examples/nfsclient-sync.c @@ -20,20 +20,26 @@ /* Example program using the highlevel sync interface */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef WIN32 #include "win32_compat.h" #pragma comment(lib, "ws2_32.lib") WSADATA wsaData; #else #include -#include #include -#include #ifndef AROS #include #endif #endif +#ifdef HAVE_UNISTD_H +#include +#endif + #ifdef AROS #include "aros_compat.h" #endif diff --git a/lib/init.c b/lib/init.c index e1d4980..6085b68 100644 --- a/lib/init.c +++ b/lib/init.c @@ -11,15 +11,21 @@ You should have received a copy of the GNU Lesser General Public License along with this program; if not, see . */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #ifdef WIN32 #include "win32_compat.h" #else -#include #include #endif/*WIN32*/ #define _GNU_SOURCE +#ifdef HAVE_UNISTD_H +#include +#endif + #include #include #include diff --git a/lib/libnfs-sync.c b/lib/libnfs-sync.c index fe711ac..f2c9ebf 100644 --- a/lib/libnfs-sync.c +++ b/lib/libnfs-sync.c @@ -17,12 +17,14 @@ /* * High level api to nfs filesystems */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef WIN32 #include "win32_compat.h" #else #include -#include -#include #include #include #include @@ -40,14 +42,18 @@ #endif /*AROS*/ #endif /*WIN32*/ -#ifdef HAVE_CONFIG_H -#include "config.h" +#ifdef HAVE_SYS_IOCTL_H +#include #endif #ifdef HAVE_POLL_H #include #endif +#ifdef HAVE_UNISTD_H +#include +#endif + #include #include #include diff --git a/lib/libnfs.c b/lib/libnfs.c index d7b5075..c3df1df 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -17,13 +17,20 @@ /* * High level api to nfs filesystems */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif + #ifdef WIN32 #include "win32_compat.h" #else #include #include -#include #ifdef AROS #include "aros_compat.h" diff --git a/lib/socket.c b/lib/socket.c index 384ba13..b14231e 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -14,26 +14,32 @@ You should have received a copy of the GNU Lesser General Public License along with this program; if not, see . */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef AROS +#include "aros_compat.h" +#endif + #ifdef WIN32 #include "win32_compat.h" #else -#include #include -#include #include #include #endif/*WIN32*/ -#ifdef HAVE_CONFIG_H -#include "config.h" +#ifdef HAVE_POLL_H +#include #endif -#ifdef AROS -#include "aros_compat.h" +#ifdef HAVE_UNISTD_H +#include #endif -#ifdef HAVE_POLL_H -#include +#ifdef HAVE_SYS_IOCTL_H +#include #endif #include