John Darrington <[EMAIL PROTECTED]> writes: > For some time now I've been cursing the braindead way that locale > information is dealt with by POSIX. Reading some of the glibc > development archives however it seems that this is planned to be > addressed in future versions, and libc already implements (but does > not document) them. > See http://www.cygwin.com/ml/libc-alpha/2007-01/msg00018.html > > What do people think about using the newlocale, uselocale, querylocale > etc functions from /usr/include/locale.h ?
I think that it is possible to simulate these interfaces in a system that does not support them. I believe that newlocale, uselocale, duplocale, freelocale can be implemented in terms of a locale_t that contains a string designating a locale, and the *_l functions in terms of wrappers that set and restore the locale. These could go into gnulib. They would not be thread-safe. querylocale is not part of the POSIX draft. I found a Mac OS X manpage for it. It looks like it should be implementable as well. Since we can simulate them on systems that don't have them, I can't see any reason not to use these interfaces. -- Ben Pfaff http://benpfaff.org _______________________________________________ pspp-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/pspp-dev
