Mercurial > hg > octave-nkf > gnulib-hg
diff lib/dirent.in.h @ 11992:a1e0b2efc812
fchdir: improve use of replacement functions
* m4/fchdir.m4 (gl_FUNC_FCHDIR): Set appropriate witnesses.
* m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add REPLACE_FSTAT.
* m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Add REPLACE_OPENDIR,
REPLACE_CLOSEDIR.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_DUP.
* modules/sys_stat (Makefile.am): Substitute correct witness.
* modules/dirent (Makefile.am): Likewise.
* modules/unistd (Makefile.am): Likewise.
* lib/dirent.in.h (opendir, closedir): Use better witnesses.
* lib/unistd.in.h (dup): Likewise.
* lib/sys_stat.in.h (fstat): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Tue, 15 Sep 2009 15:54:43 -0600 |
parents | 80567a8f98f8 |
children | bda9467a9d66 |
line wrap: on
line diff
--- a/lib/dirent.in.h +++ b/lib/dirent.in.h @@ -35,15 +35,11 @@ /* Declare overridden functions. */ -#if @REPLACE_FCHDIR@ -# define opendir rpl_opendir -extern DIR * opendir (const char *); +#if @REPLACE_CLOSEDIR@ # define closedir rpl_closedir extern int closedir (DIR *); #endif -/* Declare other POSIX functions. */ - #if @GNULIB_DIRFD@ # if !@HAVE_DECL_DIRFD@ && !defined dirfd /* Return the file descriptor associated with the given directory stream, @@ -75,6 +71,11 @@ fdopendir (f)) #endif +#if @REPLACE_OPENDIR@ +# define opendir rpl_opendir +extern DIR * opendir (const char *); +#endif + #if @GNULIB_SCANDIR@ /* Scan the directory DIR, calling FILTER on each directory entry. Entries for which FILTER returns nonzero are individually malloc'd,