pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pre-empting POSIX


From: Ben Pfaff
Subject: Re: Pre-empting POSIX
Date: Tue, 17 Jul 2007 08:33:34 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.99 (gnu/linux)

John Darrington <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]