autoconf test for dirfd and dd_fd
This commit is contained in:
@@ -392,6 +392,25 @@ AC_FOREACH([rk_func], [strsvis strsvisx strunvis strvis strvisx svis unvis vis],
|
||||
#include <vis.h>
|
||||
#endif], rk_func)])
|
||||
|
||||
AC_MSG_CHECKING([checking for dirfd])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||
#ifdef HAVE_DIRENT_H
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
]],
|
||||
[[DIR *d = 0; dirfd(d);]])],
|
||||
[ac_rk_have_dirfd=yes], [ac_rk_have_dirfd=no])
|
||||
if test "$ac_rk_have_dirfd" = "yes" ; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_DIRFD, 1, [have a dirfd function/macro])
|
||||
fi
|
||||
AC_MSG_RESULT($ac_rk_have_dirfd)
|
||||
|
||||
AC_HAVE_STRUCT_FIELD(struct dirent, dd_fd, [#include <sys/types.h>
|
||||
#ifdef HAVE_DIRENT_H
|
||||
#include <dirent.h>
|
||||
#endif])
|
||||
|
||||
|
||||
AC_BROKEN2(inet_aton,
|
||||
[#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
|
Reference in New Issue
Block a user