From bf7c04cd5f4b3a7d3e3155b0035396e7f1037a13 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 10 Dec 2004 00:41:30 +0000 Subject: Update. 2004-12-01 Jakub Jelinek * posix/tst-regex.c: Use defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 conditionals instead of defined _POSIX_CPUTIME. (main): If _POSIX_CPUTIME == 0, call sysconf to see if CPUTIME option is available. * posix/tst-regex.c2: Use defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 conditionals instead of defined _POSIX_CPUTIME. (do_test): If _POSIX_CPUTIME == 0, call sysconf to see if CPUTIME option is available. * sysdeps/posix/sysconf.c (__sysconf): If _POSIX_CPUTIME resp. _POSIX_THREAD_CPUTIME is defined to 0, return -1 for the corresponding _SC_ argument. --- sysdeps/posix/sysconf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysdeps/posix') diff --git a/sysdeps/posix/sysconf.c b/sysdeps/posix/sysconf.c index 72212fe26d..cdd1fe9636 100644 --- a/sysdeps/posix/sysconf.c +++ b/sysdeps/posix/sysconf.c @@ -897,7 +897,7 @@ __sysconf (name) #endif case _SC_CPUTIME: -#ifdef _POSIX_CPUTIME +#if _POSIX_CPUTIME > 0 return _POSIX_CPUTIME; #else return -1; @@ -1062,7 +1062,7 @@ __sysconf (name) #endif case _SC_THREAD_CPUTIME: -#ifdef _POSIX_THREAD_CPUTIME +#if _POSIX_THREAD_CPUTIME > 0 return _POSIX_THREAD_CPUTIME; #else return -1; -- cgit 1.4.1