summaryrefslogtreecommitdiff
path: root/pwd/getpwnam.c
diff options
context:
space:
mode:
Diffstat (limited to 'pwd/getpwnam.c')
-rw-r--r--pwd/getpwnam.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/pwd/getpwnam.c b/pwd/getpwnam.c
index bac8b6b4da..597b8d1205 100644
--- a/pwd/getpwnam.c
+++ b/pwd/getpwnam.c
@@ -1,5 +1,6 @@
-/* Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
+Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -13,24 +14,17 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
-#include <ansidecl.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <string.h>
#include <pwd.h>
-/* Search for an entry with a matching name. */
-struct passwd *
-DEFUN(getpwnam, (name), const char *name)
-{
- int match (struct passwd *p)
- {
- return ! strcmp (name, p->pw_name);
- }
- static void *info;
- return __pwdscan (&info, &match);
-}
+#define LOOKUP_TYPE struct passwd
+#define FUNCTION_NAME getpwnam
+#define DATABASE_NAME passwd
+#define ADD_PARAMS const char *name
+#define ADD_VARIABLES name
+#define BUFLEN 1024
+
+#include "../nss/getXXbyYY.c"