]> Savannah Git Hosting - gnulib.git/commitdiff
time: Fix test failure on FreeBSD 12.2/sparc64.
authorBruno Haible <bruno@clisp.org>
Thu, 11 Jan 2024 12:50:04 +0000 (13:50 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 18 Jan 2024 08:46:44 +0000 (09:46 +0100)
* m4/time.m4 (gl_FUNC_TIME): Guess that it does not work on
FreeBSD/sparc.
* doc/posix-functions/time.texi: Mention the bug on FreeBSD/sparc.

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

index f605eb841a1c03f051f9d244b73b91a6db15c928..e87670e874713525c3167f6b670a8e05ce4d1df8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-01-11  Bruno Haible  <bruno@clisp.org>
+
+       time: Fix test failure on FreeBSD 12.2/sparc64.
+       * m4/time.m4 (gl_FUNC_TIME): Guess that it does not work on
+       FreeBSD/sparc.
+       * doc/posix-functions/time.texi: Mention the bug on FreeBSD/sparc.
+
 2024-01-02  Bruno Haible  <bruno@clisp.org>
 
        strverscmp: Work around bug in musl libc 1.2.3 and in Cygwin.
index c744c63974a675cc32dbca56dff480b4077d846c..39a00d4370770c0d65c1b608180f949d92e1bee4 100644 (file)
@@ -12,7 +12,7 @@ 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, AIX 7.2, native Windows.
+glibc 2.31 or newer on Linux, FreeBSD 12.2/sparc64, 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 4c4e411736e1424563bef73ef494833ec85dc749..0eeb16a13f5ce8a223ddd4388c573edd02e3653f 100644 (file)
@@ -1,5 +1,5 @@
-# time.m4 serial 3
-dnl Copyright (C) 2023 Free Software Foundation, Inc.
+# time.m4 serial 3.1
+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,
 dnl with or without modifications, as long as this notice is preserved.
@@ -16,6 +16,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   - AIX,
      dnl   - native Windows.
      case "$host_os" in
@@ -31,6 +32,12 @@ 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
+         ;;
        aix*)   gl_cv_func_time_works="guessing no";;
        mingw*) gl_cv_func_time_works="guessing no";;
        *) gl_cv_func_time_works="guessing yes";;