New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.
authorBruno Haible <bruno@clisp.org>
Mon, 12 Sep 2011 23:37:35 +0000 (01:37 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 12 Sep 2011 23:39:18 +0000 (01:39 +0200)
commit994c21f30d225cd35a8fa57851df8bc6bd66d97f
tree9973bc77402821c421aa3340575345b81a357687
parentfcb7180c0ff873e26b9ea0aa7ef753df20104384
New modules 'opendir', 'readdir', 'rewinddir', 'closedir'.

* lib/dirent.in.h (struct dirent): New type.
(DT_UNKNOWN, DT_FIFO, DT_CHR, DT_DIR, DT_BLK, DT_REG, DT_LNK, DT_SOCK,
DT_WHT): New macros.
(DIR): New type.
(opendir, closedir): Declare only if the module 'opendir' is enabled.
(readdir, rewinddir): New declarations.
* lib/dirent-private.h: New file.
* lib/opendir.c: New file.
* lib/readdir.c: New file.
* lib/rewinddir.c: New file.
* lib/closedir.c: New file.
* lib/fchdir.c (rpl_closedir, rpl_opendir): Remove functions.
* m4/opendir.m4: New file.
* m4/readdir.m4: New file.
* m4/rewinddir.m4: New file.
* m4/closedir.m4: New file.
* m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't set REPLACE_OPENDIR,
REPLACE_CLOSEDIR here.
* m4/dirent_h.m4 (gl_DIRENT_H): Also check whether closedir, opendir,
readdir, rewinddir are declared.
(gl_DIRENT_H_DEFAULTS): Initialize GNULIB_OPENDIR, GNULIB_READDIR,
GNULIB_REWINDDIR, GNULIB_CLOSEDIR, HAVE_OPENDIR, HAVE_READDIR,
HAVE_REWINDDIR, HAVE_CLOSEDIR.
* modules/dirent (Makefile.am): Substitute GNULIB_OPENDIR,
GNULIB_READDIR, GNULIB_REWINDDIR, GNULIB_CLOSEDIR, HAVE_OPENDIR,
HAVE_READDIR, HAVE_REWINDDIR, HAVE_CLOSEDIR.
* modules/opendir: New file.
* modules/readdir: New file.
* modules/rewinddir: New file.
* modules/closedir: New file.
* doc/posix-functions/opendir.texi: Mention the 'opendir' module.
* doc/posix-functions/readdir.texi: Mention the 'readdir' module.
* doc/posix-functions/rewinddir.texi: Mention the 'rewinddir' module.
* doc/posix-functions/closedir.texi: Mention the 'closedir' module.
* NEWS: Mention the 'fchdir' change.
24 files changed:
ChangeLog
NEWS
doc/posix-functions/closedir.texi
doc/posix-functions/opendir.texi
doc/posix-functions/readdir.texi
doc/posix-functions/rewinddir.texi
lib/closedir.c [new file with mode: 0644]
lib/dirent-private.h [new file with mode: 0644]
lib/dirent.in.h
lib/fchdir.c
lib/opendir.c [new file with mode: 0644]
lib/readdir.c [new file with mode: 0644]
lib/rewinddir.c [new file with mode: 0644]
m4/closedir.m4 [new file with mode: 0644]
m4/dirent_h.m4
m4/fchdir.m4
m4/opendir.m4 [new file with mode: 0644]
m4/readdir.m4 [new file with mode: 0644]
m4/rewinddir.m4 [new file with mode: 0644]
modules/closedir [new file with mode: 0644]
modules/dirent
modules/opendir [new file with mode: 0644]
modules/readdir [new file with mode: 0644]
modules/rewinddir [new file with mode: 0644]