aboutsummaryrefslogtreecommitdiff
path: root/include/fcntl.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-08-03 04:09:03 +0000
committerUlrich Drepper <drepper@redhat.com>2007-08-03 04:09:03 +0000
commitcbf0489bcf3eebeeba595a514461057a4e2f1e8b (patch)
tree5494b98023b95a29643094578424382515a41724 /include/fcntl.h
parentfa39685d5c7df2502213418bead44e9543a9b9ec (diff)
downloadglibc-cbf0489bcf3eebeeba595a514461057a4e2f1e8b.tar
glibc-cbf0489bcf3eebeeba595a514461057a4e2f1e8b.tar.gz
glibc-cbf0489bcf3eebeeba595a514461057a4e2f1e8b.tar.bz2
glibc-cbf0489bcf3eebeeba595a514461057a4e2f1e8b.zip
* io/Makefile (aux): Add have_o_cloexec.
* include/fcntl.h: Declare __have_o_cloexec. * io/have_o_cloexec.c: New file. * sysdeps/unix/opendir.c (__opendir): Use O_CLOEXEC is available. (__alloc_dir): If O_CLOEXEC has been used, don't duplicate the fcntl call if not necessary. * login/utmp_file.c (setutent_file): Use __have_o_cloexec instead of local variable.
Diffstat (limited to 'include/fcntl.h')
-rw-r--r--include/fcntl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/fcntl.h b/include/fcntl.h
index 1e919befb6..d5e5ddff02 100644
--- a/include/fcntl.h
+++ b/include/fcntl.h
@@ -41,4 +41,8 @@ extern void __atfct_seterrno_2 (int errval, int fd1, const char *buf1,
/* Flag determining whether the *at system calls are available. */
extern int __have_atfcts attribute_hidden;
+#ifdef O_CLOEXEC
+extern int __have_o_cloexec attribute_hidden;
+#endif
+
#endif