changed configure.ac to detect dirfd() and related stuffs.

changed lib/cmn/syscall.h to use DIRFD related macros produced by configure
This commit is contained in:
2014-09-25 15:27:08 +00:00
parent 45ad42fa36
commit 056cff9192
15 changed files with 137 additions and 54 deletions

View File

@ -372,7 +372,15 @@
#define QSE_OPENDIR(name) opendir(name)
#define QSE_CLOSEDIR(dir) closedir(dir)
#define QSE_REWINDDIR(dir) rewinddir(dir)
#define QSE_DIRFD(dir) dirfd(dir)
#if defined(HAVE_DIRFD)
# define QSE_DIRFD(dir) dirfd(dir)
#elif defined(HAVE_DIR_DD_FD)
# define QSE_DIRFD(dir) ((dir)->dd_fd)
#elif defined(HAVE_DIR_D_FD)
# define QSE_DIRFD(dir) ((dir)->d_fd)
#else
# error OUCH!!! NO DIRFD AVAILABLE
#endif
#define QSE_DIR DIR
#if defined(HAVE_READDIR64)