#ifdef __APPLE__
d->_last_used = mach_absolute_time();
-#elif defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK)
+#elif defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_C_SOURCE >= 199309L)
struct timespec t;
clock_gettime (CLOCK_MONOTONIC, &t);
d->_last_used = t.tv_sec + (double) t.tv_nsec / 10e9;
* or it treats the file as a text stream and puts in
* line endings in etc
*/
-#ifdef WIN32
+#ifdef PLATFORM_WINDOWS
#define WRITE_FLAGS O_RDWR | O_CREAT | O_BINARY
#define READ_FLAGS O_RDONLY | O_BINARY
#else