Author: sthibault Date: 2013-08-28 19:27:11 +0000 (Wed, 28 Aug 2013) New Revision: 5687
Added: glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff Modified: glibc-package/trunk/debian/changelog glibc-package/trunk/debian/patches/series Log: * patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff: New patch from Richard Braun to work around applications which do not like micro-second clock_t, such as guile. Modified: glibc-package/trunk/debian/changelog =================================================================== --- glibc-package/trunk/debian/changelog 2013-08-17 23:43:17 UTC (rev 5686) +++ glibc-package/trunk/debian/changelog 2013-08-28 19:27:11 UTC (rev 5687) @@ -1,8 +1,14 @@ eglibc (2.17-93) UNRELEASED; urgency=low + [ Adam Conrad ] * patches/any/cvs-tst-cancel4-buf.diff: Increase nptl test case buffer size to 16384 so we really block on current (>= 3.10) Linux kernels. + [ Samuel Thibault ] + * patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff: New patch from + Richard Braun to work around applications which do not like micro-second + clock_t, such as guile. + -- Adam Conrad <adcon...@0c3.net> Thu, 01 Aug 2013 23:00:51 +0100 eglibc (2.17-92) unstable; urgency=low Added: glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff =================================================================== --- glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff (rev 0) +++ glibc-package/trunk/debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff 2013-08-28 19:27:11 UTC (rev 5687) @@ -0,0 +1,79 @@ +Some applications assume centisecond precision, or at most millisecond precision +(e.g. guile). This is a work-around for them. + +--- + clock.c | 8 ++++---- + getclktck.c | 5 ++--- + setitimer.c | 2 +- + times.c | 2 +- + 4 files changed, 8 insertions(+), 9 deletions(-) +commit d57f2f9b4bd007846af2fb4217486ea572579010 +Author: Richard Braun <rbr...@sceen.net> +Date: Tue Aug 27 11:35:31 2013 +0200 + + Express CPU time (clock_t) in centiseconds + +diff --git a/sysdeps/mach/hurd/clock.c b/sysdeps/mach/hurd/clock.c +index 61a66be..51f7abe 100644 +--- a/sysdeps/mach/hurd/clock.c ++++ b/sysdeps/mach/hurd/clock.c +@@ -44,10 +44,10 @@ clock (void) + if (err) + return __hurd_fail (err); + +- total = bi.user_time.seconds * 1000000 + bi.user_time.microseconds; +- total += tti.user_time.seconds * 1000000 + tti.user_time.microseconds; +- total += bi.system_time.seconds * 1000000 + bi.system_time.microseconds; +- total += tti.system_time.seconds * 1000000 + tti.system_time.microseconds; ++ total = bi.user_time.seconds * 100 + bi.user_time.microseconds / 10000; ++ total += tti.user_time.seconds * 100 + tti.user_time.microseconds / 10000; ++ total += bi.system_time.seconds * 100 + bi.system_time.microseconds / 10000; ++ total += tti.system_time.seconds * 100 + tti.system_time.microseconds / 10000; + + return total; + } +diff --git a/sysdeps/mach/hurd/getclktck.c b/sysdeps/mach/hurd/getclktck.c +index 69be2cc..5f7d946 100644 +--- a/sysdeps/mach/hurd/getclktck.c ++++ b/sysdeps/mach/hurd/getclktck.c +@@ -18,12 +18,11 @@ + + #include <time.h> + +-/* Return frequency of `times'. +- Since Mach reports CPU times in microseconds, we always use 1 million. */ ++/* Return frequency of `times'. */ + int + __getclktck () + { +- return 1000000; ++ return 100; + } + + /* Before glibc 2.2, the Hurd actually did this differently, so we +diff --git a/sysdeps/mach/hurd/setitimer.c b/sysdeps/mach/hurd/setitimer.c +index 39b6b16..4992c89 100644 +--- a/sysdeps/mach/hurd/setitimer.c ++++ b/sysdeps/mach/hurd/setitimer.c +@@ -42,7 +42,7 @@ quantize_timeval (struct timeval *tv) + static time_t quantum = -1; + + if (quantum == -1) +- quantum = 1000000 / __getclktck (); ++ quantum = 100 / __getclktck (); + + tv->tv_usec = ((tv->tv_usec + (quantum - 1)) / quantum) * quantum; + if (tv->tv_usec >= 1000000) +diff --git a/sysdeps/mach/hurd/times.c b/sysdeps/mach/hurd/times.c +index 9e13a75..593c33a 100644 +--- a/sysdeps/mach/hurd/times.c ++++ b/sysdeps/mach/hurd/times.c +@@ -29,7 +29,7 @@ + static inline clock_t + clock_from_time_value (const time_value_t *t) + { +- return t->seconds * 1000000 + t->microseconds; ++ return t->seconds * 100 + t->microseconds / 10000; + } + + /* Store the CPU time used by this process and all its Modified: glibc-package/trunk/debian/patches/series =================================================================== --- glibc-package/trunk/debian/patches/series 2013-08-17 23:43:17 UTC (rev 5686) +++ glibc-package/trunk/debian/patches/series 2013-08-28 19:27:11 UTC (rev 5687) @@ -125,6 +125,7 @@ hurd-i386/tg-io_select_timeout.diff hurd-i386/tg-poll_errors_fixes.diff hurd-i386/tg-context_functions.diff +hurd-i386/unsubmitted-clock_t_centiseconds.diff i386/local-biarch.diff i386/local-cmov.diff -- To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1veloz-00089i...@vasks.debian.org