]> git.pld-linux.org Git - packages/coreutils.git/blobdiff - coreutils-getgid.patch
- up to 8.3
[packages/coreutils.git] / coreutils-getgid.patch
index 6b503a26056b5f85d1bcdc754b47c548d3e58846..4f326e902ee06db6de4a0d4e074dcf97dbff6e2c 100644 (file)
@@ -1,14 +1,13 @@
-diff -Nur coreutils-4.5.3.orig/man/Makefile.am coreutils-4.5.3/man/Makefile.am
---- coreutils-4.5.3.orig/man/Makefile.am       Fri Aug  9 08:12:29 2002
-+++ coreutils-4.5.3/man/Makefile.am    Sun Oct 27 21:38:26 2002
-@@ -10,6 +10,7 @@
-   su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \
-   tty.1 uname.1 unexpand.1 uniq.1 unlink.1 uptime.1 users.1 vdir.1 wc.1 \
-   who.1 whoami.1 yes.1
-+man_MANS = getgid.1
- man_aux = $(dist_man_MANS:.1=.x)
+--- coreutils-6.10/man/Makefile.am.orig        2008-01-11 11:34:22.000000000 +0100
++++ coreutils-6.10/man/Makefile.am     2008-03-02 02:14:20.884410857 +0100
+@@ -59,6 +59,7 @@
+ false.1:      $(common_dep)   $(srcdir)/false.x       ../src/false.c
+ fmt.1:                $(common_dep)   $(srcdir)/fmt.x         ../src/fmt.c
+ fold.1:               $(common_dep)   $(srcdir)/fold.x        ../src/fold.c
++getgid.1:     $(common_dep)   $(srcdir)/getgid.x      ../src/getgid.c
+ groups.1:     $(common_dep)   $(srcdir)/groups.x      ../src/groups.c
+ head.1:               $(common_dep)   $(srcdir)/head.x        ../src/head.c
+ hostid.1:     $(common_dep)   $(srcdir)/hostid.x      ../src/hostid.c
 diff -Nur coreutils-4.5.3.orig/man/getgid.1 coreutils-4.5.3/man/getgid.1
 --- coreutils-4.5.3.orig/man/getgid.1  Thu Jan  1 01:00:00 1970
 +++ coreutils-4.5.3/man/getgid.1       Sun Oct 27 21:40:54 2002
@@ -27,7 +26,7 @@ diff -Nur coreutils-4.5.3.orig/man/getgid.1 coreutils-4.5.3/man/getgid.1
 +.SH AUTHOR
 +Written by Artur Frysiak.
 +.SH "REPORTING BUGS"
