This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] longlong: fix sh wundef builds
- From: Mike Frysinger <vapier at gentoo dot org>
- To: libc-alpha at sourceware dot org
- Date: Wed, 6 Jan 2016 21:14:18 -0500
- Subject: [PATCH] longlong: fix sh wundef builds
- Authentication-results: sourceware.org; auth=none
This file fails when building for SuperH as it assumes __SHMEDIA__ is
always defined. Update the code to check if it's defined.
---
stdlib/longlong.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/stdlib/longlong.h b/stdlib/longlong.h
index 650ef31..bdc35e3 100644
--- a/stdlib/longlong.h
+++ b/stdlib/longlong.h
@@ -1082,7 +1082,7 @@ extern UDItype __umulsidi3 (USItype, USItype);
} while (0)
#endif
-#if defined(__sh__) && !__SHMEDIA__ && W_TYPE_SIZE == 32
+#if defined(__sh__) && (!defined (__SHMEDIA__) || !__SHMEDIA__) && W_TYPE_SIZE == 32
#ifndef __sh1__
#define umul_ppmm(w1, w0, u, v) \
__asm__ ( \
@@ -1127,7 +1127,7 @@ extern UDItype __umulsidi3 (USItype, USItype);
#endif /* __sh__ */
-#if defined (__SH5__) && __SHMEDIA__ && W_TYPE_SIZE == 32
+#if defined (__SH5__) && (!defined (__SHMEDIA__) || !__SHMEDIA__) && W_TYPE_SIZE == 32
#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
#define count_leading_zeros(count, x) \
do \
--
2.6.2