This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for --version output
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: <gcc-patches at gcc dot gnu dot org>, <java-patches at gcc dot gnu dot org>
- Date: Thu, 31 Jan 2002 18:43:56 +0000 (GMT)
- Subject: Patch for --version output
This patch makes some programs in GCC follow the GNU Coding Standards
for --version output.
Note (Ada): the Ada programs don't support --version at all; hopefully
the Ada maintainers will address this (ada/4720).
Note (Fortran): though g77 now follows what the GNU Coding Standards
say is the correct format where a program has its own version
different from the overall package's version, does g77, only now
distributed as an integrated part of GCC, really still need its own
version?
Note (Java): I haven't touched the programs from Classpath. But note
that rmic should only include the most recent copyright year in its
--version output, and rmiregistry doesn't seem to support --version
yet.
Note (Java): is the full version string, which except for releases
includes the date and "(experimental)" or "(prerelease)", available
within libgcj? If so, it would be appropriate to use the full version
in --version output.
Note (gccbug): gccbug still uses the GNATS version number in the
X-send-pr-version header, since I don't know what GNATS uses that
information for.
Note (general): should the copyright notices in --version output say
"Free Software Foundation, Inc." (most programs) or just plain "Free
Software Foundation" (some libgcj programs)?
Bootstrapped with no regressions on i686-pc-linux-gnu. OK to commit?
gcc:
2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
* gccbug.in: Follow GNU Coding Standards for --version. Use GCC
version rather than GNATS version in --version output.
gcc/f:
2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
* g77spec.c (lang_specific_driver): Follow GNU Coding Standards
for --version.
gcc/java:
2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
* gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
Follow GNU Coding Standards for --version.
libjava:
2002-01-31 Joseph S. Myers <jsm28@cam.ac.uk>
* gnu/gcj/convert/Convert.java: Only include one copyright year in
--version output.
diff -ruN GCC.orig/gcc/f/g77spec.c GCC/gcc/f/g77spec.c
--- GCC.orig/gcc/f/g77spec.c Tue Jan 8 09:54:53 2002
+++ GCC/gcc/f/g77spec.c Tue Jan 29 18:29:51 2002
@@ -374,7 +374,7 @@
case OPTION_version:
printf ("\
-GNU Fortran %s (Fortran Frontend version %s)\n\
+GNU Fortran (GCC %s) %s\n\
Copyright (C) 2002 Free Software Foundation, Inc.\n\
\n\
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.\n\
diff -ruN GCC.orig/gcc/gccbug.in GCC/gcc/gccbug.in
--- GCC.orig/gcc/gccbug.in Tue Oct 9 09:55:26 2001
+++ GCC/gcc/gccbug.in Tue Jan 29 18:27:31 2002
@@ -1,6 +1,6 @@
#!/bin/sh
# Submit a problem report to a GNATS site.
-# Copyright (C) 1993, 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1993, 2000, 2001, 2002 Free Software Foundation, Inc.
# Contributed by Brendan Kehoe (brendan@cygnus.com), based on a
# version written by Heinz G. Seidl (hgs@cygnus.com).
#
@@ -183,7 +183,14 @@
-l | -CL | --lisp) FORMAT=lisp ;;
--request-id) REQUEST_ID=true ;;
-h | --help) echo "$USAGE"; $REMOVE_TEMP; exit 0 ;;
- -V | --version) echo "$VERSION"; $REMOVE_TEMP; exit 0 ;;
+ -V | --version) cat <<EOF
+gccbug (GCC) $DEFAULT_RELEASE
+Copyright (C) 2002 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+EOF
+ $REMOVE_TEMP; exit 0 ;;
-*) echo "$USAGE" ; $REMOVE_TEMP; exit 1 ;;
*) echo "$USAGE" ; $REMOVE_TEMP; exit 1
esac
diff -ruN GCC.orig/gcc/java/gjavah.c GCC/gcc/java/gjavah.c
--- GCC.orig/gcc/java/gjavah.c Thu Jan 17 09:19:44 2002
+++ GCC/gcc/java/gjavah.c Tue Jan 29 18:36:04 2002
@@ -2185,8 +2185,8 @@
static void
version ()
{
- printf ("gcjh (%s)\n\n", version_string);
- printf ("Copyright (C) 2001 Free Software Foundation, Inc.\n");
+ printf ("gcjh (GCC) %s\n\n", version_string);
+ printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n");
printf ("This is free software; see the source for copying conditions. There is NO\n");
printf ("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n");
exit (0);
diff -ruN GCC.orig/gcc/java/jcf-dump.c GCC/gcc/java/jcf-dump.c
--- GCC.orig/gcc/java/jcf-dump.c Thu Dec 27 18:08:41 2001
+++ GCC/gcc/java/jcf-dump.c Tue Jan 29 18:36:33 2002
@@ -1,7 +1,7 @@
/* Program to dump out a Java(TM) .class file.
Functionally similar to Sun's javap.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
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
@@ -822,8 +822,8 @@
static void
version ()
{
- printf ("jcf-dump (%s)\n\n", version_string);
- printf ("Copyright (C) 2001 Free Software Foundation, Inc.\n");
+ printf ("jcf-dump (GCC) %s\n\n", version_string);
+ printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n");
printf ("This is free software; see the source for copying conditions. There is NO\n");
printf ("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n");
exit (0);
diff -ruN GCC.orig/gcc/java/jv-scan.c GCC/gcc/java/jv-scan.c
--- GCC.orig/gcc/java/jv-scan.c Thu Dec 27 18:08:41 2001
+++ GCC/gcc/java/jv-scan.c Tue Jan 29 18:36:50 2002
@@ -1,5 +1,5 @@
/* Main for jv-scan
- Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
This file is part of GNU CC.
@@ -118,8 +118,8 @@
static void
version ()
{
- printf ("jv-scan (%s)\n\n", version_string);
- printf ("Copyright (C) 2001 Free Software Foundation, Inc.\n");
+ printf ("jv-scan (GCC) %s\n\n", version_string);
+ printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n");
printf ("This is free software; see the source for copying conditions. There is NO\n");
printf ("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n");
exit (0);
diff -ruN GCC.orig/libjava/gnu/gcj/convert/Convert.java GCC/libjava/gnu/gcj/convert/Convert.java
--- GCC.orig/libjava/gnu/gcj/convert/Convert.java Thu Jan 10 19:03:24 2002
+++ GCC/libjava/gnu/gcj/convert/Convert.java Tue Jan 29 18:41:24 2002
@@ -45,7 +45,7 @@
+ ") "
+ System.getProperty("java.vm.version"));
System.out.println();
- System.out.println("Copyright 1999, 2002 Free Software Foundation");
+ System.out.println("Copyright (C) 2002 Free Software Foundation");
System.out.println("This is free software; see the source for copying conditions. There is NO");
System.out.println("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.");
System.exit(0);
--
Joseph S. Myers
jsm28@cam.ac.uk