summaryrefslogtreecommitdiff
path: root/libc/misc/dirent/alphasort64.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-10-17 03:17:15 +0000
committerEric Andersen <andersen@codepoet.org>2001-10-17 03:17:15 +0000
commitf6fabdfcc7ee34bbaef30c5cef540152e5c7b224 (patch)
tree4b9d4614efaf3528cb230057df6467610cee3171 /libc/misc/dirent/alphasort64.c
parentcad937c12d93653ed1bf548eed8fc1a178f991d8 (diff)
In theory, this adds readdir64 and friends. Dunno if they
work yet or not.... -Erik
Diffstat (limited to 'libc/misc/dirent/alphasort64.c')
-rw-r--r--libc/misc/dirent/alphasort64.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libc/misc/dirent/alphasort64.c b/libc/misc/dirent/alphasort64.c
new file mode 100644
index 000000000..94194e0c6
--- /dev/null
+++ b/libc/misc/dirent/alphasort64.c
@@ -0,0 +1,16 @@
+#include <features.h>
+#define _FILE_OFFSET_BITS 64
+#define __USE_LARGEFILE64
+#define __USE_FILE_OFFSET64
+#include <string.h>
+#include "dirstream.h"
+
+#ifdef __UCLIBC_HAVE_LFS__
+
+int alphasort64(const void * a, const void * b)
+{
+ return strcmp ((*(const struct dirent64 **) a)->d_name,
+ (*(const struct dirent64 **) b)->d_name);
+}
+#endif /* __UCLIBC_HAVE_LFS__ */
+