mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Added more semaphore locking around the basic stdio, memory, locale
and dirent data operations. That should do it! While the library is not reentrant (this is not ixemul.library) it should be thread-safe now. Thread-safe in the sense of POSIX 1003.1c-1995. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14842 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: time_localtime_r.c,v 1.4 2005-02-03 16:56:17 obarthel Exp $
|
||||
* $Id: time_localtime_r.c,v 1.5 2005-02-27 21:58:21 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@@ -67,6 +67,8 @@ localtime_r(const time_t *t,struct tm * tm_ptr)
|
||||
}
|
||||
#endif /* CHECK_FOR_NULL_POINTERS */
|
||||
|
||||
__locale_lock();
|
||||
|
||||
/* The time parameter given represents UTC and
|
||||
* must be converted to local time before we proceed.
|
||||
*/
|
||||
@@ -75,6 +77,8 @@ localtime_r(const time_t *t,struct tm * tm_ptr)
|
||||
else
|
||||
gmt_offset = 0;
|
||||
|
||||
__locale_unlock();
|
||||
|
||||
SHOWVALUE(gmt_offset);
|
||||
|
||||
result = __convert_time((*t), gmt_offset, tm_ptr);
|
||||
|
||||
Reference in New Issue
Block a user