diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-11-09 22:13:45 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-11-09 22:13:45 +0000 |
commit | 8b748aed2a9ab4b964faa5722f7a182a060e475c (patch) | |
tree | 61bc3fd494c9230f44c3c84a4ac51a32711223ed /elf | |
parent | 92e4b6a92716f8b2457376291171a6330d072b0d (diff) | |
download | glibc-8b748aed2a9ab4b964faa5722f7a182a060e475c.zip glibc-8b748aed2a9ab4b964faa5722f7a182a060e475c.tar.gz glibc-8b748aed2a9ab4b964faa5722f7a182a060e475c.tar.bz2 |
Support --with-pkgversion and --with-bugurl.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/Makefile | 9 | ||||
-rw-r--r-- | elf/dl-close.c | 2 | ||||
-rw-r--r-- | elf/ldconfig.c | 9 | ||||
-rw-r--r-- | elf/ldd.bash.in | 7 | ||||
-rw-r--r-- | elf/pldd.c | 30 | ||||
-rw-r--r-- | elf/sln.c | 6 | ||||
-rwxr-xr-x | elf/sotruss.ksh | 7 | ||||
-rw-r--r-- | elf/sprof.c | 9 |
8 files changed, 53 insertions, 26 deletions
diff --git a/elf/Makefile b/elf/Makefile index 42b792b..c2f0e20 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 e6ff7e7..cda0e71 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 8d6e77f..453cd62 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 fc3f63e..ff4714d 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 | \ @@ -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\ @@ -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 ff77f7f..587ab68 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 2097d31..9f5d0ec 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\ |