diff options
Diffstat (limited to 'libc/misc/dirent/scandir64.c')
-rw-r--r-- | libc/misc/dirent/scandir64.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/libc/misc/dirent/scandir64.c b/libc/misc/dirent/scandir64.c index e77b88d3c..7b1dbd000 100644 --- a/libc/misc/dirent/scandir64.c +++ b/libc/misc/dirent/scandir64.c @@ -20,24 +20,7 @@ /* Modified for uClibc by Erik Andersen */ -#define qsort __qsort -#define opendir __opendir -#define closedir __closedir - -#include <features.h> - -#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64 -#undef _FILE_OFFSET_BITS -#define _FILE_OFFSET_BITS 64 -#endif -#ifndef __USE_LARGEFILE64 -# define __USE_LARGEFILE64 1 -#endif -/* We absolutely do _NOT_ want interfaces silently - * renamed under us or very bad things will happen... */ -#ifdef __USE_FILE_OFFSET64 -# undef __USE_FILE_OFFSET64 -#endif +#include <_lfs_64.h> #include <dirent.h> #include <stdio.h> @@ -47,6 +30,12 @@ #include <sys/types.h> #include "dirstream.h" +libc_hidden_proto(memcpy) +libc_hidden_proto(opendir) +libc_hidden_proto(closedir) +libc_hidden_proto(qsort) +libc_hidden_proto(readdir64) + int scandir64(const char *dir, struct dirent64 ***namelist, int (*selector) (const struct dirent64 *), int (*compar) (const void *, const void *)) @@ -64,7 +53,7 @@ int scandir64(const char *dir, struct dirent64 ***namelist, __set_errno (0); pos = 0; - while ((current = __readdir64 (dp)) != NULL) + while ((current = readdir64 (dp)) != NULL) if (selector == NULL || (*selector) (current)) { struct dirent64 *vnew; @@ -91,7 +80,7 @@ int scandir64(const char *dir, struct dirent64 ***namelist, if (vnew == NULL) break; - names[pos++] = (struct dirent64 *) __memcpy (vnew, current, dsize); + names[pos++] = (struct dirent64 *) memcpy (vnew, current, dsize); } if (unlikely(errno != 0)) |