aboutsummaryrefslogtreecommitdiff
path: root/pwd/getpwuid.c
diff options
context:
space:
mode:
Diffstat (limited to 'pwd/getpwuid.c')
-rw-r--r--pwd/getpwuid.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/pwd/getpwuid.c b/pwd/getpwuid.c
index 5093488..130c251 100644
--- a/pwd/getpwuid.c
+++ b/pwd/getpwuid.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 <pwd.h>
-#include <sys/types.h>
-/* Search for an entry with a matching uid. */
-struct passwd *
-DEFUN(getpwuid, (uid), uid_t uid)
-{
- int match (struct passwd *p)
- {
- return p->pw_uid == uid;
- }
- static void *info;
- return __pwdscan (&info, &match);
-}
+#define LOOKUP_TYPE struct passwd
+#define FUNCTION_NAME getpwuid
+#define DATABASE_NAME passwd
+#define ADD_PARAMS uid_t uid
+#define ADD_VARIABLES uid
+#define BUFLEN 1024
+
+#include "../nss/getXXbyYY.c"