aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/opendir.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-09-07 06:21:02 +0000
committerUlrich Drepper <drepper@redhat.com>2000-09-07 06:21:02 +0000
commit675e4015896d39a88264d4db515c6824bdd6bf27 (patch)
tree20986ad19f4aa5662c67e6ba4246241f9dfa4a7a /sysdeps/unix/opendir.c
parent04ba87901c8be7f38906147854e0fc1e4351f486 (diff)
downloadglibc-675e4015896d39a88264d4db515c6824bdd6bf27.tar
glibc-675e4015896d39a88264d4db515c6824bdd6bf27.tar.gz
glibc-675e4015896d39a88264d4db515c6824bdd6bf27.tar.bz2
glibc-675e4015896d39a88264d4db515c6824bdd6bf27.zip
Update.
* sysdeps/unix/opendir.c: If O_DIRECTORY_WORKS is defined don't use the hack with tryopen_o_directory to determine at runtime whether it works. * sysdeps/unix/sysv/linux/opendir.c: New file. * sysdeps/unix/sysv/linux/kernel-features.h: Define __ASSUME_O_DIRECTORY if kernel knows O_DIRECTORY.
Diffstat (limited to 'sysdeps/unix/opendir.c')
-rw-r--r--sysdeps/unix/opendir.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/unix/opendir.c b/sysdeps/unix/opendir.c
index cf030e02f4..ad91931de4 100644
--- a/sysdeps/unix/opendir.c
+++ b/sysdeps/unix/opendir.c
@@ -40,6 +40,10 @@
a guinea pig. It may be missing in chroot environments, so we
make sure to fail safe. */
#ifdef O_DIRECTORY
+# ifdef O_DIRECTORY_WORKS
+# define o_directory_works 1
+# define tryopen_o_directory() while (1) /* This must not be called. */
+# else
static int o_directory_works;
static void
@@ -60,6 +64,7 @@ tryopen_o_directory (void)
__set_errno (serrno);
}
+# endif
# define EXTRA_FLAGS O_DIRECTORY
#else
# define EXTRA_FLAGS 0