From 5a6e784e64c9e3d9b16b257f73cc6332771d9e18 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Mon, 2 Oct 2023 14:55:23 +0200 Subject: [PATCH] Move 'networks' routines from 'inet' into 'nss' 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 9f39f7f..776cbfa 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 1ffa444..051b305 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 2a451f6..023a11f 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 4ddc018..95219f0 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 -- 2.7.4