summaryrefslogtreecommitdiff
path: root/m4/dirent_h.m4
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-08-31 20:37:59 -0600
committerEric Blake <ebb9@byu.net>2009-09-02 19:14:47 -0600
commitd1aa3e40286ed2b0ad1045b326a37167ac5d8847 (patch)
tree32d49df867d41bdbf658a777b1198285f50f68eb /m4/dirent_h.m4
parentdd66a62cc2d76ab463e1167824ea4ca5fd4ef2ae (diff)
downloadgnulib-d1aa3e40286ed2b0ad1045b326a37167ac5d8847.tar.gz
fdopendir: split into its own module
* lib/openat.c (fdopendir): Move... * lib/fdopendir.c: ...into new file. * modules/fdopendir: New module. * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): New file. * modules/openat (Depends-on): Add fdopendir. * m4/openat.m4 (gl_FUNC_OPENAT): No longer need to check for fdopendir here. * modules/savedir (Depends-on): Only need fdopendir, not full openat. * lib/savedir.c (include): Use <dirent.h>, not "openat.h". * lib/openat.h (fdopendir): Drop prototype. * lib/dirent.in.h (fdopendir): Provide prototype. * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Add replacements. * modules/dirent (Makefile.am): Substitute them. * MODULES.html.sh (File system functions): Mention it. * doc/posix-functions/fdopendir.texi (fdopendir): Likewise. * modules/fdopendir-tests: New file. * tests/test-fdopendir.c: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'm4/dirent_h.m4')
-rw-r--r--m4/dirent_h.m410
1 files changed, 6 insertions, 4 deletions
diff --git a/m4/dirent_h.m4 b/m4/dirent_h.m4
index e507e3de8c..06fffefc15 100644
--- a/m4/dirent_h.m4
+++ b/m4/dirent_h.m4
@@ -33,11 +33,13 @@ AC_DEFUN([gl_DIRENT_H_DEFAULTS],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
GNULIB_DIRFD=0; AC_SUBST([GNULIB_DIRFD])
+ GNULIB_FDOPENDIR=0; AC_SUBST([GNULIB_FDOPENDIR])
GNULIB_SCANDIR=0; AC_SUBST([GNULIB_SCANDIR])
GNULIB_ALPHASORT=0; AC_SUBST([GNULIB_ALPHASORT])
dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_DECL_DIRFD=1; AC_SUBST([HAVE_DECL_DIRFD])
- HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR])
- HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT])
- DIRENT_H=''; AC_SUBST([DIRENT_H])
+ HAVE_DECL_DIRFD=1; AC_SUBST([HAVE_DECL_DIRFD])
+ HAVE_FDOPENDIR=1; AC_SUBST([HAVE_FDOPENDIR])
+ HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR])
+ HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT])
+ DIRENT_H=''; AC_SUBST([DIRENT_H])
])