about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArjun Shankar <arjun@redhat.com>2023-10-02 14:55:23 +0200
committerArjun Shankar <arjun@redhat.com>2023-10-24 12:30:59 +0200
commit5a6e784e64c9e3d9b16b257f73cc6332771d9e18 (patch)
treeab84ac5d7456fbad3760c1e00723ba181dca021f
parent3f7c7ac887f9d0f5d41b3c7d698fe8df939c0a87 (diff)
downloadglibc-5a6e784e64c9e3d9b16b257f73cc6332771d9e18.tar.gz
glibc-5a6e784e64c9e3d9b16b257f73cc6332771d9e18.tar.xz
glibc-5a6e784e64c9e3d9b16b257f73cc6332771d9e18.zip
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  <adhemerval.zanella@linaro.org>
-rw-r--r--inet/Makefile12
-rw-r--r--inet/Versions3
-rw-r--r--nss/Makefile19
-rw-r--r--nss/Versions2
-rw-r--r--nss/getnetbyad.c (renamed from inet/getnetbyad.c)0
-rw-r--r--nss/getnetbyad_r.c (renamed from inet/getnetbyad_r.c)0
-rw-r--r--nss/getnetbynm.c (renamed from inet/getnetbynm.c)0
-rw-r--r--nss/getnetbynm_r.c (renamed from inet/getnetbynm_r.c)0
-rw-r--r--nss/getnetent.c (renamed from inet/getnetent.c)0
-rw-r--r--nss/getnetent_r.c (renamed from inet/getnetent_r.c)0
10 files changed, 22 insertions, 14 deletions
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
index 8b4f387b74..8b4f387b74 100644
--- a/inet/getnetbyad.c
+++ b/nss/getnetbyad.c
diff --git a/inet/getnetbyad_r.c b/nss/getnetbyad_r.c
index 9a06c5e40b..9a06c5e40b 100644
--- a/inet/getnetbyad_r.c
+++ b/nss/getnetbyad_r.c
diff --git a/inet/getnetbynm.c b/nss/getnetbynm.c
index b763718873..b763718873 100644
--- a/inet/getnetbynm.c
+++ b/nss/getnetbynm.c
diff --git a/inet/getnetbynm_r.c b/nss/getnetbynm_r.c
index feb8b303a3..feb8b303a3 100644
--- a/inet/getnetbynm_r.c
+++ b/nss/getnetbynm_r.c
diff --git a/inet/getnetent.c b/nss/getnetent.c
index 69b4e399d6..69b4e399d6 100644
--- a/inet/getnetent.c
+++ b/nss/getnetent.c
diff --git a/inet/getnetent_r.c b/nss/getnetent_r.c
index d0a05993ab..d0a05993ab 100644
--- a/inet/getnetent_r.c
+++ b/nss/getnetent_r.c