summaryrefslogtreecommitdiff
path: root/firmware/libc/memchr.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/memchr.c
parent955be5b34af2e6cf374162ea8b4d4451b1644952 (diff)
downloadrockbox-d984725cbf38d0a9e71c866ae61c48ad488373b4.tar.gz
rockbox-d984725cbf38d0a9e71c866ae61c48ad488373b4.zip
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/memchr.c')
-rw-r--r--firmware/libc/memchr.c4
1 files changed, 2 insertions, 2 deletions
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
38#include "_ansi.h" /* for _DEFUN */ 38#include "_ansi.h" /* for _DEFUN */
39 39
40/* Nonzero if X is not aligned on a "long" boundary. */ 40/* Nonzero if X is not aligned on a "long" boundary. */
41#define UNALIGNED(X) ((long)X & (sizeof (long) - 1)) 41#define ROCKBOX_UNALIGNED(X) ((long)X & (sizeof (long) - 1))
42 42
43/* How many bytes are loaded each iteration of the word copy loop. */ 43/* How many bytes are loaded each iteration of the word copy loop. */
44#define LBLOCKSIZE (sizeof (long)) 44#define LBLOCKSIZE (sizeof (long))
@@ -82,7 +82,7 @@ _DEFUN (memchr, (s1, i, n),
82 unsigned long mask,j; 82 unsigned long mask,j;
83 unsigned long *aligned_addr; 83 unsigned long *aligned_addr;
84 84
85 if (!UNALIGNED (s)) 85 if (!ROCKBOX_UNALIGNED (s))
86 { 86 {
87 mask = 0; 87 mask = 0;
88 for (j = 0; j < LBLOCKSIZE; j++) 88 for (j = 0; j < LBLOCKSIZE; j++)