diff options
author | theraven <theraven@FreeBSD.org> | 2011-11-20 14:45:42 +0000 |
---|---|---|
committer | theraven <theraven@FreeBSD.org> | 2011-11-20 14:45:42 +0000 |
commit | 0f6ef690b3118882121ed67561c7ce2660cfebe1 (patch) | |
tree | 909189922493cddbeeac84af2e316dc897661311 /include/runetype.h | |
parent | 18b29f3fb8abee5d57ed8f4a44f806bec7e0eeff (diff) | |
download | FreeBSD-src-0f6ef690b3118882121ed67561c7ce2660cfebe1.zip FreeBSD-src-0f6ef690b3118882121ed67561c7ce2660cfebe1.tar.gz |
Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a
load of _l suffixed versions of various standard library functions that use
the global locale, making them take an explicit locale parameter. Also
adds support for per-thread locales. This work was funded by the FreeBSD
Foundation.
Please test any code you have that uses the C standard locale functions!
Reviewed by: das (gdtoa changes)
Approved by: dim (mentor)
Diffstat (limited to 'include/runetype.h')
-rw-r--r-- | include/runetype.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/runetype.h b/include/runetype.h index a63d909..c33ea2b 100644 --- a/include/runetype.h +++ b/include/runetype.h @@ -83,8 +83,14 @@ typedef struct { } _RuneLocale; #define _RUNE_MAGIC_1 "RuneMagi" /* Indicates version 0 of RuneLocale */ - -extern _RuneLocale _DefaultRuneLocale; +__BEGIN_DECLS +extern const _RuneLocale _DefaultRuneLocale; +__attribute__((deprecated)) extern _RuneLocale *_CurrentRuneLocale; +/* TODO: This is called quite a lot, so we should use a __thread variable when + * it's available. */ +extern _RuneLocale *__getCurrentRuneLocale(void); +#define _CurrentRuneLocale (__getCurrentRuneLocale()) +__END_DECLS #endif /* !_RUNETYPE_H_ */ |