about summary refs log tree commit diff
path: root/sysdeps/powerpc/ffs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/ffs.c')
-rw-r--r--sysdeps/powerpc/ffs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/powerpc/ffs.c b/sysdeps/powerpc/ffs.c
index 60f7460886..b2b7b7c071 100644
--- a/sysdeps/powerpc/ffs.c
+++ b/sysdeps/powerpc/ffs.c
@@ -1,6 +1,6 @@
 /* Find first set bit in a word, counted from least significant end.
    For PowerPC.
-   Copyright (C) 1991, 1992, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1997, 1998, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Torbjorn Granlund (tege@sics.se).
 
@@ -20,6 +20,7 @@
    02111-1307 USA.  */
 
 #define ffsl __something_else
+#include <limits.h>
 #include <string.h>
 
 #undef	ffs
@@ -35,8 +36,10 @@ __ffs (int x)
   return 32 - cnt;
 }
 weak_alias (__ffs, ffs)
+#if ULONG_MAX == UINT_MAX
 #undef ffsl
 weak_alias (__ffs, ffsl)
+#endif
 
 #else
 #include <sysdeps/generic/ffs.c>