summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include/sys/reent.h
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/include/sys/reent.h')
-rw-r--r--newlib/libc/include/sys/reent.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
index 5481ca234..28fbecbdc 100644
--- a/newlib/libc/include/sys/reent.h
+++ b/newlib/libc/include/sys/reent.h
@@ -37,6 +37,11 @@ typedef __uint32_t __ULong;
struct _reent;
+/* TODO: This structure type isn't defined yet. It's supposed to be used
+ by locale-specific functions in case a pre-thread locale per SUSv4 has
+ been specified. */
+struct _thr_locale_t;
+
/*
* If _REENT_SMALL is defined, we make struct _reent as small as possible,
* by having nearly everything possible allocated at first use.
@@ -384,8 +389,9 @@ struct _reent
int __sdidinit; /* 1 means stdio has been init'd */
- int _current_category; /* unused */
- _CONST char *_current_locale; /* unused */
+ /* TODO */
+ int _unspecified_locale_info; /* unused, reserved for locale stuff */
+ struct _thr_locale_t *_locale;/* per-thread locale */
struct _mprec *_mp;
@@ -450,7 +456,6 @@ extern const struct __sFILE_fake __sf_fake_stderr;
{ (var)->_stdin = (__FILE *)&__sf_fake_stdin; \
(var)->_stdout = (__FILE *)&__sf_fake_stdout; \
(var)->_stderr = (__FILE *)&__sf_fake_stderr; \
- (var)->_current_locale = "C"; \
}
/* Only built the assert() calls if we are built with debugging. */
@@ -577,8 +582,9 @@ struct _reent
int _inc; /* used by tmpnam */
char _emergency[_REENT_EMERGENCY_SIZE];
- int _current_category; /* used by setlocale */
- _CONST char *_current_locale;
+ /* TODO */
+ int _unspecified_locale_info; /* unused, reserved for locale stuff */
+ struct _thr_locale_t *_locale;/* per-thread locale */
int __sdidinit; /* 1 means stdio has been init'd */
@@ -697,7 +703,6 @@ struct _reent
{ (var)->_stdin = &(var)->__sf[0]; \
(var)->_stdout = &(var)->__sf[1]; \
(var)->_stderr = &(var)->__sf[2]; \
- (var)->_current_locale = "C"; \
(var)->_new._reent._rand_next = 1; \
(var)->_new._reent._r48._seed[0] = _RAND48_SEED_0; \
(var)->_new._reent._r48._seed[1] = _RAND48_SEED_1; \