summaryrefslogtreecommitdiff
path: root/include/dirent.h
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-02-08 22:40:17 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-02-08 22:40:17 +0000
commit1a2c9641465f2c64fbb49749688ca465ad3cd6fe (patch)
treeca3cdb783459f014263c7ca200d0a66b8e9856b8 /include/dirent.h
parent7cccb9c2531088502492d92e8632159653de6290 (diff)
Add strverscmp() and versionsort[64]().
By Hai Zaar (haizaar AT codefidence.com)
Diffstat (limited to 'include/dirent.h')
-rw-r--r--include/dirent.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/dirent.h b/include/dirent.h
index e2fce367c..d17f10998 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -293,6 +293,25 @@ extern int alphasort64 (__const void *__e1, __const void *__e2)
__THROW __attribute_pure__ __nonnull ((1, 2));
# endif
+/* Function to compare two `struct dirent's alphabetically. */
+# ifndef __USE_FILE_OFFSET64
+extern int versionsort (__const void *__e1, __const void *__e2)
+ __THROW __attribute_pure__ __nonnull ((1, 2));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (versionsort,
+ (__const void *__e1, __const void *__e2),
+ versionsort64) __attribute_pure__ __nonnull ((1, 2));
+# else
+# define versionsort versionsort64
+# endif
+# endif
+
+# if defined __USE_GNU && defined __USE_LARGEFILE64
+extern int versionsort64 (__const void *__e1, __const void *__e2)
+ __THROW __attribute_pure__ __nonnull ((1, 2));
+# endif
+
#endif /* Use BSD or misc. */
__END_DECLS