diff options
author | Roland McGrath <roland@gnu.org> | 2003-03-23 10:01:48 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2003-03-23 10:01:48 +0000 |
commit | b910f7887bdc3c07e460c8ee25ba552c6a2249a5 (patch) | |
tree | 06271b5c9ed70bf9c3dd2a08c551a2a54c1ed302 /nptl/tst-cond11.c | |
parent | 24eaaef61dffee283b6d32328f3e5126063d9d2a (diff) | |
download | glibc-b910f7887bdc3c07e460c8ee25ba552c6a2249a5.tar.gz glibc-b910f7887bdc3c07e460c8ee25ba552c6a2249a5.tar.xz glibc-b910f7887bdc3c07e460c8ee25ba552c6a2249a5.zip |
* tst-join5.c (tf1, tf2): Add a cast.
* Makeconfig (includes): Append -I$(..)nptl to this variable. * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]: Don't test anything. * tst-cond4.c: Likewise. * tst-cond6.c: Likewise. * tst-flock2.c: Likewise. * tst-mutex4.c: Likewise. * tst-rwlock4.c: Likewise. * tst-signal1.c: Likewise. * tst-spin2.c: Likewise. * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise. * tst-mutex4.c: Use test-skeleton.c. * tst-spin2.c: Likewise. * tst-sysconf.c: Likewise. * tst-barrier2.c: Likewise. * tst-cond4.c: Likewise. * tst-cond6.c: Likewise. * tst-rwlock4.c: Likewise. * tst-unload.c: Likewise. * tst-flock2.c (do_test): Use return instead of exit.
Diffstat (limited to 'nptl/tst-cond11.c')
-rw-r--r-- | nptl/tst-cond11.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/nptl/tst-cond11.c b/nptl/tst-cond11.c index 6c7758bf68..079dec5afc 100644 --- a/nptl/tst-cond11.c +++ b/nptl/tst-cond11.c @@ -24,6 +24,7 @@ #include <unistd.h> +#if _POSIX_CLOCK_SELECTION static int run_test (clockid_t cl) { @@ -149,15 +150,23 @@ run_test (clockid_t cl) return 0; } +#endif static int do_test (void) { +#if ! _POSIX_CLOCK_SELECTION + + puts ("_POSIX_CLOCK_SELECTION not supported, test skipped"); + return 0; + +#else + int res = run_test (CLOCK_REALTIME); -#if defined _POSIX_MONOTONIC_CLOCK -# if _POSIX_MONOTONIC_CLOCK == 0 +# if defined _POSIX_MONOTONIC_CLOCK +# if _POSIX_MONOTONIC_CLOCK == 0 int e = sysconf (_SC_MONOTONIC_CLOCK); if (e < 0) puts ("CLOCK_MONOTONIC not supported"); @@ -167,13 +176,14 @@ do_test (void) res = 1; } else -# endif +# endif res |= run_test (CLOCK_MONOTONIC); -#else +# else puts ("_POSIX_MONOTONIC_CLOCK not defined"); -#endif +# endif return res; +#endif } #define TIMEOUT 3 |