aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/time
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-07-19 16:48:07 +0200
committerCorinna Vinschen <corinna@vinschen.de>2016-08-15 10:56:56 +0200
commit88208d3735821df0f5a66c5f8781282a7f5bf284 (patch)
treed93a285355c8af0bcd33f0b0c9290aa15714ee2a /newlib/libc/time
parenta6a477fa8190b13d4ef0150875e2bd114cb5b132 (diff)
downloadnewlib-88208d3735821df0f5a66c5f8781282a7f5bf284.zip
newlib-88208d3735821df0f5a66c5f8781282a7f5bf284.tar.gz
newlib-88208d3735821df0f5a66c5f8781282a7f5bf284.tar.bz2
POSIX-1.2008 per-thread locales, groundwork part 2
Move all locale category structure definitions into setlocale.h and remove other headers in locale subdir. Create inline accessor functions for current category struct pointers and use throughout. Use pointers to "C" locale category structs by default in __global_locale. Signed-off by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc/time')
-rw-r--r--newlib/libc/time/strftime.c4
-rw-r--r--newlib/libc/time/strptime.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/newlib/libc/time/strftime.c b/newlib/libc/time/strftime.c
index ced106a..12c37eb 100644
--- a/newlib/libc/time/strftime.c
+++ b/newlib/libc/time/strftime.c
@@ -276,7 +276,7 @@ the "C" locale settings.
#include <ctype.h>
#include <wctype.h>
#include "local.h"
-#include "../locale/timelocal.h"
+#include "../locale/setlocale.h"
/* Defines to make the file dual use for either strftime() or wcsftime().
* To get wcsftime, define MAKE_WCSFTIME.
@@ -709,7 +709,7 @@ _DEFUN (strftime, (s, maxsize, format, tim_p),
unsigned long width;
int tzset_called = 0;
- struct lc_time_T *_CurrentTimeLocale = __get_current_time_locale ();
+ const struct lc_time_T *_CurrentTimeLocale = __get_current_time_locale ();
for (;;)
{
while (*format && *format != CQ('%'))
diff --git a/newlib/libc/time/strptime.c b/newlib/libc/time/strptime.c
index 19b9fce..88b8978 100644
--- a/newlib/libc/time/strptime.c
+++ b/newlib/libc/time/strptime.c
@@ -37,7 +37,7 @@
#include <strings.h>
#include <ctype.h>
#include <stdlib.h>
-#include "../locale/timelocal.h"
+#include "../locale/setlocale.h"
#define _ctloc(x) (_CurrentTimeLocale->x)
@@ -160,7 +160,7 @@ _DEFUN (strptime, (buf, format, timeptr),
char c;
int ymd = 0;
- struct lc_time_T *_CurrentTimeLocale = __get_current_time_locale ();
+ const struct lc_time_T *_CurrentTimeLocale = __get_current_time_locale ();
for (; (c = *format) != '\0'; ++format) {
char *s;
int ret;