"Fossies" - the Fresh Open Source Software Archive 
Member "amavisd-milter-1.7.2/aclocal/dirfd.m4" (6 Jan 2019, 761 Bytes) of package /linux/privat/amavisd-milter-1.7.2.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 # Find out how to get the file descriptor associated with an open DIR*.
2
3 AC_DEFUN([AC_CHECK_DIRFD],
4 [
5 AH_TEMPLATE([HAVE_DIRFD_AS_MACRO], [Define if dirfd() is a macro.])
6 AC_REQUIRE([AC_PROG_CPP])
7 AC_REQUIRE([AC_PROG_EGREP])
8 AC_HEADER_DIRENT
9 AC_CHECK_MEMBERS([DIR.d_fd, DIR.dd_fd, DIR.__dd_fd],
10 [], [], [#include <dirent.h>])
11 AC_CHECK_FUNCS([dirfd])
12 AS_IF([test "$ac_cv_func_dirfd" = no],
13 [AC_CACHE_CHECK([whether dirfd is a macro], [ac_cv_func_dirfd_macro],
14 [AC_EGREP_CPP([func_dirfd_macro], [
15 #include <dirent.h>
16 #if defined(dirfd)
17 func_dirfd_macro
18 #endif],[ac_cv_func_dirfd_macro=yes],[ac_cv_func_dirfd_macro=no]
19 )
20 ])
21 ])
22 if test "$ac_cv_func_dirfd_macro" = yes; then
23 AC_DEFINE([HAVE_DIRFD_AS_MACRO], [1])
24 fi
25 ])