]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix -Wundef warnings for _ABI* on MIPS.
authorJoseph Myers <joseph@codesourcery.com>
Fri, 21 Mar 2014 18:21:13 +0000 (18:21 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 21 Mar 2014 18:21:13 +0000 (18:21 +0000)
This patch fixes -Wundef warnings related to the _ABI* macros on MIPS.
GCC predefines only the _ABI* macro related to the ABI actually in
use, meaning that a conditional such as "#if _MIPS_SIM == _ABI64" is
true only for the ABI in question (all the macros are nonzero), but
produces a -Wundef warning for the other ABIs.  The normal approach to
using these macros is to include <sgidefs.h>, which ensures that all
three _ABI* macros are defined rather than just one; this patch does
so in the places that caused warnings (the bulk of the warnings
arising from <bits/wordsize.h>).  Tested that the warnings are fixed.

* sysdeps/mips/bits/wordsize.h: Include <sgidefs.h>.
* sysdeps/unix/sysv/linux/mips/getrlimit64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/setrlimit64.c: Likewise.

ChangeLog
sysdeps/mips/bits/wordsize.h
sysdeps/unix/sysv/linux/mips/getrlimit64.c
sysdeps/unix/sysv/linux/mips/setrlimit64.c

index e3601495d02751fdbee8872c4a7d504fb84caa9a..720183f4f6274a3a7c7d1b21cb678523e4c85470 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2014-03-21  Joseph Myers  <joseph@codesourcery.com>
 
+       * sysdeps/mips/bits/wordsize.h: Include <sgidefs.h>.
+       * sysdeps/unix/sysv/linux/mips/getrlimit64.c: Likewise.
+       * sysdeps/unix/sysv/linux/mips/setrlimit64.c: Likewise.
+
        [BZ #16731]
        * sysdeps/i386/fpu/e_log.S (__ieee754_log): Take absolute value
        when x - 1 is zero.
index 3f05c7d6528cc89ae91f006254a96e0ff5fbee5f..2c29d8181f211ad3acb9c5b8305a6ccfb18cab9d 100644 (file)
@@ -15,6 +15,8 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <sgidefs.h>
+
 #define __WORDSIZE     _MIPS_SZPTR
 #if _MIPS_SIM == _ABI64
 # define __WORDSIZE_TIME64_COMPAT32    1
index f3b33312281b82369db2c952628e1f3d1bbfc9e6..b4a449b57dc85df539c62499f424e8fd7a3d285b 100644 (file)
@@ -15,6 +15,8 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <sgidefs.h>
+
 #if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32
 
 # include <shlib-compat.h>
index 73d60950f2b8af3bde284608b3a9cecdd9153df2..26bf13854dfbd922ceffd58e291a7b7aa44323f9 100644 (file)
@@ -15,6 +15,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <sgidefs.h>
 
 #if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32