2 #include "libpbd-config.h"
5 #ifndef HAVE_LOCALTIME_R
19 static pthread_mutex_t time_mutex;
20 static int time_mutex_inited = 0;
23 if (!time_mutex_inited)
25 time_mutex_inited = 1;
26 pthread_mutex_init(&time_mutex, NULL);
29 pthread_mutex_lock(&time_mutex);
30 tmp = localtime(timep);
33 memcpy(p_tm, tmp,
sizeof(
struct tm));
36 pthread_mutex_unlock(&time_mutex);
45 __cdecl localtime(
const long int *_Time)
49 return localtime((
const time_t *
const)NULL);
53 const time_t tempTime = *_Time;
54 return localtime(&tempTime);
struct tm * localtime_r(const time_t *const timep, struct tm *p_tm)