2010-09-14 14:24:25 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif /* HAVE_CONFIG_H */
|
|
|
|
|
|
|
|
#include "Evil.h"
|
|
|
|
#include "evil_private.h"
|
|
|
|
|
2012-04-12 09:12:58 -07:00
|
|
|
#ifndef localtime_r
|
2010-09-14 14:24:25 -07:00
|
|
|
|
|
|
|
struct tm *
|
|
|
|
localtime_r(const time_t *timep, struct tm *result)
|
|
|
|
{
|
2012-04-12 09:12:58 -07:00
|
|
|
# ifndef _MSC_VER
|
2010-09-14 14:24:25 -07:00
|
|
|
struct tm *tmp;
|
2012-04-12 09:12:58 -07:00
|
|
|
# endif /* ! _MSC_VER */
|
2010-09-14 14:24:25 -07:00
|
|
|
|
|
|
|
if (!timep || !result)
|
|
|
|
return NULL;
|
|
|
|
|
2012-04-12 09:12:58 -07:00
|
|
|
# ifdef _MSC_VER
|
2010-09-14 14:24:25 -07:00
|
|
|
if (localtime_s(result, timep) != 0)
|
|
|
|
return NULL;
|
2012-04-12 09:12:58 -07:00
|
|
|
# else
|
2010-09-14 14:24:25 -07:00
|
|
|
tmp = localtime(timep);
|
|
|
|
if (!tmp)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
memcpy(result, tmp, sizeof(struct tm));
|
|
|
|
|
2012-04-12 09:12:58 -07:00
|
|
|
# endif /* ! _MSC_VER */
|
2010-09-14 14:24:25 -07:00
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
2011-02-23 11:34:27 -08:00
|
|
|
|
2012-04-12 09:12:58 -07:00
|
|
|
#endif /* localtime_r */
|
|
|
|
|
2011-02-23 11:34:27 -08:00
|
|
|
#ifdef UNDER_CE
|
|
|
|
|
|
|
|
void
|
|
|
|
tzset(void)
|
|
|
|
{
|
|
|
|
/* does nothing... */
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* UNDER_CE */
|