#define _XLOCALE_PRIVATE_H_
#include <sys/cdefs.h>
+#define __DARWIN_XLOCALE_PRIVATE
#include <xlocale.h>
+#undef __DARWIN_XLOCALE_PRIVATE
#include <stdlib.h>
#include <locale.h>
#include <libkern/OSAtomic.h>
#include <pthread.h>
+#include <limits.h>
#include "setlocale.h"
#include "collate.h"
#include "runetype.h"
struct __xlocale_st_collate {
__STRUCT_COMMON
char __encoding[ENCODING_LEN + 1];
- unsigned char __substitute_table[UCHAR_MAX + 1][STR_LEN];
- struct __collate_st_char_pri __char_pri_table[UCHAR_MAX + 1];
+ struct __collate_st_info __info;
+ struct __collate_st_subst *__substitute_table[COLL_WEIGHTS_MAX];
struct __collate_st_chain_pri *__chain_pri_table;
+ struct __collate_st_large_char_pri *__large_char_pri_table;
+ struct __collate_st_char_pri __char_pri_table[UCHAR_MAX + 1];
};
struct __xlocale_st_runelocale {
__STRUCT_COMMON
};
/* the extended locale structure */
+ /* values for __numeric_fp_cvt */
+#define LC_NUMERIC_FP_UNINITIALIZED 0
+#define LC_NUMERIC_FP_SAME_LOCALE 1
+#define LC_NUMERIC_FP_USE_LOCALE 2
+
struct _xlocale {
/* The item(s) before __magic are not copied when duplicating locale_t's */
+ __STRUCT_COMMON /* only used for locale_t's in __lc_numeric_loc */
/* 10 independent mbstate_t buffers! */
__darwin_mbstate_t __mbs_mblen;
__darwin_mbstate_t __mbs_mbrlen;
unsigned char _time_using_locale;
unsigned char __mlocale_changed;
unsigned char __nlocale_changed;
+ unsigned char __numeric_fp_cvt;
/* collate */
struct __xlocale_st_collate *__lc_collate;
/* ctype */
struct __xlocale_st_monetary *__lc_monetary;
/* numeric */
struct __xlocale_st_numeric *__lc_numeric;
+ struct _xlocale *__lc_numeric_loc;
/* time */
struct __xlocale_st_time *__lc_time;
/* localeconv */
__BEGIN_DECLS
void __ldpart_free_extra(struct __xlocale_st_ldpart *);
+locale_t __numeric_ctype(locale_t);
void __xlocale_init(void);
static inline __attribute__((always_inline)) locale_t