1
2
3
4
5
6
7
8
9
|
/*
* Copyright (c) 2008-2023 Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This file is part of ObjFW. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE.QPL included in
* the packaging of this file.
*
|
|
|
1
2
3
4
5
6
7
8
9
|
/*
* Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This file is part of ObjFW. It may be distributed under the terms of the
* Q Public License 1.0, which can be found in the file LICENSE.QPL included in
* the packaging of this file.
*
|
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
|
#if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \
defined(OF_HAVE_THREADS)
mutex = [[OFMutex alloc] init];
atexit(releaseMutex);
#endif
#ifdef OF_WINDOWS
if ((module = LoadLibrary("msvcrt.dll")) != NULL)
_mktime64FuncPtr = (__time64_t (*)(struct tm *))
GetProcAddress(module, "_mktime64");
#endif
}
+ (instancetype)alloc
{
|
|
|
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
|
#if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \
defined(OF_HAVE_THREADS)
mutex = [[OFMutex alloc] init];
atexit(releaseMutex);
#endif
#ifdef OF_WINDOWS
if ((module = GetModuleHandle("msvcrt.dll")) != NULL)
_mktime64FuncPtr = (__time64_t (*)(struct tm *))
GetProcAddress(module, "_mktime64");
#endif
}
+ (instancetype)alloc
{
|