From patchwork Mon Oct 2 12:55:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arjun Shankar X-Patchwork-Id: 1842122 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=MvNS2laE; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rzh4K6MkZz1ypV for ; Tue, 3 Oct 2023 00:04:33 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 55D64394D89B for ; Mon, 2 Oct 2023 13:03:56 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 3437938323DD for ; Mon, 2 Oct 2023 13:02:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3437938323DD Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696251745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=szhQnwT607aQ/NYarDPNKrOmpmjxMMPIJVXuBtBTGzc=; b=MvNS2laEUsP7eSAFkfz9O2t2wSgK56MlgOug42vKOnhHWc4VkuDA2QJy3zUhPWlCQqN3tx m18MjhKWzW4uIrIEZFp9Wdlp/6BJxlvH0+n6u4JaUxzSnzNlA6ICljUShi8u0FVOJku9r0 HQP1bxC+qMgbiA0Ju8laIyzmoL7NMJ0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-156-n8jBnY4JOY67UfonVyW7QQ-1; Mon, 02 Oct 2023 09:02:14 -0400 X-MC-Unique: n8jBnY4JOY67UfonVyW7QQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8F1E8185A78E for ; Mon, 2 Oct 2023 13:02:14 +0000 (UTC) Received: from localhost.localdomain (dhcp129-93.brq.redhat.com [10.34.129.93]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 176FBC15BB8; Mon, 2 Oct 2023 13:02:13 +0000 (UTC) From: Arjun Shankar To: libc-alpha@sourceware.org, Arjun Shankar Subject: [PATCH 11/16] Move 'networks' routines from 'inet' into 'nss' Date: Mon, 2 Oct 2023 14:55:23 +0200 Message-ID: <20231002130150.1497733-12-arjun@redhat.com> In-Reply-To: <20231002130150.1497733-1-arjun@redhat.com> References: <20231002130150.1497733-1-arjun@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org The getnetby* and getnetent* routines are entry points for nss functionality. This commit moves them from the 'inet' subdirectory to 'nss'. Reviewed-by: Adhemerval Zanella --- inet/Makefile | 12 ------------ inet/Versions | 3 +-- nss/Makefile | 19 +++++++++++++++++++ nss/Versions | 2 ++ {inet => nss}/getnetbyad.c | 0 {inet => nss}/getnetbyad_r.c | 0 {inet => nss}/getnetbynm.c | 0 {inet => nss}/getnetbynm_r.c | 0 {inet => nss}/getnetent.c | 0 {inet => nss}/getnetent_r.c | 0 10 files changed, 22 insertions(+), 14 deletions(-) rename {inet => nss}/getnetbyad.c (100%) rename {inet => nss}/getnetbyad_r.c (100%) rename {inet => nss}/getnetbynm.c (100%) rename {inet => nss}/getnetbynm_r.c (100%) rename {inet => nss}/getnetent.c (100%) rename {inet => nss}/getnetent_r.c (100%) diff --git a/inet/Makefile b/inet/Makefile index 9f39f7ff2b..776cbfa0fd 100644 --- a/inet/Makefile +++ b/inet/Makefile @@ -48,12 +48,6 @@ routines := \ ether_ntoa_r \ getipv4sourcefilter \ getnameinfo \ - getnetbyad \ - getnetbyad_r \ - getnetbynm \ - getnetbynm_r \ - getnetent \ - getnetent_r \ getproto \ getproto_r \ getprtent \ @@ -144,12 +138,6 @@ include ../gen-locales.mk ifeq ($(have-thread-library),yes) CFLAGS-rcmd.c += -fexceptions -CFLAGS-getnetbynm_r.c += -fexceptions -CFLAGS-getnetbynm.c += -fexceptions -CFLAGS-getnetbyad_r.c += -fexceptions -CFLAGS-getnetbyad.c += -fexceptions -CFLAGS-getnetent_r.c += -fexceptions -CFLAGS-getnetent.c += -fexceptions CFLAGS-getrpcent_r.c += -fexceptions CFLAGS-getrpcent.c += -fexceptions CFLAGS-getservent_r.c += -fexceptions diff --git a/inet/Versions b/inet/Versions index 1ffa444730..051b305e48 100644 --- a/inet/Versions +++ b/inet/Versions @@ -14,8 +14,7 @@ libc { ether_ntoa_r; # g* - getdomainname; getnetbyaddr; getnetbyaddr_r; getnetbyname; - getnetbyname_r; getnetent; getnetent_r; + getdomainname; getprotobyname; getprotobyname_r; getprotobynumber; getprotobynumber_r; getprotoent; getprotoent_r; getservbyname; getservbyname_r; getservbyport; diff --git a/nss/Makefile b/nss/Makefile index 2a451f68d9..023a11fa4b 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -159,6 +159,25 @@ CFLAGS-getnetgrent.c += -fexceptions CFLAGS-getnetgrent_r.c += -fexceptions endif +# networks routines: +routines += \ + getnetbyad \ + getnetbyad_r \ + getnetbynm \ + getnetbynm_r \ + getnetent \ + getnetent_r \ + # routines + +ifeq ($(have-thread-library),yes) +CFLAGS-getnetbyad.c += -fexceptions +CFLAGS-getnetbyad_r.c += -fexceptions +CFLAGS-getnetbynm.c += -fexceptions +CFLAGS-getnetbynm_r.c += -fexceptions +CFLAGS-getnetent.c += -fexceptions +CFLAGS-getnetent_r.c += -fexceptions +endif + # pwd routines: routines += \ fgetpwent \ diff --git a/nss/Versions b/nss/Versions index 4ddc018012..95219f0fc7 100644 --- a/nss/Versions +++ b/nss/Versions @@ -25,6 +25,8 @@ libc { gethostbyaddr; gethostbyaddr_r; gethostbyname; gethostbyname2; gethostbyname2_r; gethostbyname_r; gethostent; gethostent_r; getnetgrent; getnetgrent_r; + getnetbyaddr; getnetbyaddr_r; getnetbyname; getnetbyname_r; + getnetent; getnetent_r; getpw; getpwent; getpwent_r; getpwnam; getpwnam_r; getpwuid; getpwuid_r; getspent; getspent_r; getspnam; getspnam_r; diff --git a/inet/getnetbyad.c b/nss/getnetbyad.c similarity index 100% rename from inet/getnetbyad.c rename to nss/getnetbyad.c diff --git a/inet/getnetbyad_r.c b/nss/getnetbyad_r.c similarity index 100% rename from inet/getnetbyad_r.c rename to nss/getnetbyad_r.c diff --git a/inet/getnetbynm.c b/nss/getnetbynm.c similarity index 100% rename from inet/getnetbynm.c rename to nss/getnetbynm.c diff --git a/inet/getnetbynm_r.c b/nss/getnetbynm_r.c similarity index 100% rename from inet/getnetbynm_r.c rename to nss/getnetbynm_r.c diff --git a/inet/getnetent.c b/nss/getnetent.c similarity index 100% rename from inet/getnetent.c rename to nss/getnetent.c diff --git a/inet/getnetent_r.c b/nss/getnetent_r.c similarity index 100% rename from inet/getnetent_r.c rename to nss/getnetent_r.c