efl/legacy/evil/src/lib/evil_time.c

43 lines
603 B
C

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif /* HAVE_CONFIG_H */
#include "Evil.h"
#include "evil_private.h"
struct tm *
localtime_r(const time_t *timep, struct tm *result)
{
#ifndef _MSC_VER
struct tm *tmp;
#endif /* ! _MSC_VER */
if (!timep || !result)
return NULL;
#ifdef _MSC_VER
if (localtime_s(result, timep) != 0)
return NULL;
#else
tmp = localtime(timep);
if (!tmp)
return NULL;
memcpy(result, tmp, sizeof(struct tm));
#endif /* ! _MSC_VER */
return result;
}
#ifdef UNDER_CE
void
tzset(void)
{
/* does nothing... */
}
#endif /* UNDER_CE */