bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IBM z/OS compatibility issues - per-thread locale functions


From: Bruno Haible
Subject: Re: IBM z/OS compatibility issues - per-thread locale functions
Date: Thu, 12 Dec 2019 13:56:10 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-166-generic; KDE/5.18.0; x86_64; ; )

Hi Daniel,

> >   3) Please provide all three of the following:
> >      - grep locale configure.out
> ...
> >      - grep -i locale config.status
> 
>     bash-2.03$ grep -i locale config.status
>     S["gl_LTLIBOBJS"]=" alphasort.lo asnprintf.lo at-func2.lo 
> canonicalize-lgpl.lo cnd.lo dirfd.lo dprintf.lo duplocale.lo error.lo 
> euidaccess.lo faccessat.lo fchmodat.lo "\
>     S["gl_LIBOBJS"]=" alphasort.o asnprintf.o at-func2.o canonicalize-lgpl.o 
> cnd.o dirfd.o dprintf.o duplocale.o error.o euidaccess.o faccessat.o 
> fchmodat.o fchownat.o f"\
> ...
>     S["REPLACE_DUPLOCALE"]="1"
> ...
>     S["HAVE_DUPLOCALE"]="0"

The REPLACE_DUPLOCALE=1 is wrong. HAVE_DUPLOCALE should be 0, not only
when set by localename.m4 but also when set by duplocale.m4. This patch
should fix it.


2019-12-12  Bruno Haible  <address@hidden>

        duplocale: Don't attempt to override if locale_t does not exist.
        Reported by Daniel Richard G. in
        <https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00039.html>.
        * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): If locale_t does not exist, set
        HAVE_DUPLOCALE to 0.

diff --git -w a/m4/duplocale.m4 b/m4/duplocale.m4
index c2c95dd..fb5e602 100644
--- a/m4/duplocale.m4
+++ b/m4/duplocale.m4
@@ -1,4 +1,4 @@
-# duplocale.m4 serial 10
+# duplocale.m4 serial 11
 dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -17,6 +17,7 @@ AC_DEFUN([gl_FUNC_DUPLOCALE],
     dnl Also, on NetBSD 7.0, duplocale(LC_GLOBAL_LOCALE) returns a locale that
     dnl corresponds to the C locale.
     AC_REQUIRE([gl_LOCALE_H])
+    if test $HAVE_LOCALE_T = 1; then
       AC_CHECK_FUNCS_ONCE([snprintf_l nl_langinfo_l])
       AC_CACHE_CHECK([whether duplocale(LC_GLOBAL_LOCALE) works],
         [gl_cv_func_duplocale_works],
@@ -100,6 +101,12 @@ int main ()
         *no) REPLACE_DUPLOCALE=1 ;;
       esac
     else
+      dnl In 2019, some versions of z/OS lack the locale_t type and have broken
+      dnl newlocale, duplocale, freelocale functions. In this situation, we
+      dnl cannot use nor override duplocale.
+      HAVE_DUPLOCALE=0
+    fi
+  else
     HAVE_DUPLOCALE=0
   fi
 ])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]