From patchwork Mon Oct 2 12:55:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arjun Shankar X-Patchwork-Id: 76963 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BB6FF3889826 for ; Mon, 2 Oct 2023 13:03:08 +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 83234386180D for ; Mon, 2 Oct 2023 13:02:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 83234386180D 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=1696251737; 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=ToErMRgIvpeomrsqqFFmQs2EIG6v4451j1dSXe892CE=; b=PyB/aFu8cebz9+4Pz2A7tPc8NLHSCQqbA5o/NNx+cy5XaN20PYSyiCYZwrW8KBIvJ1H/4m yaaFfalXmSjmVsA3aG7t2w+AOItsLqSLs//G2Ca6vP5vGYoO50Xn4vKk8zcvFh5X6bi8q6 W7r4ti376jYe6OV00ysAlWT0+BhCsw8= 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-426-9uz--qcFMlG1trsuYCHGSw-1; Mon, 02 Oct 2023 09:02:16 -0400 X-MC-Unique: 9uz--qcFMlG1trsuYCHGSw-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 BF5BD101A550 for ; Mon, 2 Oct 2023 13:02:15 +0000 (UTC) Received: from localhost.localdomain (dhcp129-93.brq.redhat.com [10.34.129.93]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 47192C15BB8; Mon, 2 Oct 2023 13:02:15 +0000 (UTC) From: Arjun Shankar To: libc-alpha@sourceware.org, Arjun Shankar Subject: [PATCH 12/16] Move 'protocols' routines from 'inet' into 'nss' Date: Mon, 2 Oct 2023 14:55:24 +0200 Message-ID: <20231002130150.1497733-13-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+patchwork=sourceware.org@sourceware.org The getprotoby* and getprotoent* routines are entry points for nss functionality. This commit moves them from the 'inet' subdirectory to 'nss'. Reviewed-by: Adhemerval Zanella --- inet/Makefile | 8 -------- inet/Versions | 5 +---- nss/Makefile | 15 +++++++++++++++ nss/Versions | 3 +++ {inet => nss}/getproto.c | 0 {inet => nss}/getproto_r.c | 0 {inet => nss}/getprtent.c | 0 {inet => nss}/getprtent_r.c | 0 {inet => nss}/getprtname.c | 0 {inet => nss}/getprtname_r.c | 0 10 files changed, 19 insertions(+), 12 deletions(-) rename {inet => nss}/getproto.c (100%) rename {inet => nss}/getproto_r.c (100%) rename {inet => nss}/getprtent.c (100%) rename {inet => nss}/getprtent_r.c (100%) rename {inet => nss}/getprtname.c (100%) rename {inet => nss}/getprtname_r.c (100%) diff --git a/inet/Makefile b/inet/Makefile index 776cbfa0fd..dab7182a11 100644 --- a/inet/Makefile +++ b/inet/Makefile @@ -48,12 +48,6 @@ routines := \ ether_ntoa_r \ getipv4sourcefilter \ getnameinfo \ - getproto \ - getproto_r \ - getprtent \ - getprtent_r \ - getprtname \ - getprtname_r \ getrpcbyname \ getrpcbyname_r \ getrpcbynumber \ @@ -142,8 +136,6 @@ CFLAGS-getrpcent_r.c += -fexceptions CFLAGS-getrpcent.c += -fexceptions CFLAGS-getservent_r.c += -fexceptions CFLAGS-getservent.c += -fexceptions -CFLAGS-getprtent_r.c += -fexceptions -CFLAGS-getprtent.c += -fexceptions CFLAGS-either_ntoh.c += -fexceptions CFLAGS-either_hton.c += -fexceptions CFLAGS-in6_addr.c += $(config-cflags-wno-ignored-attributes) diff --git a/inet/Versions b/inet/Versions index 051b305e48..c0c64e1543 100644 --- a/inet/Versions +++ b/inet/Versions @@ -15,8 +15,6 @@ libc { # g* getdomainname; - getprotobyname; getprotobyname_r; getprotobynumber; - getprotobynumber_r; getprotoent; getprotoent_r; getservbyname; getservbyname_r; getservbyport; getservbyport_r; getservent; getservent_r; @@ -48,8 +46,7 @@ libc { # g* getaliasbyname_r; getaliasent_r; gethostbyaddr_r; gethostbyname2_r; gethostbyname_r; gethostent_r; getnetbyaddr_r; getnetbyname_r; - getnetent_r; getprotobyname_r; getprotobynumber_r; - getprotoent_r; getservbyname_r; + getnetent_r; getservbyname_r; getservbyport_r; getservent_r; } diff --git a/nss/Makefile b/nss/Makefile index 023a11fa4b..df22d3655c 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -178,6 +178,21 @@ CFLAGS-getnetent.c += -fexceptions CFLAGS-getnetent_r.c += -fexceptions endif +# protocols routines: +routines += \ + getproto \ + getproto_r \ + getprtent \ + getprtent_r \ + getprtname \ + getprtname_r \ + # routines + +ifeq ($(have-thread-library),yes) +CFLAGS-getprtent_r.c += -fexceptions +CFLAGS-getprtent.c += -fexceptions +endif + # pwd routines: routines += \ fgetpwent \ diff --git a/nss/Versions b/nss/Versions index 95219f0fc7..c5de97fb53 100644 --- a/nss/Versions +++ b/nss/Versions @@ -27,6 +27,8 @@ libc { getnetgrent; getnetgrent_r; getnetbyaddr; getnetbyaddr_r; getnetbyname; getnetbyname_r; getnetent; getnetent_r; + getprotobyname; getprotobyname_r; getprotobynumber; + getprotobynumber_r; getprotoent; getprotoent_r; getpw; getpwent; getpwent_r; getpwnam; getpwnam_r; getpwuid; getpwuid_r; getspent; getspent_r; getspnam; getspnam_r; @@ -58,6 +60,7 @@ libc { # g* getgrent_r; getgrgid_r; getgrnam_r; getnetgrent_r; + getprotobyname_r; getprotobynumber_r; getprotoent_r; getpwent_r; getpwuid_r; getpwnam_r; getspent_r; getspnam_r; } diff --git a/inet/getproto.c b/nss/getproto.c similarity index 100% rename from inet/getproto.c rename to nss/getproto.c diff --git a/inet/getproto_r.c b/nss/getproto_r.c similarity index 100% rename from inet/getproto_r.c rename to nss/getproto_r.c diff --git a/inet/getprtent.c b/nss/getprtent.c similarity index 100% rename from inet/getprtent.c rename to nss/getprtent.c diff --git a/inet/getprtent_r.c b/nss/getprtent_r.c similarity index 100% rename from inet/getprtent_r.c rename to nss/getprtent_r.c diff --git a/inet/getprtname.c b/nss/getprtname.c similarity index 100% rename from inet/getprtname.c rename to nss/getprtname.c diff --git a/inet/getprtname_r.c b/nss/getprtname_r.c similarity index 100% rename from inet/getprtname_r.c rename to nss/getprtname_r.c