diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-03-20 12:06:55 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-03-20 12:06:55 +0000 |
commit | 89a9e37b7a7a2134cedb6d27db265a8ab774f9d1 (patch) | |
tree | 19131b4a9aa63f7737c683a57a00b1b37bf7b701 /dirent/dirent.h | |
parent | 9c1a1da9866c22c1626f2222cf5d03ef1b0ede3b (diff) | |
download | glibc-89a9e37b7a7a2134cedb6d27db265a8ab774f9d1.tar glibc-89a9e37b7a7a2134cedb6d27db265a8ab774f9d1.tar.gz glibc-89a9e37b7a7a2134cedb6d27db265a8ab774f9d1.tar.bz2 glibc-89a9e37b7a7a2134cedb6d27db265a8ab774f9d1.zip |
Update.
1998-03-20 11:58 Ulrich Drepper <drepper@cygnus.com>
* dirent/Makefile (routines): Add scandir64, alphasort64, and
versionsort64.
* dirent/alphasort64.c: New file.
* dirent/scandir64.c: New file.
* dirent/versionsort64.c: New file.
* dirent/dirent.h: Add LFS support for scandir, alphasort, and
versionsort.
* sysdeps/generic/readdir64.c: Rename to __readdir64 and make
old name weak alias.
* sysdeps/unix/sysv/linux/readdir64.c: Likewise.
* dirent/alphasort.c: Use strcoll instead of strcmp.
* dirent/scandir.c: Optimize a bit.
* dirent/versionsort.c: Pretty print.
1998-03-20 Ulrich Drepper <drepper@cygnus.com>
* string/string.h: Add prototype for __strtok_r.
Diffstat (limited to 'dirent/dirent.h')
-rw-r--r-- | dirent/dirent.h | 46 |
1 files changed, 39 insertions, 7 deletions
diff --git a/dirent/dirent.h b/dirent/dirent.h index 63986bfc0f..07d543b6e2 100644 --- a/dirent/dirent.h +++ b/dirent/dirent.h @@ -135,6 +135,7 @@ extern struct dirent *readdir __P ((DIR *__dirp)) __asm__ ("readdir64"); #endif #ifdef __USE_LARGEFILE64 +extern struct dirent64 *__readdir64 __P ((DIR *__dirp)); extern struct dirent64 *readdir64 __P ((DIR *__dirp)); #endif @@ -199,18 +200,49 @@ extern int dirfd __P ((DIR *__dirp)); Entries for which SELECT returns nonzero are individually malloc'd, sorted using qsort with CMP, and collected in a malloc'd array in *NAMELIST. Returns the number of entries selected, or -1 on error. */ -extern int scandir __P ((__const char *__dir, - struct dirent ***__namelist, - int (*__selector) __P ((__const struct dirent *)), - int (*__cmp) __P ((__const __ptr_t, - __const __ptr_t)))); +# ifndef __USE_FILE_OFFSET64 +extern int scandir __P ((__const char *__dir, struct dirent ***__namelist, + int (*__selector) (__const struct dirent *), + int (*__cmp) (__const __ptr_t, __const __ptr_t))); +# else +extern int scandir __P ((__const char *__dir, struct dirent ***__namelist, + int (*__selector) (__const struct dirent *), + int (*__cmp) (__const __ptr_t, __const __ptr_t))) + __asm__ ("scandir64"); +# endif + +# if defined __USE_GNU && defined __USE_LARGEFILE64 +/* This function is like `scandir' but it uses the 64bit dirent structure. + Please note that the CMP function must now work with struct dirent64 **. */ +extern int scandir64 __P ((__const char *__dir, struct dirent64 ***__namelist, + int (*__selector) (__const struct dirent64 *), + int (*__cmp) (__const __ptr_t, __const __ptr_t))); +# endif /* Function to compare two `struct dirent's alphabetically. */ -extern int alphasort __P ((__const __ptr_t, __const __ptr_t)); +# ifndef __USE_FILE_OFFSET64 +extern int alphasort __P ((__const __ptr_t __e1, __const __ptr_t __e2)); +# else +extern int alphasort __P ((__const __ptr_t __e1, __const __ptr_t __e2)) + __asm__ ("alphasort64"); +# endif + +# if defined __USE_GNU && defined __USE_LARGEFILE64 +extern int alphasort64 __P ((__const __ptr_t __e1, __const __ptr_t __e2)); +# endif # ifdef __USE_GNU /* Function to compare two `struct dirent's by name & version. */ -extern int versionsort __P ((__const __ptr_t, __const __ptr_t)); +# ifndef __USE_FILE_OFFSET64 +extern int versionsort __P ((__const __ptr_t __e1, __const __ptr_t __e2)); +# else +extern int versionsort __P ((__const __ptr_t __e1, __const __ptr_t __e2)) + __asm__ ("versionsort64"); +# endif + +# ifdef __USE_LARGEFILE64 +extern int versionsort64 __P ((__const __ptr_t __e1, __const __ptr_t __e2)); +# endif # endif /* Read directory entries from FD into BUF, reading at most NBYTES. |