Public bug reported:

Binary package hint: gcc-4.4

std::chrono::monotonic_clock in <chrono> can be defined differently
(typedef system_clock or proper monotonic_clock) based on the define
_GLIBCXX_USE_CLOCK_MONOTONIC.

The latter should be defined from the gcc configuration scrips based on
whether the clock_gettime supports monotonic clock or not.

Ubuntu Lucid obviously supports monotonic clock (see example below),
however _GLIBCXX_USE_CLOCK_MONOTONIC is not defined in
/usr/include/c++/4.4/x86_64-linux-gnu/bits/c++config.h.

---

#include <unistd.h>
#include <stdio.h>
#include <time.h>
#include <errno.h>
#include <string.h>
 
int
main ()
{
          struct timespec tp;
          int ret = clock_gettime(CLOCK_MONOTONIC, &tp);
        if (ret < 0)
                printf("%s\n", strerror(errno));
 return ret;
}

$ gcc monotonic.c -o monotonic -lrt

** Affects: gcc-4.4 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
c++0x: _GLIBCXX_USE_CLOCK_MONOTONIC is not defined on Ubuntu Lucid
https://bugs.launchpad.net/bugs/608164
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to