summaryrefslogtreecommitdiff
path: root/sysdeps/unix/opendir.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-12-06 03:16:46 +0000
committerUlrich Drepper <drepper@redhat.com>2000-12-06 03:16:46 +0000
commit256ba8884797809da49252231ed69f7982ad1a10 (patch)
tree2fafeb4d85a8bdddada9e8cceb2d79d5b5b021e4 /sysdeps/unix/opendir.c
parentc50ec4e093e109363a4d2f25dfe386249080325e (diff)
downloadglibc-256ba8884797809da49252231ed69f7982ad1a10.tar.gz
Update.
2000-12-05 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/aix/Makefile [$(subdir)==misc] (sysdep_routines): Add restf and savef. * sysdeps/unix/sysv/aix/restf.c: New file. * sysdeps/unix/sysv/aix/savef.c: New file. Patches by Michael Keezer <mkeezer@redhat.com>. * sysdeps/unix/opendir.c (__opendir): Don't use o_directory_works if O_DIRECTORY is not defined. Patch by Michael Keezer <mkeezer@redhat.com>. * include/libc-symbols.h (C_SYMBOL_DOT_NAME): Define. Patch by Michael Keezer <mkeezer@redhat.com>. * locale/programs/linereader.c (get_toplvl_escape): Recognize more than 4 bytes in escape sequence. Patch by Shinya Hanataka <hanataka@abyss.rim.or.jp>.
Diffstat (limited to 'sysdeps/unix/opendir.c')
-rw-r--r--sysdeps/unix/opendir.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sysdeps/unix/opendir.c b/sysdeps/unix/opendir.c
index 461f82bc97..927caab70f 100644
--- a/sysdeps/unix/opendir.c
+++ b/sysdeps/unix/opendir.c
@@ -120,11 +120,15 @@ __opendir (const char *name)
O_DIRECTORY flag is honored by the kernel. */
if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &statbuf), 0) < 0)
goto lose;
- if (o_directory_works <= 0
- && __builtin_expect (! S_ISDIR (statbuf.st_mode), 0))
+#ifdef O_DIRECTORY
+ if (o_directory_works <= 0)
+#endif
{
- save_errno = ENOTDIR;
- goto lose;
+ if (__builtin_expect (! S_ISDIR (statbuf.st_mode), 0))
+ {
+ save_errno = ENOTDIR;
+ goto lose;
+ }
}
if (__builtin_expect (__fcntl (fd, F_SETFD, FD_CLOEXEC), 0) < 0)