diff options
author | Eric Blake <ebb9@byu.net> | 2009-12-16 10:07:13 -0700 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-12-16 19:25:36 -0700 |
commit | e4ee142063a2f63f483d32b4ab87387db9130804 (patch) | |
tree | 1b10241bfaebf75e29857b8e73ffc910f29808e5 /modules/fchdir | |
parent | 021c8619190757f535c72ad5cdb1d624e19620d6 (diff) | |
download | gnulib-e4ee142063a2f63f483d32b4ab87387db9130804.tar.gz |
fcntl: use to simplify other modules
Let fcntl do the work, instead of copying code into other modules.
* modules/cloexec (Depends-on): Add fcntl.
* modules/fchdir (Depends-on): Likewise.
* modules/fd-safer-flag (Depends-on): Likewise.
* modules/unistd-safer (Depends-on): Likewise.
* modules/dup3 (configure.ac): Set module indicator.
* m4/fchdir.m4 (gl_FUNC_FCHDIR): Replace fcntl if fchdir is
missing.
* lib/fchdir.c (_gl_register_dup): Fix comment.
* lib/cloexec.c (dup_cloexec): Simplify, by relying on fcntl.
* lib/dup-safer.c (dup_safer): Likewise.
* lib/dup-safer-flag.c (dup_safer_flag): Likewise.
* lib/dup3.c (dup3): Likewise.
* tests/test-fchdir.c (main): Enhance test.
Fixes a dup_cloexec bug reported by Ondřej Vašík.
Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'modules/fchdir')
-rw-r--r-- | modules/fchdir | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/fchdir b/modules/fchdir index 5bae7d611c..46b481fd14 100644 --- a/modules/fchdir +++ b/modules/fchdir @@ -10,6 +10,7 @@ close dirent dirfd dup2 +fcntl fcntl-h include_next malloc-posix |