about summary refs log tree commit diff
path: root/inet
diff options
context:
space:
mode:
authorArjun Shankar <arjun@redhat.com>2023-10-02 14:55:24 +0200
committerArjun Shankar <arjun@redhat.com>2023-10-24 12:30:59 +0200
commita25a060c358358d61d683dc8e9aa9df91e877a35 (patch)
treee01407aca6f3cf2a7891c428681314842aca5878 /inet
parent5a6e784e64c9e3d9b16b257f73cc6332771d9e18 (diff)
downloadglibc-a25a060c358358d61d683dc8e9aa9df91e877a35.tar.gz
glibc-a25a060c358358d61d683dc8e9aa9df91e877a35.tar.xz
glibc-a25a060c358358d61d683dc8e9aa9df91e877a35.zip
Move 'protocols' routines from 'inet' into 'nss'
The getprotoby* and getprotoent* 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>
Diffstat (limited to 'inet')
-rw-r--r--inet/Makefile8
-rw-r--r--inet/Versions5
-rw-r--r--inet/getproto.c31
-rw-r--r--inet/getproto_r.c30
-rw-r--r--inet/getprtent.c28
-rw-r--r--inet/getprtent_r.c32
-rw-r--r--inet/getprtname.c31
-rw-r--r--inet/getprtname_r.c30
8 files changed, 1 insertions, 194 deletions
diff --git a/inet/Makefile b/inet/Makefile
index 776cbfa0fd..dab7182a11 100644
--- a/inet/Makefile
+++ b/inet/Makefile
@@ -48,12 +48,6 @@ routines := \
   ether_ntoa_r \
   getipv4sourcefilter \
   getnameinfo \
-  getproto \
-  getproto_r \
-  getprtent \
-  getprtent_r \
-  getprtname \
-  getprtname_r \
   getrpcbyname \
   getrpcbyname_r \
   getrpcbynumber \
@@ -142,8 +136,6 @@ CFLAGS-getrpcent_r.c += -fexceptions
 CFLAGS-getrpcent.c += -fexceptions
 CFLAGS-getservent_r.c += -fexceptions
 CFLAGS-getservent.c += -fexceptions
-CFLAGS-getprtent_r.c += -fexceptions
-CFLAGS-getprtent.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 051b305e48..c0c64e1543 100644
--- a/inet/Versions
+++ b/inet/Versions
@@ -15,8 +15,6 @@ libc {
 
     # g*
     getdomainname;
-    getprotobyname; getprotobyname_r; getprotobynumber;
-    getprotobynumber_r; getprotoent; getprotoent_r;
     getservbyname; getservbyname_r; getservbyport;
     getservbyport_r; getservent; getservent_r;
 
@@ -48,8 +46,7 @@ libc {
     # g*
     getaliasbyname_r; getaliasent_r; gethostbyaddr_r; gethostbyname2_r;
     gethostbyname_r; gethostent_r; getnetbyaddr_r; getnetbyname_r;
-    getnetent_r; getprotobyname_r; getprotobynumber_r;
-    getprotoent_r; getservbyname_r;
+    getnetent_r; getservbyname_r;
     getservbyport_r;
     getservent_r;
   }
diff --git a/inet/getproto.c b/inet/getproto.c
deleted file mode 100644
index 297d67d26b..0000000000
--- a/inet/getproto.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <netdb.h>
-
-
-#define LOOKUP_TYPE	struct protoent
-#define FUNCTION_NAME	getprotobynumber
-#define DATABASE_NAME	protocols
-#define ADD_PARAMS	int proto
-#define ADD_VARIABLES	proto
-#define BUFLEN		1024
-
-/* There is no nscd support for the protocols file.  */
-#undef	USE_NSCD
-
-#include "../nss/getXXbyYY.c"
diff --git a/inet/getproto_r.c b/inet/getproto_r.c
deleted file mode 100644
index 789d3dd34e..0000000000
--- a/inet/getproto_r.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <netdb.h>
-
-
-#define LOOKUP_TYPE		struct protoent
-#define FUNCTION_NAME		getprotobynumber
-#define DATABASE_NAME		protocols
-#define ADD_PARAMS		int proto
-#define ADD_VARIABLES		proto
-
-/* There is no nscd support for the protocols file.  */
-#undef	USE_NSCD
-
-#include "../nss/getXXbyYY_r.c"
diff --git a/inet/getprtent.c b/inet/getprtent.c
deleted file mode 100644
index 83df7d89f9..0000000000
--- a/inet/getprtent.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <netdb.h>
-
-
-#define LOOKUP_TYPE	struct protoent
-#define	GETFUNC_NAME	getprotoent
-#define BUFLEN		1024
-
-/* There is no nscd support for the protocols file.  */
-#undef	USE_NSCD
-
-#include "../nss/getXXent.c"
diff --git a/inet/getprtent_r.c b/inet/getprtent_r.c
deleted file mode 100644
index 39975ca7e6..0000000000
--- a/inet/getprtent_r.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <netdb.h>
-
-
-#define LOOKUP_TYPE		struct protoent
-#define SETFUNC_NAME		setprotoent
-#define	GETFUNC_NAME		getprotoent
-#define	ENDFUNC_NAME		endprotoent
-#define DATABASE_NAME		protocols
-#define STAYOPEN		int stayopen
-#define STAYOPEN_VAR		stayopen
-
-/* There is no nscd support for the protocols file.  */
-#undef	USE_NSCD
-
-#include "../nss/getXXent_r.c"
diff --git a/inet/getprtname.c b/inet/getprtname.c
deleted file mode 100644
index 8206347cfc..0000000000
--- a/inet/getprtname.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <netdb.h>
-
-
-#define LOOKUP_TYPE	struct protoent
-#define FUNCTION_NAME	getprotobyname
-#define DATABASE_NAME	protocols
-#define ADD_PARAMS	const char *name
-#define ADD_VARIABLES	name
-#define BUFLEN		1024
-
-/* There is no nscd support for the protocols file.  */
-#undef	USE_NSCD
-
-#include "../nss/getXXbyYY.c"
diff --git a/inet/getprtname_r.c b/inet/getprtname_r.c
deleted file mode 100644
index a69d6a5680..0000000000
--- a/inet/getprtname_r.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-#include <netdb.h>
-
-
-#define LOOKUP_TYPE		struct protoent
-#define FUNCTION_NAME		getprotobyname
-#define DATABASE_NAME		protocols
-#define ADD_PARAMS		const char *name
-#define ADD_VARIABLES		name
-
-/* There is no nscd support for the protocols file.  */
-#undef	USE_NSCD
-
-#include "../nss/getXXbyYY_r.c"