[Bug libc/5486] nl_langinfo() returns invalid pointer instead of expected empty string
bugs at daylessday dot org
sourceware-bugzilla@sourceware.org
Fri Dec 14 10:53:00 GMT 2007
------- 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.
More information about the Glibc-bugs
mailing list