summaryrefslogtreecommitdiff
path: root/gnulib-m4/nanosleep.m4
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2026-03-08 17:28:50 +0100
committerJörg Frings-Fürst <debian@jff.email>2026-03-08 17:28:50 +0100
commitff33e1d252f46bec1a33e28700da3282fc24047a (patch)
tree5c15bc695be820b393a8496c5807ecafbbdeb89b /gnulib-m4/nanosleep.m4
parentb2ac982cc8b5290699eb5f52fb043d3d15e2624b (diff)
parent5f59a34ab747dde8ede7357f3431bf06bd6002fe (diff)
Update upstream source from tag 'upstream/1.4.2'
Update to upstream version '1.4.2' with Debian dir 493e96bcd865e4f9990e20bee26408c96231d727
Diffstat (limited to 'gnulib-m4/nanosleep.m4')
-rw-r--r--gnulib-m4/nanosleep.m423
1 files changed, 21 insertions, 2 deletions
diff --git a/gnulib-m4/nanosleep.m4 b/gnulib-m4/nanosleep.m4
index 81c45d8a..3a9967c8 100644
--- a/gnulib-m4/nanosleep.m4
+++ b/gnulib-m4/nanosleep.m4
@@ -1,6 +1,6 @@
# nanosleep.m4
-# serial 47
-dnl Copyright (C) 1999-2001, 2003-2025 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.
@@ -144,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