]> Savannah Git Hosting - gnulib.git/commitdiff
time: Fix test failure on FreeBSD.
authorBruno Haible <bruno@clisp.org>
Fri, 28 Jun 2024 09:10:59 +0000 (11:10 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 28 Jun 2024 09:10:59 +0000 (11:10 +0200)
* m4/time.m4 (gl_FUNC_TIME): Guess no for FreeBSD in general.
* doc/posix-functions/time.texi: Mention FreeBSD in general.

ChangeLog
doc/posix-functions/time.texi
m4/time.m4

index 8d65ce6364198c7cca615ab14d773aebaf3df2aa..a9453b0b451378bff7d140656a1bf001c7440f9a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-06-28  Bruno Haible  <bruno@clisp.org>
+
+       time: Fix test failure on FreeBSD.
+       * m4/time.m4 (gl_FUNC_TIME): Guess no for FreeBSD in general.
+       * doc/posix-functions/time.texi: Mention FreeBSD in general.
+
 2024-06-27  Collin Funk  <collin.funk1@gmail.com>
 
        doc: Improve documentation of previous POSIX functions.
index 39a00d4370770c0d65c1b608180f949d92e1bee4..804c2a3bfa64406e148c7e4f2a595b9285492aad 100644 (file)
@@ -12,7 +12,10 @@ Portability problems fixed by Gnulib:
 This function is not consistent with @code{gettimeofday} and @code{timespec_get}
 on some platforms:
 @c https://sourceware.org/bugzilla/show_bug.cgi?id=30200
-glibc 2.31 or newer on Linux, FreeBSD 12.2/sparc64, AIX 7.2, native Windows.
+glibc 2.31 or newer on Linux,
+@c Only seen on machines with 2 or more CPUs.
+FreeBSD 14.0,
+AIX 7.2, native Windows.
 Namely, in the first 1 to 2.5 milliseconds of every second (or, on AIX and
 Windows, in the first 5 milliseconds of every second), @code{time} returns
 a value that is one less than the @code{tv_sec} part of the return value of
index ba5b65ceadb36d8775c30ef9a22ffbe796f8cff5..dd346419ff6828e894fe67e0f5e34975817fc389 100644 (file)
@@ -1,5 +1,5 @@
 # time.m4
-# serial 5
+# serial 6
 dnl Copyright (C) 2023-2024 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,7 @@ AC_DEFUN([gl_FUNC_TIME],
      dnl   - glibc >= 2.31 with Linux. And binaries produced on glibc < 2.31
      dnl     need to run fine on newer glibc versions as well; therefore ignore
      dnl     __GLIBC_MINOR__.
-     dnl   - FreeBSD/sparc,
+     dnl   - FreeBSD, on machines with 2 or more CPUs,
      dnl   - AIX,
      dnl   - native Windows.
      case "$host_os" in
@@ -33,12 +33,7 @@ AC_DEFUN([gl_FUNC_TIME],
            [gl_cv_func_time_works="guessing no"],
            [gl_cv_func_time_works="guessing yes"])
          ;;
-       freebsd*)
-         case "$host_cpu" in
-           sparc*)        gl_cv_func_time_works="guessing no";;
-           *)             gl_cv_func_time_works="guessing yes";;
-         esac
-         ;;
+       freebsd*)          gl_cv_func_time_works="guessing no";;
        aix*)              gl_cv_func_time_works="guessing no";;
        mingw* | windows*) gl_cv_func_time_works="guessing no";;
        *)                 gl_cv_func_time_works="guessing yes";;