From 27822ce67fbf7f2b204992a410e7da2e8c1e2607 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Wed, 26 Mar 2014 15:37:35 -0500 Subject: Define _STRING_ARCH_unaligned unconditionally This patch defines _STRING_ARCH_unaligned to 0 on default bits/string.h header to avoid undefined compiler warnings on platforms that do not define it. It also make adjustments in code where tests checked if macro existed or not. --- iconv/loop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'iconv/loop.c') diff --git a/iconv/loop.c b/iconv/loop.c index f836d08c37..f86f62747a 100644 --- a/iconv/loop.c +++ b/iconv/loop.c @@ -63,7 +63,7 @@ representations with a fixed width of 2 or 4 bytes. But if we cannot access unaligned memory we still have to read byte-wise. */ #undef FCTNAME2 -#if defined _STRING_ARCH_unaligned || !defined DEFINE_UNALIGNED +#if _STRING_ARCH_unaligned || !defined DEFINE_UNALIGNED /* We can handle unaligned memory access. */ # define get16(addr) *((const uint16_t *) (addr)) # define get32(addr) *((const uint32_t *) (addr)) @@ -342,7 +342,7 @@ FCTNAME (LOOPFCT) (struct __gconv_step *step, /* Include the file a second time to define the function to handle unaligned access. */ -#if !defined DEFINE_UNALIGNED && !defined _STRING_ARCH_unaligned \ +#if !defined DEFINE_UNALIGNED && !_STRING_ARCH_unaligned \ && MIN_NEEDED_INPUT != 1 && MAX_NEEDED_INPUT % MIN_NEEDED_INPUT == 0 \ && MIN_NEEDED_OUTPUT != 1 && MAX_NEEDED_OUTPUT % MIN_NEEDED_OUTPUT == 0 # undef get16 -- cgit 1.4.1