5#if !(defined(_MSC_VER) || defined(LINUX) || defined(SOLARIS) || defined(__APPLE__) || defined(__MACH__) || defined(__unix__) || defined(__CYGWIN__))
6static MDB_THREAD_LOCK localtime_lock = MDB_THREAD_LOCK_INITIALIZER;
9int mdb_localtime_copy(
const time_t *when,
struct tm *result) {
14 return localtime_s(result, when) == 0;
15#elif defined(LINUX) || defined(SOLARIS) || defined(__APPLE__) || defined(__MACH__) || defined(__unix__) || defined(__CYGWIN__)
16 return localtime_r(when, result) != NULL;
23 mdb_thread_lock(&localtime_lock);
24 temporary = localtime(when);
25 status = temporary != NULL;
28 mdb_thread_unlock(&localtime_lock);