From a25a060c358358d61d683dc8e9aa9df91e877a35 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Mon, 2 Oct 2023 14:55:24 +0200 Subject: 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 --- inet/Makefile | 8 -------- inet/Versions | 5 +---- inet/getproto.c | 31 ------------------------------- inet/getproto_r.c | 30 ------------------------------ inet/getprtent.c | 28 ---------------------------- inet/getprtent_r.c | 32 -------------------------------- inet/getprtname.c | 31 ------------------------------- inet/getprtname_r.c | 30 ------------------------------ 8 files changed, 1 insertion(+), 194 deletions(-) delete mode 100644 inet/getproto.c delete mode 100644 inet/getproto_r.c delete mode 100644 inet/getprtent.c delete mode 100644 inet/getprtent_r.c delete mode 100644 inet/getprtname.c delete mode 100644 inet/getprtname_r.c (limited to 'inet') 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 - . */ - -#include - - -#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 - . */ - -#include - - -#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 - . */ - -#include - - -#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 - . */ - -#include - - -#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 - . */ - -#include - - -#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 - . */ - -#include - - -#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" -- cgit 1.4.1