From b910f7887bdc3c07e460c8ee25ba552c6a2249a5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 23 Mar 2003 10:01:48 +0000 Subject: * 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. --- nptl/tst-cond11.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'nptl/tst-cond11.c') 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 +#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 -- cgit v1.2.3