diff options
author | Eric Blake <ebb9@byu.net> | 2009-09-01 09:18:16 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-09-02 19:14:45 -0600 |
commit | dd66a62cc2d76ab463e1167824ea4ca5fd4ef2ae (patch) | |
tree | 7926e1b2496c9bee62d53ca388b4544bcdd275c0 /lib/dup-safer.c | |
parent | 4475e25b6a19e31e5783781f2132cdbd05bcf7c4 (diff) | |
download | gnulib-dd66a62cc2d76ab463e1167824ea4ca5fd4ef2ae.tar.gz |
fchdir: use more consistent macro convention
* lib/fcntl.in.h (_gl_register_fd): Move declaration to unistd.
* lib/sys_stat.in.h (rpl_fstat): Declare via make-time
REPLACE_FCHDIR, rather than relying on config.h macros.
* lib/unistd.in.h (fchdir): Move all fchdir internal declarations
inside a single make-time REPLACE_FCHDIR block, rather than using
the config.h FCHDIR_REPLACEMENT.
* m4/fchdir.m4 (gl_FUNC_FCHDIR): REPLACE_FCHDIR was already
AC_SUBST'd, also AC_DEFINE it. Don't define FCHDIR_REPLACEMENT.
Manage fstat replacement.
* m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Pick up
REPLACE_FCHDIR.
* modules/sys_stat (Files): Add m4/unistd_h.m4.
(Makefile.am): Substitute REPLACE_FCHDIR.
* lib/close.c (rpl_close): Use REPLACE_FCHDIR, not
FCHDIR_REPLACEMENT.
* lib/dup-safer.c (dup_safer): Likewise.
* lib/dup2.c (rpl_dup2): Likewise.
* lib/dup3.c (rpl_dup3): Likewise.
* lib/open.c (rpl_open): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'lib/dup-safer.c')
-rw-r--r-- | lib/dup-safer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dup-safer.c b/lib/dup-safer.c index 7d9b2be349..22b96babf5 100644 --- a/lib/dup-safer.c +++ b/lib/dup-safer.c @@ -32,7 +32,7 @@ int dup_safer (int fd) { -#if defined F_DUPFD && !defined FCHDIR_REPLACEMENT +#if defined F_DUPFD && !REPLACE_FCHDIR return fcntl (fd, F_DUPFD, STDERR_FILENO + 1); #else /* fd_safer calls us back, but eventually the recursion unwinds and |