From c56364c6e43a5c8655e1c3e9e17c69672493bf6d Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Fri, 6 Aug 2004 09:50:34 +0000 Subject: [PATCH] use dirfd-autoconf test git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@741 423420c4-83ab-492f-b58f-81f9feb106b5 --- configure.ac | 4 ++++ disk.c | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 0ccf9a9..eabceac 100644 --- a/configure.ac +++ b/configure.ac @@ -154,6 +154,10 @@ else fi AC_SUBST(SOUNDOBJ) +# +# dirfd +# +UTILS_FUNC_DIRFD # # debugging diff --git a/disk.c b/disk.c index 4903a3b..a9e31f9 100644 --- a/disk.c +++ b/disk.c @@ -20,16 +20,6 @@ #include "disk.h" -#if (defined(sun) && (defined(__svr4__) || defined(__SVR4))) -#define SOLARIS -#endif - -#if (defined(SOLARIS) || defined(__hpux)) -#define DIRFD(a) ((a)->dd_fd) -#else -#define DIRFD(a) (dirfd(a)) -#endif - #include #include #include @@ -41,6 +31,16 @@ #include #include /* ctime */ +#if defined(HAVE_DIRFD) +#define DIRFD(a) (dirfd(a)) +#else +#define DIRFD(a) ((a)->DIR_FD_MEMBER_NAME) +#endif + +/* TODO: let autoconf figure out everything below... */ +#if (defined(sun) && (defined(__svr4__) || defined(__SVR4))) +#define SOLARIS +#endif #if (defined(SOLARIS) || defined (__hpux) || defined(__BEOS__)) #include /* solaris statvfs */