summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-02-08 22:45:48 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-02-08 22:45:48 +0000
commitd140aa4d58bdc6e779c4dcf63f15fbfbb8cce23e (patch)
tree420b1a3899b1d04b026f3ade2799cb81f4599530 /include
parent9676f11d513a43b0c1640b62b1978136c117d581 (diff)
downloaduClibc-alpine-d140aa4d58bdc6e779c4dcf63f15fbfbb8cce23e.tar.bz2
uClibc-alpine-d140aa4d58bdc6e779c4dcf63f15fbfbb8cce23e.tar.xz
Add strverscmp() and versionsort[64]().
By Hai Zaar (haizaar AT codefidence.com)
Diffstat (limited to 'include')
-rw-r--r--include/dirent.h19
-rw-r--r--include/string.h2
2 files changed, 19 insertions, 2 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
diff --git a/include/string.h b/include/string.h
index ab1076565..6d6469100 100644
--- a/include/string.h
+++ b/include/string.h
@@ -422,11 +422,9 @@ libc_hidden_proto(strsep)
#ifdef __USE_GNU
/* Compare S1 and S2 as strings holding name & indices/version numbers. */
-# if 0
extern int strverscmp (__const char *__s1, __const char *__s2)
__THROW __attribute_pure__ __nonnull ((1, 2));
libc_hidden_proto(strverscmp)
-# endif
/* Return a string describing the meaning of the signal number in SIG. */
extern char *strsignal (int __sig) __THROW;