summaryrefslogtreecommitdiff
path: root/libc/debug
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2008-09-26 16:27:00 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2008-09-26 16:27:00 +0000
commitb26073ea8b9473fd8f1d1edda0d4a63dc5a9dc83 (patch)
treea0f50ca1f91de15afce18ffcbc33c2740964ed36 /libc/debug
parent892052c4f276840e377448b23ce0a98e07ba614c (diff)
downloadeglibc2-b26073ea8b9473fd8f1d1edda0d4a63dc5a9dc83.tar.gz
libc:
* aclocal.m4 (ACX_PKGVERSION, ACX_BUGURL): Define. * configure.in: Use ACX_PKGVERSION and ACX_BUGURL. * configure: Regenerate. * config.h.in (PKGVERSION, REPORT_BUGS_TO): Undefine. * config.make.in (PKGVERSION, REPORT_BUGS_TO): Define. * catgets/gencat.c (more_help): Use REPORT_BUGS_TO. (print_version): Use PKGVERSION. * csu/version.c (banner): Use PKGVERSION and REPORT_BUGS_TO. * debug/Makefile ($(objpfx)catchsegv, $(objpfx)xtrace): Also substitute PKGVERSION and REPORT_BUGS_TO. * debug/catchsegv.sh: Use PKGVERSION and REPORT_BUGS_TO. * debug/pcprofiledump.c (print_version, argp_program_version_hook): New. (more_help): Use REPORT_BUGS_TO. * debug/xtrace.sh: Use PKGVERSION and REPORT_BUGS_TO. * elf/Makefile (common-ldd-rewrite): Also substitute PKGVERSION and REPORT_BUGS_TO. * elf/dl-close.c (_dl_close_worker): Use REPORT_BUGS_TO. * elf/ldconfig.c (doc): Use REPORT_BUGS_TO. (print_version): Use PKGVERSION. * elf/ldd.bash.in: Use PKGVERSION and REPORT_BUGS_TO. * elf/sln.c (usage): New. (main): Support --help and --version. * elf/sprof.c (doc): Use REPORT_BUGS_TO. (print_version): Use PKGVERSION. * iconv/iconv_prog.c (more_help): Use REPORT_BUGS_TO. (print_version): Use PKGVERSION. * iconv/iconvconfig.c (more_help): Use REPORT_BUGS_TO. (print_version): Use PKGVERSION. * locale/programs/locale.c (doc): Use REPORT_BUGS_TO. (print_version): Use PKGVERSION. * locale/programs/localedef.c (more_help): Use REPORT_BUGS_TO. (print_version): Use PKGVERSION. * login/programs/pt_chown.c * malloc/Makefile ($(objpfx)mtrace, $(objpfx)memusage): Also substitute PKGVERSION and REPORT_BUGS_TO. * malloc/memusage.sh: Use PKGVERSION and REPORT_BUGS_TO. * malloc/memusagestat.c (print_version, argp_program_version_hook): New. (more_help): Use REPORT_BUGS_TO. * malloc/mtrace.pl: Use PKGVERSION and REPORT_BUGS_TO. * manual/Makefile (libc.dvi, libc.pdf, libc.info, libc/index.html): Depend on pkgvers.texi. (pkgvers.texi, stamp-pkgvers): New. * manual/install.texi: Adjust bug database description. Use REPORT_BUGS_TO. * manual/libc.texinfo: Include pkgvers.texi. Use PKGVERSION. * nscd/nscd.c (doc): Use REPORT_BUGS_TO. (print_version): Use PKGVERSION. * nss/getent.c (doc): Use REPORT_BUGS_TO. (print_version): Use PKGVERSION. * nss/makedb.c (more_help): Use REPORT_BUGS_TO. (print_version): Use PKGVERSION. * posix/getconf.c (main): Send --version output to stdout. Use PKGVERSION. Support --help. * sunrpc/proto.h (REPORT_BUGS_TO, PKGVERSION): Define for cross-rpcgen. * sunrpc/rpc_main.c (usage, options_usage): Take STREAM and STATUS arguments. All callers changed. Use REPORT_BUGS_TO (print_version): New. (parseargs): Support --help and --version. * sunrpc/rpcinfo.c (usage): Take STREAM argument. All callers changed. Use REPORT_BUGS_TO. (print_version): New. (main): Use getopt_long. Support --help and --version. * sysdeps/unix/sysv/linux/lddlibc4.c (main): Support --help and --version. * timezone/Makefile: Use -DCROSS_ZIC for cross-zic. ($(objpfx)tzselect): Also substitute PKGVERSION and REPORT_BUGS_TO. * timezone/tzselect.ksh: Support --help and --version. * timezone/zdump.c (usage): New. (main): Use it. Support --help. Print program name and PKGVERSION in --version output. * timezone/zic.c (usage): Take STREAM and STATUS arguments. All callers changed. Use REPORT_BUGS_TO. (main): Support --help. Print program name and PKGVERSION in --version output. localedef: * configure.ac: Support --with-pkgversion and --with-bugurl. * configure, config.h.in: Regenerate. git-svn-id: svn://svn.eglibc.org/trunk@7026 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/debug')
-rw-r--r--libc/debug/Makefile8
-rwxr-xr-xlibc/debug/catchsegv.sh4
-rw-r--r--libc/debug/pcprofiledump.c24
-rwxr-xr-xlibc/debug/xtrace.sh4
4 files changed, 32 insertions, 8 deletions
diff --git a/libc/debug/Makefile b/libc/debug/Makefile
index 3c72f920a..9c73bc085 100644
--- a/libc/debug/Makefile
+++ b/libc/debug/Makefile
@@ -159,7 +159,9 @@ sLIBdir := $(shell echo $(slibdir) | sed 's,lib\(\|64\)$$,\\\\$$LIB,')
$(objpfx)catchsegv: catchsegv.sh $(common-objpfx)soversions.mk \
$(common-objpfx)config.make
slibpfx=`echo $(slibdir)|sed 's/lib\(64\|\)$$/\\\\\\\\$$LIB/'`; \
- sed -e 's|@VERSION@|$(version)|' -e "s|@SLIB@|$$slibpfx|" $< > $@.new
+ sed -e 's|@VERSION@|$(version)|' -e "s|@SLIB@|$$slibpfx|" \
+ -e 's|@PKGVERSION@|$(PKGVERSION)|' \
+ -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $< > $@.new
chmod 555 $@.new
mv -f $@.new $@
@@ -168,7 +170,9 @@ $(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o
$(objpfx)xtrace: xtrace.sh
rm -f $@.new
sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \
- -e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' $^ > $@.new \
+ -e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' \
+ -e 's|@PKGVERSION@|$(PKGVERSION)|' \
+ -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
&& rm -f $@ && mv $@.new $@ && chmod +x $@
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
diff --git a/libc/debug/catchsegv.sh b/libc/debug/catchsegv.sh
index 68fcb6989..7281f29d0 100755
--- a/libc/debug/catchsegv.sh
+++ b/libc/debug/catchsegv.sh
@@ -35,11 +35,11 @@ if test $# -eq 0; then
echo ' --help print this help, then exit'
echo ' --version print version number, then exit'
echo "For bug reporting instructions, please see:"
- echo "<http://www.gnu.org/software/libc/bugs.html>."
+ echo "@REPORT_BUGS_TO@."
exit 0
;;
--v | --ve | --ver | --vers | --versi | --versio | --version)
- echo 'catchsegv (GNU libc) @VERSION@'
+ echo 'catchsegv @PKGVERSION@@VERSION@'
echo 'Copyright (C) 2008 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.
diff --git a/libc/debug/pcprofiledump.c b/libc/debug/pcprofiledump.c
index 62c0d73f4..73c0c3ebf 100644
--- a/libc/debug/pcprofiledump.c
+++ b/libc/debug/pcprofiledump.c
@@ -66,6 +66,10 @@ static char *more_help (int key, const char *text, void *input);
/* Prototype for option handler. */
static error_t parse_opt (int key, char *arg, struct argp_state *state);
+/* Name and version of program. */
+static void print_version (FILE *stream, struct argp_state *state);
+void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
+
/* Data structure to communicate with argp functions. */
static struct argp argp =
{
@@ -197,15 +201,31 @@ parse_opt (int key, char *arg, struct argp_state *state)
static char *
more_help (int key, const char *text, void *input)
{
+ char *tp = NULL;
switch (key)
{
case ARGP_KEY_HELP_EXTRA:
/* We print some extra information. */
- return strdup (gettext ("\
+ if (asprintf (&tp, gettext ("\
For bug reporting instructions, please see:\n\
-<http://www.gnu.org/software/libc/bugs.html>.\n"));
+%s.\n"), REPORT_BUGS_TO) < 0)
+ return NULL;
+ return tp;
default:
break;
}
return (char *) text;
}
+
+/* Print the version information. */
+static void
+print_version (FILE *stream, struct argp_state *state)
+{
+ fprintf (stream, "pcprofiledump %s%s\n", PKGVERSION, VERSION);
+ fprintf (stream, gettext ("\
+Copyright (C) %s Free Software Foundation, Inc.\n\
+This is free software; see the source for copying conditions. There is NO\n\
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
+"), "2008");
+ fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
+}
diff --git a/libc/debug/xtrace.sh b/libc/debug/xtrace.sh
index 6902c4f4c..11f4f8127 100755
--- a/libc/debug/xtrace.sh
+++ b/libc/debug/xtrace.sh
@@ -55,12 +55,12 @@ Mandatory arguments to long options are also mandatory for any corresponding
short options.
For bug reporting instructions, please see:
-<http://www.gnu.org/software/libc/bugs.html>.\n"
+%s.\n" "@REPORT_BUGS_TO@"
exit 0
}
do_version() {
- echo 'xtrace (GNU libc) @VERSION@'
+ echo 'xtrace @PKGVERSION@@VERSION@'
printf $"Copyright (C) %s 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.