From: Ronnie Sahlberg Date: Sun, 14 Apr 2013 17:32:01 +0000 (-0700) Subject: more include cleanups it starts to look almost decent now X-Git-Tag: upstream/1.9.6^2~215 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=108c622a9561676b4df437c318959f79e42d4675;p=deb_libnfs.git more include cleanups it starts to look almost decent now --- diff --git a/configure.ac b/configure.ac index 70e451b..8141179 100644 --- a/configure.ac +++ b/configure.ac @@ -93,6 +93,14 @@ AC_CHECK_HEADERS([unistd.h]) dnl Check for sys/ioctl.h AC_CHECK_HEADERS([sys/ioctl.h]) +# check for sys/vfs.h +dnl Check for sys/vfs.h +AC_CHECK_HEADERS([sys/vfs.h]) + +# check for sys/statvfs.h +dnl Check for sys/statvfs.h +AC_CHECK_HEADERS([sys/statvfs.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-listservers.c b/examples/nfsclient-listservers.c index 9bec6a7..db71520 100644 --- a/examples/nfsclient-listservers.c +++ b/examples/nfsclient-listservers.c @@ -17,16 +17,15 @@ /* Example program showing sync interface to probe for all local servers */ +#ifdef AROS +#include "aros_compat.h" +#endif #include #include #include "libnfs-zdr.h" #include "libnfs.h" -#ifdef AROS -#include "aros_compat.h" -#endif - int main(int argc _U_, char *argv[] _U_) { struct nfs_server_list *srvrs; diff --git a/examples/nfsclient-sync.c b/examples/nfsclient-sync.c index 70bd77a..72aa312 100644 --- a/examples/nfsclient-sync.c +++ b/examples/nfsclient-sync.c @@ -24,6 +24,10 @@ #include "config.h" #endif +#ifdef AROS +#include "aros_compat.h" +#endif + #ifdef WIN32 #include "win32_compat.h" #pragma comment(lib, "ws2_32.lib") @@ -40,10 +44,6 @@ WSADATA wsaData; #include #endif -#ifdef AROS -#include "aros_compat.h" -#endif - #include #include #include diff --git a/lib/init.c b/lib/init.c index 6085b68..ecac1e7 100644 --- a/lib/init.c +++ b/lib/init.c @@ -15,6 +15,10 @@ #include "config.h" #endif +#ifdef AROS +#include "aros_compat.h" +#endif + #ifdef WIN32 #include "win32_compat.h" #else @@ -38,10 +42,6 @@ #include "libnfs-raw.h" #include "libnfs-private.h" -#ifdef AROS -#include "aros_compat.h" -#endif - struct rpc_context *rpc_init_context(void) { struct rpc_context *rpc; diff --git a/lib/libnfs-sync.c b/lib/libnfs-sync.c index f2c9ebf..0527bbf 100644 --- a/lib/libnfs-sync.c +++ b/lib/libnfs-sync.c @@ -21,6 +21,10 @@ #include "config.h" #endif +#ifdef AROS +#include "aros_compat.h" +#endif + #ifdef WIN32 #include "win32_compat.h" #else @@ -28,19 +32,20 @@ #include #include #include +#endif /*WIN32*/ -#ifdef AROS -#include "aros_compat.h" -#else #ifdef ANDROID #include -#include #define statvfs statfs -#else +#endif + +#ifdef HAVE_SYS_VFS_H +#include +#endif + +#ifdef HAVE_SYS_STATVFS_H #include -#endif /*ANDRIOD*/ -#endif /*AROS*/ -#endif /*WIN32*/ +#endif #ifdef HAVE_SYS_IOCTL_H #include diff --git a/lib/libnfs.c b/lib/libnfs.c index c3df1df..c07a8e8 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -21,31 +21,35 @@ #include "config.h" #endif -#ifdef HAVE_UNISTD_H -#include +#ifdef AROS +#include "aros_compat.h" #endif #ifdef WIN32 #include "win32_compat.h" #else - #include #include +#endif /*WIN32*/ -#ifdef AROS -#include "aros_compat.h" -#else #ifdef ANDROID -#include #define statvfs statfs -#else -#include -#endif /*ANDROID*/ -#endif /*AROS*/ -#endif /*WIN32*/ +#endif #define _GNU_SOURCE +#ifdef HAVE_UNISTD_H +#include +#endif + +#ifdef HAVE_SYS_VFS_H +#include +#endif + +#ifdef HAVE_SYS_STATVFS_H +#include +#endif + #include #include #include diff --git a/lib/pdu.c b/lib/pdu.c index e4f296b..5dff517 100644 --- a/lib/pdu.c +++ b/lib/pdu.c @@ -14,6 +14,10 @@ You should have received a copy of the GNU Lesser General Public License along with this program; if not, see . */ +#ifdef AROS +#include "aros_compat.h" +#endif + #ifdef WIN32 #include "win32_compat.h" #else @@ -33,10 +37,6 @@ #include "libnfs-raw.h" #include "libnfs-private.h" -#ifdef AROS -#include "aros_compat.h" -#endif - struct rpc_pdu *rpc_allocate_pdu(struct rpc_context *rpc, int program, int version, int procedure, rpc_cb cb, void *private_data, zdrproc_t zdr_decode_fn, int zdr_decode_bufsize) { struct rpc_pdu *pdu;