From patchwork Tue Jul 1 14:07:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 366108 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 D534814008B for ; Wed, 2 Jul 2014 00:07:11 +1000 (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:cc:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=TF8+ VswIqB5YrY67dlHmS82KPCInvVCsycuR9FJm6VcLCpSrtPUVfzfPetdg/9Ku5BUz JkaoOeqCyUYBbg2pUO2H0LQINgKWzzxyobNMRM9c8O5BbBl6aE83GLlKgrnx5j49 5R8xoYsMZhMSIWYQ5jyRbOkTyiCE2elBbsOSZh4= 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:cc:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=80yGf/46Vl vU5ygWX3AxDCpF6uo=; b=ro8YNaXJLLeie/LJ4kxTcS3Am0BVKMe9gwekzhtP6f DR1G2FUI106rjWhvxmI93vu2X4ckVdWyCbtl1qihLqTch+dMBmsB5hPWy998cHtX E5R3jbUP7eWPfo4IAXYrzlTgpojoNzPmVDqG+L2l3NKywlN5oOdFtBeqrBSARz0M Q= Received: (qmail 7403 invoked by alias); 1 Jul 2014 14:06:38 -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 7150 invoked by uid 89); 1 Jul 2014 14:06:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Tue, 1 Jul 2014 19:37:27 +0530 From: Siddhesh Poyarekar To: "Carlos O'Donell" Cc: Roland McGrath , libc-alpha@sourceware.org Subject: [PATCH] Add comment to gethnamaddr.c to warn that the file is unmaintained Message-ID: <20140701140726.GB20796@spoyarek.pnq.redhat.com> References: <20140627173501.GA12370@spoyarek.pnq.redhat.com> <53ADB5FD.1030202@redhat.com> <20140628012721.GL4477@spoyarek.pnq.redhat.com> <20140628043419.AFBF62C3A0D@topped-with-meat.com> <20140630055909.GN4477@spoyarek.pnq.redhat.com> <53B18376.7000701@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <53B18376.7000701@redhat.com> User-Agent: Mutt/1.5.22.1-rc1 (2013-10-16) On Mon, Jun 30, 2014 at 11:34:14AM -0400, Carlos O'Donell wrote: > On 06/30/2014 01:59 AM, Siddhesh Poyarekar wrote: > > On Fri, Jun 27, 2014 at 09:34:19PM -0700, Roland McGrath wrote: > >> I guess for now the inconsistency just makes me want to have the other code > >> forks around as documentation. I suppose comments would do it just as > >> well. Still my inclination is to make these something like: > >> > >> /* Insert long new comment about the weirdness and referring to the other > >> file where the opposite fork is used in equivalent code. */ > >> #if 0 /* was MULTI_PTRS_ARE_ALIASES */ > > > > After reading further, I don't think there is any inconsistency in > > functionality. The gethostbyaddr function also uses the dns-host.c > > bits and gethnamaddr.c is currently not used at all. The only > > reference it has is in resolv/README: > > > > The files gethnamaddr.c, mapv4v6addr.h and mapv4v6hostent.h are > > leftovers from BIND 4.9.7. > > > > Given this newly discovered fact, how about the following patch > > instead? I don't modify gethnamaddr.c because it's not even used. I > > wonder - given that we have decided to own the resolver bits now - if > > we should just get rid of gethnamaddr.c and other unused files. I > > could add a note in the README mentioning this. > > > > Siddhesh > > > > * resolv/nss_dns/dns-host.c (getanswer_r) > > [MULTI_PTRS_ARE_ALIASES]: Remove code. > > I'm OK with this v2, but if you're up for it I'd like to remove > gethnameaddr.c and update README. If we don't use the code it > should be immediately removed to prevent future confusion. Looks like it can't be removed. The file is linked into libresolv.so and it exports some _gethst* and res_gethost* functions, that are not documented so I'm assuming we don't knowingly support them. All changes to the file seem to be general bulk changes. How about just adding this comment to the file instead? Siddhesh * resolv/gethnamaddr.c: Add comment warning that the file is not maintained. diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c index c73a0dc..49cdc72 100644 --- a/resolv/gethnamaddr.c +++ b/resolv/gethnamaddr.c @@ -49,6 +49,11 @@ * --Copyright-- */ +/* XXX This file is not used by any of the resolver functions implemented by + glibc (i.e. get*info and gethostby*). It cannot be removed however because + it exports symbols in the libresolv ABI. The file is not maintained any + more, nor are these functions. */ + #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */