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: "bugs at daylessday dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 14 Dec 2007 10:53:30 -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 bugs at daylessday dot org 2007-12-14 10:53 -------
>nl_langinfo doesn't return always char pointers.
Well, this definitely not expected..
The documentation doesn't mention anywhere that this function may return
anything except for strings.
---
RETURN VALUE
If no locale has been selected for the appropriate category,
nl_langinfo() returns a pointer to the corresponding string in the
"C" locale.
---
>From what I see, this behaviour exists only in glibc (both MacOS and AIX know
nothing about _NL_TIME_WEEK_1STDAY and return day name when 17 is passed) and
probably violates the X/Open standard, according to which the function should
return char *, not union.
/usr/include/langinfo.h doesn't have any indication of possible return values.
Can I see the extended list of 'item' values somewhere (with the corresponding
return values)?
Are there any more undocumented return values?
Thanks in advance.
--
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.