svn commit: trunk/uClibc/libc/string/generic

vda at uclibc.org vda at uclibc.org
Sat Dec 13 03:01:00 UTC 2008


Author: vda
Date: 2008-12-12 19:00:59 -0800 (Fri, 12 Dec 2008)
New Revision: 24399

Log:
string/generic/memcmp.c: remove some really paranoid guards
 for ancient compilers. none of other string/*.c files have them.



Modified:
   trunk/uClibc/libc/string/generic/memcmp.c


Changeset:
Modified: trunk/uClibc/libc/string/generic/memcmp.c
===================================================================
--- trunk/uClibc/libc/string/generic/memcmp.c	2008-12-13 01:53:28 UTC (rev 24398)
+++ trunk/uClibc/libc/string/generic/memcmp.c	2008-12-13 03:00:59 UTC (rev 24399)
@@ -26,10 +26,6 @@
 #include <endian.h>
 
 #if __BYTE_ORDER == __BIG_ENDIAN
-# define WORDS_BIGENDIAN
-#endif
-
-#ifdef WORDS_BIGENDIAN
 # define CMP_LT_OR_GT(a, b) ((a) > (b) ? 1 : -1)
 #else
 # define CMP_LT_OR_GT(a, b) memcmp_bytes ((a), (b))
@@ -48,17 +44,12 @@
 
    3. Compare the few remaining bytes.  */
 
-#ifndef WORDS_BIGENDIAN
+#if __BYTE_ORDER != __BIG_ENDIAN
 /* memcmp_bytes -- Compare A and B bytewise in the byte order of the machine.
    A and B are known to be different.
    This is needed only on little-endian machines.  */
 
-static int memcmp_bytes __P((op_t, op_t));
-
-# ifdef  __GNUC__
-__inline
-# endif
-static int
+static __inline__ int
 memcmp_bytes (op_t a, op_t b)
 {
   long int srcp1 = (long int) &a;
@@ -77,8 +68,6 @@
 }
 #endif
 
-static int memcmp_common_alignment __P((long, long, size_t));
-
 /* memcmp_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN `op_t'
    objects (not LEN bytes!).  Both SRCP1 and SRCP2 should be aligned for
    memory operations on `op_t's.  */
@@ -161,8 +150,6 @@
   return 0;
 }
 
-static int memcmp_not_common_alignment __P((long, long, size_t));
-
 /* memcmp_not_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN
    `op_t' objects (not LEN bytes!).  SRCP2 should be aligned for memory
    operations on `op_t', but SRCP1 *should be unaligned*.  */




More information about the uClibc-cvs mailing list