|
From: | Paul Eggert |
Subject: | Re: clock_gettime and CLOCK_REALTIME |
Date: | Sun, 29 Jul 2018 11:48:00 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Eli Zaretskii wrote:
Does Posix mandate that CLOCK_REALTIME be a macro?
Yes, the POSIX spec for <time.h> requires CLOCK_REALTIME to be a symbolic constant, and it says that a symbolic constant must be a macro that expands to a compile-time constant expression with an integer type (it need not be usable in #if).
Why does Gnulib's gettime.c insist on CLOCK_REALTIME being a macro?
Evidently nobody has cared about this before, as there is a fallback that should work well enough.
I suspect the best place to fix this is mingw, as there should be an easy fix there. It'd be a nice also to scan mingw headers for other places that don't define macros as they should.
[Prev in Thread] | Current Thread | [Next in Thread] |