From patchwork Sat Dec 27 00:03:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Metcalf X-Patchwork-Id: 4440 Received: (qmail 14457 invoked by alias); 27 Dec 2014 00:09:01 -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 14447 invoked by uid 89); 27 Dec 2014 00:09:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: emea01-am1-obe.outbound.protection.outlook.com Message-ID: <549DF741.7020903@ezchip.com> Date: Fri, 26 Dec 2014 19:03:13 -0500 From: Chris Metcalf User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: GLIBC Devel Subject: [PATCH] fix some -Wundef warnings X-ClientProxiedBy: DM2PR11CA0019.namprd11.prod.outlook.com (25.160.91.29) To DB4PR02MB0543.eurprd02.prod.outlook.com (10.141.45.16) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=cmetcalf@ezchip.com; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:DB4PR02MB0543; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:DB4PR02MB0543; X-Forefront-PRVS: 0438F90F17 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(6009001)(189002)(377424004)(199003)(42186005)(110136001)(101416001)(66066001)(65956001)(47776003)(87976001)(97736003)(107886001)(83506001)(86362001)(120916001)(50986999)(450100001)(19580405001)(36756003)(20776003)(59896002)(229853001)(80316001)(46102003)(50466002)(23676002)(99396003)(4396001)(19580395003)(87266999)(15975445007)(68736005)(54356999)(65816999)(105586002)(92566001)(77096005)(64126003)(106356001)(77156002)(64706001)(62966003)(21056001)(122386002)(117156001)(107046002)(31966008)(40100003)(33656002)(18886065003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR02MB0543; H:[192.168.1.162]; FPR:; SPF:None; MLV:sfv; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: ezchip.com does not designate permitted sender hosts) X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:DB4PR02MB0543; X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Dec 2014 00:03:29.2955 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR02MB0543 While I was fixing -Werror warnings I noticed a couple that haven't yet become fatal (since we are waiting on -Wundef to be added) but I figured I might as well fix them. Any reason not to commit these? They both seem very straightforward. 2014-12-26 Chris Metcalf * sysdeps/unix/sysv/linux/tst-setgetname.c (do_test): Use #ifndef instead of #if to avoid a Wundef warning. * stdlib/tst-limits.c (do_test): Likewise. diff --git a/sysdeps/unix/sysv/linux/tst-setgetname.c b/sysdeps/unix/sysv/linux/tst-setgetname.c index f5693e26c422..7799ebe57bc3 100644 --- a/sysdeps/unix/sysv/linux/tst-setgetname.c +++ b/sysdeps/unix/sysv/linux/tst-setgetname.c @@ -101,7 +101,7 @@ do_test (int argc, char **argv) { res = get_self_comm (gettid (), name_check, TASK_COMM_LEN); -#if !__ASSUME_PROC_PID_TASK_COMM +#ifndef __ASSUME_PROC_PID_TASK_COMM /* On this first test we look for ENOENT to be returned from get_self_comm to indicate that the kernel is older than 2.6.33 and doesn't contain comm within the proc structure. diff --git a/stdlib/tst-limits.c b/stdlib/tst-limits.c index 6e51dcadb5ba..9aabc360f6b8 100644 --- a/stdlib/tst-limits.c +++ b/stdlib/tst-limits.c @@ -58,7 +58,7 @@ do_test (void) /* Values from POSIX and Unix. */ #ifdef PAGESIZE TEST (PAGESIZE, "d", getpagesize ()); -#elif PAGE_SIZE +#elif defined (PAGE_SIZE) TEST (PAGE_SIZE, "d", getpagesize ()); #endif