mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Split the reentrant functions from the non-reentrant ones.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14774 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: time_localtime.c,v 1.2 2004-11-17 19:07:22 obarthel Exp $
|
||||
* $Id: time_localtime.c,v 1.3 2004-11-18 09:40:37 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@@ -47,46 +47,6 @@
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
struct tm *
|
||||
localtime_r(const time_t *t,struct tm * tm_ptr)
|
||||
{
|
||||
struct tm * result = NULL;
|
||||
LONG gmt_offset;
|
||||
|
||||
ENTER();
|
||||
|
||||
assert( t != NULL && tm_ptr != NULL );
|
||||
|
||||
#if defined(CHECK_FOR_NULL_POINTERS)
|
||||
{
|
||||
if(t == NULL || tm_ptr == NULL)
|
||||
{
|
||||
errno = EFAULT;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
#endif /* CHECK_FOR_NULL_POINTERS */
|
||||
|
||||
/* The time parameter given represents local time and
|
||||
* must be converted to UTC before we proceed.
|
||||
*/
|
||||
if(__default_locale != NULL)
|
||||
gmt_offset = 60 * __default_locale->loc_GMTOffset;
|
||||
else
|
||||
gmt_offset = 0;
|
||||
|
||||
SHOWVALUE(gmt_offset);
|
||||
|
||||
result = __convert_time((*t), gmt_offset, tm_ptr);
|
||||
|
||||
out:
|
||||
|
||||
RETURN(result);
|
||||
return(result);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
struct tm *
|
||||
localtime(const time_t *t)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user