# HG changeset patch # User jlarmour # Date 1055513154 0 # Node ID 7d1bfa2391f96bdab306331a14c63c577830470c # Parent c07b9a1eed80a6007a857b5eb30ff963fe8ecd5d * tests/clock.c (main): Avoid div-by-zero if mean==0. * cdl/time.cdl: build all POSIX files all the time because they are used internally by the standard ISO C functions even if not exported. [Bug 1000001] diff --git a/packages/language/c/libc/time/current/ChangeLog b/packages/language/c/libc/time/current/ChangeLog --- a/packages/language/c/libc/time/current/ChangeLog +++ b/packages/language/c/libc/time/current/ChangeLog @@ -1,3 +1,12 @@ +2003-06-13 Jonathan Larmour + + * tests/clock.c (main): Avoid div-by-zero if mean==0. + + * cdl/time.cdl: build all POSIX files all the time because they + are used internally by the standard ISO C functions even if not + exported. + [Bug 1000001] + 2003-04-24 Robert Cragie * include/time.inl: diff --git a/packages/language/c/libc/time/current/cdl/time.cdl b/packages/language/c/libc/time/current/cdl/time.cdl --- a/packages/language/c/libc/time/current/cdl/time.cdl +++ b/packages/language/c/libc/time/current/cdl/time.cdl @@ -65,12 +65,20 @@ cdl_package CYGPKG_LIBC_TIME { requires CYGINT_ISO_DIV requires CYGINT_ISO_ABS + # Note: the POSIX files asctime_r,ctime_r,gmtime_r and + # localtime_r should be built all the time, not just in + # CYGFUN_LIBC_TIME_POSIX because the internal definitions + # are used by the ISO C functions regardless. Otherwise we + # get problems with certain inlining combinations. [Bug 1000001] + compile asctime.cxx clock.cxx \ ctime.cxx difftime.cxx \ gmtime.cxx localtime.cxx \ mktime.cxx settime.cxx \ strftime.cxx time.cxx \ - timeutil.cxx + timeutil.cxx asctime_r.cxx \ + ctime_r.cxx gmtime_r.cxx \ + localtime_r.cxx # ==================================================================== @@ -116,8 +124,7 @@ cdl_package CYGPKG_LIBC_TIME { display "POSIX time functions" default_value 1 requires CYGFUN_LIBC_STRING_BSD_FUNCS - compile asctime_r.cxx ctime_r.cxx gmtime_r.cxx \ - localtime_r.cxx strptime.cxx + compile strptime.cxx description " Enabling this option allows the use of the following functions defined in POSIX 1003.1: diff --git a/packages/language/c/libc/time/current/tests/clock.c b/packages/language/c/libc/time/current/tests/clock.c --- a/packages/language/c/libc/time/current/tests/clock.c +++ b/packages/language/c/libc/time/current/tests/clock.c @@ -221,7 +221,8 @@ main(int argc, char *argv[]) for (i=SKIPPED_SAMPLES;i TOLERANCE) { diag_printf("mean=%d, ctrs[%d]=%d, err=%d\n", mean, i, ctrs[i], err);