]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - nss/getXXent_r.c
nss_files: Add generic code for set*ent, end*ent and file open
[thirdparty/glibc.git] / nss / getXXent_r.c
index d53caeff40da341cb802c258121f246b5149c40b..c8443c597742f49e64d7e52a8de19d21d51bc10a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2000,2002,2004,2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
    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, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
 
 #include <errno.h>
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
 
 #include "nsswitch.h"
 
 
 /* This handle for the NSS data base is shared between all
    set/get/endXXXent functions.  */
-static service_user *nip;
+static nss_action_list nip;
 /* Remember the last service used since the last call to  `endXXent'.  */
-static service_user *last_nip;
-/* Remember the first service_entry, it's always the same.  */
-static service_user *startp;
+static nss_action_list last_nip;
+/* Remember the first service_entry across set/get/endent.  */
+static nss_action_list startp;
 
 #ifdef STAYOPEN_TMP
 /* We need to remember the last `stayopen' flag given by the user
@@ -113,9 +112,8 @@ static STAYOPEN_TMP;
 __libc_lock_define_initialized (static, lock)
 
 /* The lookup function for the first entry of this service.  */
-extern int DB_LOOKUP_FCT (service_user **nip, const char *name,
-                         const char *name2, void **fctp)
-     internal_function;
+extern int DB_LOOKUP_FCT (nss_action_list *nip, const char *name,
+                         const char *name2, void **fctp);
 libc_hidden_proto (DB_LOOKUP_FCT)
 \f
 void
@@ -208,6 +206,6 @@ do_default_symbol_version (NEW (REENTRANT_GETNAME),
                           REENTRANT_GETNAME, GLIBC_2_1_2);
 #endif
 
-static_link_warning (SETFUNC_NAME)
-static_link_warning (ENDFUNC_NAME)
-static_link_warning (REENTRANT_GETNAME)
+nss_interface_function (SETFUNC_NAME)
+nss_interface_function (ENDFUNC_NAME)
+nss_interface_function (REENTRANT_GETNAME)