From patchwork Thu Apr 28 15:27:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 616306 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 3qwggH4xpGz9sCk for ; Fri, 29 Apr 2016 01:27:23 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=JkjmaId7; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:cc:from:message-id:date :mime-version:in-reply-to:content-type; q=dns; s=default; b=Dghn pLj1VT6sRb6GHyCspRrsHVFmZFxEiMXrBs0/G4DwosdBEDQpeFD1Pq3pabqv9lQR 0h8XCdm3wWLjR372Bu4ng7ntnoV4AzhUvWp3rLidymRQKdO/XXmtSYpT0KSjanux C8Pu+vciwipGhbpAoi4POSVSRAF1zNQ5Y0nKzJ8= 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:subject:to:references:cc:from:message-id:date :mime-version:in-reply-to:content-type; s=default; bh=ZDoYkQnUmK OhaC1adB1zr0pFEJQ=; b=JkjmaId7iGWNeUoMbxwq9MzD2WBwhZjYq9b2UVEpsB 3eoZLAE9gyGiPk3yvizbVkaCGpdmBWwnUi1zKJgEqrlwfn4ReggPppTUxycfk3V0 6IgJPefwj8cTBQykq5haIhuiZdYzlkcA7ed9jN18H35plYJZ3vsRjjkzv1enU890 g= Received: (qmail 61458 invoked by alias); 28 Apr 2016 15:27:16 -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 61440 invoked by uid 89); 28 Apr 2016 15:27:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2506, held X-HELO: mx1.redhat.com Subject: Re: [PATCH COMMITTED] resolv: Remove _LIBC conditionals To: Joseph Myers References: <20160428120739.81175403F10C9@oldenburg.str.redhat.com> Cc: libc-alpha@sourceware.org From: Florian Weimer Message-ID: <57222BCF.1060007@redhat.com> Date: Thu, 28 Apr 2016 17:27:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: On 04/28/2016 04:16 PM, Joseph Myers wrote: > On Thu, 28 Apr 2016, Florian Weimer wrote: > >> -#ifdef _LIBC >> # include >> # include >> # include >> # include >> # include >> -#endif > > In cases such as this you need to update the preprocessor indentation > inside the removed conditionals. Right, I fixed up only some cases. The attached patch addresses the remaining ones. > I presume all these patches have been tested not to change the generated > code unless line numbers in assertions are involved. Yes, the series as whole did not change object code, except for line numbers in asserts. Florian 2016-04-28 Florian Weimer * resolv/inet_addr.c: Reindent preprocessor conditionals. * resolv/res_init.c: Likewise. * resolv/res_mkquery.c: Likewise. diff --git a/resolv/inet_addr.c b/resolv/inet_addr.c index 10d9a1e..022f7ea 100644 --- a/resolv/inet_addr.c +++ b/resolv/inet_addr.c @@ -72,11 +72,11 @@ #include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include /* * Ascii internet address interpretation routine. diff --git a/resolv/res_init.c b/resolv/res_init.c index 915a70a..cea4c8a 100644 --- a/resolv/res_init.c +++ b/resolv/res_init.c @@ -542,7 +542,7 @@ res_nclose(res_state statp) } libc_hidden_def (__res_nclose) -# ifdef _LIBC_REENTRANT +#ifdef _LIBC_REENTRANT /* This is called when a thread is exiting to free resources held in _res. */ static void __attribute__ ((section ("__libc_thread_freeres_fn"))) res_thread_freeres (void) @@ -558,4 +558,4 @@ res_thread_freeres (void) } text_set_element (__libc_thread_subfreeres, res_thread_freeres); text_set_element (__libc_subfreeres, res_thread_freeres); -# endif +#endif diff --git a/resolv/res_mkquery.c b/resolv/res_mkquery.c index 9a11d16..12f9730 100644 --- a/resolv/res_mkquery.c +++ b/resolv/res_mkquery.c @@ -77,11 +77,11 @@ /* Options. Leave them on. */ /* #define DEBUG */ -# include -# include -# if HP_TIMING_AVAIL -# define RANDOM_BITS(Var) { uint64_t v64; HP_TIMING_NOW (v64); Var = v64; } -# endif +#include +#include +#if HP_TIMING_AVAIL +# define RANDOM_BITS(Var) { uint64_t v64; HP_TIMING_NOW (v64); Var = v64; } +#endif /* * Form all types of queries.