aboutsummaryrefslogtreecommitdiff
path: root/dirent
diff options
context:
space:
mode:
Diffstat (limited to 'dirent')
-rw-r--r--dirent/dirent.h54
1 files changed, 39 insertions, 15 deletions
diff --git a/dirent/dirent.h b/dirent/dirent.h
index 07d543b..1ac68fa 100644
--- a/dirent/dirent.h
+++ b/dirent/dirent.h
@@ -128,14 +128,18 @@ extern int closedir __P ((DIR *__dirp));
If the Large File Support API is selected we have to use the
appropriate interface. */
extern struct dirent *__readdir __P ((DIR *__dirp));
+extern struct dirent64 *__readdir64 __P ((DIR *__dirp));
#ifndef __USE_FILE_OFFSET64
extern struct dirent *readdir __P ((DIR *__dirp));
#else
-extern struct dirent *readdir __P ((DIR *__dirp)) __asm__ ("readdir64");
+# ifdef __REDIRECT
+extern struct dirent *__REDIRECT (readdir, __P ((DIR *__dirp)), readdir64);
+# else
+# define readdir readdir64
+# endif
#endif
#ifdef __USE_LARGEFILE64
-extern struct dirent64 *__readdir64 __P ((DIR *__dirp));
extern struct dirent64 *readdir64 __P ((DIR *__dirp));
#endif
@@ -148,9 +152,13 @@ extern int __readdir_r __P ((DIR *__dirp, struct dirent *__entry,
extern int readdir_r __P ((DIR *__dirp, struct dirent *__entry,
struct dirent **__result));
# else
-extern int readdir_r __P ((DIR *__dirp, struct dirent *__entry,
- struct dirent **__result))
- __asm__ ("readdir64_r");
+# ifdef __REDIRECT
+extern int __REDIRECT (readdir_r, __P ((DIR *__dirp, struct dirent *__entry,
+ struct dirent **__result)),
+ readdir64_r);
+# else
+# define readdir_r readdir64_r
+# endif
# endif
# ifdef __USE_LARGEFILE64
@@ -205,26 +213,37 @@ 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");
+# ifdef __REDIRECT
+extern int __REDIRECT (scandir,
+ __P ((__const char *__dir,
+ struct dirent ***__namelist,
+ int (*__selector) (__const struct dirent *),
+ int (*__cmp) (__const __ptr_t, __const __ptr_t))),
+ scandir64);
+# else
+# define scandir scandir64
+# endif
# 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)));
+ int (*__selector) (__const struct dirent64 *),
+ int (*__cmp) (__const __ptr_t, __const __ptr_t)));
# endif
/* Function to compare two `struct dirent's alphabetically. */
# 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");
+# ifdef __REDIRECT
+extern int __REDIRECT (alphasort,
+ __P ((__const __ptr_t __e1, __const __ptr_t __e2)),
+ alphasort64);
+# else
+# define alphasort alphasort64
+# endif
# endif
# if defined __USE_GNU && defined __USE_LARGEFILE64
@@ -236,8 +255,13 @@ extern int alphasort64 __P ((__const __ptr_t __e1, __const __ptr_t __e2));
# 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");
+# ifdef __REDIRECT
+extern int __REDIRECT (versionsort,
+ __P ((__const __ptr_t __e1, __const __ptr_t __e2)),
+ versionsort64);
+# else
+# define versionsort versionsort64
+# endif
# endif
# ifdef __USE_LARGEFILE64