diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2009-03-23 09:34:13 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-03-23 09:34:13 (GMT) |
commit | 67ad0519fd165acee4a4d2a94fa502e9e4847bd0 (patch) | |
tree | 1dbf50b3dff8d5ca7e9344733968c72704eb15ff /config.tests/unix/clock-gettime | |
download | Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.zip Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.tar.gz Qt-67ad0519fd165acee4a4d2a94fa502e9e4847bd0.tar.bz2 |
Long live Qt!
Diffstat (limited to 'config.tests/unix/clock-gettime')
-rw-r--r-- | config.tests/unix/clock-gettime/clock-gettime.cpp | 16 | ||||
-rw-r--r-- | config.tests/unix/clock-gettime/clock-gettime.pri | 2 | ||||
-rw-r--r-- | config.tests/unix/clock-gettime/clock-gettime.pro | 4 |
3 files changed, 22 insertions, 0 deletions
diff --git a/config.tests/unix/clock-gettime/clock-gettime.cpp b/config.tests/unix/clock-gettime/clock-gettime.cpp new file mode 100644 index 0000000..edb71f5 --- /dev/null +++ b/config.tests/unix/clock-gettime/clock-gettime.cpp @@ -0,0 +1,16 @@ +#include <unistd.h> +#include <time.h> + +int main(int, char **) +{ +#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) + timespec ts; + clock_gettime(CLOCK_REALTIME, &ts); +#else +# error "Feature _POSIX_TIMERS not available" + // MIPSpro doesn't understand #error, so force a compiler error + force_compiler_error = true; +#endif + return 0; +} + diff --git a/config.tests/unix/clock-gettime/clock-gettime.pri b/config.tests/unix/clock-gettime/clock-gettime.pri new file mode 100644 index 0000000..2a6160b --- /dev/null +++ b/config.tests/unix/clock-gettime/clock-gettime.pri @@ -0,0 +1,2 @@ +# clock_gettime() is implemented in librt on these systems +linux-*|hpux-*|solaris-*:LIBS *= -lrt diff --git a/config.tests/unix/clock-gettime/clock-gettime.pro b/config.tests/unix/clock-gettime/clock-gettime.pro new file mode 100644 index 0000000..c527535 --- /dev/null +++ b/config.tests/unix/clock-gettime/clock-gettime.pro @@ -0,0 +1,4 @@ +SOURCES = clock-gettime.cpp +CONFIG -= qt dylib +mac:CONFIG -= app_bundle +include(clock-gettime.pri) |