summary refs log tree commit diff
path: root/grp/getgrgid.c
diff options
context:
space:
mode:
Diffstat (limited to 'grp/getgrgid.c')
-rw-r--r--grp/getgrgid.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/grp/getgrgid.c b/grp/getgrgid.c
index ef3860fe40..855d31cbe9 100644
--- a/grp/getgrgid.c
+++ b/grp/getgrgid.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 <sys/types.h>
 #include <grp.h>
 
-/* Search for an entry with a matching group ID.  */
-struct group *
-DEFUN(getgrgid, (gid), gid_t gid)
-{
-  int match (struct group *p)
-    {
-      return p->gr_gid == gid;
-    }
-  static void *info;
 
-  return __grpscan (&info, &match);
-}
+#define LOOKUP_TYPE	struct group
+#define FUNCTION_NAME	getgrgid
+#define DATABASE_NAME	group
+#define ADD_PARAMS	gid_t gid
+#define ADD_VARIABLES	gid
+#define BUFLEN		1024
+
+#include "../nss/getXXbyYY.c"