]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Move 'networks' routines from 'inet' into 'nss'
authorArjun Shankar <arjun@redhat.com>
Mon, 2 Oct 2023 12:55:23 +0000 (14:55 +0200)
committerArjun Shankar <arjun@redhat.com>
Tue, 24 Oct 2023 10:30:59 +0000 (12:30 +0200)
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>
inet/Makefile
inet/Versions
nss/Makefile
nss/Versions
nss/getnetbyad.c [moved from inet/getnetbyad.c with 100% similarity]
nss/getnetbyad_r.c [moved from inet/getnetbyad_r.c with 100% similarity]
nss/getnetbynm.c [moved from inet/getnetbynm.c with 100% similarity]
nss/getnetbynm_r.c [moved from inet/getnetbynm_r.c with 100% similarity]
nss/getnetent.c [moved from inet/getnetent.c with 100% similarity]
nss/getnetent_r.c [moved from inet/getnetent_r.c with 100% similarity]

index 9f39f7ff2b9dcf3b41c21badf60bcd950fcbd905..776cbfa0fd2ac5a1488e47f37859ac14a978d93b 100644 (file)
@@ -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
index 1ffa444730b1e1ac98e1732d6213a8428661bdfe..051b305e48f401c585e33f360943c44b6d6f021c 100644 (file)
@@ -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;
index 2a451f68d999f19cabeecb78f3bfe612aadaa970..023a11fa4becdc80179d13cbc102ee704c88ea4a 100644 (file)
@@ -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 \
index 4ddc018012f15fc20986311cdc5c5a946e617e32..95219f0fc780c8c63293a91065972ae9b59faf40 100644 (file)
@@ -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;
 
similarity index 100%
rename from inet/getnetbyad.c
rename to nss/getnetbyad.c
similarity index 100%
rename from inet/getnetbyad_r.c
rename to nss/getnetbyad_r.c
similarity index 100%
rename from inet/getnetbynm.c
rename to nss/getnetbynm.c
similarity index 100%
rename from inet/getnetbynm_r.c
rename to nss/getnetbynm_r.c
similarity index 100%
rename from inet/getnetent.c
rename to nss/getnetent.c
similarity index 100%
rename from inet/getnetent_r.c
rename to nss/getnetent_r.c