projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(jm_ICONV): Recommend GNU libiconv.
[gnulib.git]
/
lib
/
memcmp.c
diff --git
a/lib/memcmp.c
b/lib/memcmp.c
index
1226947
..
5756bc0
100644
(file)
--- a/
lib/memcmp.c
+++ b/
lib/memcmp.c
@@
-49,6
+49,11
@@
#ifdef _LIBC
# include <memcopy.h>
#ifdef _LIBC
# include <memcopy.h>
+# include <endian.h>
+
+# if __BYTE_ORDER == __BIG_ENDIAN
+# define WORDS_BIGENDIAN
+# endif
#else /* Not in the GNU C library. */
#else /* Not in the GNU C library. */
@@
-104,8
+109,7
@@
static int memcmp_bytes __P((op_t, op_t));
__inline
# endif
static int
__inline
# endif
static int
-memcmp_bytes (a, b)
- op_t a, b;
+memcmp_bytes (long unsigned int a, long unsigned int b)
{
long int srcp1 = (long int) &a;
long int srcp2 = (long int) &b;
{
long int srcp1 = (long int) &a;
long int srcp2 = (long int) &b;
@@
-132,10
+136,7
@@
static int memcmp_common_alignment __P((long, long, size_t));
__inline
#endif
static int
__inline
#endif
static int
-memcmp_common_alignment (srcp1, srcp2, len)
- long int srcp1;
- long int srcp2;
- size_t len;
+memcmp_common_alignment (long int srcp1, long int srcp2, size_t len)
{
op_t a0, a1;
op_t b0, b1;
{
op_t a0, a1;
op_t b0, b1;
@@
-222,10
+223,7
@@
static int memcmp_not_common_alignment __P((long, long, size_t));
__inline
#endif
static int
__inline
#endif
static int
-memcmp_not_common_alignment (srcp1, srcp2, len)
- long int srcp1;
- long int srcp2;
- size_t len;
+memcmp_not_common_alignment (long int srcp1, long int srcp2, size_t len)
{
op_t a0, a1, a2, a3;
op_t b0, b1, b2, b3;
{
op_t a0, a1, a2, a3;
op_t b0, b1, b2, b3;
@@
-325,10
+323,7
@@
memcmp_not_common_alignment (srcp1, srcp2, len)
}
int
}
int
-rpl_memcmp (s1, s2, len)
- const __ptr_t s1;
- const __ptr_t s2;
- size_t len;
+rpl_memcmp (const void *s1, const void *s2, size_t len)
{
op_t a0;
op_t b0;
{
op_t a0;
op_t b0;