]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
longlong: fix sh -Wundef builds
authorMike Frysinger <vapier@gentoo.org>
Thu, 7 Jan 2016 22:18:09 +0000 (17:18 -0500)
committerMike Frysinger <vapier@gentoo.org>
Thu, 7 Jan 2016 22:29:17 +0000 (17:29 -0500)
This file fails when building for SuperH as it assumes __SHMEDIA__
is always defined.  Update the code to check if it's defined.

ChangeLog
stdlib/longlong.h

index bb445a480fde4a52e464ac4cacaa0013a565c380..4db27e679f3838efca30fb681e88d8b3d148527a 100644 (file)
--- 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>
index 4c8d131b9ec01b28cfc6b37c45c9d831c47d17b0..5cbc410fb035f7e89212c0661c41f82454469e35 100644 (file)
@@ -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                                                                   \