diff options
Diffstat (limited to 'debug')
-rw-r--r-- | debug/pcprofiledump.c | 17 | ||||
-rw-r--r-- | debug/segfault.c | 6 |
2 files changed, 14 insertions, 9 deletions
diff --git a/debug/pcprofiledump.c b/debug/pcprofiledump.c index 210e5089e9..62c0d73f40 100644 --- a/debug/pcprofiledump.c +++ b/debug/pcprofiledump.c @@ -1,5 +1,5 @@ /* Dump information generated by PC profiling. - Copyright (C) 1999, 2002 Free Software Foundation, Inc. + Copyright (C) 1999, 2002, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999. @@ -37,6 +37,7 @@ #include "../version.h" +#define PACKAGE _libc_intl_domainname #ifndef _ # define _(Str) gettext (Str) @@ -75,14 +76,17 @@ static struct argp argp = int main (int argc, char *argv[]) { - int fd; - int remaining; - int must_swap; - uint32_t word; + /* Set locale via LC_ALL. */ + setlocale (LC_ALL, ""); + + /* Set the text message domain. */ + textdomain (PACKAGE); /* Parse and process arguments. */ + int remaining; argp_parse (&argp, argc, argv, 0, &remaining, NULL); + int fd; if (remaining == argc) fd = STDIN_FILENO; else if (remaining + 1 != argc) @@ -102,11 +106,12 @@ main (int argc, char *argv[]) /* Read the first 4-byte word. It contains the information about the word size and the endianess. */ + uint32_t word; if (TEMP_FAILURE_RETRY (read (fd, &word, 4)) != 4) error (EXIT_FAILURE, errno, _("cannot read header")); /* Check whether we have to swap the byte order. */ - must_swap = (word & 0xfffffff0) == bswap_32 (0xdeb00000); + int must_swap = (word & 0xfffffff0) == bswap_32 (0xdeb00000); if (must_swap) word = bswap_32 (word); diff --git a/debug/segfault.c b/debug/segfault.c index f141fff661..413f207207 100644 --- a/debug/segfault.c +++ b/debug/segfault.c @@ -1,5 +1,5 @@ /* Catch segmentation faults and print backtrace. - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -42,7 +42,7 @@ /* Get code to possibly dump the content of all registers. */ #include <register-dump.h> -/* We'll use tis a lot. */ +/* We'll use this a lot. */ #define WRITE_STRING(s) write (fd, s, strlen (s)) /* Name of the output file. */ @@ -67,7 +67,7 @@ write_strsignal (int fd, int signal) /* This function is called when a segmentation fault is caught. The system - is in an instable state now. This means especially that malloc() might + is in an unstable state now. This means especially that malloc() might not work anymore. */ static void catch_segfault (int signal, SIGCONTEXT ctx) |