[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
clock_gettime and CLOCK_REALTIME
From: |
Eli Zaretskii |
Subject: |
clock_gettime and CLOCK_REALTIME |
Date: |
Sun, 29 Jul 2018 21:16:57 +0300 |
Gnulib's gettime.c assumes that CLOCK_REALTIME is a preprocessor
macro:
# if defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME
if (clock_gettime (CLOCK_REALTIME, ts) == 0)
return;
# endif
Does Posix mandate that CLOCK_REALTIME be a macro? With mingw.org's
MinGW runtime 5.1.0, it isn't:
typedef struct __clockid__ *clockid_t;
extern clockid_t CLOCK_REALTIME;
extern clockid_t CLOCK_MONOTONIC;
Why does Gnulib's gettime.c insist on CLOCK_REALTIME being a macro?
Thanks.
- clock_gettime and CLOCK_REALTIME,
Eli Zaretskii <=