Re: [PATCH RFC] Update/correct copyright notices

Kevin Buettner
2001-02-28T14:56:00Z

On Feb 28, 8:56am, Michael Elizabeth Chastain wrote:

> Proofread. Several glitches found.

Wow! I'm impressed at how thorough you were. Thanks!

> ===
>
> gdb/config/i386/xm-ptx4.h has a formatting problem.
>
> diff -upr gdb.orig/config/i386/xm-ptx4.h gdb/config/i386/xm-ptx4.h
> --- gdb.orig/config/i386/xm-ptx4.h Wed Jul 7 13:13:44 1999
> +++ gdb/config/i386/xm-ptx4.h Wed Feb 28 01:17:13 2001
> @@ -1,6 +1,6 @@
> /* Definitions to make GDB run on a Sequent Symmetry under ptx, with
> - Weitek 1167 and i387 support. Copyright 1986, 1987, 1989, 1992,
> - 1993 Free Software Foundation, Inc.
> + Weitek 1167 and i387 support. Copyright 1986, 1987, 1989, 1992, 1993,
> + Weitek 1167 and i387 support. 1994 Free Software Foundation, Inc.
>
> This file is part of GDB.

This was caused by my script attempting to maintain the same prefix at
the start of every comment. E.g. it is desirable to have "# " at the
beginning of each line in many of the files which use the pound sign
as a comment character. And awk scripts use "dnl" to beginnin
comments. Anyway, I've put a special case in for *.[hc] files and now
this portion of the patch looks like this instead:

diff -upr gdb.orig/config/i386/xm-ptx4.h gdb/config/i386/xm-ptx4.h
--- gdb.orig/config/i386/xm-ptx4.h Wed Jul 7 13:13:44 1999
+++ gdb/config/i386/xm-ptx4.h Wed Feb 28 15:03:33 2001
@@ -1,6 +1,7 @@
/* Definitions to make GDB run on a Sequent Symmetry under ptx, with
- Weitek 1167 and i387 support. Copyright 1986, 1987, 1989, 1992,
- 1993 Free Software Foundation, Inc.
+ Weitek 1167 and i387 support.
+ Copyright 1986, 1987, 1989, 1992, 1993, 1994
+ Free Software Foundation, Inc.

This file is part of GDB.

> gdb/mipsread.c dropped some years. According to the CVS log and the
> ChangeLog, this file was edited on 2001-02-10, but "2001" was dropped.
> The file is also mentioned in ChangeLog-1998, but "1998" was dropped.
>
> diff -upr gdb.orig/mipsread.c gdb/mipsread.c
> --- gdb.orig/mipsread.c Thu Feb 15 19:58:01 2001
> +++ gdb/mipsread.c Wed Feb 28 01:17:14 2001
> @@ -1,5 +1,6 @@
> /* Read a symbol table in MIPS' format (Third-Eye).
> - Copyright 1986, 87, 89, 90, 91, 92, 93, 94, 95, 96, 1998, 2001
> + Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
> + 1999, 2000
> Free Software Foundation, Inc.
> Contributed by Alessandro Forin (af@cs.cmu.edu) at CMU. Major work
> by Per Bothner, John Gilmore and Ian Lance Taylor at Cygnus Support.

This one was very puzzling to me at first. Errors such as these were
starting me to doubt the efficacy of the script! But in each case,
the ChangeLog files are in error.

For the 2001-02-10 change, I see this ChangeLog entry:

2000-02-10 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>

* mipsread.c (read_alphacoff_dynamic_symtab): Replace alloca calls
with xmalloc calls and cleanups.

This *does* appear in the current ChangeLog file so it's obvious that
Peter meant 2001. I think this ChangeLog entry ought to be fixed
especially since it's in the current ChangeLog.

As to the dropping of 1998, I see the following ChangeLog entry:

1998-10-13 Jason Molenda (jsm@bugshack.cygnus.com)

...

* ax-gdb.c breakpoint.c coffread.c corelow.c dbxread.c
dwarf2read.c dwarfread.c elfread.c eval.c exec.c infcmd.c infrun.c
mipsread.c nlmread.c os9kread.c parse.c printcmd.c symfile.c
symmisc.c symtab.c thread.c top.c tracepoint.c typeprint.c
valops.c: Cast parameters passed to make_cleanup to use the new
make_cleanup_func typedef.

The script regarded this list of files as a sentence instead of a
file list because they're not comma separated. I'm still mulling
this one over and may think of a way to change my script to accomodate
this type of error. (It's likely that it occurs elsewhere too.)

> gdb/thread.c changed the nominal copyright owner! The old file has no
> mention of "Free Software Foundation, Inc." The new file has no mention
> of "Lynx Real-Time Systems, Inc. Los Gatos, CA." I recommend that
> we specifically check that Lynx has an assignment on file that covers
> gdb/thread.c, and then make sure that their "Contributed by ..." line
> comes after the "Copyright Free Software Foundation, Inc." line.
>
> diff -upr gdb.orig/thread.c gdb/thread.c
> --- gdb.orig/thread.c Mon Jan 29 17:06:26 2001
> +++ gdb/thread.c Wed Feb 28 01:17:14 2001
> @@ -1,7 +1,6 @@
> /* Multi-process/thread control for GDB, the GNU debugger.
> - Copyright 1986, 1987, 1988, 1993, 1998, 1999, 2000, 2001
> -
> - Contributed by Lynx Real-Time Systems, Inc. Los Gatos, CA.
> + Copyright 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
> + 2000, 2001
> Free Software Foundation, Inc.
>
> This file is part of GDB.

Good catch. I've revised my script so that it now makes the following
change instead:

diff -upr gdb.orig/thread.c gdb/thread.c
--- gdb.orig/thread.c Mon Jan 29 17:06:26 2001
+++ gdb/thread.c Wed Feb 28 15:03:34 2001
@@ -1,8 +1,9 @@
/* Multi-process/thread control for GDB, the GNU debugger.
- Copyright 1986, 1987, 1988, 1993, 1998, 1999, 2000, 2001
-
- Contributed by Lynx Real-Time Systems, Inc. Los Gatos, CA.
+ Copyright 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001
Free Software Foundation, Inc.
+ Contributed by Lynx Real-Time Systems, Inc. Los Gatos, CA.
+

This file is part of GDB.

> gdb/nindy-share/* is problematic. Changelog-1993 says:
>
> * nindy-share/*, remote-nindy.c: Extensive hacking to make it
> conform to GDB conventions like using memcpy not bcopy, serial.h,
> etc. This is to make it host on Solaris, AIX, etc.
>
> ... so these files will need hand analysis.
>
> I grepped for '\/\*' in ChangeLog-* and ChangeLog and found some more
> instances of this. I recomend hand-checking for this problem in a
> subsequent task.

Yes, the use of ``*'' as a filename wildcard in ChangeLog entries is
really quite annoying. There were also entries that said foo.[hc] or
sometimes {foo,bar}.c (or sometimes a combination of the two), but I
was able to handle these cases.

The problem with * though is that you have nothing concrete to work
with. Sure, you can look at the current sources, but it is totally
inappropriate to mark a recently created file with a copyright date
of (e.g) 1988 just because some really old ChangeLog entry is using a
wildcard. if you really wanted to do it right, you'd have to
(attempt) to check out the files from CVS for that year, but this
won't really work either since CVS wasn't in use from the very
beginning.

Anyway, I agree with you that some hand analysis will be needed.
For a first cut, however, I think it's sufficient to simply ignore
any entries which use * as a wildcard. I think this is adequate
for two reasons: 1) Changes denoted by using a wildcard often
denote maintenance activities. There's not much intellectual
property tied up in such changes. 2) The rule regarding the
merging of the earlier dates that appeared in the original copyright
notice will pick up a lot of these anyway.

FWIW, here's a more complete list pruned from ``fixdates --show-only'':

gdb/*-dep.c: 1988, 1989
gdb/*-exp.y: 1993
gdb/*.*: 1989
gdb/*.c: 1988
gdb/*dep.c: 1990
gdb/config/*: 1990
gdb/config/*.mh: 1992, 1993
gdb/config/*.mt: 1992, 1993
gdb/config/*/*.mh: 1994, 1998
gdb/config/*/*.mt: 1994, 1995
gdb/config/*/nm-*.h: 1993
gdb/config/*/tm-*.h: 1993
gdb/config/*/xm-*.h: 1993
gdb/config/convex/*: 1999
gdb/config/gould/*: 1999, 2000
gdb/config/i386/*aix*: 1993
gdb/config/i860/*: 1993
gdb/config/m68k/*delta68*: 1993
gdb/config/m68k/tm-*.h: 1993
gdb/config/m88k/xm-*.h: 1993
gdb/config/mips/tm-*.h: 1998
gdb/config/mt-*mips: 1992
gdb/config/powerpc/*.mt: 1996
gdb/config/pyr/*: 1999
gdb/config/sparc/*linux*: 1998
gdb/config/sun*: 1990
gdb/config/tahoe/*: 1999
gdb/deblib/connection/*: 1992
gdb/doc/*-config.texi: 1993
gdb/doc/*-m4.texinfo: 1991
gdb/doc/rc-*: 1991
gdb/gdbserver/*: 1994
gdb/java-*: 1997
gdb/m*.h: 1989
gdb/m-*.h: 1988, 1989, 1990
gdb/m-hp*.h: 1989
gdb/nindy-share/*: 1993
gdb/nm-*: 1993
gdb/tconfig/sun*4: 1991
gdb/testsuite/*/Makefile.in: 1993, 1996
gdb/testsuite/*/configure: 1996
gdb/testsuite/*/gdbme.*: 1994
gdb/testsuite/config/*-gdb.exp: 1993
gdb/testsuite/config/mt-*: 1993, 1999
gdb/testsuite/gdb.*/*.exp: 1997
gdb/testsuite/gdb.base/*.c: 1997
gdb/testsuite/gdb.base/*.exp: 1995
gdb/testsuite/gdb.base/langs*: 1995
gdb/testsuite/gdb.c++/*.exp: 1995
gdb/testsuite/gdb.chill/*.exp: 1995, 1997
gdb/testsuite/gdb.disasm/*.mt: 1997
gdb/testsuite/gdb.gdbtk/*: 1999
gdb/testsuite/gdb.hp/*.exp: 1999
gdb/testsuite/gdb.t*/*.exp: 1993
gdb/testsuite/gdb.t*/configure.in: 1993
gdb/testsuite/gdb.t2*: 1993
gdb/testsuite/gdb.t2*/Makefile.in: 1993
gdb/testsuite/gdb.trace/*.exp: 1998
gdb/tm-*: 1993
gdb/tm-*.h: 1991
gdb/xconfig/i386*: 1990, 1991
gdb/xm-*: 1993
gdb/xm-*.h: 1990, 1991

Kevin