This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Binutils bug-reporting
- To: binutils at sourceware dot cygnus dot com
- Subject: Binutils bug-reporting
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Sat, 1 Apr 2000 13:40:15 +1000 (EST)
Hi All,
This patch replaces all the "Report bugs to..." strings with a
macro, defined in include/bin-bugs.h. The idea is to have just one
place to change should the bug reporting address need changing.
Inspired by a similar scheme in the gcc sources, and by H.J. Lu's patch
that uses a function in libiberty. I didn't like to add a libiberty
function because libiberty is really separate from binutils. If
binutils had it's own library, then a function could go there.
Comments? Any objections to committing this? I'll do all the mkdep
and automake stuff before I check this in.
Regards, Alan Modra
--
Linuxcare. Support for the Revolution.
include/ChangeLog
* bin-bugs.h: New file.
binutils/ChangeLog
* bucomm.h: #include "bin-bugs.h"
* addr2line.c (usage): Use REPORT_BUGS_TO.
* ar.c (usage): Likewise.
* nlmconv.c (show_usage): Likewise.
* nm.c (usage): Likewise.
* objcopy.c (copy_usage): Likewise.
(strip_usage): Likewise.
* objdump.c (usage): Likewise.
* readelf.c (usage): Likewise.
* strings.c (usage): Likewise.
* windres.c (usage): Likewise.
gas/ChangeLog
* as.h: #include "bin-bugs.h"
* as.c (show_usage): Use REPORT_BUGS_TO.
* gasp.c: #include "bin-bugs.h"
(show_usage): Use REPORT_BUGS_TO.
* config/tc-sparc.c (md_show_usage): Add a trailing newline.
gprof/ChangeLog
* gprof.h: #include "bin-bugs.h".
* gprof.c (usage): Use REPORT_BUGS_TO.
ld/ChangeLog
* ld.h: #include "bin-bugs.h"
* lexsup.c (help): Use REPORT_BUGS_TO.
Index: include/bin-bugs.h
===================================================================
RCS file: bin-bugs.h
diff -N bin-bugs.h
--- /dev/null Tue May 5 13:32:27 1998
+++ bin-bugs.h Fri Mar 31 19:35:45 2000
@@ -0,0 +1,3 @@
+#ifndef REPORT_BUGS_TO
+#define REPORT_BUGS_TO "Report bugs to bug-gnu-utils@gnu.org\n"
+#endif
Index: binutils/addr2line.c
===================================================================
RCS file: /cvs/src/src/binutils/addr2line.c,v
retrieving revision 1.2
diff -u -p -r1.2 addr2line.c
--- addr2line.c 1999/07/11 20:02:14 1.2
+++ addr2line.c 2000/04/01 02:53:26
@@ -80,7 +80,7 @@ Usage: %s [-CfsHV] [-b bfdname] [--targe
program_name);
list_supported_targets (program_name, stream);
if (status == 0)
- fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n"));
+ fprintf (stream, _(REPORT_BUGS_TO));
exit (status);
}
Index: binutils/ar.c
===================================================================
RCS file: /cvs/src/src/binutils/ar.c,v
retrieving revision 1.8
diff -u -p -r1.8 ar.c
--- ar.c 1999/10/15 16:50:47 1.8
+++ ar.c 2000/04/01 02:53:29
@@ -283,7 +283,7 @@ usage (help)
list_supported_targets (program_name, stderr);
if (help)
- fprintf (s, _("Report bugs to bug-gnu-utils@gnu.org\n"));
+ fprintf (s, _(REPORT_BUGS_TO));
xexit (help ? 0 : 1);
}
Index: binutils/bucomm.h
===================================================================
RCS file: /cvs/src/src/binutils/bucomm.h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 bucomm.h
--- bucomm.h 1999/05/03 07:29:09 1.1.1.1
+++ bucomm.h 2000/04/01 02:53:29
@@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place - Suit
#include <sys/types.h>
#include "config.h"
+#include "bin-bugs.h"
#ifdef USE_BINARY_FOPEN
#include "fopen-bin.h"
Index: binutils/nlmconv.c
===================================================================
RCS file: /cvs/src/src/binutils/nlmconv.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 nlmconv.c
--- nlmconv.c 1999/05/03 07:29:10 1.1.1.1
+++ nlmconv.c 2000/04/01 02:53:35
@@ -1138,7 +1138,7 @@ Usage: %s [-dhV] [-I bfdname] [-O bfdnam
[in-file [out-file]]\n"),
program_name);
if (status == 0)
- fprintf (file, _("Report bugs to bug-gnu-utils@gnu.org\n"));
+ fprintf (file, _(REPORT_BUGS_TO));
exit (status);
}
Index: binutils/nm.c
===================================================================
RCS file: /cvs/src/src/binutils/nm.c,v
retrieving revision 1.4
diff -u -p -r1.4 nm.c
--- nm.c 2000/01/28 01:06:37 1.4
+++ nm.c 2000/04/01 02:53:38
@@ -301,7 +301,7 @@ Usage: %s [-aABCDglnopPrsuvV] [-t radix]
program_name);
list_supported_targets (program_name, stream);
if (status == 0)
- fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n"));
+ fprintf (stream, _(REPORT_BUGS_TO));
exit (status);
}
Index: binutils/objcopy.c
===================================================================
RCS file: /cvs/src/src/binutils/objcopy.c,v
retrieving revision 1.6
diff -u -p -r1.6 objcopy.c
--- objcopy.c 1999/11/22 09:42:42 1.6
+++ objcopy.c 2000/04/01 02:53:42
@@ -341,7 +341,7 @@ copy_usage (stream, exit_status)
"));
list_supported_targets (program_name, stream);
if (exit_status == 0)
- fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n"));
+ fprintf (stream, _(REPORT_BUGS_TO));
exit (exit_status);
}
@@ -373,7 +373,7 @@ strip_usage (stream, exit_status)
list_supported_targets (program_name, stream);
if (exit_status == 0)
- fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n"));
+ fprintf (stream, _(REPORT_BUGS_TO));
exit (exit_status);
}
Index: binutils/objdump.c
===================================================================
RCS file: /cvs/src/src/binutils/objdump.c,v
retrieving revision 1.18
diff -u -p -r1.18 objdump.c
--- objdump.c 2000/02/21 12:01:27 1.18
+++ objdump.c 2000/04/01 02:53:49
@@ -274,7 +274,7 @@ usage (stream, status)
disassembler_usage (stream);
}
if (status == 0)
- fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n"));
+ fprintf (stream, _(REPORT_BUGS_TO));
exit (status);
}
Index: binutils/readelf.c
===================================================================
RCS file: /cvs/src/src/binutils/readelf.c,v
retrieving revision 1.46
diff -u -p -r1.46 readelf.c
--- readelf.c 2000/03/30 23:37:22 1.46
+++ readelf.c 2000/04/01 02:54:13
@@ -1700,7 +1700,7 @@ usage ()
fprintf (stdout, _(" -I or --histogram Display histogram of bucket list lengths\n"));
fprintf (stdout, _(" -v or --version Display the version number of readelf\n"));
fprintf (stdout, _(" -H or --help Display this information\n"));
- fprintf (stdout, _("Report bugs to bug-gnu-utils@gnu.org\n"));
+ fprintf (stdout, _(REPORT_BUGS_TO));
exit (0);
}
Index: binutils/strings.c
===================================================================
RCS file: /cvs/src/src/binutils/strings.c,v
retrieving revision 1.2
diff -u -p -r1.2 strings.c
--- strings.c 1999/12/26 18:49:30 1.2
+++ strings.c 2000/04/01 02:54:13
@@ -509,6 +509,6 @@ Usage: %s [-afov] [-n min-len] [-min-len
program_name);
list_supported_targets (program_name, stream);
if (status == 0)
- fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n"));
+ fprintf (stream, _(REPORT_BUGS_TO));
exit (status);
}
Index: binutils/windres.c
===================================================================
RCS file: /cvs/src/src/binutils/windres.c,v
retrieving revision 1.5
diff -u -p -r1.5 windres.c
--- windres.c 2000/01/07 22:33:48 1.5
+++ windres.c 2000/04/01 02:54:13
@@ -734,7 +734,7 @@ extension if not specified. A single fi
No input-file is stdin, default rc. No output-file is stdout, default rc.\n"));
list_supported_targets (program_name, stream);
if (status == 0)
- fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n"));
+ fprintf (stream, _(REPORT_BUGS_TO));
exit (status);
}
Index: gas/as.c
===================================================================
RCS file: /cvs/src/src/gas/as.c,v
retrieving revision 1.7
diff -u -p -r1.7 as.c
--- as.c 2000/01/26 22:48:31 1.7
+++ as.c 2000/04/01 02:54:33
@@ -322,7 +322,8 @@ Options:\n\
md_show_usage (stream);
- fprintf (stream, _("\nReport bugs to bug-gnu-utils@gnu.org\n"));
+ fputc ('\n', stream);
+ fprintf (stream, _(REPORT_BUGS_TO));
}
/*
Index: gas/as.h
===================================================================
RCS file: /cvs/src/src/gas/as.h,v
retrieving revision 1.9
diff -u -p -r1.9 as.h
--- as.h 2000/03/26 14:47:33 1.9
+++ as.h 2000/04/01 02:54:34
@@ -38,6 +38,7 @@
*/
#include "config.h"
+#include "bin-bugs.h"
/* This is the code recommended in the autoconf documentation, almost
verbatim. If it doesn't work for you, let me know, and notify
Index: gas/gasp.c
===================================================================
RCS file: /cvs/src/src/gas/gasp.c,v
retrieving revision 1.6
diff -u -p -r1.6 gasp.c
--- gasp.c 2000/03/26 14:47:33 1.6
+++ gasp.c 2000/04/01 02:54:42
@@ -50,6 +50,7 @@ suitable for gas to consume.
*/
#include "config.h"
+#include "bin-bugs.h"
#include <stdio.h>
#include <string.h>
@@ -3550,7 +3551,7 @@ Usage: %s \n\
[-Ipath] add to include path list\n\
[in-file]\n"));
if (status == 0)
- printf (_("\nReport bugs to bug-gnu-utils@gnu.org\n"));
+ printf (_(REPORT_BUGS_TO));
exit (status);
}
Index: gas/config/tc-sparc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-sparc.c,v
retrieving revision 1.13
diff -u -p -r1.13 tc-sparc.c
--- tc-sparc.c 2000/02/28 03:51:32 1.13
+++ tc-sparc.c 2000/04/01 02:54:50
@@ -638,7 +638,7 @@ md_show_usage (stream)
-EL generate code for a little endian machine\n\
-EB generate code for a big endian machine\n\
--little-endian-data generate code for a machine having big endian\n\
- instructions and little endian data."));
+ instructions and little endian data.\n"));
#endif
}
Index: gprof/gprof.c
===================================================================
RCS file: /cvs/src/src/gprof/gprof.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 gprof.c
--- gprof.c 1999/05/03 07:29:11 1.1.1.1
+++ gprof.c 2000/04/01 02:55:06
@@ -157,7 +157,7 @@ Usage: %s [-[abcDhilLsTvwxyz]] [-[ACeEfF
[image-file] [profile-file...]\n"),
whoami);
if (status == 0)
- fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n"));
+ fprintf (stream, _(REPORT_BUGS_TO));
done (status);
}
Index: gprof/gprof.h
===================================================================
RCS file: /cvs/src/src/gprof/gprof.h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 gprof.h
--- gprof.h 1999/05/03 07:29:11 1.1.1.1
+++ gprof.h 2000/04/01 02:55:06
@@ -76,6 +76,7 @@
# define N_(String) (String)
#endif
+#include "bin-bugs.h"
/*
* These may already be defined on some systems. We could probably
Index: ld/ld.h
===================================================================
RCS file: /cvs/src/src/ld/ld.h,v
retrieving revision 1.3
diff -u -p -r1.3 ld.h
--- ld.h 2000/01/05 14:12:23 1.3
+++ ld.h 2000/04/01 02:55:46
@@ -45,6 +45,8 @@
# define N_(String) (String)
#endif
+#include "bin-bugs.h"
+
/* Look in this environment name for the linker to pretend to be */
#define EMULATION_ENVIRON "LDEMULATION"
/* If in there look for the strings: */
Index: ld/lexsup.c
===================================================================
RCS file: /cvs/src/src/ld/lexsup.c,v
retrieving revision 1.7
diff -u -p -r1.7 lexsup.c
--- lexsup.c 1999/09/12 16:40:09 1.7
+++ lexsup.c 2000/04/01 02:55:50
@@ -1162,6 +1162,6 @@ help ()
printf (_("%s: emulation specific options:\n"), program_name);
ldemul_list_emulation_options (stdout);
printf ("\n");
-
- printf (_("\nReport bugs to bug-gnu-utils@gnu.org\n"));
+
+ printf (_(REPORT_BUGS_TO));
}