Overview
| Comment: | OFDate: Don't declare _mktime64() with WINAPI |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
bce1118807a729c881adb9cbd536a05a |
| User & Date: | js on 2020-05-16 22:00:56 |
| Other Links: | manifest | tags |
Context
|
2020-05-17
| ||
| 00:58 | OFWin32ConsoleStdIOStream: Support for ANSI Win32 (check-in: bcf421d813 user: js tags: trunk) | |
|
2020-05-16
| ||
| 22:00 | OFDate: Don't declare _mktime64() with WINAPI (check-in: bce1118807 user: js tags: trunk) | |
| 18:17 | Better tests for local dates (check-in: ce2822b26c user: js tags: trunk) | |
Changes
Modified src/OFDate.m from [249eca1bb1] to [1c4647d564].
| ︙ | ︙ | |||
48 49 50 51 52 53 54 |
#if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \
defined(OF_HAVE_THREADS)
static OFMutex *mutex;
#endif
#ifdef OF_WINDOWS
| | | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
#if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \
defined(OF_HAVE_THREADS)
static OFMutex *mutex;
#endif
#ifdef OF_WINDOWS
static __time64_t (*func__mktime64)(struct tm *);
#endif
#ifdef HAVE_GMTIME_R
# define GMTIME_RET(field) \
time_t seconds = (time_t)_seconds; \
struct tm tm; \
\
|
| ︙ | ︙ | |||
202 203 204 205 206 207 208 |
#if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \
defined(OF_HAVE_THREADS)
mutex = [[OFMutex alloc] init];
#endif
#ifdef OF_WINDOWS
if ((module = LoadLibrary("msvcrt.dll")) != NULL)
| | | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
#if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \
defined(OF_HAVE_THREADS)
mutex = [[OFMutex alloc] init];
#endif
#ifdef OF_WINDOWS
if ((module = LoadLibrary("msvcrt.dll")) != NULL)
func__mktime64 = (__time64_t (*)(struct tm *))
GetProcAddress(module, "_mktime64");
#endif
}
+ (instancetype)date
{
return [[[self alloc] init] autorelease];
|
| ︙ | ︙ |