aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-01-07 17:18:09 -0500
committerMike Frysinger <vapier@gentoo.org>2016-01-07 17:29:17 -0500
commit6e76c11f89e9bd0b8bb7185dc754bf6c7dac572b (patch)
treed43df165a83e9558ffb7541ab71c10db5168ad28
parent5d29eefd6151e1475aeb4d89041313451c02fa41 (diff)
downloadglibc-6e76c11f89e9bd0b8bb7185dc754bf6c7dac572b.tar
glibc-6e76c11f89e9bd0b8bb7185dc754bf6c7dac572b.tar.gz
glibc-6e76c11f89e9bd0b8bb7185dc754bf6c7dac572b.tar.bz2
glibc-6e76c11f89e9bd0b8bb7185dc754bf6c7dac572b.zip
longlong: fix sh -Wundef builds
This file fails when building for SuperH as it assumes __SHMEDIA__ is always defined. Update the code to check if it's defined.
-rw-r--r--ChangeLog6
-rw-r--r--stdlib/longlong.h4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index bb445a480f..4db27e679f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-01-07 Mike Frysinger <vapier@gentoo.org>
+
+ * longlong.h: Change !__SHMEDIA__ to
+ (!defined (__SHMEDIA__) || !__SHMEDIA__).
+ Change __SHMEDIA__ to defined (__SHMEDIA__) && __SHMEDIA__.
+
2016-01-07 Daniel Jacobowitz <dan@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
Mark Shinwell <shinwell@codesourcery.com>
diff --git a/stdlib/longlong.h b/stdlib/longlong.h
index 4c8d131b9e..5cbc410fb0 100644
--- a/stdlib/longlong.h
+++ b/stdlib/longlong.h
@@ -1086,7 +1086,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__ ( \
@@ -1159,7 +1159,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 \