summaryrefslogtreecommitdiffstats
path: root/gl/m4/pthread_rwlock_rdlock.m4
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2024-10-31 15:27:12 (GMT)
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2024-10-31 15:27:12 (GMT)
commit5be04ec2ceb1df77afbca4fcbf9e92a712612d6f (patch)
tree2b2e1c71dffae827c8e45cd4cccc375093d03486 /gl/m4/pthread_rwlock_rdlock.m4
parent6d1d1dac32841d5ca6ee51bb09b30a6c604b17e2 (diff)
downloadmonitoring-plugins-5be04ec2ceb1df77afbca4fcbf9e92a712612d6f.tar.gz
Sync with the latest Gnulib code (d4ec02b3cc)refs/pull/2037/head
Diffstat (limited to 'gl/m4/pthread_rwlock_rdlock.m4')
-rw-r--r--gl/m4/pthread_rwlock_rdlock.m443
1 files changed, 22 insertions, 21 deletions
diff --git a/gl/m4/pthread_rwlock_rdlock.m4 b/gl/m4/pthread_rwlock_rdlock.m4
index ae6a885..b8b5b11 100644
--- a/gl/m4/pthread_rwlock_rdlock.m4
+++ b/gl/m4/pthread_rwlock_rdlock.m4
@@ -1,5 +1,6 @@
1# pthread_rwlock_rdlock.m4 serial 4 1# pthread_rwlock_rdlock.m4
2dnl Copyright (C) 2017-2023 Free Software Foundation, Inc. 2# serial 8
3dnl Copyright (C) 2017-2024 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
@@ -34,11 +35,11 @@ dnl https://sourceware.org/bugzilla/show_bug.cgi?id=13701
34dnl https://bugzilla.redhat.com/show_bug.cgi?id=1410052 35dnl https://bugzilla.redhat.com/show_bug.cgi?id=1410052
35AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], 36AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER],
36[ 37[
37 AC_REQUIRE([gl_THREADLIB_EARLY]) 38 AC_REQUIRE([gl_THREADLIB])
38 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles 39 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
39 AC_CACHE_CHECK([whether pthread_rwlock_rdlock prefers a writer to a reader], 40 AC_CACHE_CHECK([whether pthread_rwlock_rdlock prefers a writer to a reader],
40 [gl_cv_pthread_rwlock_rdlock_prefer_writer], 41 [gl_cv_pthread_rwlock_rdlock_prefer_writer],
41 [save_LIBS="$LIBS" 42 [saved_LIBS="$LIBS"
42 LIBS="$LIBS $LIBMULTITHREAD" 43 LIBS="$LIBS $LIBMULTITHREAD"
43 AC_RUN_IFELSE( 44 AC_RUN_IFELSE(
44 [AC_LANG_SOURCE([[ 45 [AC_LANG_SOURCE([[
@@ -156,25 +157,25 @@ main ()
156 [gl_cv_pthread_rwlock_rdlock_prefer_writer=yes], 157 [gl_cv_pthread_rwlock_rdlock_prefer_writer=yes],
157 [gl_cv_pthread_rwlock_rdlock_prefer_writer=no], 158 [gl_cv_pthread_rwlock_rdlock_prefer_writer=no],
158 [case "$host_os" in 159 [case "$host_os" in
159 # Guess no on glibc systems. 160 # Guess no on glibc systems.
160 *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; 161 *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
161 # Guess no on musl systems. 162 # Guess no on musl systems.
162 *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; 163 *-musl* | midipix*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
163 # Guess no on bionic systems. 164 # Guess no on bionic systems.
164 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; 165 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
165 # Guess yes on native Windows with the mingw-w64 winpthreads library. 166 # Guess yes on native Windows with the mingw-w64 winpthreads library.
166 # Guess no on native Windows with the gnulib windows-rwlock module. 167 # Guess no on native Windows with the gnulib windows-rwlock module.
167 mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then 168 mingw* | windows*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
168 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes" 169 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
169 else 170 else
170 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" 171 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
171 fi 172 fi
172 ;; 173 ;;
173 # If we don't know, obey --enable-cross-guesses. 174 # If we don't know, obey --enable-cross-guesses.
174 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;; 175 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
175 esac 176 esac
176 ]) 177 ])
177 LIBS="$save_LIBS" 178 LIBS="$saved_LIBS"
178 ]) 179 ])
179 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in 180 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
180 *yes) 181 *yes)