This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/625] New: lconv::frac_digits != CHAR_MAX in "C" locale
- From: "sebor at roguewave dot com" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 28 Dec 2004 23:22:54 -0000
- Subject: [Bug libc/625] New: lconv::frac_digits != CHAR_MAX in "C" locale
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
According to 7.11, p2 of C99, the value of lconv::frac_digits is required to be
equal to CHAR_MAX in the "C" locale. GNU glibc on PPC64 sets the value to 127
instead of CHAR_MAX (which is 255 on this platform, since char is unsigned).
$ cat t.c && gcc t.c && ./a.out
#include <assert.h>
#include <limits.h>
#include <locale.h>
int main ()
{
struct lconv* lc = localeconv ();
assert (lc->frac_digits == CHAR_MAX);
}
a.out: t.c:9: main: Assertion `lc->frac_digits == (127 * 2 + 1)' failed.
Aborted
$ ldd a.out
libc.so.6 => /lib/tls/libc.so.6 (0x0feb9000)
/lib/ld.so.1 => /lib/ld.so.1 (0x40000000)
$ /lib/tls/libc.so.6
GNU C Library stable release version 2.3.3 (20040412), by Roland
McGrath et al.
Copyright (C) 2004 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.
Configured for ppc-suse-linux.
Compiled by GNU CC version 3.3.3 (SuSE Linux).
Compiled on a Linux 2.6.5 system on 2004-06-30.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
NPTL 0.61 by Ulrich Drepper
GNU Libidn by Simon Josefsson
RT using linux kernel aio
BIND-8.2.3-T5B
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
software FPU emulation by Richard Henderson, Jakub Jelinek and
others
Thread-local storage support included.
Report bugs using the `glibcbug' script to <bugs@gnu.org>.
--
Summary: lconv::frac_digits != CHAR_MAX in "C" locale
Product: glibc
Version: 2.3.3
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: sebor at roguewave dot com
CC: glibc-bugs at sources dot redhat dot com
GCC host triplet: ppc-suse-linux
http://sources.redhat.com/bugzilla/show_bug.cgi?id=625
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.