This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/10968] New: _NL_LOCALE_NAME macro does not work
- From: "bruno at clisp dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 17 Nov 2009 00:37:43 -0000
- Subject: [Bug libc/10968] New: _NL_LOCALE_NAME macro does not work
- Reply-to: sourceware-bugzilla at sourceware dot org
In <http://sourceware.org/ml/libc-alpha/2005-03/msg00179.html> a macro
_NL_LOCALE_NAME was introduced, whose purpose it is to access the name
of the current locale. But it does not work: with it, the nl_langinfo
function always returns the empty string.
How to reproduce: Compile and run the attached program bug1.c.
The reason, found by Ludovic Courtès, is that in the macroexpansion of
_NL_ITEM (category, -1) => (((category) << 16) | (-1))
the bits 31..16 of the number -1 overwrite the bits of the category.
The suggested fix therefore is to change the _NL_LOCALE_NAME macro
as indicated in bug1.c.
--
Summary: _NL_LOCALE_NAME macro does not work
Product: glibc
Version: 2.8
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: bruno at clisp dot org
CC: glibc-bugs at sources dot redhat dot com,ludo at gnu dot
org
GCC build triplet: x86_64-suse-linux
GCC host triplet: x86_64-suse-linux
GCC target triplet: x86_64-suse-linux
http://sourceware.org/bugzilla/show_bug.cgi?id=10968
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.