This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] string.h to gdb_string.h


Kevin Buettner wrote:
> 
> On Jan 24,  6:06pm, David Smith wrote:
> 
> > Here's a minor cleanup patch to change 6 occurrences of <string.h> to
> > "gdb_string.h".  There were no changes in a test suite run after
> > applying this patch (under Red Hat Linux 7.0).  (There are a few other
> > files that use <string.h> instead of "gdb_string.h", but since these
> > files don't get compiled under a native Linux build, I didn't feel
> > comfortable including a patch for them.)
> >
> > 2001-01-24  David Smith  <dsmith@redhat.com>
> >
> >       * event-loop.c: Changed inclusion of string.h to gdb_string.h.
> >       * ser-pipe.c: Ditto.
> >       * mi/mi-cmds.c: Ditto.
> >       * mi/mi-console.c: Ditto.
> >       * mi/mi-getopt.c: Ditto.
> >       * mi/mi-parse.c: Ditto.
> >
> > Index: gdb/event-loop.c
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/event-loop.c,v
> > retrieving revision 1.9
> > diff -u -p -r1.9 event-loop.c
> > --- gdb/event-loop.c  2000/12/15 01:01:46     1.9
> > +++ gdb/event-loop.c  2001/01/24 23:43:19
> > @@ -1,5 +1,5 @@
> >  /* Event loop machinery for GDB, the GNU debugger.
> > -   Copyright 1999 Free Software Foundation, Inc.
> > +   Copyright 1999, 2001, Free Software Foundation, Inc.
> 
> The only nit that I have with these changes is the use of the
> comma after 2001 in the copyright notices.  The prevailing
> convention (if there is one) seems to be no comma after the
> final year.  Also, it is my understanding that year ranges
> (e.g 1998-2000) are forbidden and that the years should be
> spelled out explicitly.  (You got this part right, but it
> sure is tempting to use ranges.)
> 
> The ChangeLog entries probably ought to indicate the fact that
> you updated the copyright notice in these files too.
> 
> Kevin

Kevin,

Thanks for taking a look at this patch.  Here's a revised
patch/changelog entry with the changes you suggested.  Sorry about the
"," in the copyright notice.  I noticed that the original files had a
mix of styles and I picked one style to make them consistent. 
Unfortunately, I picked the wrong style...

2001-01-24  David Smith  <dsmith@redhat.com>

	* event-loop.c: Change inclusion of string.h to gdb_string.h and
	updated the copyright notice.
        * ser-pipe.c: Ditto.
        * mi/mi-cmds.c: Ditto.
        * mi/mi-console.c: Ditto.
        * mi/mi-getopt.c: Ditto.
        * mi/mi-parse.c: Ditto.

Index: gdb/event-loop.c
===================================================================
RCS file: /cvs/src/src/gdb/event-loop.c,v
retrieving revision 1.9
diff -u -p -r1.9 event-loop.c
--- gdb/event-loop.c    2000/12/15 01:01:46     1.9
+++ gdb/event-loop.c    2001/01/24 23:43:19
@@ -1,5 +1,5 @@
 /* Event loop machinery for GDB, the GNU debugger.
-   Copyright 1999 Free Software Foundation, Inc.
+   Copyright 1999, 2001 Free Software Foundation, Inc.
    Written by Elena Zannoni <ezannoni@cygnus.com> of Cygnus Solutions.
 
    This file is part of GDB.
@@ -33,7 +33,7 @@
 #endif
 
 #include <sys/types.h>
-#include <string.h>
+#include "gdb_string.h"
 #include <errno.h>
 #include <setjmp.h>
 #include <sys/time.h>
Index: gdb/ser-pipe.c
===================================================================
RCS file: /cvs/src/src/gdb/ser-pipe.c,v
retrieving revision 1.4
diff -u -p -r1.4 ser-pipe.c
--- gdb/ser-pipe.c      2000/12/15 01:01:49     1.4
+++ gdb/ser-pipe.c      2001/01/24 23:44:01
@@ -1,5 +1,5 @@
 /* Serial interface for a pipe to a separate program
-   Copyright 1999 Free Software Foundation, Inc.
+   Copyright 1999, 2001 Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions.
 
@@ -29,7 +29,7 @@
 #include <sys/socket.h>
 #include <sys/time.h>
 #include <fcntl.h>
-#include <string.h>
+#include "gdb_string.h"
 
 #include "signals.h"
 
Index: gdb/mi/mi-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-cmds.c,v
retrieving revision 1.5
diff -u -p -r1.5 mi-cmds.c
--- gdb/mi/mi-cmds.c    2000/07/30 01:48:28     1.5
+++ gdb/mi/mi-cmds.c    2001/01/24 23:44:25
@@ -1,5 +1,5 @@
 /* MI Command Set.
-   Copyright (C) 2000, Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions (a Red Hat company).
 
    This file is part of GDB.
@@ -22,7 +22,7 @@
 #include "defs.h"
 #include "top.h"
 #include "mi-cmds.h"
-#include <string.h>
+#include "gdb_string.h"
 
 extern void _initialize_mi_cmds (void);
 struct mi_cmd;
Index: gdb/mi/mi-console.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-console.c,v
retrieving revision 1.4
diff -u -p -r1.4 mi-console.c
--- gdb/mi/mi-console.c 2000/12/15 01:01:51     1.4
+++ gdb/mi/mi-console.c 2001/01/24 23:44:25
@@ -1,5 +1,5 @@
 /* MI Console code.
-   Copyright (C) 2000, Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions (a Red Hat company).
 
    This file is part of GDB.
@@ -21,7 +21,7 @@
 
 #include "defs.h"
 #include "mi-console.h"
-#include <string.h>
+#include "gdb_string.h"
 
 /* Convenience macro for allocting typesafe memory. */
 
Index: gdb/mi/mi-getopt.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-getopt.c,v
retrieving revision 1.3
diff -u -p -r1.3 mi-getopt.c
--- gdb/mi/mi-getopt.c  2000/05/16 05:07:53     1.3
+++ gdb/mi/mi-getopt.c  2001/01/24 23:44:25
@@ -1,5 +1,5 @@
 /* MI Command Set - MI Option Parser.
-   Copyright (C) 2000, Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions (a Red Hat company).
 
    This file is part of GDB.
@@ -21,7 +21,7 @@
 
 #include "defs.h"
 #include "mi-getopt.h"
-#include "string.h"
+#include "gdb_string.h"
 
 int
 mi_getopt (const char *prefix,
Index: gdb/mi/mi-parse.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-parse.c,v
retrieving revision 1.5
diff -u -p -r1.5 mi-parse.c
--- gdb/mi/mi-parse.c   2000/12/15 01:01:51     1.5
+++ gdb/mi/mi-parse.c   2001/01/24 23:44:26
@@ -1,5 +1,5 @@
 /* MI Command Set - MI parser.
-   Copyright (C) 2000, Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    Contributed by Cygnus Solutions (a Red Hat company).
 
    This file is part of GDB.
@@ -24,7 +24,7 @@
 #include "mi-parse.h"
 
 #include <ctype.h>
-#include <string.h>
+#include "gdb_string.h"
 
 #undef XMALLOC
 #define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]