diff options
author | Eric Blake <ebb9@byu.net> | 2009-08-31 20:37:59 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-09-02 19:14:47 -0600 |
commit | d1aa3e40286ed2b0ad1045b326a37167ac5d8847 (patch) | |
tree | 32d49df867d41bdbf658a777b1198285f50f68eb /modules | |
parent | dd66a62cc2d76ab463e1167824ea4ca5fd4ef2ae (diff) | |
download | gnulib-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 'modules')
-rw-r--r-- | modules/dirent | 2 | ||||
-rw-r--r-- | modules/fdopendir | 30 | ||||
-rw-r--r-- | modules/fdopendir-tests | 13 | ||||
-rw-r--r-- | modules/openat | 1 | ||||
-rw-r--r-- | modules/savedir | 2 |
5 files changed, 47 insertions, 1 deletions
diff --git a/modules/dirent b/modules/dirent index 8df7c354aa..3eb7411f1a 100644 --- a/modules/dirent +++ b/modules/dirent @@ -25,9 +25,11 @@ dirent.h: dirent.in.h -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \ -e 's|@''GNULIB_DIRFD''@|$(GNULIB_DIRFD)|g' \ + -e 's|@''GNULIB_FDOPENDIR''@|$(GNULIB_FDOPENDIR)|g' \ -e 's|@''GNULIB_SCANDIR''@|$(GNULIB_SCANDIR)|g' \ -e 's|@''GNULIB_ALPHASORT''@|$(GNULIB_ALPHASORT)|g' \ -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \ + -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \ -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \ -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \ -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \ diff --git a/modules/fdopendir b/modules/fdopendir new file mode 100644 index 0000000000..7a90aa367f --- /dev/null +++ b/modules/fdopendir @@ -0,0 +1,30 @@ +Description: +Open a directory stream from a file descriptor. + +Files: +lib/fdopendir.c +lib/openat-priv.h +lib/openat-proc.c +m4/fdopendir.m4 + +Depends-on: +extensions +dirent +fchdir +openat-die +save-cwd + +configure.ac: +gl_FUNC_FDOPENDIR +gl_DIRENT_MODULE_INDICATOR([fdopendir]) + +Makefile.am: + +Include: +<dirent.h> + +License: +GPL + +Maintainer: +Jim Meyering, Eric Blake diff --git a/modules/fdopendir-tests b/modules/fdopendir-tests new file mode 100644 index 0000000000..9df5e293ad --- /dev/null +++ b/modules/fdopendir-tests @@ -0,0 +1,13 @@ +Files: +tests/test-fdopendir.c + +Depends-on: +open +progname + +configure.ac: + +Makefile.am: +TESTS += test-fdopendir +check_PROGRAMS += test-fdopendir +test_fdopendir_LDADD = $(LDADD) @LIBINTL@ diff --git a/modules/openat b/modules/openat index 561687d9d0..5c326a07d5 100644 --- a/modules/openat +++ b/modules/openat @@ -18,6 +18,7 @@ Depends-on: dirname extensions fchdir +fdopendir gettext-h intprops lchown diff --git a/modules/savedir b/modules/savedir index e781af76b2..4171b802c1 100644 --- a/modules/savedir +++ b/modules/savedir @@ -7,7 +7,7 @@ lib/savedir.c m4/savedir.m4 Depends-on: -openat +fdopendir xalloc configure.ac: |