summaryrefslogtreecommitdiff
path: root/dirent
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-08-19 20:57:48 +0000
committerUlrich Drepper <drepper@redhat.com>1999-08-19 20:57:48 +0000
commite5cd813b4321685f7611fe1031ae1205c6a1a86f (patch)
treec5e353c4d68c45b14cf01dc54ebd23ee19841221 /dirent
parent6229c88e862c624e41129cf550cbc6d98085d23c (diff)
Update.
* dirent/Makefile (routines): Add getdents64. * sysdeps/unix/sysv/linux/Makefile [dirent] (sysdep_routines): Remove getdents64. * dirent/dirent.h: Redirect getdirentries to getdirentries64 if compiled with _FILE_OFFSET_BITS=64. * sysdeps/generic/getdents64.c: New file. * sysdeps/unix/sysv/linux/getdirentries.c: Also redefine off_t and __lseek for getdirentries64 definition. * sysdeps/unix/sysv/linux/llseek.c: Make __lseek64 a strong alias. * sysdeps/unix/sysv/linux/sys/sendfile.h: Don't allow use with _FILE_OFFSET_BITS=64.
Diffstat (limited to 'dirent')
-rw-r--r--dirent/Makefile4
-rw-r--r--dirent/dirent.h17
2 files changed, 19 insertions, 2 deletions
diff --git a/dirent/Makefile b/dirent/Makefile
index aebbd64b5f..6040a3a744 100644
--- a/dirent/Makefile
+++ b/dirent/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+# Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@ subdir := dirent
headers := dirent.h bits/dirent.h
routines := opendir closedir readdir readdir_r rewinddir \
seekdir telldir scandir alphasort versionsort \
- getdents dirfd readdir64 readdir64_r scandir64 \
+ getdents getdents64 dirfd readdir64 readdir64_r scandir64 \
alphasort64 versionsort64
distribute := dirstream.h
diff --git a/dirent/dirent.h b/dirent/dirent.h
index f64c7fcfa5..29b9cd59cf 100644
--- a/dirent/dirent.h
+++ b/dirent/dirent.h
@@ -287,10 +287,27 @@ extern int versionsort64 __P ((__const __ptr_t __e1, __const __ptr_t __e2));
Reading starts at offset *BASEP, and *BASEP is updated with the new
position after reading. Returns the number of bytes read; zero when at
end of directory; or -1 for errors. */
+# ifndef __USE_FILE_OFFSET64
extern __ssize_t getdirentries __P ((int __fd, char *__restrict __buf,
size_t __nbytes,
__off_t *__restrict __basep));
+# else
+# ifdef __REDIRECT
+extern __ssize_t __REDIRECT (getdirentries,
+ __P ((int __fd, char *__restrict __buf,
+ size_t __nbytes,
+ __off_t *__restrict __basep)),
+ getdirentries64);
+# else
+# define getdirentries getdirentries64
+# endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern __ssize_t getdirentries64 __P ((int __fd, char *__restrict __buf,
+ size_t __nbytes,
+ __off64_t *__restrict __basep));
+# endif
#endif /* Use BSD or misc. */