From patchwork Fri Mar 21 18:23:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 332702 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6112E2C00A0 for ; Sat, 22 Mar 2014 05:23:27 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=ufZ3UADiq9EtrupfsRhEE9PpYesvD J6WNcNwqg1KVdZ1CoMqpwgYyP2tDg/fpNYp0fesWDwLeKUoeiFxDBdEUu4ZKWUkN aRRscQ36x5afIpEFcTviyAcAgymyuJmN0EQ4gvHOFXXwS/NsgEKTCXUGwL7oU8nv uIn/gI/nfVYniQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=QBZdfyO+L/3x54UKvDRBtmy8mmM=; b=dzV kEZc78b2mvZIRVlYhCbgtyP5zz/ugAckcn4AXy9ImRlql9vOxaj7YJjg9klQlC1F KXOMJQwn3KF5wv2A2CK5gOm2ZSwSrE1426HqAEh1BB63HatEnS1g05l6uc2O7tGL j5EdLjeC0FtlYYkmUdjxNo6kwaLbFcoOmY48yXTs= Received: (qmail 29487 invoked by alias); 21 Mar 2014 18:23:21 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 29477 invoked by uid 89); 21 Mar 2014 18:23:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL, BAYES_20 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Fri, 21 Mar 2014 18:23:14 +0000 From: "Joseph S. Myers" To: Subject: Fix -Wundef warnings for _ABI* on MIPS Message-ID: MIME-Version: 1.0 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 and committed. 2014-03-21 Joseph Myers * sysdeps/mips/bits/wordsize.h: Include . * sysdeps/unix/sysv/linux/mips/getrlimit64.c: Likewise. * sysdeps/unix/sysv/linux/mips/setrlimit64.c: Likewise. diff --git a/sysdeps/mips/bits/wordsize.h b/sysdeps/mips/bits/wordsize.h index 3f05c7d..2c29d81 100644 --- a/sysdeps/mips/bits/wordsize.h +++ b/sysdeps/mips/bits/wordsize.h @@ -15,6 +15,8 @@ License along with the GNU C Library. If not, see . */ +#include + #define __WORDSIZE _MIPS_SZPTR #if _MIPS_SIM == _ABI64 # define __WORDSIZE_TIME64_COMPAT32 1 diff --git a/sysdeps/unix/sysv/linux/mips/getrlimit64.c b/sysdeps/unix/sysv/linux/mips/getrlimit64.c index f3b3331..b4a449b 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 73d6095..26bf138 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