diff options
Diffstat (limited to 'gl/m4/pthread_rwlock_rdlock.m4')
-rw-r--r-- | gl/m4/pthread_rwlock_rdlock.m4 | 43 |
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 |
2 | dnl Copyright (C) 2017-2023 Free Software Foundation, Inc. | 2 | # serial 8 |
3 | dnl Copyright (C) 2017-2024 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl 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 | |||
34 | dnl https://bugzilla.redhat.com/show_bug.cgi?id=1410052 | 35 | dnl https://bugzilla.redhat.com/show_bug.cgi?id=1410052 |
35 | AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], | 36 | AC_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) |