[PATCH, RTEMS] Fix CLOCKS_PER_SEC
Tue Mar 3 19:42:00 GMT 2015
On Mar 3 11:51, Joel Sherrill wrote:
> This patch is correct per POSIX.
> Gedare addressed the path to our clock() implementation and that should
> now be consistent.
> I am curious how the #else targets are correct given the POSIX definition.
That depends on the requirement for backward compat.
What's worse is that toplevel time.h uses a non-POSIX default definition
for _CLOCKS_PER_SEC_. Unfortunately this, too, is required for backward
The Cygwin source uses CLOCKS_PER_SEC to compute the right values in
times(2), for instance, and applications may depend on that. I added a
change to Cygwin to allow new applications to use another CLOCKS_PER_SEC
value while retaining backward compatibility for existing applications
to my TODO list.
> For RTEMS, is this OK to apply?
With the change I mentioned, yes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the Newlib