]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Move 'hosts' routines from 'inet' into 'nss'
authorArjun Shankar <arjun@redhat.com>
Mon, 2 Oct 2023 12:55:21 +0000 (14:55 +0200)
committerArjun Shankar <arjun@redhat.com>
Tue, 24 Oct 2023 10:30:59 +0000 (12:30 +0200)
The gethostby* and gethostent* 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>
13 files changed:
inet/Makefile
inet/Versions
nss/Makefile
nss/Versions
nss/gethstbyad.c [moved from inet/gethstbyad.c with 100% similarity]
nss/gethstbyad_r.c [moved from inet/gethstbyad_r.c with 100% similarity]
nss/gethstbynm.c [moved from inet/gethstbynm.c with 100% similarity]
nss/gethstbynm2.c [moved from inet/gethstbynm2.c with 100% similarity]
nss/gethstbynm2_r.c [moved from inet/gethstbynm2_r.c with 100% similarity]
nss/gethstbynm_r.c [moved from inet/gethstbynm_r.c with 100% similarity]
nss/gethstent.c [moved from inet/gethstent.c with 100% similarity]
nss/gethstent_r.c [moved from inet/gethstent_r.c with 100% similarity]
nss/tst-gethnm.c [moved from inet/tst-gethnm.c with 100% similarity]

index 4d053de748e21e32774ede318115c1e99bb45ed6..d37854254903ba5bb24360b1a3891dcee12f8ef6 100644 (file)
@@ -46,14 +46,6 @@ routines := \
   ether_line \
   ether_ntoa \
   ether_ntoa_r \
-  gethstbyad \
-  gethstbyad_r \
-  gethstbynm \
-  gethstbynm2 \
-  gethstbynm2_r \
-  gethstbynm_r \
-  gethstent \
-  gethstent_r \
   getipv4sourcefilter \
   getnameinfo \
   getnetbyad \
@@ -123,7 +115,6 @@ tests := \
   tst-checks-posix \
   tst-ether_aton \
   tst-ether_line \
-  tst-gethnm \
   tst-getni1 \
   tst-getni2 \
   tst-if_index-long \
@@ -154,14 +145,6 @@ include ../gen-locales.mk
 
 ifeq ($(have-thread-library),yes)
 
-CFLAGS-gethstbyad_r.c += -fexceptions
-CFLAGS-gethstbyad.c += -fexceptions
-CFLAGS-gethstbynm_r.c += -fexceptions
-CFLAGS-gethstbynm.c += -fexceptions
-CFLAGS-gethstbynm2_r.c += -fexceptions
-CFLAGS-gethstbynm2.c += -fexceptions
-CFLAGS-gethstent_r.c += -fexceptions
-CFLAGS-gethstent.c += -fexceptions
 CFLAGS-rcmd.c += -fexceptions
 CFLAGS-getnetbynm_r.c += -fexceptions
 CFLAGS-getnetbynm.c += -fexceptions
index a7c1a0fb6f4a392df7390ddb68cdbf78bc2a0206..d937e9835ccc4836bb5e7385e88df66f387841d6 100644 (file)
@@ -14,9 +14,7 @@ libc {
     ether_ntoa_r;
 
     # g*
-    getdomainname; gethostbyaddr; gethostbyaddr_r; gethostbyname;
-    gethostbyname2; gethostbyname2_r; gethostbyname_r; gethostent;
-    gethostent_r; getnetbyaddr; getnetbyaddr_r; getnetbyname;
+    getdomainname; getnetbyaddr; getnetbyaddr_r; getnetbyname;
     getnetbyname_r; getnetent; getnetent_r; getnetgrent; getnetgrent_r;
     getprotobyname; getprotobyname_r; getprotobynumber;
     getprotobynumber_r; getprotoent; getprotoent_r;
index 148c6dc1cfe0bbb0d20f85317cc97a803f2b2a2b..d0b564a0332102cdff1a13a0d21210bbf08cac84 100644 (file)
@@ -125,6 +125,29 @@ CFLAGS-getsgnam.c += -fexceptions
 CFLAGS-getsgnam_r.c += -fexceptions
 endif
 
+# hosts routines:
+routines += \
+  gethstbyad \
+  gethstbyad_r \
+  gethstbynm \
+  gethstbynm2 \
+  gethstbynm2_r \
+  gethstbynm_r \
+  gethstent \
+  gethstent_r \
+  # routines
+
+ifeq ($(have-thread-library),yes)
+CFLAGS-gethstbyad.c += -fexceptions
+CFLAGS-gethstbyad_r.c += -fexceptions
+CFLAGS-gethstbynm.c += -fexceptions
+CFLAGS-gethstbynm_r.c += -fexceptions
+CFLAGS-gethstbynm2.c += -fexceptions
+CFLAGS-gethstbynm2_r.c += -fexceptions
+CFLAGS-gethstent.c += -fexceptions
+CFLAGS-gethstent_r.c += -fexceptions
+endif
+
 # pwd routines:
 routines += \
   fgetpwent \
@@ -210,6 +233,7 @@ tests := \
   test-netdb \
   testgrp \
   tst-fgetsgent_r \
+  tst-gethnm \
   tst-getpw \
   tst-gshadow \
   tst-nss-getpwent \
index 99208cb9df6220670876befe2d5e638541d7e065..74ba4470d84b78cde5d81c167837bad885b75d73 100644 (file)
@@ -21,6 +21,8 @@ libc {
     getaliasbyname; getaliasbyname_r; getaliasent; getaliasent_r;
     getgrent; getgrent_r; getgrgid; getgrgid_r; getgrnam; getgrnam_r;
     getgroups;
+    gethostbyaddr; gethostbyaddr_r; gethostbyname; gethostbyname2;
+    gethostbyname2_r; gethostbyname_r; gethostent; gethostent_r;
     getpw; getpwent; getpwent_r; getpwnam; getpwnam_r; getpwuid; getpwuid_r;
     getspent; getspent_r; getspnam; getspnam_r;
 
similarity index 100%
rename from inet/gethstbyad.c
rename to nss/gethstbyad.c
similarity index 100%
rename from inet/gethstbyad_r.c
rename to nss/gethstbyad_r.c
similarity index 100%
rename from inet/gethstbynm.c
rename to nss/gethstbynm.c
similarity index 100%
rename from inet/gethstbynm2.c
rename to nss/gethstbynm2.c
similarity index 100%
rename from inet/gethstbynm2_r.c
rename to nss/gethstbynm2_r.c
similarity index 100%
rename from inet/gethstbynm_r.c
rename to nss/gethstbynm_r.c
similarity index 100%
rename from inet/gethstent.c
rename to nss/gethstent.c
similarity index 100%
rename from inet/gethstent_r.c
rename to nss/gethstent_r.c
similarity index 100%
rename from inet/tst-gethnm.c
rename to nss/tst-gethnm.c