This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/5486] nl_langinfo() returns invalid pointer instead of expected empty string
- From: "jakub at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 15 Dec 2007 15:07:47 -0000
- Subject: [Bug libc/5486] nl_langinfo() returns invalid pointer instead of expected empty string
- References: <20071213225007.5486.bugs@daylessday.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jakub at redhat dot com 2007-12-15 15:07 -------
Get a clue. POSIX specifies a bunch of values that must be supported and for
them all a string is returned (though it can be empty even if the argument is
valid POSIX arg - say if some locale doesn't define AM/PM strings). Passing
any other value triggers undefined behavior wrt. POSIX. Some values have a
meaning for glibc and then glibc returns some value (in some cases a string, in
other cases an unsigned int, in other cases pointer to uint32_t wide chars),
which is ok, because for POSIX this is undefined behavior. Some values are
invalid and then "" is returned as POSIX says.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |INVALID
http://sourceware.org/bugzilla/show_bug.cgi?id=5486
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.