This is needed to run Python on the Hurd, especially during the build of python-boot0. Adapted from https://salsa.debian.org/glibc-team/glibc/-/blob/glibc-2.31/debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff commit d57f2f9b4bd007846af2fb4217486ea572579010 Author: Richard Braun Date: Tue Aug 27 11:35:31 2013 +0200 Express CPU time (clock_t of times(2)) in centiseconds From 170c292b643fdc1eb56881e6592b07c0c019993e Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 2 Mar 2020 18:28:54 +0100 Subject: [PATCH 1/2] Express CPU time (clock_t) in centiseconds --- sysdeps/mach/hurd/clock.c | 8 ++++---- sysdeps/mach/hurd/getclktck.c | 5 ++--- sysdeps/mach/hurd/setitimer.c | 2 +- sysdeps/mach/hurd/times.c | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/sysdeps/mach/hurd/clock.c b/sysdeps/mach/hurd/clock.c index 7cb42df786..4db49b579d 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 943e36e805..5a3cf0930b 100644 --- a/sysdeps/mach/hurd/getclktck.c +++ b/sysdeps/mach/hurd/getclktck.c @@ -18,12 +18,11 @@ #include -/* Return frequency of `times'. - Since Mach reports CPU times in microseconds, we always use 1 million. */ +/* Return frequency of `times'. */ int __getclktck (void) { - 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 b16f4ddd5d..8bf1464830 100644 --- a/sysdeps/mach/hurd/setitimer.c +++ b/sysdeps/mach/hurd/setitimer.c @@ -43,7 +43,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 23ed992783..cbf6039b19 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 -- 2.24.0 '/guix/commit/gnu/packages/enchant.scm?id=8ed4c468ab611409902c00bdf7c21fdb8d312928'>gnu: Don't append '.git' to GitHub uris....* gnu/packages/admin.scm (nmrpflash)[source]: Remove '.git' from URI. * gnu/packages/aidc.scm (zxing-cpp), * gnu/packages/assembly.scm (mbuild), * gnu/packages/audio.scm (opensles, wildmidi, tinyalsa), * gnu/packages/browser-extensions.scm (ublock-origin-chromium), * gnu/packages/check.scm (mutest), * gnu/packages/compression.scm (unshield), * gnu/packages/coq.scm (subset), * gnu/packages/dictionaries.scm (translate-shell), * gnu/packages/disk.scm (memkind), * gnu/packages/documentation.scm (latex2html), * gnu/packages/emacs-xyz.scm (emacs-chronometrist, emacs-flycheck-ledger, emacs-counsel-notmuch, emacs-spaceline, emacs-org-generate), * gnu/packages/embedded.scm (ebusd, ebusd-configuration), * gnu/packages/enchant.scm (nuspell), * gnu/packages/fontutils.scm (woff2), * gnu/packages/geo.scm (memphis), * gnu/packages/gimp.scm (mrg), * gnu/packages/gnome-xyz.scm (gnome-shell-extension-appindicator), * gnu/packages/gnome.scm (parlatype), * gnu/packages/golang.scm (go-github-com-tv42-httpunix, go-github-com-ayufan-golang-kardianos-service), * gnu/packages/graphics.scm (eglexternalplatform, egl-wayland, mmm, directfb, flux), * gnu/packages/gstreamer.scm (openni2, ccextractor, libvisual, graphene), * gnu/packages/guile-xyz.scm (guile-srfi-180, guile-torrent), * gnu/packages/image.scm (openjpeg-data), * gnu/packages/java.scm (javacc), * gnu/packages/language.scm (liblouis, liblouisutdml), * gnu/packages/linux.scm (pamela, ttyebus), * gnu/packages/lxqt.scm (lxqt-connman-applet), * gnu/packages/mail.scm (libetpan), * gnu/packages/man.scm (ronn), * gnu/packages/music.scm (tascam-gtk, artyfx), * gnu/packages/networking.scm (srt, lksctp-tools, nng, nanomsg), * gnu/packages/python-crypto.scm (pure-python-otr), * gnu/packages/qt.scm (qtspell), * gnu/packages/raspberry-pi.scm (raspi-gpio, raspi-open-firmware), * gnu/packages/rdp.scm (freerdp), * gnu/packages/ruby.scm (ruby-prawn-templates, ruby-treetop, ruby-gimme, ruby-standard, ruby-rubocop-ast, ruby-rexml, ruby-range-compressor, ruby-regexp-property-values, ruby-regexp-parser, ruby-rubocop, ruby-pdf-reader, ruby-pdf-inspector, ruby-prawn), * gnu/packages/syncthing.scm (syncthing-gtk), * gnu/packages/video.scm (svt-hevc, mediasdk, libvideogfx, libde265, tslib), * gnu/packages/xml.scm (libxmlb, libxmlplusplus)[source]: Same. Efraim Flashner 2020-11-10gnu: enchant: Update to 2.2.13....* gnu/packages/enchant.scm (enchant): Update to 2.2.13. Tobias Geerinckx-Rice 2020-08-21gnu: enchant: Depend on hunspell....* gnu/packages/enchant.scm (enchant): Add hunspell as an input. Julien Lepiller 2020-08-19gnu: nuspell: Update to 3.1.2....* gnu/packages/enchant.scm (nuspell): Update to 3.1.2. Tobias Geerinckx-Rice 2020-08-18gnu: Add nuspell....* gnu/packages/enchant.scm (nuspell): New variable. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Raghav Gururajan 2020-03-04gnu: enchant: Update to 2.2.8....* gnu/packages/enchant.scm (enchant): Update to 2.2.8. Marius Bakke