diff options
author | axis <qt-info@nokia.com> | 2009-04-24 11:34:15 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-04-24 11:34:15 (GMT) |
commit | 8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76 (patch) | |
tree | a17e1a767a89542ab59907462206d7dcf2e504b2 /config.tests/unix/clock-gettime | |
download | Qt-8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76.zip Qt-8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76.tar.gz Qt-8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76.tar.bz2 |
Long live Qt for S60!
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) |