This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, RTEMS] Fix CLOCKS_PER_SEC


On Mar  3 14:54, Craig Howland wrote:
> 
> On 03/03/2015 02:42 PM, Corinna Vinschen wrote:
> >On Mar  3 11:51, Joel Sherrill wrote:
> >>This patch is correct per POSIX.
> >>
> >>http://pubs.opengroup.org/onlinepubs/009695399/functions/clock.html
> >>
> >>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
> >compat.
> >
> >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.
> Strictly speaking, POSIX only requires 1 million for XSI, but not otherwise.
> So there are compile cases in which the 100 value is POSIX-compliant.

Oh, right!  I missed the XSI marker.  Thanks for noticing.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: pgpi4bguMkbBL.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]