From patchwork Mon Oct 2 12:55:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arjun Shankar X-Patchwork-Id: 76969 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 653DF3959C96 for ; Mon, 2 Oct 2023 13:03:38 +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.129.124]) by sourceware.org (Postfix) with ESMTPS id 0E9E238618FE for ; Mon, 2 Oct 2023 13:02:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0E9E238618FE 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=1696251739; 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=zRPjwMoKKRG9sSXeuTZJlx07PSHqBN70YBFgrwCpjkk=; b=g/dvXSh6yrl9BimE0ySsnFqJdHLnwh0S5iIyEPunf6wSyr9Lv33GgHoJdMmQJCTMsmbnox aZL7oz6kfeLeouI2bild7qpdItxv0T+CxxqDM5lnvM1EQGE7AaS70pUb5wY3/Cr2Z/3Ow/ 0jkNcLJx0wvW7m9VSURKc88sL8VDTlw= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-209-gcho6J2-Pr-frl--NHxK-w-1; Mon, 02 Oct 2023 09:02:18 -0400 X-MC-Unique: gcho6J2-Pr-frl--NHxK-w-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 428043816C8A for ; Mon, 2 Oct 2023 13:02:18 +0000 (UTC) Received: from localhost.localdomain (dhcp129-93.brq.redhat.com [10.34.129.93]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BE482C15BB8; Mon, 2 Oct 2023 13:02:17 +0000 (UTC) From: Arjun Shankar To: libc-alpha@sourceware.org, Arjun Shankar Subject: [PATCH 14/16] Move 'services' routines from 'inet' into 'nss' Date: Mon, 2 Oct 2023 14:55:26 +0200 Message-ID: <20231002130150.1497733-15-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=-10.7 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_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_SBL_CSS, 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 getservby* and getservent* 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 | 6 +----- nss/Makefile | 15 +++++++++++++++ nss/Versions | 3 +++ {inet => nss}/getservent.c | 0 {inet => nss}/getservent_r.c | 0 {inet => nss}/getsrvbynm.c | 0 {inet => nss}/getsrvbynm_r.c | 0 {inet => nss}/getsrvbypt.c | 0 {inet => nss}/getsrvbypt_r.c | 0 10 files changed, 19 insertions(+), 13 deletions(-) rename {inet => nss}/getservent.c (100%) rename {inet => nss}/getservent_r.c (100%) rename {inet => nss}/getsrvbynm.c (100%) rename {inet => nss}/getsrvbynm_r.c (100%) rename {inet => nss}/getsrvbypt.c (100%) rename {inet => nss}/getsrvbypt_r.c (100%) diff --git a/inet/Makefile b/inet/Makefile index 3c1987877a..d275f51b3f 100644 --- a/inet/Makefile +++ b/inet/Makefile @@ -48,13 +48,7 @@ routines := \ ether_ntoa_r \ getipv4sourcefilter \ getnameinfo \ - getservent \ - getservent_r \ getsourcefilter \ - getsrvbynm \ - getsrvbynm_r \ - getsrvbypt \ - getsrvbypt_r \ herrno \ herrno-loc \ htonl \ @@ -126,8 +120,6 @@ include ../gen-locales.mk ifeq ($(have-thread-library),yes) CFLAGS-rcmd.c += -fexceptions -CFLAGS-getservent_r.c += -fexceptions -CFLAGS-getservent.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 c0c64e1543..7765cb7722 100644 --- a/inet/Versions +++ b/inet/Versions @@ -15,8 +15,6 @@ libc { # g* getdomainname; - getservbyname; getservbyname_r; getservbyport; - getservbyport_r; getservent; getservent_r; # h* htonl; htons; @@ -46,9 +44,7 @@ libc { # g* getaliasbyname_r; getaliasent_r; gethostbyaddr_r; gethostbyname2_r; gethostbyname_r; gethostent_r; getnetbyaddr_r; getnetbyname_r; - getnetent_r; getservbyname_r; - getservbyport_r; - getservent_r; + getnetent_r; } GLIBC_2.2 { # i* diff --git a/nss/Makefile b/nss/Makefile index cbfd5dc692..e88754bf51 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -229,6 +229,21 @@ CFLAGS-getrpcent_r.c += -fexceptions CFLAGS-getrpcent.c += -fexceptions endif +# services routines: +routines += \ + getservent \ + getservent_r \ + getsrvbynm \ + getsrvbynm_r \ + getsrvbypt \ + getsrvbypt_r \ + # routines + +ifeq ($(have-thread-library),yes) +CFLAGS-getservent_r.c += -fexceptions +CFLAGS-getservent.c += -fexceptions +endif + # shadow routines routines += \ fgetspent \ diff --git a/nss/Versions b/nss/Versions index b7491154bf..d8c4e373c9 100644 --- a/nss/Versions +++ b/nss/Versions @@ -32,6 +32,8 @@ libc { getpw; getpwent; getpwent_r; getpwnam; getpwnam_r; getpwuid; getpwuid_r; getrpcbyname; getrpcbyname_r; getrpcbynumber; getrpcbynumber_r; getrpcent; getrpcent_r; + getservbyname; getservbyname_r; getservbyport; + getservbyport_r; getservent; getservent_r; getspent; getspent_r; getspnam; getspnam_r; # i* @@ -64,6 +66,7 @@ libc { getnetgrent_r; getprotobyname_r; getprotobynumber_r; getprotoent_r; getpwent_r; getpwuid_r; getpwnam_r; + getservbyname_r; getservbyport_r; getservent_r; getspent_r; getspnam_r; } GLIBC_2.2.2 { diff --git a/inet/getservent.c b/nss/getservent.c similarity index 100% rename from inet/getservent.c rename to nss/getservent.c diff --git a/inet/getservent_r.c b/nss/getservent_r.c similarity index 100% rename from inet/getservent_r.c rename to nss/getservent_r.c diff --git a/inet/getsrvbynm.c b/nss/getsrvbynm.c similarity index 100% rename from inet/getsrvbynm.c rename to nss/getsrvbynm.c diff --git a/inet/getsrvbynm_r.c b/nss/getsrvbynm_r.c similarity index 100% rename from inet/getsrvbynm_r.c rename to nss/getsrvbynm_r.c diff --git a/inet/getsrvbypt.c b/nss/getsrvbypt.c similarity index 100% rename from inet/getsrvbypt.c rename to nss/getsrvbypt.c diff --git a/inet/getsrvbypt_r.c b/nss/getsrvbypt_r.c similarity index 100% rename from inet/getsrvbypt_r.c rename to nss/getsrvbypt_r.c