From d984725cbf38d0a9e71c866ae61c48ad488373b4 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Sun, 15 Jan 2017 13:29:40 +0100 Subject: Renamed defines UNALIGNED to ROCKBOX_UNALIGNED - UNALIGNED is already defined in mingw environments. Renamed defines of UNALIGNED to ROCKBOX_UNALIGNED so that they don't conflict with definitions in mingw32 cross-compiling environments (defined in _mingw.h). Change-Id: I369848c0f507e6bf5ff9ab4a60663bbbda6edc52 --- firmware/libc/memchr.c | 4 ++-- firmware/libc/memcmp.c | 4 ++-- firmware/libc/strchr.c | 4 ++-- firmware/libc/strcmp.c | 4 ++-- firmware/libc/strcpy.c | 4 ++-- firmware/libc/strncmp.c | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) (limited to 'firmware/libc') diff --git a/firmware/libc/memchr.c b/firmware/libc/memchr.c index 8b6b4d69d9..bd99cfbc4d 100644 --- a/firmware/libc/memchr.c +++ b/firmware/libc/memchr.c @@ -38,7 +38,7 @@ QUICKREF #include "_ansi.h" /* for _DEFUN */ /* Nonzero if X is not aligned on a "long" boundary. */ -#define UNALIGNED(X) ((long)X & (sizeof (long) - 1)) +#define ROCKBOX_UNALIGNED(X) ((long)X & (sizeof (long) - 1)) /* How many bytes are loaded each iteration of the word copy loop. */ #define LBLOCKSIZE (sizeof (long)) @@ -82,7 +82,7 @@ _DEFUN (memchr, (s1, i, n), unsigned long mask,j; unsigned long *aligned_addr; - if (!UNALIGNED (s)) + if (!ROCKBOX_UNALIGNED (s)) { mask = 0; for (j = 0; j < LBLOCKSIZE; j++) diff --git a/firmware/libc/memcmp.c b/firmware/libc/memcmp.c index c2fa1bf6b7..e2894bb05a 100644 --- a/firmware/libc/memcmp.c +++ b/firmware/libc/memcmp.c @@ -40,7 +40,7 @@ QUICKREF #include "_ansi.h" /* for _DEFUN */ /* Nonzero if either X or Y is not aligned on a "long" boundary. */ -#define UNALIGNED(X, Y) \ +#define ROCKBOX_UNALIGNED(X, Y) \ (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) /* How many bytes are copied each iteration of the word copy loop. */ @@ -78,7 +78,7 @@ _DEFUN (memcmp, (m1, m2, n), /* If the size is too small, or either pointer is unaligned, then we punt to the byte compare loop. Hopefully this will not turn up in inner loops. */ - if (!TOO_SMALL(n) && !UNALIGNED(s1,s2)) + if (!TOO_SMALL(n) && !ROCKBOX_UNALIGNED(s1,s2)) { /* Otherwise, load and compare the blocks of memory one word at a time. */ diff --git a/firmware/libc/strchr.c b/firmware/libc/strchr.c index ada6e2d098..425d4a2f7a 100644 --- a/firmware/libc/strchr.c +++ b/firmware/libc/strchr.c @@ -38,7 +38,7 @@ QUICKREF #include "_ansi.h" /* for _DEFUN */ /* Nonzero if X is not aligned on a "long" boundary. */ -#define UNALIGNED(X) ((long)X & (sizeof (long) - 1)) +#define ROCKBOX_UNALIGNED(X) ((long)X & (sizeof (long) - 1)) /* How many bytes are loaded each iteration of the word copy loop. */ #define LBLOCKSIZE (sizeof (long)) @@ -83,7 +83,7 @@ _DEFUN (strchr, (s1, i), unsigned long mask,j; unsigned long *aligned_addr; - if (!UNALIGNED (s)) + if (!ROCKBOX_UNALIGNED (s)) { mask = 0; for (j = 0; j < LBLOCKSIZE; j++) diff --git a/firmware/libc/strcmp.c b/firmware/libc/strcmp.c index d540fae7dd..c1487dab74 100644 --- a/firmware/libc/strcmp.c +++ b/firmware/libc/strcmp.c @@ -40,7 +40,7 @@ QUICKREF #include "_ansi.h" /* for _DEFUN */ /* Nonzero if either X or Y is not aligned on a "long" boundary. */ -#define UNALIGNED(X, Y) \ +#define ROCKBOX_UNALIGNED(X, Y) \ (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) /* DETECTNULL returns nonzero if (long)X contains a NULL byte. */ @@ -76,7 +76,7 @@ _DEFUN (strcmp, (s1, s2), unsigned long *a2; /* If s1 or s2 are unaligned, then compare bytes. */ - if (!UNALIGNED (s1, s2)) + if (!ROCKBOX_UNALIGNED (s1, s2)) { /* If s1 and s2 are word-aligned, compare them a word at a time. */ a1 = (unsigned long*)s1; diff --git a/firmware/libc/strcpy.c b/firmware/libc/strcpy.c index 035e2bda9e..166a74967d 100644 --- a/firmware/libc/strcpy.c +++ b/firmware/libc/strcpy.c @@ -40,7 +40,7 @@ QUICKREF /*SUPPRESS 530*/ /* Nonzero if either X or Y is not aligned on a "long" boundary. */ -#define UNALIGNED(X, Y) \ +#define ROCKBOX_UNALIGNED(X, Y) \ (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) #if LONG_MAX == 2147483647L @@ -77,7 +77,7 @@ _DEFUN (strcpy, (dst0, src0), _CONST long *aligned_src; /* If SRC or DEST is unaligned, then copy bytes. */ - if (!UNALIGNED (src, dst)) + if (!ROCKBOX_UNALIGNED (src, dst)) { aligned_dst = (long*)dst; aligned_src = (long*)src; diff --git a/firmware/libc/strncmp.c b/firmware/libc/strncmp.c index 315fae810a..83e8d5b457 100644 --- a/firmware/libc/strncmp.c +++ b/firmware/libc/strncmp.c @@ -41,7 +41,7 @@ QUICKREF #include "_ansi.h" /* for _DEFUN */ /* Nonzero if either X or Y is not aligned on a "long" boundary. */ -#define UNALIGNED(X, Y) \ +#define ROCKBOX_UNALIGNED(X, Y) \ (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) /* DETECTNULL returns nonzero if (long)X contains a NULL byte. */ @@ -86,7 +86,7 @@ _DEFUN (strncmp, (s1, s2, n), return 0; /* If s1 or s2 are unaligned, then compare bytes. */ - if (!UNALIGNED (s1, s2)) + if (!ROCKBOX_UNALIGNED (s1, s2)) { /* If s1 and s2 are word-aligned, compare them a word at a time. */ a1 = (unsigned long*)s1; -- cgit v1.2.3