mirror of
https://github.com/cc65/cc65.git
synced 2025-08-09 13:25:06 +00:00
Enable timespec_get in MINGW64 code path to see if that works (5).
This commit is contained in:
@@ -68,14 +68,13 @@ void PeripheralsWriteByte (uint8_t Addr, uint8_t Val)
|
|||||||
#if defined(__MINGW64__)
|
#if defined(__MINGW64__)
|
||||||
/* We check for MINGW64 before MINGW32, since MINGW64 also defines __MINGW32__. */
|
/* We check for MINGW64 before MINGW32, since MINGW64 also defines __MINGW32__. */
|
||||||
/* Using timespec_get() in the MinGW64 compiler makes the Linux workflow build fail. */
|
/* Using timespec_get() in the MinGW64 compiler makes the Linux workflow build fail. */
|
||||||
//bool time_valid = timespec_get(&ts, TIME_UTC) == TIME_UTC;
|
/* Using clock_gettime() in the MinGW64 compiler makes the Linux workflow build fail. */
|
||||||
/* does clock_gettime work? */
|
bool time_valid = false;
|
||||||
bool time_valid = clock_gettime(CLOCK_REALTIME, &ts) == 0;
|
|
||||||
//bool time_valid = false;
|
|
||||||
#elif defined(__MINGW32__)
|
#elif defined(__MINGW32__)
|
||||||
/* does timespec_get work? -- yes! */
|
/* does timespec_get work? -- yes! */
|
||||||
/* does clock_gettime work? */
|
/* does clock_gettime work? */
|
||||||
bool time_valid = false;
|
//bool time_valid = false;
|
||||||
|
bool time_valid = clock_gettime(CLOCK_REALTIME, &ts) == 0;
|
||||||
//bool time_valid = timespec_get(&ts, TIME_UTC) == TIME_UTC;
|
//bool time_valid = timespec_get(&ts, TIME_UTC) == TIME_UTC;
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
/* clock_gettime() is not available when using the Microsoft compiler. Use timespec_get() instead. */
|
/* clock_gettime() is not available when using the Microsoft compiler. Use timespec_get() instead. */
|
||||||
|
Reference in New Issue
Block a user