From 1ca2d03e3e4c8b27a666676bb5b92e6f5d6f2a07 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 21 Mar 2014 18:21:13 +0000 Subject: Fix -Wundef warnings for _ABI* on MIPS. 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 , 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 ). Tested that the warnings are fixed. * sysdeps/mips/bits/wordsize.h: Include . * sysdeps/unix/sysv/linux/mips/getrlimit64.c: Likewise. * sysdeps/unix/sysv/linux/mips/setrlimit64.c: Likewise. --- sysdeps/unix/sysv/linux/mips/getrlimit64.c | 2 ++ sysdeps/unix/sysv/linux/mips/setrlimit64.c | 1 + 2 files changed, 3 insertions(+) (limited to 'sysdeps/unix/sysv/linux') diff --git a/sysdeps/unix/sysv/linux/mips/getrlimit64.c b/sysdeps/unix/sysv/linux/mips/getrlimit64.c index f3b3331228..b4a449b57d 100644 --- a/sysdeps/unix/sysv/linux/mips/getrlimit64.c +++ b/sysdeps/unix/sysv/linux/mips/getrlimit64.c @@ -15,6 +15,8 @@ License along with the GNU C Library; if not, see . */ +#include + #if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32 # include diff --git a/sysdeps/unix/sysv/linux/mips/setrlimit64.c b/sysdeps/unix/sysv/linux/mips/setrlimit64.c index 73d60950f2..26bf13854d 100644 --- a/sysdeps/unix/sysv/linux/mips/setrlimit64.c +++ b/sysdeps/unix/sysv/linux/mips/setrlimit64.c @@ -15,6 +15,7 @@ License along with the GNU C Library; if not, see . */ +#include #if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32 -- cgit 1.4.1