fchdir: use more consistent macro convention
authorEric Blake <ebb9@byu.net>
Tue, 1 Sep 2009 15:18:16 +0000 (09:18 -0600)
committerEric Blake <ebb9@byu.net>
Thu, 3 Sep 2009 01:14:45 +0000 (19:14 -0600)
commitdd66a62cc2d76ab463e1167824ea4ca5fd4ef2ae
tree7926e1b2496c9bee62d53ca388b4544bcdd275c0
parent4475e25b6a19e31e5783781f2132cdbd05bcf7c4
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>
12 files changed:
ChangeLog
lib/close.c
lib/dup-safer.c
lib/dup2.c
lib/dup3.c
lib/fcntl.in.h
lib/open.c
lib/sys_stat.in.h
lib/unistd.in.h
m4/fchdir.m4
m4/sys_stat_h.m4
modules/sys_stat