OSDN Git Service

versionsort*.c, alphasort*.c: do not need *64 compiled for __WORDSIZE = 64
authorPeter S. Mazinger <ps.m@gmx.net>
Wed, 16 Mar 2011 19:52:50 +0000 (20:52 +0100)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 15 Jun 2012 12:00:25 +0000 (14:00 +0200)
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>
libc/misc/dirent/alphasort.c
libc/misc/dirent/alphasort64.c
libc/misc/dirent/versionsort.c
libc/misc/dirent/versionsort64.c

index eb0dbf2..55980d1 100644 (file)
@@ -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
index d65b596..ef1e83e 100644 (file)
@@ -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
index d84da1f..8e56ec5 100644 (file)
@@ -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
index af9689e..28fef7d 100644 (file)
@@ -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