diff -Nur coreutils-4.5.3.orig/src/getgid.c coreutils-4.5.3/src/getgid.c
--- coreutils-4.5.3.orig/src/getgid.c Thu Jan 1 01:00:00 1970
+++ coreutils-4.5.3/src/getgid.c Sun Oct 27 21:52:01 2002
-@@ -0,0 +1,80 @@
+@@ -0,0 +1,106 @@
+/* getgid - print GID of given group
+ Copyright (C) 1999 Artur Frysiak <wiget@pld-linux.org>
+
+#include <config.h>
+#include <grp.h>
+#include <sys/types.h>
++#include <getopt.h>
+#include "system.h"
++#include "quote.h"
++#include "error.h"
+
+#define PROGRAM_NAME "getgid"
+
+/* The name by which this program was run. */
+char *program_name;
+
++static struct option const longopts[] =
++{
++ {GETOPT_HELP_OPTION_DECL},
++ {GETOPT_VERSION_OPTION_DECL},
++ {NULL, 0, NULL, 0}
++};
++
+void
+usage (int status)
+{
+int main(int argc, char **argv)
+{
+ struct group *gr;
-+ int retval;
++ int optc;
+
+ initialize_main (&argc, &argv);
+ program_name = argv[0];
+
+ atexit (close_stdout);
+
-+ if (argc > 1) {
-+ gr = getgrnam(argv[1]);
-+ if (gr) {
-+ printf("%d\n",gr->gr_gid);
-+ retval = 0;
-+ } else {
-+ retval = 1;
++ while ((optc = getopt_long (argc, argv, "+", longopts, NULL)) != -1) {
++ switch (optc) {
++ case_GETOPT_HELP_CHAR;
++ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
++ default:
++ usage (EXIT_FAILURE);
+ }
-+ } else {
-+ usage(retval);
+ }
-+ return (retval ? EXIT_FAILURE : EXIT_SUCCESS);
++
++ if (argc < optind + 1)
++ {
++ error (0, 0, _("missing operand"));
++ usage (EXIT_FAILURE);
++ }
++
++ if (optind + 2 < argc)
++ {
++ error (0, 0, _("extra operand %s"), quote (argv[optind + 2]));
++ usage (EXIT_FAILURE);
++ }
++
++ gr = getgrnam(argv[optind]);
++ if (gr == NULL) {
++ error (0, 0, _("cannot find group name %s"), quote(argv[optind]));
++ exit(EXIT_FAILURE);
++ } else
++ printf("%lu\n", (unsigned long int) gr->gr_gid);
++ exit(EXIT_SUCCESS);
+}
+
--- coreutils-4.5.3/po/POTFILES.in.orig Mon Jul 1 23:26:55 2002