more include cleanups it starts to look almost decent now

libnfs-4.0.0-vitalif
Ronnie Sahlberg 2013-04-14 10:32:01 -07:00
parent 00748f36c5
commit 108c622a95
7 changed files with 54 additions and 38 deletions

View File

@ -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],

View File

@ -17,16 +17,15 @@
/* Example program showing sync interface to probe for all local servers
*/
#ifdef AROS
#include "aros_compat.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#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;

View File

@ -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 <unistd.h>
#endif
#ifdef AROS
#include "aros_compat.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

View File

@ -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;

View File

@ -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 <netdb.h>
#include <sys/socket.h>
#include <net/if.h>
#endif /*WIN32*/
#ifdef AROS
#include "aros_compat.h"
#else
#ifdef ANDROID
#include <netinet/in.h>
#include <sys/vfs.h>
#define statvfs statfs
#else
#endif
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
#ifdef HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>
#endif /*ANDRIOD*/
#endif /*AROS*/
#endif /*WIN32*/
#endif
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>

View File

@ -21,31 +21,35 @@
#include "config.h"
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#ifdef AROS
#include "aros_compat.h"
#endif
#ifdef WIN32
#include "win32_compat.h"
#else
#include <strings.h>
#include <utime.h>
#ifdef AROS
#include "aros_compat.h"
#else
#ifdef ANDROID
#include <sys/vfs.h>
#define statvfs statfs
#else
#include <sys/statvfs.h>
#endif /*ANDROID*/
#endif /*AROS*/
#endif /*WIN32*/
#ifdef ANDROID
#define statvfs statfs
#endif
#define _GNU_SOURCE
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
#ifdef HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>
#endif
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>

View File

@ -14,6 +14,10 @@
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#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;