From 382fa90fe1fdd0f363088a28a5be12a4548099b4 Mon Sep 17 00:00:00 2001 From: Craig Howland Date: Tue, 31 Mar 2015 10:26:49 +0200 Subject: Move tzset calls to time functions. * libc/stdlib/setenv_r.c (_setenv_r): Remove tzset() call for TZ definition. * libc/time/lcltime_r.c (localtime_r): Add tzset() call * libc/time/mktime.c (mktime): Ditto. * libc/time/strftime.c (strftime, wcsftime): Ditto. Signed-off-by: Corinna Vinschen --- newlib/libc/stdlib/setenv_r.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'newlib/libc/stdlib/setenv_r.c') diff --git a/newlib/libc/stdlib/setenv_r.c b/newlib/libc/stdlib/setenv_r.c index f9ff2c1cd..c32c6aca9 100644 --- a/newlib/libc/stdlib/setenv_r.c +++ b/newlib/libc/stdlib/setenv_r.c @@ -79,9 +79,6 @@ _DEFUN (_setenv_r, (reent_ptr, name, value, rewrite), { /* old larger; copy over */ while ((*C++ = *value++) != 0); ENV_UNLOCK; - /* if we are changing the TZ environment variable, update timezone info */ - if (strcmp (name, "TZ") == 0) - tzset (); return 0; } } @@ -128,10 +125,6 @@ _DEFUN (_setenv_r, (reent_ptr, name, value, rewrite), ENV_UNLOCK; - /* if we are setting the TZ environment variable, update timezone info */ - if (strncmp ((*p_environ)[offset], "TZ=", 3) == 0) - tzset (); - return 0; } -- cgit v1.2.3