-+Report bugs to <feedback@pld.org.pl>.
++Report bugs to <feedback@pld-linux.org>.
 +.SH COPYRIGHT
 +Copyright \(co 1999 Artur Frysiak.
 +.br
@@ -35,6 +34,13 @@ diff -Nur coreutils-4.5.3.orig/man/getgid.1 coreutils-4.5.3/man/getgid.1
 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 +.SH "SEE ALSO"
 +.BR id (1)
+--- coreutils-4.5.3.orig/man/getgid.x  2007-02-13 17:29:53.000000000 +0100
++++ coreutils-4.5.3.orig/man/getgid.x  2008-08-08 20:54:14.890808765 +0200
+@@ -0,0 +1,4 @@
++[NAME]
++getgid \- print ID of given group
++[DESCRIPTION]
++.\" Add any additional description here
 diff -Nur coreutils-4.5.3.orig/man/pl/getgid.1 coreutils-4.5.3/man/pl/getgid.1
 --- coreutils-4.5.3.orig/man/pl/getgid.1       Thu Jan  1 01:00:00 1970
 +++ coreutils-4.5.3/man/pl/getgid.1    Sun Oct 27 21:46:48 2002
@@ -53,7 +59,7 @@ diff -Nur coreutils-4.5.3.orig/man/pl/getgid.1 coreutils-4.5.3/man/pl/getgid.1
 +.SH AUTOR
 +Napisane przez Artura Frysiaka.
 +.SH "ZG£ASZANIE B£ÊDÓW"
-+B³êdy proszê zg³aszaæ (w jêz. polskim lub angielskim) pod <feedback@pld.org.pl>.
++B³êdy proszê zg³aszaæ (w jêz. polskim lub angielskim) pod <feedback@pld-linux.org>.
 +.SH COPYRIGHT
 +Copyright \(co 1999 Artur Frysiak.
 +.br
@@ -61,24 +67,22 @@ diff -Nur coreutils-4.5.3.orig/man/pl/getgid.1 coreutils-4.5.3/man/pl/getgid.1
 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 +.SH ZOBACZ TAK¯E
 +.BR id (1)
-diff -Nur coreutils-4.5.3.orig/src/Makefile.am coreutils-4.5.3/src/Makefile.am
---- coreutils-4.5.3.orig/src/Makefile.am       Sun Oct 27 21:25:08 2002
-+++ coreutils-4.5.3/src/Makefile.am    Sun Oct 27 21:30:35 2002
-@@ -10,7 +10,7 @@
-   mkfifo mknod mv rm rmdir shred stat sync touch unlink \
-   cat cksum comm csplit cut expand fmt fold head join md5sum \
-   nl od paste pr ptx sha1sum sort split sum tac tail tr tsort unexpand uniq wc \
--  basename date dirname echo env expr factor false \
-+  basename date dirname echo env expr factor false getgid \
-   hostname id kill logname pathchk printenv printf pwd seq sleep tee \
-   test true tty whoami yes \
-   @OPTIONAL_BIN_PROGS@ @DF_PROG@
+--- coreutils-6.10/src/Makefile.am.orig        2008-03-02 02:12:29.418058752 +0100
++++ coreutils-6.10/src/Makefile.am     2008-03-02 02:14:46.205853844 +0100
+@@ -69,6 +69,7 @@
+   false               \
+   fmt         \
+   fold                \
++  getgid      \
+   ginstall    \
+   groups      \
+   head                \
 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,42 @@
+@@ -0,0 +1,106 @@
 +/* getgid - print GID of given group
-+   Copyright (C) 1999 Artur Frysiak <wiget@pld.org.pl>
++   Copyright (C) 1999 Artur Frysiak <wiget@pld-linux.org>
 +
 +   This program is free software; you can redistribute it and/or modify
 +   it under the terms of the GNU General Public License as published by
@@ -97,25 +101,118 @@ diff -Nur coreutils-4.5.3.orig/src/getgid.c coreutils-4.5.3/src/getgid.c
 +#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"
++
++#define AUTHORS proper_name ("Artur Frysiak")
++
++/* The name by which this program was run. */
++const char *program_name;
++
++static struct option const longopts[] =
++{
++  {GETOPT_HELP_OPTION_DECL},
++  {GETOPT_VERSION_OPTION_DECL},
++  {NULL, 0, NULL, 0}
++};
++
++void
++usage (int status)
++{
++  if (status != EXIT_SUCCESS)
++    fprintf (stderr, _("Try `%s --help' for more information.\n"),
++             program_name);
++  else
++    {
++      printf (_("\
++Usage: %s [OPTION]... [GROUPNAME]...\n\
++"),
++              program_name);
++      fputs (_("\
++Prints ID of given group name.\
++\n\
++"), stdout);
++      fputs (HELP_OPTION_DESCRIPTION, stdout);
++      fputs (VERSION_OPTION_DESCRIPTION, stdout);
++      emit_bug_reporting_address ();
++    }
++  exit (status);
++}
 +
 +int main(int argc, char **argv)
 +{
 +      struct group    *gr;
-+      int             retval;
-+
-+      if (argc > 1) {
-+              gr = getgrnam(argv[1]);
-+              if (gr) {
-+                      printf("%d\n",gr->gr_gid);
-+                      retval = 0;
-+              } else {
-+                      retval = 1;
++      int             optc;
++
++      initialize_main (&argc, &argv);
++      program_name = argv[0];
++
++      setlocale (LC_ALL, "");
++      bindtextdomain (PACKAGE, LOCALEDIR);
++      textdomain (PACKAGE);
++
++      atexit (close_stdout);
++
++      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 {
-+              printf(_("Usage:\n\t%s groupname\n"),argv[0]);
-+              retval = 1;
 +      }
-+      return retval;
++
++      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
++++ coreutils-4.5.3/po/POTFILES.in     Fri Nov  1 02:25:41 2002
+@@ -61,6 +61,7 @@
+ src/false.c
+ src/fmt.c
+ src/fold.c
++src/getgid.c
+ src/getlimits.c
+ src/group-list.c
+ src/groups.c
+--- coreutils-6.10/po/pl.po.orig       2008-03-02 02:12:29.526064907 +0100
++++ coreutils-6.10/po/pl.po    2008-03-02 02:15:20.139787629 +0100
+@@ -4152,6 +4152,15 @@
+ msgid "invalid number of columns: %s"
+ msgstr "b³êdna liczba kolumn: %s"
++#: src/getgid.c:37
++#, c-format
++msgid ""
++"Usage:\n"
++"\t%s groupname\n"
++msgstr ""
++"Składnia:\n"
++"\t%s nazwa-grupy\n"
++
+ #. This is a proper name. See the gettext manual, section Names.
+ #: src/getlimits.c:29 src/timeout.c:74 src/truncate.c:42
+ msgid "Padraig Brady"
+
This page took 0.038001 seconds and 4 git commands to generate.