This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/5486] nl_langinfo() returns invalid pointer instead of expected empty string


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]