tech-userlevel archive

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

locale.h not POSIX-compliant



http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html

/usr/include/locale.h does not support some 2008 POSIX extensions to the
ISO C standard.  I propose we add them per the attached patch.  Quoting
from the above: 

        "[CX]  The <locale.h> header shall contain at least the
following macros representing bitmasks for use with the newlocale()
function for each supported locale category: LC_COLLATE_MASK
LC_CTYPE_MASK LC_MESSAGES_MASK LC_MONETARY_MASK LC_NUMERIC_MASK
LC_TIME_MASK
        [...]
        "In addition, a macro to set the bits for all categories set
shall be defined: LC_ALL_MASK"

AFAICT the standard doesn't require the _MASK macros to match, e.g. 

        LC_COLLATE
and
        LC_COLLATE_MASK

might have different values, and in fact the GNU implementation uses
one as the bit position of the other.  I would do the same but with
less indirection.  

Suggestions?  Entrenched opposition?  

There?s no point in acting all surprised about it. All the planning
charts and demolition orders have been on display at your local
planning department in Alpha Centauri for fifty of your Earth years so
you?ve had plenty of time to lodge any formal complaints and its far
too late to start making a fuss about it now. 

--jkl

Attachment: locale.diff
Description: Binary data



Home | Main Index | Thread Index | Old Index