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 <corinna@vinschen.de>
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user