[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug report (as s/w requests).
From: |
Jim Meyering |
Subject: |
Re: Bug report (as s/w requests). |
Date: |
Wed, 22 Mar 2006 15:05:27 +0100 |
Hugh Sasse <address@hidden> wrote:
...
>> Would you please run this (from the top level):
>>
>> make && env LC_ALL=C make -C tests/dd check TESTS=skip-seek
>>
>> If that succeeds, then we'll know that the problem is locale-related,
>> making dd's use of ngettext malfunction.
Did you try the above?
>> If the above still fails, then please run this variant, which will
>> show, among other things, the output of running `dd --version':
>>
>> make && \
>> env LC_ALL=C VERBOSE=yes DEBUG=yes make -C tests/dd check TESTS=skip-seek
>>
>> Please make sure that the version information corresponds to
>> the version of the package that you're building. I get this,
>> since I'm building the latest from cvs:
>>
>> make[1]: Entering directory `/var/tmp/cu/tests/dd'
>> dd (coreutils) 6.0-cvs
>
> Yes, it does. See attached.
>
> I've not CC'd the list this time as my other response may well suffice.
> By all means include the list in a reply.
Then maybe your version of ngettext is malfunctioning.
One way to test this is to build with `./configure --disable-nls',
recompile and see if the problem persists.
If that still doesn't help, ...
apply this patch to dd.c:
Index: dd.c
===================================================================
RCS file: /fetish/cu/src/dd.c,v
retrieving revision 1.192
diff -u -p -r1.192 dd.c
--- dd.c 8 Mar 2006 18:57:39 -0000 1.192
+++ dd.c 22 Mar 2006 13:55:52 -0000
@@ -547,11 +547,12 @@ print_stats (void)
r_full, r_partial, w_full, w_partial);
if (r_truncate != 0)
- fprintf (stderr,
- ngettext ("1 truncated record\n",
- "%"PRIuMAX" truncated records\n",
- MIN (r_truncate, ULONG_MAX)),
- r_truncate);
+ {
+ char const *fmt = ngettext ("1 truncated record\n",
+ "%"PRIuMAX" truncated records\n",
+ MIN (r_truncate, ULONG_MAX));
+ fprintf (stderr, fmt, r_truncate);
+ }
if (status_flags & STATUS_NOXFER)
return;
Create an input file:
printf '01234567\nabcdefghijkl\n' > in
Then compile it for debugging (make CFLAGS=-g LDFLAGS= dd),
and debug it:
gdb dd
b print_stats
r ibs=10 cbs=10 conv=block < in > out
then type `n' (aka next) 5 times, which will put you just after
this line:
551 char const *fmt = ngettext ("1 truncated record\n",
(gdb)
Then give the command to print the value of the `fmt' variable.
Here's what I get:
(gdb) p fmt
$1 = 0x4080b8 "1 truncated record\n"
Re: Bug report (as s/w requests)., Bob Proulx, 2006/03/22
Re: Bug report (as s/w requests)., Paul Eggert, 2006/03/22