summaryrefslogtreecommitdiff
path: root/firmware/libc/memcmp.c
diff options
context:
space:
mode:
authorMatthias Mohr <Rockbox@Mohrenclan.de>2017-01-15 13:29:40 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2017-01-15 21:32:49 +0100
commitd984725cbf38d0a9e71c866ae61c48ad488373b4 (patch)
treefc064f5fa0baf667bbcd09d56bc350fbb2b5a0d9 /firmware/libc/memcmp.c
parent955be5b34af2e6cf374162ea8b4d4451b1644952 (diff)
downloadrockbox-d984725cbf38d0a9e71c866ae61c48ad488373b4.zip
rockbox-d984725cbf38d0a9e71c866ae61c48ad488373b4.tar.gz
rockbox-d984725cbf38d0a9e71c866ae61c48ad488373b4.tar.bz2
rockbox-d984725cbf38d0a9e71c866ae61c48ad488373b4.tar.xz
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
Diffstat (limited to 'firmware/libc/memcmp.c')
-rw-r--r--firmware/libc/memcmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/libc/memcmp.c b/firmware/libc/memcmp.c
index c2fa1bf..e2894bb 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. */