summaryrefslogtreecommitdiff
path: root/grp/getgrnam.c
diff options
context:
space:
mode:
Diffstat (limited to 'grp/getgrnam.c')
-rw-r--r--grp/getgrnam.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/grp/getgrnam.c b/grp/getgrnam.c
index 841677070d..2104d87459 100644
--- a/grp/getgrnam.c
+++ b/grp/getgrnam.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 <grp.h>
-/* Search for an entry with a matching name. */
-struct group *
-DEFUN(getgrnam, (name), const char *name)
-{
- int match (struct group *p)
- {
- return ! strcmp (name, p->gr_name);
- }
- static void *info;
- return __grpscan (&info, &match);
-}
+#define LOOKUP_TYPE struct group
+#define FUNCTION_NAME getgrnam
+#define DATABASE_NAME group
+#define ADD_PARAMS const char *name
+#define ADD_VARIABLES name
+#define BUFLEN 1024
+
+#include "../nss/getXXbyYY.c"