From 00893e79fc62966067af1a106567db96bd170338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 3 Mar 2024 19:11:32 +0100 Subject: New upstream version 1.2 --- gnulib-m4/setlocale_null.m4 | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) (limited to 'gnulib-m4/setlocale_null.m4') diff --git a/gnulib-m4/setlocale_null.m4 b/gnulib-m4/setlocale_null.m4 index 09ea50ea..54d3d46d 100644 --- a/gnulib-m4/setlocale_null.m4 +++ b/gnulib-m4/setlocale_null.m4 @@ -1,5 +1,5 @@ -# setlocale_null.m4 serial 5 -dnl Copyright (C) 2019-2022 Free Software Foundation, Inc. +# setlocale_null.m4 serial 9 +dnl Copyright (C) 2019-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. @@ -13,11 +13,25 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL], AC_CACHE_CHECK([whether setlocale (LC_ALL, NULL) is multithread-safe], [gl_cv_func_setlocale_null_all_mtsafe], [case "$host_os" in - # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin. - *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*) + # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku. + *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku*) gl_cv_func_setlocale_null_all_mtsafe=no ;; + # Guess no on Cygwin < 3.4.6. + cygwin*) + AC_EGREP_CPP([Lucky user], + [ +#if defined __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED >= CYGWIN_VERSION_DLL_MAKE_COMBINED (3004, 6) + Lucky user + #endif +#endif + ], + [gl_cv_func_setlocale_null_all_mtsafe=yes], + [gl_cv_func_setlocale_null_all_mtsafe=no]) + ;; # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows. - *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*) + *-gnu* | gnu* | hpux* | irix* | solaris* | mingw* | windows*) gl_cv_func_setlocale_null_all_mtsafe=yes ;; # If we don't know, obey --enable-cross-guesses. *) @@ -26,7 +40,7 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL], ]) dnl On platforms without multithreading, there is no issue. case "$host_os" in - mingw*) ;; + mingw* | windows*) ;; *) if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then gl_cv_func_setlocale_null_all_mtsafe="trivially yes" @@ -48,7 +62,7 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL], openbsd* | aix*) gl_cv_func_setlocale_null_one_mtsafe=no ;; # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows. - *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*) + *-gnu* | gnu* | *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw* | windows*) gl_cv_func_setlocale_null_one_mtsafe=yes ;; # If we don't know, obey --enable-cross-guesses. *) @@ -57,7 +71,7 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL], ]) dnl On platforms without multithreading, there is no issue. case "$host_os" in - mingw*) ;; + mingw* | windows*) ;; *) if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then gl_cv_func_setlocale_null_one_mtsafe="trivially yes" @@ -74,20 +88,25 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL], dnl Determine link dependencies of lib/setlocale_null.c and lib/setlocale-lock.c. if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then case "$host_os" in - mingw*) LIB_SETLOCALE_NULL= ;; + mingw* | windows*) + SETLOCALE_NULL_LIB= + ;; *) gl_WEAK_SYMBOLS case "$gl_cv_have_weak" in - *yes) LIB_SETLOCALE_NULL= ;; - *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;; + *yes) SETLOCALE_NULL_LIB= ;; + *) SETLOCALE_NULL_LIB="$LIBPTHREAD" ;; esac ;; esac else - LIB_SETLOCALE_NULL= + SETLOCALE_NULL_LIB= fi - dnl LIB_SETLOCALE_NULL is expected to be '-pthread' or '-lpthread' on AIX + dnl SETLOCALE_NULL_LIB is expected to be '-pthread' or '-lpthread' on AIX dnl with gcc or xlc, and empty otherwise. + AC_SUBST([SETLOCALE_NULL_LIB]) + dnl For backward compatibility. + LIB_SETLOCALE_NULL="$SETLOCALE_NULL_LIB" AC_SUBST([LIB_SETLOCALE_NULL]) ]) -- cgit v1.2.3