Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Mike Frysinger committed Jan 7, 2016
1 parent 5d29eef commit 6e76c11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions 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>
Expand Down
4 changes: 2 additions & 2 deletions stdlib/longlong.h
Expand Up @@ -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__ ( \
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit 6e76c11

Please sign in to comment.