diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2026-03-10 13:24:07 +0100 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2026-03-10 13:24:07 +0100 |
| commit | cfd1f17f1a85d95ea12bca8dae42add7dad1ad11 (patch) | |
| tree | 8016486f8ee7157213f2d09ff2491bfa9c94638a /gnulib-m4/nanosleep.m4 | |
| parent | 14e4d584d0121031ec40e6c35869745f1747ff29 (diff) | |
| parent | 1403307d6e2fb4e7b5d97a35f40d1e95134561ab (diff) | |
Merge branch 'release/debian/1.4.2-1'HEADdebian/1.4.2-1master
Diffstat (limited to 'gnulib-m4/nanosleep.m4')
| -rw-r--r-- | gnulib-m4/nanosleep.m4 | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/gnulib-m4/nanosleep.m4 b/gnulib-m4/nanosleep.m4 index a7281b8a..3a9967c8 100644 --- a/gnulib-m4/nanosleep.m4 +++ b/gnulib-m4/nanosleep.m4 @@ -1,9 +1,10 @@ # nanosleep.m4 -# serial 47 -dnl Copyright (C) 1999-2001, 2003-2024 Free Software Foundation, Inc. +# serial 48 +dnl Copyright (C) 1999-2001, 2003-2026 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. +dnl This file is offered as-is, without any warranty. dnl From Jim Meyering. dnl Check for the nanosleep function. @@ -143,6 +144,25 @@ AC_DEFUN([gl_FUNC_NANOSLEEP], ;; esac else + # Replace the static inline function on mingw which requires linking to + # libwinpthreads. + AC_CACHE_CHECK([for static inline nanosleep], + [gl_cv_static_inline_nanosleep], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include <time.h>]], + [[ + static struct timespec ts1; + static struct timespec ts2; + return nanosleep (&ts1, &ts2); + ]]) + ], + [gl_cv_static_inline_nanosleep=yes], + [gl_cv_static_inline_nanosleep=no]) + ]) + if test $gl_cv_static_inline_nanosleep = yes; then + REPLACE_NANOSLEEP=1 + fi HAVE_NANOSLEEP=0 fi LIBS=$gl_saved_LIBS |
