mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
[BZ #4925]
* debug/pcprofiledump.c: Turn on internationalization by calling setlocale. Patch mostly by Benno Schulenberg.
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
2007-08-21 Ulrich Drepper <drepper@redhat.com>
|
2007-08-21 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
[BZ #4925]
|
||||||
|
* debug/pcprofiledump.c: Turn on internationalization by calling
|
||||||
|
setlocale. Patch mostly by Benno Schulenberg.
|
||||||
|
|
||||||
[BZ #4936]
|
[BZ #4936]
|
||||||
* iconv/gconv.c (__gconv): If flush was successful, clear rest of
|
* iconv/gconv.c (__gconv): If flush was successful, clear rest of
|
||||||
the state.
|
the state.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/* Dump information generated by PC profiling.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
|
||||||
|
|
||||||
@@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "../version.h"
|
#include "../version.h"
|
||||||
|
|
||||||
|
#define PACKAGE _libc_intl_domainname
|
||||||
|
|
||||||
#ifndef _
|
#ifndef _
|
||||||
# define _(Str) gettext (Str)
|
# define _(Str) gettext (Str)
|
||||||
@@ -75,14 +76,17 @@ static struct argp argp =
|
|||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int fd;
|
/* Set locale via LC_ALL. */
|
||||||
int remaining;
|
setlocale (LC_ALL, "");
|
||||||
int must_swap;
|
|
||||||
uint32_t word;
|
/* Set the text message domain. */
|
||||||
|
textdomain (PACKAGE);
|
||||||
|
|
||||||
/* Parse and process arguments. */
|
/* Parse and process arguments. */
|
||||||
|
int remaining;
|
||||||
argp_parse (&argp, argc, argv, 0, &remaining, NULL);
|
argp_parse (&argp, argc, argv, 0, &remaining, NULL);
|
||||||
|
|
||||||
|
int fd;
|
||||||
if (remaining == argc)
|
if (remaining == argc)
|
||||||
fd = STDIN_FILENO;
|
fd = STDIN_FILENO;
|
||||||
else if (remaining + 1 != argc)
|
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
|
/* Read the first 4-byte word. It contains the information about
|
||||||
the word size and the endianess. */
|
the word size and the endianess. */
|
||||||
|
uint32_t word;
|
||||||
if (TEMP_FAILURE_RETRY (read (fd, &word, 4)) != 4)
|
if (TEMP_FAILURE_RETRY (read (fd, &word, 4)) != 4)
|
||||||
error (EXIT_FAILURE, errno, _("cannot read header"));
|
error (EXIT_FAILURE, errno, _("cannot read header"));
|
||||||
|
|
||||||
/* Check whether we have to swap the byte order. */
|
/* 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)
|
if (must_swap)
|
||||||
word = bswap_32 (word);
|
word = bswap_32 (word);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user