aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog94
-rw-r--r--INSTALL23
-rw-r--r--Makefile13
-rw-r--r--aclocal.m448
-rw-r--r--catgets/gencat.c9
-rw-r--r--config.h.in6
-rw-r--r--config.make.in6
-rwxr-xr-xconfigure66
-rw-r--r--configure.in7
-rw-r--r--csu/version.c4
-rw-r--r--debug/Makefile8
-rwxr-xr-xdebug/catchsegv.sh8
-rw-r--r--debug/pcprofiledump.c11
-rwxr-xr-xdebug/xtrace.sh7
-rw-r--r--elf/Makefile9
-rw-r--r--elf/dl-close.c2
-rw-r--r--elf/ldconfig.c9
-rw-r--r--elf/ldd.bash.in7
-rw-r--r--elf/pldd.c30
-rw-r--r--elf/sln.c6
-rwxr-xr-xelf/sotruss.ksh7
-rw-r--r--elf/sprof.c9
-rw-r--r--iconv/iconv_prog.c9
-rw-r--r--iconv/iconvconfig.c9
-rw-r--r--locale/programs/locale.c9
-rw-r--r--locale/programs/localedef.c16
-rw-r--r--login/programs/pt_chown.c17
-rw-r--r--malloc/Makefile8
-rwxr-xr-xmalloc/memusage.sh7
-rw-r--r--malloc/memusagestat.c15
-rw-r--r--malloc/mtrace.pl7
-rw-r--r--manual/Makefile16
-rw-r--r--manual/install.texi19
-rw-r--r--manual/libc.texinfo17
-rw-r--r--nscd/nscd.c9
-rw-r--r--nss/getent.c6
-rw-r--r--nss/makedb.c9
-rw-r--r--posix/getconf.c6
-rw-r--r--sunrpc/proto.h3
-rw-r--r--sunrpc/rpc_main.c6
-rw-r--r--sunrpc/rpcinfo.c6
-rw-r--r--sysdeps/unix/sysv/linux/lddlibc4.c6
42 files changed, 470 insertions, 119 deletions
diff --git a/ChangeLog b/ChangeLog
index 52bf3911e6..011e854ad6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,99 @@
2012-11-09 Joseph Myers <joseph@codesourcery.com>
+ * aclocal.m4 (ACX_PKGVERSION): New macro.
+ (ACX_BUGURL): Likewise.
+ * configure.in: Use ACX_PKGVERSION and ACX_BUGURL.
+ (PKGVERSION): New AC_DEFINE_UNQUOTED.
+ (REPORT_BUGS_TO): Likewise.
+ * configure: Regenerated.
+ * config.h.in (PKGVERSION): New macro.
+ (REPORT_BUGS_TO): Likewise.
+ * config.make.in (PKGVERSION): New variable.
+ (PKGVERSION_TEXI): Likewise.
+ (REPORT_BUGS_TO): Likewise.
+ (REPORT_BUGS_TEXI): Likewise.
+ * Makefile (format-me): Use -I$(common-objpfx)manual.
+ (INSTALL): Depend on $(common-objpfx)manual/pkgvers.texi.
+ ($(common-objpfx)manual/%): New target.
+ (manual/%): Remove target.
+ * 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): Also substitute PKGVERSION
+ and REPORT_BUGS_TO.
+ ($(objpfx)xtrace): Likewise.
+ * debug/catchsegv.sh: Use PKGVERSION and REPORT_BUGS_TO.
+ * debug/pcprofiledump.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * debug/xtrace.sh (do_help): Use REPORT_BUGS_TO.
+ (do_version): Use PKGVERSION.
+ * elf/Makefile ($(objpfx)sotruss): Also substitute PKGVERSION and
+ REPORT_BUGS_TO.
+ (common-ldd-rewrite): Likewise.
+ * elf/dl-close.c (_dl_close_worker): Use REPORT_BUGS_TO.
+ * elf/ldconfig.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * elf/ldd.bash.in: Use PKGVERSION and REPORT_BUGS_TO.
+ * elf/pldd.c (argp_program_bug_address): Remove variable.
+ (more_help): New function.
+ (argp): Use more_help.
+ (print_version): Use PKGVERSION.
+ * elf/sln.c (main): Use PKGVERSION.
+ (usage): Use REPORT_BUGS_TO.
+ * elf/sotruss.ksh (do_help): Use REPORT_BUGS_TO.
+ (top level): Use PKGVERSION.
+ * elf/sprof.c (more_help): 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 (more_help): 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 (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * malloc/Makefile ($(objpfx)mtrace): Also substitute PKGVERSION
+ and BUGURL.
+ ($(objpfx)memusage): Likewise.
+ * malloc/memusage.sh (do_help): Use REPORT_BUGS_TO.
+ (do_version): Use PKGVERSION.
+ * malloc/memusagestat.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * malloc/mtrace.pl ($PACKAGE): Remove variable.
+ ($PKGVERSION): New variable.
+ ($REPORT_BUGS_TO): Likewise.
+ (usage): Use $REPORT_BUGS_TO.
+ (top level): Use $PKGVERSION.
+ * manual/Makefile (libc-texi-generated): Add pkgvers.texi.
+ ($(objpfx)pkgvers.texi): New rule.
+ ($(objpfx)stamp-pkgvers): Likewise.
+ * manual/install.texi: Include pkgvers.texi.
+ (--with-pkgversion): Document new configure option.
+ (--with-bugurl): Likewise.
+ (Reporting Bugs): Describe Bugzilla as upstream tracker rather
+ than necessarily for this particular distribution. Use
+ REPORT_BUGS_TO for where to report bugs.
+ * INSTALL: Regenerated.
+ * manual/libc.texinfo: Include pkgvers.texi.
+ [!PKGVERSION_DEFAULT]: Include PKGVERSION in version information.
+ * nscd/nscd.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * nss/getent.c (more_help): 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): Use PKGVERSION and REPORT_BUGS_TO.
+ * sunrpc/proto.h [IS_IN_build] (_libc_intl_domainname): Remove
+ macro.
+ * sunrpc/rpc_main.c (options_usage): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * sunrpc/rpcinfo.c (usage): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * sysdeps/unix/sysv/linux/lddlibc4.c (main): Use REPORT_BUGS_TO
+ and PKGVERSION.
+
* timezone/checktab.awk: Update from tzcode 2012i.
* timezone/ialloc.c: Likewise.
* timezone/private.h: Likewise.
diff --git a/INSTALL b/INSTALL
index d70019883a..9a0166b602 100644
--- a/INSTALL
+++ b/INSTALL
@@ -148,6 +148,19 @@ will be used, and CFLAGS sets optimization options for the compiler.
If you specify just `--build', `configure' will get confused.
+`--with-pkgversion=VERSION'
+ Specify a description, possibly including a build number or build
+ date, of the binaries being built, to be included in `--version'
+ output from programs installed with the GNU C Library. For
+ example, `--with-pkgversion='FooBar GNU/Linux glibc build 123''.
+ The default value is `GNU libc'.
+
+`--with-bugurl=URL'
+ Specify the URL that users should visit if they wish to report a
+ bug, to be included in `--help' output from programs installed with
+ the GNU C Library. The default value refers to the main
+ bug-reporting information for the GNU C Library.
+
To build the library and related programs, type `make'. This will
produce a lot of output, some of which may look like errors from `make'
but isn't. Look for error messages from `make' containing `***'.
@@ -404,10 +417,10 @@ remain unfixed for all eternity, if not longer.
It is a good idea to verify that the problem has not already been
reported. Bugs are documented in two places: The file `BUGS' describes
-a number of well known bugs and the bug tracking system has a WWW
-interface at `http://sourceware.org/bugzilla/'. The WWW interface
-gives you access to open and closed reports. A closed report normally
-includes a patch or a hint on solving the problem.
+a number of well known bugs and the central GNU C Library bug tracking
+system has a WWW interface at `http://sourceware.org/bugzilla/'. The
+WWW interface gives you access to open and closed reports. A closed
+report normally includes a patch or a hint on solving the problem.
To report a bug, first you must find it. With any luck, this will
be the hard part. Once you've found a bug, make sure it's really a
@@ -428,7 +441,7 @@ library, you really only need to narrow it down to one library function
call, if possible. This should not be too difficult.
The final step when you have a simple test case is to report the bug.
-Do this using the WWW interface to the bug database.
+Do this at `http://www.gnu.org/software/libc/bugs.html'.
If you are not sure how a function should behave, and this manual
doesn't tell you, that's a bug in the manual. Report that too! If the
diff --git a/Makefile b/Makefile
index 5617acce9e..78aaeb4d79 100644
--- a/Makefile
+++ b/Makefile
@@ -399,15 +399,18 @@ endif
define format-me
@rm -f $@
-makeinfo --no-validate --plaintext --no-number-sections $< -o $@
+makeinfo --no-validate --plaintext --no-number-sections \
+ -I$(common-objpfx)manual $< -o $@
-chmod a-w $@
endef
-INSTALL: manual/install.texi manual/macros.texi; $(format-me)
-manual/dir-add.texi manual/dir-add.info: FORCE
- $(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
+INSTALL: manual/install.texi manual/macros.texi \
+ $(common-objpfx)manual/pkgvers.texi
+ $(format-me)
+$(common-objpfx)manual/%: FORCE
+ $(MAKE) $(PARALLELMFLAGS) -C manual $@
FORCE:
-iconvdata/% localedata/% po/% manual/%: FORCE
+iconvdata/% localedata/% po/%: FORCE
$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
# glibc 2.0 contains some header files which aren't used with glibc 2.1
diff --git a/aclocal.m4 b/aclocal.m4
index 3e61dc83f3..b173e9e339 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -165,3 +165,51 @@ then
done
AC_MSG_RESULT()
fi])
+
+# These two macros are taken from GCC's config/acx.m4.
+dnl Support the --with-pkgversion configure option.
+dnl ACX_PKGVERSION(default-pkgversion)
+AC_DEFUN([ACX_PKGVERSION],[
+ AC_ARG_WITH(pkgversion,
+ AS_HELP_STRING([--with-pkgversion=PKG],
+ [Use PKG in the version string in place of "$1"]),
+ [case "$withval" in
+ yes) AC_MSG_ERROR([package version not specified]) ;;
+ no) PKGVERSION= ;;
+ *) PKGVERSION="($withval) " ;;
+ esac],
+ PKGVERSION="($1) "
+ )
+ PKGVERSION_TEXI=`echo "$PKGVERSION" | sed 's/@/@@/g'`
+ AC_SUBST(PKGVERSION)
+ AC_SUBST(PKGVERSION_TEXI)
+])
+
+dnl Support the --with-bugurl configure option.
+dnl ACX_BUGURL(default-bugurl)
+AC_DEFUN([ACX_BUGURL],[
+ AC_ARG_WITH(bugurl,
+ AS_HELP_STRING([--with-bugurl=URL],
+ [Direct users to URL to report a bug]),
+ [case "$withval" in
+ yes) AC_MSG_ERROR([bug URL not specified]) ;;
+ no) BUGURL=
+ ;;
+ *) BUGURL="$withval"
+ ;;
+ esac],
+ BUGURL="$1"
+ )
+ case ${BUGURL} in
+ "")
+ REPORT_BUGS_TO=
+ REPORT_BUGS_TEXI=
+ ;;
+ *)
+ REPORT_BUGS_TO="<$BUGURL>"
+ REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
+ ;;
+ esac;
+ AC_SUBST(REPORT_BUGS_TO)
+ AC_SUBST(REPORT_BUGS_TEXI)
+])
diff --git a/catgets/gencat.c b/catgets/gencat.c
index 26bb91d5d7..5078e3c828 100644
--- a/catgets/gencat.c
+++ b/catgets/gencat.c
@@ -227,13 +227,16 @@ 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;
}
@@ -244,7 +247,7 @@ For bug reporting instructions, please see:\n\
static void
print_version (FILE *stream, struct argp_state *state)
{
- fprintf (stream, "gencat (GNU %s) %s\n", PACKAGE, VERSION);
+ fprintf (stream, "gencat %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\
diff --git a/config.h.in b/config.h.in
index 653df54e56..f3fe6b88be 100644
--- a/config.h.in
+++ b/config.h.in
@@ -161,6 +161,12 @@
/* Define if __stack_chk_guard canary should be randomized at program startup. */
#undef ENABLE_STACKGUARD_RANDOMIZE
+/* Package description. */
+#undef PKGVERSION
+
+/* Bug reporting address. */
+#undef REPORT_BUGS_TO
+
/* Define if multi-arch DSOs should be generated. */
#undef USE_MULTIARCH
diff --git a/config.make.in b/config.make.in
index c22acf4a10..7f1bbb51d5 100644
--- a/config.make.in
+++ b/config.make.in
@@ -139,4 +139,10 @@ PERL = @PERL@
# Additional libraries.
LIBGD = @LIBGD@
+# Package versions and bug reporting configuration.
+PKGVERSION = @PKGVERSION@
+PKGVERSION_TEXI = @PKGVERSION_TEXI@
+REPORT_BUGS_TO = @REPORT_BUGS_TO@
+REPORT_BUGS_TEXI = @REPORT_BUGS_TEXI@
+
# More variables may be inserted below by configure.
diff --git a/configure b/configure
index 35b06c1473..980f25fffe 100755
--- a/configure
+++ b/configure
@@ -685,6 +685,10 @@ build_vendor
build_cpu
build
subdirs
+REPORT_BUGS_TEXI
+REPORT_BUGS_TO
+PKGVERSION_TEXI
+PKGVERSION
target_alias
host_alias
build_alias
@@ -726,6 +730,8 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
+with_pkgversion
+with_bugurl
with_gd
with_gd_include
with_gd_lib
@@ -1417,6 +1423,8 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pkgversion=PKG Use PKG in the version string in place of "GNU libc"
+ --with-bugurl=URL Direct users to URL to report a bug
--with-gd=DIR find libgd include dir and library with prefix DIR
--with-gd-include=DIR find libgd include files in DIR
--with-gd-lib=DIR find libgd library files in DIR
@@ -2285,6 +2293,64 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Check whether --with-pkgversion was given.
+if test "${with_pkgversion+set}" = set; then :
+ withval=$with_pkgversion; case "$withval" in
+ yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
+ no) PKGVERSION= ;;
+ *) PKGVERSION="($withval) " ;;
+ esac
+else
+ PKGVERSION="(GNU libc) "
+
+fi
+
+ PKGVERSION_TEXI=`echo "$PKGVERSION" | sed 's/@/@@/g'`
+
+
+
+
+
+# Check whether --with-bugurl was given.
+if test "${with_bugurl+set}" = set; then :
+ withval=$with_bugurl; case "$withval" in
+ yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
+ no) BUGURL=
+ ;;
+ *) BUGURL="$withval"
+ ;;
+ esac
+else
+ BUGURL="http://www.gnu.org/software/libc/bugs.html"
+
+fi
+
+ case ${BUGURL} in
+ "")
+ REPORT_BUGS_TO=
+ REPORT_BUGS_TEXI=
+ ;;
+ *)
+ REPORT_BUGS_TO="<$BUGURL>"
+ REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
+ ;;
+ esac;
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define PKGVERSION "$PKGVERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
+_ACEOF
+
+
# Glibc should not depend on any header files
diff --git a/configure.in b/configure.in
index 5e35b98613..7c059039a6 100644
--- a/configure.in
+++ b/configure.in
@@ -5,6 +5,13 @@ AC_CONFIG_SRCDIR([include/features.h])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([scripts])
+ACX_PKGVERSION([GNU libc])
+ACX_BUGURL([http://www.gnu.org/software/libc/bugs.html])
+AC_DEFINE_UNQUOTED([PKGVERSION], ["$PKGVERSION"],
+ [Package description])
+AC_DEFINE_UNQUOTED([REPORT_BUGS_TO], ["$REPORT_BUGS_TO"],
+ [Bug reporting address])
+
# Glibc should not depend on any header files
AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS],
[m4_divert_text([DEFAULTS],
diff --git a/csu/version.c b/csu/version.c
index 78039388e2..9fe9fef8c0 100644
--- a/csu/version.c
+++ b/csu/version.c
@@ -24,7 +24,7 @@ static const char __libc_release[] = RELEASE;
static const char __libc_version[] = VERSION;
static const char banner[] =
-"GNU C Library "RELEASE" release version "VERSION", by Roland McGrath et al.\n\
+"GNU C Library "PKGVERSION RELEASE" release version "VERSION", by Roland McGrath et al.\n\
Copyright (C) 2012 Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions.\n\
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
@@ -38,7 +38,7 @@ LIBC_ABIS_STRING
"The oldest ABI supported: " GLIBC_OLDEST_ABI ".\n"
#endif
"For bug reporting instructions, please see:\n\
-<http://www.gnu.org/software/libc/bugs.html>.\n";
+"REPORT_BUGS_TO".\n";
#include <unistd.h>
diff --git a/debug/Makefile b/debug/Makefile
index 04dd79981a..0d0e002c9a 100644
--- a/debug/Makefile
+++ b/debug/Makefile
@@ -156,7 +156,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 $@
@@ -165,7 +167,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/debug/catchsegv.sh b/debug/catchsegv.sh
index 9bbcfc0f87..0ff5a8a047 100755
--- a/debug/catchsegv.sh
+++ b/debug/catchsegv.sh
@@ -33,12 +33,14 @@ if test $# -eq 0; then
echo 'Usage: catchsegv PROGRAM ARGS...'
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 'For bug reporting instructions, please see:'
+ cat <<\EOF
+@REPORT_BUGS_TO@.
+EOF
exit 0
;;
--v | --ve | --ver | --vers | --versi | --versio | --version)
- echo 'catchsegv (GNU libc) @VERSION@'
+ echo 'catchsegv @PKGVERSION@@VERSION@'
echo 'Copyright (C) 2012 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/debug/pcprofiledump.c b/debug/pcprofiledump.c
index fe6f3b4f3d..fd5ab519d3 100644
--- a/debug/pcprofiledump.c
+++ b/debug/pcprofiledump.c
@@ -1,5 +1,5 @@
/* Dump information generated by PC profiling.
- Copyright (C) 1999, 2002, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -200,13 +200,16 @@ 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;
}
@@ -217,7 +220,7 @@ For bug reporting instructions, please see:\n\
static void
print_version (FILE *stream, struct argp_state *state)
{
- fprintf (stream, "pcprofiledump (GNU %s) %s\n", PACKAGE, VERSION);
+ 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\
diff --git a/debug/xtrace.sh b/debug/xtrace.sh
index ea4d25431b..ec1cd09661 100755
--- a/debug/xtrace.sh
+++ b/debug/xtrace.sh
@@ -54,14 +54,13 @@ Mandatory arguments to long options are also mandatory for any corresponding
short options.
"
- echo $"For bug reporting instructions, please see:
-<http://www.gnu.org/software/libc/bugs.html>.
-"
+ printf $"For bug reporting instructions, please see:\\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.
diff --git a/elf/Makefile b/elf/Makefile
index 42b792bce8..c2f0e2058f 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -108,7 +108,10 @@ $(objpfx)sotruss: sotruss.ksh $(common-objpfx)config.make
sed -e 's%@KSH@%$(KSH)%g' \
-e 's%@VERSION@%$(version)%g' \
-e 's%@TEXTDOMAINDIR@%$(msgcatdir)%g' \
- -e 's%@PREFIX@%$(prefix)%g' < $< > $@.new
+ -e 's%@PREFIX@%$(prefix)%g' \
+ -e 's|@PKGVERSION@|$(PKGVERSION)|g' \
+ -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \
+ < $< > $@.new
chmod 555 $@.new
mv -f $@.new $@
$(inst_auditdir)/sotruss-lib.so: $(objpfx)sotruss-lib.so $(+force)
@@ -381,7 +384,9 @@ endif
common-ldd-rewrite = -e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
- -e 's%@VERSION@%$(version)%g'
+ -e 's%@VERSION@%$(version)%g' \
+ -e 's|@PKGVERSION@|$(PKGVERSION)|g' \
+ -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g'
sh-ldd-rewrite = $(common-ldd-rewrite) -e 's%@BASH@%/bin/sh%g;s/\$$"/"/g'
bash-ldd-rewrite = $(common-ldd-rewrite) -e 's%@BASH@%$(BASH)%g' \
-e 's%@TEXTDOMAINDIR@%$(msgcatdir)%g'
diff --git a/elf/dl-close.c b/elf/dl-close.c
index e6ff7e75d0..cda0e71963 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -702,7 +702,7 @@ _dl_close_worker (struct link_map *map)
if (any_tls)
{
if (__builtin_expect (++GL(dl_tls_generation) == 0, 0))
- _dl_fatal_printf ("TLS generation counter wrapped! Please report as described in <http://www.gnu.org/software/libc/bugs.html>.\n");
+ _dl_fatal_printf ("TLS generation counter wrapped! Please report as described in "REPORT_BUGS_TO".\n");
if (tls_free_end == GL(dl_tls_static_used))
GL(dl_tls_static_used) = tls_free_start;
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
index 8d6e77f8ec..453cd6278d 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -294,13 +294,16 @@ 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;
}
@@ -311,7 +314,7 @@ For bug reporting instructions, please see:\n\
static void
print_version (FILE *stream, struct argp_state *state)
{
- fprintf (stream, "ldconfig (GNU %s) %s\n", PACKAGE, VERSION);
+ fprintf (stream, "ldconfig %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\
diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in
index fc3f63e12b..ff4714df89 100644
--- a/elf/ldd.bash.in
+++ b/elf/ldd.bash.in
@@ -34,7 +34,7 @@ verbose=
while test $# -gt 0; do
case "$1" in
--vers | --versi | --versio | --version)
- echo 'ldd (GNU libc) @VERSION@'
+ echo 'ldd @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.
@@ -52,9 +52,8 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-u, --unused print unused direct dependencies
-v, --verbose print all information
"
- echo $"For bug reporting instructions, please see:
-<http://www.gnu.org/software/libc/bugs.html>.
-"
+ printf $"For bug reporting instructions, please see:\\n%s.\\n" \
+ "@REPORT_BUGS_TO@"
exit 0
;;
-d | --d | --da | --dat | --data | --data- | --data-r | --data-re | \
diff --git a/elf/pldd.c b/elf/pldd.c
index 39095c9888..a8e2e5ce7d 100644
--- a/elf/pldd.c
+++ b/elf/pldd.c
@@ -52,10 +52,8 @@ extern void *xrealloc (void *o, size_t n)
static void print_version (FILE *stream, struct argp_state *state);
void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
-/* Bug report address. */
-const char *argp_program_bug_address = N_("\
-For bug reporting instructions, please see:\n\
-<http://www.gnu.org/software/libc/bugs.html>.\n");
+/* Function to print some extra text in the help message. */
+static char *more_help (int key, const char *text, void *input);
/* Definitions of arguments for argp functions. */
static const struct argp_option options[] =
@@ -76,7 +74,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state);
/* Data structure to communicate with argp functions. */
static struct argp argp =
{
- options, parse_opt, args_doc, doc, NULL, NULL, NULL
+ options, parse_opt, args_doc, doc, NULL, more_help, NULL
};
// File descriptor of /proc/*/mem file.
@@ -212,11 +210,31 @@ parse_opt (int key, char *arg, struct argp_state *state)
}
+/* Print bug-reporting information in the help message. */
+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. */
+ if (asprintf (&tp, gettext ("\
+For bug reporting instructions, please see:\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, "pldd (GNU %s) %s\n", PACKAGE, VERSION);
+ fprintf (stream, "pldd %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\
diff --git a/elf/sln.c b/elf/sln.c
index 547a818f01..1bad21f226 100644
--- a/elf/sln.c
+++ b/elf/sln.c
@@ -58,7 +58,7 @@ main (int argc, char **argv)
{
case 2:
if (strcmp (argv[1], "--version") == 0) {
- printf ("sln (GNU libc) %s\n", VERSION);
+ printf ("sln %s%s\n", PKGVERSION, VERSION);
return 0;
} else if (strcmp (argv[1], "--help") == 0) {
usage ();
@@ -82,8 +82,8 @@ static void
usage (void)
{
printf (_("Usage: sln src dest|file\n\n"));
- fputs (_("For bug reporting instructions, please see:\n\
-<http://www.gnu.org/software/libc/bugs.html>.\n"), stdout);
+ printf (_("For bug reporting instructions, please see:\n\
+%s.\n"), REPORT_BUGS_TO);
}
static int
diff --git a/elf/sotruss.ksh b/elf/sotruss.ksh
index ff77f7fe0e..587ab68987 100755
--- a/elf/sotruss.ksh
+++ b/elf/sotruss.ksh
@@ -46,9 +46,8 @@ function do_help {
printf $"Mandatory arguments to long options are also mandatory for any corresponding\nshort options.\n"
echo
- printf $"For bug reporting instructions, please see:
-<http://www.gnu.org/software/libc/bugs.html>.
-"
+ printf $"For bug reporting instructions, please see:\\n%s.\\n" \
+ "@REPORT_BUGS_TO@"
exit 0
}
@@ -72,7 +71,7 @@ function do_ambiguous {
while test $# -gt 0; do
case "$1" in
--v | --ve | --ver | --vers | --versi | --versio | --version)
- echo "sotruss (GNU libc) @VERSION@"
+ echo "sotruss @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.
diff --git a/elf/sprof.c b/elf/sprof.c
index 2097d31195..9f5d0eccbf 100644
--- a/elf/sprof.c
+++ b/elf/sprof.c
@@ -363,13 +363,16 @@ 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;
}
@@ -381,7 +384,7 @@ For bug reporting instructions, please see:\n\
static void
print_version (FILE *stream, struct argp_state *state)
{
- fprintf (stream, "sprof (GNU %s) %s\n", PACKAGE, VERSION);
+ fprintf (stream, "sprof %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\
diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
index 36168a1a91..62c6794e4f 100644
--- a/iconv/iconv_prog.c
+++ b/iconv/iconv_prog.c
@@ -400,13 +400,16 @@ 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;
}
@@ -418,7 +421,7 @@ For bug reporting instructions, please see:\n\
static void
print_version (FILE *stream, struct argp_state *state)
{
- fprintf (stream, "iconv (GNU %s) %s\n", PACKAGE, VERSION);
+ fprintf (stream, "iconv %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\
diff --git a/iconv/iconvconfig.c b/iconv/iconvconfig.c
index 0379ec37a0..d70b0136bd 100644
--- a/iconv/iconvconfig.c
+++ b/iconv/iconvconfig.c
@@ -375,13 +375,16 @@ 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;
}
@@ -393,7 +396,7 @@ For bug reporting instructions, please see:\n\
static void
print_version (FILE *stream, struct argp_state *state)
{
- fprintf (stream, "iconvconfig (GNU %s) %s\n", PACKAGE, VERSION);
+ fprintf (stream, "iconvconfig %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\
diff --git a/locale/programs/locale.c b/locale/programs/locale.c
index 247265e2e9..6bbd9d6840 100644
--- a/locale/programs/locale.c
+++ b/locale/programs/locale.c
@@ -271,13 +271,16 @@ 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;
}
@@ -289,7 +292,7 @@ For bug reporting instructions, please see:\n\
static void
print_version (FILE *stream, struct argp_state *state)
{
- fprintf (stream, "locale (GNU %s) %s\n", PACKAGE, VERSION);
+ fprintf (stream, "locale %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\
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
index 5dc35ca695..864fc55f38 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
@@ -354,20 +354,26 @@ static char *
more_help (int key, const char *text, void *input)
{
char *cp;
+ char *tp;
switch (key)
{
case ARGP_KEY_HELP_EXTRA:
/* We print some extra information. */
+ if (asprintf (&tp, gettext ("\
+For bug reporting instructions, please see:\n\
+%s.\n"), REPORT_BUGS_TO) < 0)
+ return NULL;
if (asprintf (&cp, gettext ("\
System's directory for character maps : %s\n\
repertoire maps: %s\n\
locale path : %s\n\
%s"),
- CHARMAP_PATH, REPERTOIREMAP_PATH, LOCALE_PATH, gettext ("\
-For bug reporting instructions, please see:\n\
-<http://www.gnu.org/software/libc/bugs.html>.\n")) < 0)
- return NULL;
+ CHARMAP_PATH, REPERTOIREMAP_PATH, LOCALE_PATH, tp) < 0)
+ {
+ free (tp);
+ return NULL;
+ }
return cp;
default:
break;
@@ -379,7 +385,7 @@ For bug reporting instructions, please see:\n\
static void
print_version (FILE *stream, struct argp_state *state)
{
- fprintf (stream, "localedef (GNU %s) %s\n", PACKAGE, VERSION);
+ fprintf (stream, "localedef %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\
diff --git a/login/programs/pt_chown.c b/login/programs/pt_chown.c
index fe98964c33..34e09fb0a6 100644
--- a/login/programs/pt_chown.c
+++ b/login/programs/pt_chown.c
@@ -58,7 +58,7 @@ static struct argp argp =
static void
print_version (FILE *stream, struct argp_state *state)
{
- fprintf (stream, "pt_chown (GNU %s) %s\n", PACKAGE, VERSION);
+ fprintf (stream, "pt_chown %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\
@@ -70,6 +70,7 @@ static char *
more_help (int key, const char *text, void *input)
{
char *cp;
+ char *tp;
switch (key)
{
@@ -84,13 +85,19 @@ Set the owner, group and access permission of the slave pseudo\
return cp;
case ARGP_KEY_HELP_EXTRA:
/* We print some extra information. */
- asprintf (&cp, gettext ("\
+ if (asprintf (&tp, gettext ("\
+For bug reporting instructions, please see:\n\
+%s.\n"), REPORT_BUGS_TO) < 0)
+ return NULL;
+ if (asprintf (&cp, gettext ("\
The owner is set to the current user, the group is set to `%s',\
and the access permission is set to `%o'.\n\n\
%s"),
- TTY_GROUP, S_IRUSR|S_IWUSR|S_IWGRP, gettext ("\
-For bug reporting instructions, please see:\n\
-<http://www.gnu.org/software/libc/bugs.html>.\n"));
+ TTY_GROUP, S_IRUSR|S_IWUSR|S_IWGRP, tp) < 0)
+ {
+ free (tp);
+ return NULL;
+ }
return cp;
default:
break;
diff --git a/malloc/Makefile b/malloc/Makefile
index 1e0281f9fa..e1938998e6 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -126,13 +126,17 @@ sLIBdir := $(shell echo $(slibdir) | sed 's,lib\(\|64\)$$,\\\\$$LIB,')
$(objpfx)mtrace: mtrace.pl
rm -f $@.new
sed -e 's|@PERL@|$(PERL)|' -e 's|@XXX@|$(address-width)|' \
- -e 's|@VERSION@|$(version)|' $^ > $@.new \
+ -e 's|@VERSION@|$(version)|' \
+ -e 's|@PKGVERSION@|$(PKGVERSION)|' \
+ -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
&& rm -f $@ && mv $@.new $@ && chmod +x $@
$(objpfx)memusage: memusage.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 $@
diff --git a/malloc/memusage.sh b/malloc/memusage.sh
index 7ed68c0773..50b92d51bd 100755
--- a/malloc/memusage.sh
+++ b/malloc/memusage.sh
@@ -61,14 +61,13 @@ Mandatory arguments to long options are also mandatory for any corresponding
short options.
"
- echo $"For bug reporting instructions, please see:
-<http://www.gnu.org/software/libc/bugs.html>.
-"
+ printf $"For bug reporting instructions, please see:\\n%s.\\n" \
+ "@REPORT_BUGS_TO@"
exit 0
}
do_version() {
- echo 'memusage (GNU libc) @VERSION@'
+ echo 'memusage @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.
diff --git a/malloc/memusagestat.c b/malloc/memusagestat.c
index af8f991003..a609a9b7c8 100644
--- a/malloc/memusagestat.c
+++ b/malloc/memusagestat.c
@@ -528,20 +528,17 @@ parse_opt (int key, char *arg, struct argp_state *state)
static char *
more_help (int key, const char *text, void *input)
{
- char *orig;
- char *cp;
+ char *tp;
switch (key)
{
case ARGP_KEY_HELP_EXTRA:
/* We print some extra information. */
- orig = gettext ("\
+ if (asprintf (&tp, gettext ("\
For bug reporting instructions, please see:\n\
-<http://www.gnu.org/software/libc/bugs.html>.\n");
- cp = strdup (orig);
- if (cp == NULL)
- cp = orig;
- return cp;
+%s.\n"), REPORT_BUGS_TO) < 0)
+ return NULL;
+ return tp;
default:
break;
}
@@ -552,7 +549,7 @@ For bug reporting instructions, please see:\n\
static void
print_version (FILE *stream, struct argp_state *state)
{
- fprintf (stream, "memusagestat (GNU %s) %s\n", PACKAGE, VERSION);
+ fprintf (stream, "memusagestat %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\
diff --git a/malloc/mtrace.pl b/malloc/mtrace.pl
index a2125003cb..adf61c7373 100644
--- a/malloc/mtrace.pl
+++ b/malloc/mtrace.pl
@@ -21,7 +21,8 @@ eval "exec @PERL@ -S $0 $@"
# <http://www.gnu.org/licenses/>.
$VERSION = "@VERSION@";
-$PACKAGE = "libc";
+$PKGVERSION = "@PKGVERSION@";
+$REPORT_BUGS_TO = '@REPORT_BUGS_TO@';
$progname = $0;
sub usage {
@@ -30,7 +31,7 @@ sub usage {
print " --version print version number, then exit\n";
print "\n";
print "For bug reporting instructions, please see:\n";
- print "<http://www.gnu.org/software/libc/bugs.html>.\n";
+ print "$REPORT_BUGS_TO.\n";
exit 0;
}
@@ -43,7 +44,7 @@ arglist: while (@ARGV) {
if ($ARGV[0] eq "--v" || $ARGV[0] eq "--ve" || $ARGV[0] eq "--ver" ||
$ARGV[0] eq "--vers" || $ARGV[0] eq "--versi" ||
$ARGV[0] eq "--versio" || $ARGV[0] eq "--version") {
- print "mtrace (GNU $PACKAGE) $VERSION\n";
+ print "mtrace $PKGVERSION$VERSION\n";
print "Copyright (C) 2012 Free Software Foundation, Inc.\n";
print "This is free software; see the source for copying conditions. There is NO\n";
print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
diff --git a/manual/Makefile b/manual/Makefile
index 67e13904bb..a05ab8328c 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -61,7 +61,7 @@ examples = $(filter-out $(foreach d, $(add-ons), ../$d/%.c.texi), \
# Generated files directly included from libc.texinfo.
libc-texi-generated = chapters.texi top-menu.texi dir-add.texi \
- libm-err.texi version.texi
+ libm-err.texi version.texi pkgvers.texi
# Add path to build dir for generated files
texis-path := $(filter-out $(libc-texi-generated) summary.texi $(examples), \
@@ -113,6 +113,20 @@ $(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
$(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi
touch $@
+# Package version and bug reporting URL.
+$(objpfx)pkgvers.texi: $(objpfx)stamp-pkgvers ;
+$(objpfx)stamp-pkgvers: $(common-objpfx)config.make
+ echo "@ifclear PKGVERS" > $(objpfx)pkgvers-tmp
+ echo "@set PKGVERS" >> $(objpfx)pkgvers-tmp
+ echo "@set PKGVERSION $(PKGVERSION_TEXI)" >> $(objpfx)pkgvers-tmp
+ if [ "$(PKGVERSION_TEXI)" = "(GNU libc) " ]; then \
+ echo "@set PKGVERSION_DEFAULT" >> $(objpfx)pkgvers-tmp; \
+ fi
+ echo "@set REPORT_BUGS_TO $(REPORT_BUGS_TEXI)" >> $(objpfx)pkgvers-tmp
+ echo "@end ifclear" >> $(objpfx)pkgvers-tmp
+ $(move-if-change) $(objpfx)pkgvers-tmp $(objpfx)pkgvers.texi
+ touch $@
+
# Generate a file with the version number.
$(objpfx)version.texi: $(objpfx)stamp-version ;
$(objpfx)stamp-version: $(common-objpfx)config.make
diff --git a/manual/install.texi b/manual/install.texi
index 4802e699fe..1b54051de3 100644
--- a/manual/install.texi
+++ b/manual/install.texi
@@ -2,6 +2,7 @@
@c Makeinfo ignores it when processing the file from the include.
@setfilename INSTALL
@include macros.texi
+@include pkgvers.texi
@node Installation, Maintenance, Library Summary, Top
@c %MENU% How to install the GNU C Library
@@ -173,6 +174,19 @@ the appropriate compiler flags (@samp{-mcpu=i386} will do the trick) to
@var{CFLAGS}.
If you specify just @samp{--build}, @code{configure} will get confused.
+
+@item --with-pkgversion=@var{version}
+Specify a description, possibly including a build number or build
+date, of the binaries being built, to be included in
+@option{--version} output from programs installed with @theglibc{}.
+For example, @option{--with-pkgversion='FooBar GNU/Linux glibc build
+123'}. The default value is @samp{GNU libc}.
+
+@item --with-bugurl=@var{url}
+Specify the URL that users should visit if they wish to report a bug,
+to be included in @option{--help} output from programs installed with
+@theglibc{}. The default value refers to the main bug-reporting
+information for @theglibc{}.
@end table
To build the library and related programs, type @code{make}. This will
@@ -458,7 +472,8 @@ remain unfixed for all eternity, if not longer.
It is a good idea to verify that the problem has not already been
reported. Bugs are documented in two places: The file @file{BUGS}
-describes a number of well known bugs and the bug tracking system has a
+describes a number of well known bugs and the central @glibcadj{}
+bug tracking system has a
WWW interface at
@url{http://sourceware.org/bugzilla/}. The WWW
interface gives you access to open and closed reports. A closed report
@@ -483,7 +498,7 @@ library, you really only need to narrow it down to one library
function call, if possible. This should not be too difficult.
The final step when you have a simple test case is to report the bug.
-Do this using the WWW interface to the bug database.
+Do this at @value{REPORT_BUGS_TO}.
If you are not sure how a function should behave, and this manual
doesn't tell you, that's a bug in the manual. Report that too! If the
diff --git a/manual/libc.texinfo b/manual/libc.texinfo
index 2c1344ac84..d720fbdcf3 100644
--- a/manual/libc.texinfo
+++ b/manual/libc.texinfo
@@ -13,6 +13,8 @@
@end direntry
@include dir-add.texi
+@include pkgvers.texi
+
@c This tells texinfo.tex to use the real section titles in xrefs in
@c place of the node name, when no section title is explicitly given.
@set xref-automatic-section-title
@@ -36,7 +38,13 @@ This file documents @theglibc{}.
This is
@c Disabled (printed editions, see above).
@c Edition @value{EDITION} of
-@cite{The GNU C Library Reference Manual}, for version @value{VERSION}.
+@cite{The GNU C Library Reference Manual}, for version
+@ifset PKGVERSION_DEFAULT
+@value{VERSION}.
+@end ifset
+@ifclear PKGVERSION_DEFAULT
+@value{VERSION} @value{PKGVERSION}.
+@end ifclear
Copyright @copyright{} 1993--2012 Free Software Foundation, Inc.
@@ -70,6 +78,10 @@ supports it in developing GNU and promoting software freedom.''
@c @center Edition @value{EDITION}
@c @sp 1
@center for version @value{VERSION}
+@ifclear PKGVERSION_DEFAULT
+@sp 1
+@center @value{PKGVERSION}
+@end ifclear
@page
@vskip 0pt plus 1filll
@insertcopying
@@ -96,6 +108,9 @@ This is
@c Disabled (printed editions, see above).
@c Edition @value{EDITION} of
@cite{The GNU C Library Reference Manual}, for Version @value{VERSION}
+@ifclear PKGVERSION_DEFAULT
+@value{PKGVERSION}
+@end ifclear
of @theglibc{}.
@end ifnottex
diff --git a/nscd/nscd.c b/nscd/nscd.c
index bee9ed49ff..6adb3d8197 100644
--- a/nscd/nscd.c
+++ b/nscd/nscd.c
@@ -451,13 +451,16 @@ 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;
}
@@ -468,7 +471,7 @@ For bug reporting instructions, please see:\n\
static void
print_version (FILE *stream, struct argp_state *state)
{
- fprintf (stream, "nscd (GNU %s) %s\n", PACKAGE, VERSION);
+ fprintf (stream, "nscd %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\
diff --git a/nss/getent.c b/nss/getent.c
index e88356dd2b..5f8278a839 100644
--- a/nss/getent.c
+++ b/nss/getent.c
@@ -82,7 +82,7 @@ static int idn_flags = AI_IDN | AI_CANONIDN;
static void
print_version (FILE *stream, struct argp_state *state)
{
- fprintf (stream, "getent (GNU %s) %s\n", PACKAGE, VERSION);
+ fprintf (stream, "getent %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\
@@ -962,9 +962,9 @@ more_help (int key, const char *text, void *input)
fputs ("\n\n", fp);
- fputs (gettext ("\
+ fprintf (fp, gettext ("\
For bug reporting instructions, please see:\n\
-<http://www.gnu.org/software/libc/bugs.html>.\n"), fp);
+%s.\n"), REPORT_BUGS_TO);
if (fclose (fp) == 0)
return doc;
diff --git a/nss/makedb.c b/nss/makedb.c
index ccaabdff95..8d7d027b74 100644
--- a/nss/makedb.c
+++ b/nss/makedb.c
@@ -363,13 +363,16 @@ 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;
}
@@ -380,7 +383,7 @@ For bug reporting instructions, please see:\n\
static void
print_version (FILE *stream, struct argp_state *state)
{
- fprintf (stream, "makedb (GNU %s) %s\n", PACKAGE, VERSION);
+ fprintf (stream, "makedb %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\
diff --git a/posix/getconf.c b/posix/getconf.c
index 985e25218c..aa0dd86afb 100644
--- a/posix/getconf.c
+++ b/posix/getconf.c
@@ -1099,7 +1099,7 @@ main (int argc, char *argv[])
if (argc > 1 && strcmp (argv[1], "--version") == 0)
{
- printf ("getconf (GNU %s) %s\n", PACKAGE, VERSION);
+ printf ("getconf %s%s\n", PKGVERSION, VERSION);
printf (gettext ("\
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
@@ -1118,8 +1118,8 @@ Usage: getconf [-v SPEC] VAR\n\
Get the configuration value for variable VAR, or for variable PATH_VAR\n\
for path PATH. If SPEC is given, give values for compilation\n\
environment SPEC.\n\n"));
- fputs (gettext ("For bug reporting instructions, please see:\n\
-<http://www.gnu.org/software/libc/bugs.html>.\n"), stdout);
+ printf (gettext ("For bug reporting instructions, please see:\n\
+%s.\n"), REPORT_BUGS_TO);
return 0;
}
diff --git a/sunrpc/proto.h b/sunrpc/proto.h
index 0ba9cd6286..ea28565b1e 100644
--- a/sunrpc/proto.h
+++ b/sunrpc/proto.h
@@ -62,7 +62,4 @@ void add_type(int len, const char *type);
#define _(X) (X)
#define textdomain(X) ((void) 0)
-/* This is used in the definition of PACKAGE for --version output. */
-#define _libc_intl_domainname "libc"
-
#endif
diff --git a/sunrpc/rpc_main.c b/sunrpc/rpc_main.c
index 2103b10d5f..1477b43a7d 100644
--- a/sunrpc/rpc_main.c
+++ b/sunrpc/rpc_main.c
@@ -1439,15 +1439,15 @@ options_usage (FILE *stream, int status)
f_print (stream, _("-T\t\tgenerate code to support RPC dispatch tables\n"));
f_print (stream, _("-Y path\t\tdirectory name to find C preprocessor (cpp)\n"));
- f_print (stream, "\n%s", _("\
+ f_print (stream, _("\n\
For bug reporting instructions, please see:\n\
-<http://www.gnu.org/software/libc/bugs.html>.\n"));
+%s.\n"), REPORT_BUGS_TO);
exit (status);
}
static void
print_version (void)
{
- printf ("rpcgen (GNU %s) %s\n", PACKAGE, VERSION);
+ printf ("rpcgen %s%s\n", PKGVERSION, VERSION);
exit (0);
}
diff --git a/sunrpc/rpcinfo.c b/sunrpc/rpcinfo.c
index 16c03542c0..e490a7ee12 100644
--- a/sunrpc/rpcinfo.c
+++ b/sunrpc/rpcinfo.c
@@ -688,15 +688,15 @@ usage (FILE *stream)
fputs (_(" rpcinfo -b prognum versnum\n"), stream);
fputs (_(" rpcinfo -d prognum versnum\n"), stream);
fputc ('\n', stream);
- fputs (_("\
+ fprintf (stream, _("\
For bug reporting instructions, please see:\n\
-<http://www.gnu.org/software/libc/bugs.html>.\n"), stream);
+%s.\n"), REPORT_BUGS_TO);
}
static void
print_version (void)
{
- printf ("rpcinfo (GNU %s) %s\n", PACKAGE, VERSION);
+ printf ("rpcinfo %s%s\n", PKGVERSION, VERSION);
}
static u_long
diff --git a/sysdeps/unix/sysv/linux/lddlibc4.c b/sysdeps/unix/sysv/linux/lddlibc4.c
index f441a9e0dc..c251be8550 100644
--- a/sysdeps/unix/sysv/linux/lddlibc4.c
+++ b/sysdeps/unix/sysv/linux/lddlibc4.c
@@ -58,13 +58,13 @@ main (int argc, char *argv[])
if (strcmp (argv[1], "--help") == 0)
{
printf (gettext ("Usage: lddlibc4 FILE\n\n"));
- fputs (gettext ("For bug reporting instructions, please see:\n\
-<http://www.gnu.org/software/libc/bugs.html>.\n"), stdout);
+ printf (gettext ("For bug reporting instructions, please see:\n\
+%s.\n"), REPORT_BUGS_TO);
return 0;
}
else if (strcmp (argv[1], "--version") == 0)
{
- printf ("lddlibc4 (GNU %s) %s\n", PACKAGE, VERSION);
+ printf ("lddlibc4 %s%s\n", PKGVERSION, VERSION);
printf (gettext ("\
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\