Arithmetic type emulator helper class for testcases.

Chris Fairles chris.fairles@gmail.com
Mon Jul 14 22:21:00 GMT 2008


On Sat, Jul 12, 2008 at 9:51 PM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> ... if, however, you feel like you want to prepare something rock solid, following src/ptimer.c in wget  (wget-1.11.4.tgz) should be OK. Note that the sysconf(_SC_MONOTONIC_CLOCK) call happens when the timer facility is initialized, would not belong to configure time.
>
> Paolo.
>
>

I like the simple-first approach :) Attached is an update (everything
this time), note that I'm still just checking if any of
clock_gettime(REAL/MONO) and gettimeofday compile regardless of _POSIX
defn's. Is this ok if I do the _POSIX checks in <chrono> itself if the
corresponding _GLIBXX is defined? I guess I'm assuming that the
configure-time check is suppose to figure out which of clock func's
are available for use and not just, "yes, at least one is available".

Few other issues with system_clock in particular. The testcase in the
patch is just using dg-compile because, at least on my system,
clock_gettime is defined in librt.so and I wasn't sure if adding -lrt
to the dg-options is sufficient. Is another configure-time check
needed to determine if clock_gettime is in librt.so or not (I've seen
a similar check done in other opensource projects)?

Chris
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: chrono_patch.txt
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20080714/88f8687e/attachment.txt>


More information about the Libstdc++ mailing list