summaryrefslogtreecommitdiff
path: root/libc/misc/dirent
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-03-16 20:52:50 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:25 +0200
commite50a776d7615173ede86f5f492bed5d2b75214ec (patch)
tree801c88fc5ffb7d352826466f28a4d823523b92cd /libc/misc/dirent
parent329befa2612ab31a5992684acee2a6e5e3861673 (diff)
versionsort*.c, alphasort*.c: do not need *64 compiled for __WORDSIZE = 64
use a strong_alias instead Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/misc/dirent')
-rw-r--r--libc/misc/dirent/alphasort.c4
-rw-r--r--libc/misc/dirent/alphasort64.c8
-rw-r--r--libc/misc/dirent/versionsort.c3
-rw-r--r--libc/misc/dirent/versionsort64.c8
4 files changed, 16 insertions, 7 deletions
diff --git a/libc/misc/dirent/alphasort.c b/libc/misc/dirent/alphasort.c
index eb0dbf238..55980d115 100644
--- a/libc/misc/dirent/alphasort.c
+++ b/libc/misc/dirent/alphasort.c
@@ -12,4 +12,6 @@ int alphasort(const struct dirent **a, const struct dirent **b)
{
return strcmp((*a)->d_name, (*b)->d_name);
}
-
+#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
+strong_alias_untyped(alphasort,alphasort64)
+#endif
diff --git a/libc/misc/dirent/alphasort64.c b/libc/misc/dirent/alphasort64.c
index d65b59647..ef1e83e45 100644
--- a/libc/misc/dirent/alphasort64.c
+++ b/libc/misc/dirent/alphasort64.c
@@ -5,12 +5,14 @@
*/
#include <_lfs_64.h>
-
#include <dirent.h>
-#include <string.h>
-#include "dirstream.h"
+
+#if __WORDSIZE != 64
+# include <string.h>
+# include "dirstream.h"
int alphasort64(const struct dirent64 **a, const struct dirent64 **b)
{
return strcmp((*a)->d_name, (*b)->d_name);
}
+#endif
diff --git a/libc/misc/dirent/versionsort.c b/libc/misc/dirent/versionsort.c
index d84da1f6c..8e56ec56b 100644
--- a/libc/misc/dirent/versionsort.c
+++ b/libc/misc/dirent/versionsort.c
@@ -12,3 +12,6 @@ int versionsort(const struct dirent **a, const struct dirent **b)
{
return strverscmp((*a)->d_name, (*b)->d_name);
}
+#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
+strong_alias_untyped(versionsort,versionsort64)
+#endif
diff --git a/libc/misc/dirent/versionsort64.c b/libc/misc/dirent/versionsort64.c
index af9689eab..28fef7d3f 100644
--- a/libc/misc/dirent/versionsort64.c
+++ b/libc/misc/dirent/versionsort64.c
@@ -5,12 +5,14 @@
*/
#include <_lfs_64.h>
-
#include <dirent.h>
-#include <string.h>
-#include "dirstream.h"
+
+#if __WORDSIZE != 64
+# include <string.h>
+# include "dirstream.h"
int versionsort64(const struct dirent64 **a, const struct dirent64 **b)
{
return strverscmp((*a)->d_name, (*b)->d_name);
}
+#endif