From c11779332651dd2f3b12f5ec48202fa7e547272b Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 31 Mar 2015 11:14:22 +0200 Subject: Add _tzset_unlocked and _tzset_unlocked_r newlib: * libc/time/local.h (_tzset_unlocked_r): Add prototype. (_tzset_unlocked): Ditto. * libc/time/tzset.c (_tzset_unlocked): New function, call _tzset_unlocked_r. (tzset): Lock and call _tzset_unlocked_r. * libc/time/tzset_r (_tzset_unlocked_r): Remove locking and rename from _tzset_r. (_tzset_r): Lock and call _tzset_unlocked_r. cygwin: * localtime.cc (tzset_unlocked): Export as _tzset_unlocked. Signed-off-by: Corinna Vinschen --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/localtime.cc | 10 ++++++++++ 2 files changed, 14 insertions(+) (limited to 'winsup/cygwin') diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 72d15278c..79ae5a9a1 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2015-03-31 Corinna Vinschen + + * localtime.cc (tzset_unlocked): Export as _tzset_unlocked. + 2015-03-30 Yaakov Selkowitz * common.din (__gnu_basename): Export. diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc index ca58b65e1..d57a020b5 100644 --- a/winsup/cygwin/localtime.cc +++ b/winsup/cygwin/localtime.cc @@ -500,7 +500,11 @@ static int tzload(timezone_t sp, const char * name, int doextend); static int tzparse(timezone_t sp, const char * name, int lastditch); +#ifdef __CYGWIN__ +extern "C" void tzset_unlocked(void); +#else static void tzset_unlocked(void); +#endif static long leapcorr(const timezone_t sp, time_t * timep); static timezone_t lclptr; @@ -1613,6 +1617,9 @@ tzsetwall (void) static NO_COPY muto tzset_guard; +#ifdef __CYGWIN__ +extern "C" +#else #ifndef STD_INSPIRED /* ** A non-static declaration of tzsetwall in a system header file @@ -1620,6 +1627,7 @@ static NO_COPY muto tzset_guard; */ static #endif /* !defined STD_INSPIRED */ +#endif void tzset_unlocked(void) { @@ -1663,6 +1671,8 @@ tzset_unlocked(void) settzname(); } +EXPORT_ALIAS (tzset_unlocked, _tzset_unlocked) + extern "C" void tzset(void) { -- cgit v1.2.3