From 7af2ef6d6da9b49249e618c5e601d243e4965dfa Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 9 Apr 2023 18:14:46 +0200 Subject: [PATCH] c32is*: Ensure GNULIB_defined_mbstate_t is defined on AIX. * m4/mbrtowc.m4 (gl_MBSTATE_T_BROKEN): Define through AC_DEFUN_ONCE. * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32): Require it. * modules/c32isalnum (Files): Add m4/mbrtowc.m4, m4/locale-ja.m4. (configure.ac): Require gl_MBSTATE_T_BROKEN. * modules/c32isalpha: Likewise. * modules/c32isblank: Likewise. * modules/c32iscntrl: Likewise. * modules/c32isdigit: Likewise. * modules/c32isgraph: Likewise. * modules/c32islower: Likewise. * modules/c32isprint: Likewise. * modules/c32ispunct: Likewise. * modules/c32isspace: Likewise. * modules/c32isupper: Likewise. * modules/c32isxdigit: Likewise. --- ChangeLog | 19 +++++++++++++++++++ m4/mbrtoc32.m4 | 4 ++-- m4/mbrtowc.m4 | 6 +++--- modules/c32isalnum | 5 +++++ modules/c32isalpha | 5 +++++ modules/c32isblank | 5 +++++ modules/c32iscntrl | 5 +++++ modules/c32isdigit | 5 +++++ modules/c32isgraph | 5 +++++ modules/c32islower | 5 +++++ modules/c32isprint | 5 +++++ modules/c32ispunct | 5 +++++ modules/c32isspace | 5 +++++ modules/c32isupper | 5 +++++ modules/c32isxdigit | 5 +++++ 15 files changed, 84 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa513fa2dc..d4d665bb4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2023-04-09 Bruno Haible + + c32is*: Ensure GNULIB_defined_mbstate_t is defined on AIX. + * m4/mbrtowc.m4 (gl_MBSTATE_T_BROKEN): Define through AC_DEFUN_ONCE. + * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32): Require it. + * modules/c32isalnum (Files): Add m4/mbrtowc.m4, m4/locale-ja.m4. + (configure.ac): Require gl_MBSTATE_T_BROKEN. + * modules/c32isalpha: Likewise. + * modules/c32isblank: Likewise. + * modules/c32iscntrl: Likewise. + * modules/c32isdigit: Likewise. + * modules/c32isgraph: Likewise. + * modules/c32islower: Likewise. + * modules/c32isprint: Likewise. + * modules/c32ispunct: Likewise. + * modules/c32isspace: Likewise. + * modules/c32isupper: Likewise. + * modules/c32isxdigit: Likewise. + 2023-04-09 Bruno Haible mbrtoc32: Add comments. diff --git a/m4/mbrtoc32.m4 b/m4/mbrtoc32.m4 index a193c97c96..62ec2531e9 100644 --- a/m4/mbrtoc32.m4 +++ b/m4/mbrtoc32.m4 @@ -1,4 +1,4 @@ -# mbrtoc32.m4 serial 9.1 +# mbrtoc32.m4 serial 9.2 dnl Copyright (C) 2014-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -12,7 +12,7 @@ AC_DEFUN([gl_FUNC_MBRTOC32], dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is dnl determined. It describes how our overridden mbrtowc is implemented. dnl We then implement mbrtoc32 accordingly. - gl_MBSTATE_T_BROKEN + AC_REQUIRE([gl_MBSTATE_T_BROKEN]) AC_REQUIRE([gl_TYPE_CHAR32_T]) AC_REQUIRE([gl_MBRTOC32_SANITYCHECK]) diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4 index ec8716b599..34d5a179c3 100644 --- a/m4/mbrtowc.m4 +++ b/m4/mbrtowc.m4 @@ -1,5 +1,5 @@ -# mbrtowc.m4 serial 38 -*- coding: utf-8 -*- -dnl Copyright (C) 2001-2002, 2004-2005, 2008-2022 Free Software Foundation, +# mbrtowc.m4 serial 38.1 -*- coding: utf-8 -*- +dnl Copyright (C) 2001-2002, 2004-2005, 2008-2023 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -114,7 +114,7 @@ dnl Result is REPLACE_MBSTATE_T. dnl When this is set to 1, we replace both mbsinit() and mbrtowc(), in order to dnl avoid inconsistencies. -AC_DEFUN([gl_MBSTATE_T_BROKEN], +AC_DEFUN_ONCE([gl_MBSTATE_T_BROKEN], [ AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) diff --git a/modules/c32isalnum b/modules/c32isalnum index 16ff86663e..834fe87fbe 100644 --- a/modules/c32isalnum +++ b/modules/c32isalnum @@ -5,7 +5,9 @@ Files: lib/c32isalnum.c lib/c32is-impl.h m4/mbrtoc32.m4 +m4/mbrtowc.m4 m4/locale-fr.m4 +m4/locale-ja.m4 m4/locale-zh.m4 m4/codeset.m4 @@ -20,6 +22,9 @@ verify configure.ac: AC_REQUIRE([gl_UCHAR_H]) +dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is +dnl determined. It describes how mbrtoc32 is implemented. +AC_REQUIRE([gl_MBSTATE_T_BROKEN]) AC_REQUIRE([gl_MBRTOC32_SANITYCHECK]) gl_UCHAR_MODULE_INDICATOR([c32isalnum]) diff --git a/modules/c32isalpha b/modules/c32isalpha index f82bd2a840..f3869466a3 100644 --- a/modules/c32isalpha +++ b/modules/c32isalpha @@ -5,7 +5,9 @@ Files: lib/c32isalpha.c lib/c32is-impl.h m4/mbrtoc32.m4 +m4/mbrtowc.m4 m4/locale-fr.m4 +m4/locale-ja.m4 m4/locale-zh.m4 m4/codeset.m4 @@ -20,6 +22,9 @@ verify configure.ac: AC_REQUIRE([gl_UCHAR_H]) +dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is +dnl determined. It describes how mbrtoc32 is implemented. +AC_REQUIRE([gl_MBSTATE_T_BROKEN]) AC_REQUIRE([gl_MBRTOC32_SANITYCHECK]) gl_UCHAR_MODULE_INDICATOR([c32isalpha]) diff --git a/modules/c32isblank b/modules/c32isblank index 5f5d9c04d3..2a0c28dc8f 100644 --- a/modules/c32isblank +++ b/modules/c32isblank @@ -5,7 +5,9 @@ Files: lib/c32isblank.c lib/c32is-impl.h m4/mbrtoc32.m4 +m4/mbrtowc.m4 m4/locale-fr.m4 +m4/locale-ja.m4 m4/locale-zh.m4 m4/codeset.m4 @@ -21,6 +23,9 @@ verify configure.ac: AC_REQUIRE([gl_UCHAR_H]) +dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is +dnl determined. It describes how mbrtoc32 is implemented. +AC_REQUIRE([gl_MBSTATE_T_BROKEN]) AC_REQUIRE([gl_MBRTOC32_SANITYCHECK]) gl_UCHAR_MODULE_INDICATOR([c32isblank]) diff --git a/modules/c32iscntrl b/modules/c32iscntrl index e3581dc33f..6d267643fd 100644 --- a/modules/c32iscntrl +++ b/modules/c32iscntrl @@ -5,7 +5,9 @@ Files: lib/c32iscntrl.c lib/c32is-impl.h m4/mbrtoc32.m4 +m4/mbrtowc.m4 m4/locale-fr.m4 +m4/locale-ja.m4 m4/locale-zh.m4 m4/codeset.m4 @@ -20,6 +22,9 @@ verify configure.ac: AC_REQUIRE([gl_UCHAR_H]) +dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is +dnl determined. It describes how mbrtoc32 is implemented. +AC_REQUIRE([gl_MBSTATE_T_BROKEN]) AC_REQUIRE([gl_MBRTOC32_SANITYCHECK]) gl_UCHAR_MODULE_INDICATOR([c32iscntrl]) diff --git a/modules/c32isdigit b/modules/c32isdigit index 49b7936465..33dadb93dc 100644 --- a/modules/c32isdigit +++ b/modules/c32isdigit @@ -5,7 +5,9 @@ Files: lib/c32isdigit.c lib/c32is-impl.h m4/mbrtoc32.m4 +m4/mbrtowc.m4 m4/locale-fr.m4 +m4/locale-ja.m4 m4/locale-zh.m4 m4/codeset.m4 @@ -21,6 +23,9 @@ verify configure.ac: AC_REQUIRE([gl_UCHAR_H]) +dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is +dnl determined. It describes how mbrtoc32 is implemented. +AC_REQUIRE([gl_MBSTATE_T_BROKEN]) AC_REQUIRE([gl_MBRTOC32_SANITYCHECK]) gl_UCHAR_MODULE_INDICATOR([c32isdigit]) diff --git a/modules/c32isgraph b/modules/c32isgraph index a9b87325d0..8e43388a76 100644 --- a/modules/c32isgraph +++ b/modules/c32isgraph @@ -5,7 +5,9 @@ Files: lib/c32isgraph.c lib/c32is-impl.h m4/mbrtoc32.m4 +m4/mbrtowc.m4 m4/locale-fr.m4 +m4/locale-ja.m4 m4/locale-zh.m4 m4/codeset.m4 @@ -20,6 +22,9 @@ verify configure.ac: AC_REQUIRE([gl_UCHAR_H]) +dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is +dnl determined. It describes how mbrtoc32 is implemented. +AC_REQUIRE([gl_MBSTATE_T_BROKEN]) AC_REQUIRE([gl_MBRTOC32_SANITYCHECK]) gl_UCHAR_MODULE_INDICATOR([c32isgraph]) diff --git a/modules/c32islower b/modules/c32islower index 5ee73d0898..87aa7d2d4c 100644 --- a/modules/c32islower +++ b/modules/c32islower @@ -5,7 +5,9 @@ Files: lib/c32islower.c lib/c32is-impl.h m4/mbrtoc32.m4 +m4/mbrtowc.m4 m4/locale-fr.m4 +m4/locale-ja.m4 m4/locale-zh.m4 m4/codeset.m4 @@ -20,6 +22,9 @@ verify configure.ac: AC_REQUIRE([gl_UCHAR_H]) +dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is +dnl determined. It describes how mbrtoc32 is implemented. +AC_REQUIRE([gl_MBSTATE_T_BROKEN]) AC_REQUIRE([gl_MBRTOC32_SANITYCHECK]) gl_UCHAR_MODULE_INDICATOR([c32islower]) diff --git a/modules/c32isprint b/modules/c32isprint index b6d241be90..f570086319 100644 --- a/modules/c32isprint +++ b/modules/c32isprint @@ -5,7 +5,9 @@ Files: lib/c32isprint.c lib/c32is-impl.h m4/mbrtoc32.m4 +m4/mbrtowc.m4 m4/locale-fr.m4 +m4/locale-ja.m4 m4/locale-zh.m4 m4/codeset.m4 @@ -20,6 +22,9 @@ verify configure.ac: AC_REQUIRE([gl_UCHAR_H]) +dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is +dnl determined. It describes how mbrtoc32 is implemented. +AC_REQUIRE([gl_MBSTATE_T_BROKEN]) AC_REQUIRE([gl_MBRTOC32_SANITYCHECK]) gl_UCHAR_MODULE_INDICATOR([c32isprint]) diff --git a/modules/c32ispunct b/modules/c32ispunct index f77217f799..c8a372d37e 100644 --- a/modules/c32ispunct +++ b/modules/c32ispunct @@ -6,7 +6,9 @@ Files: lib/c32ispunct.c lib/c32is-impl.h m4/mbrtoc32.m4 +m4/mbrtowc.m4 m4/locale-fr.m4 +m4/locale-ja.m4 m4/locale-zh.m4 m4/codeset.m4 @@ -21,6 +23,9 @@ verify configure.ac: AC_REQUIRE([gl_UCHAR_H]) +dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is +dnl determined. It describes how mbrtoc32 is implemented. +AC_REQUIRE([gl_MBSTATE_T_BROKEN]) AC_REQUIRE([gl_MBRTOC32_SANITYCHECK]) gl_UCHAR_MODULE_INDICATOR([c32ispunct]) diff --git a/modules/c32isspace b/modules/c32isspace index 1b7d765ed8..6818f2f21c 100644 --- a/modules/c32isspace +++ b/modules/c32isspace @@ -5,7 +5,9 @@ Files: lib/c32isspace.c lib/c32is-impl.h m4/mbrtoc32.m4 +m4/mbrtowc.m4 m4/locale-fr.m4 +m4/locale-ja.m4 m4/locale-zh.m4 m4/codeset.m4 @@ -20,6 +22,9 @@ verify configure.ac: AC_REQUIRE([gl_UCHAR_H]) +dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is +dnl determined. It describes how mbrtoc32 is implemented. +AC_REQUIRE([gl_MBSTATE_T_BROKEN]) AC_REQUIRE([gl_MBRTOC32_SANITYCHECK]) gl_UCHAR_MODULE_INDICATOR([c32isspace]) diff --git a/modules/c32isupper b/modules/c32isupper index 0dfafb55eb..32cf0b0326 100644 --- a/modules/c32isupper +++ b/modules/c32isupper @@ -5,7 +5,9 @@ Files: lib/c32isupper.c lib/c32is-impl.h m4/mbrtoc32.m4 +m4/mbrtowc.m4 m4/locale-fr.m4 +m4/locale-ja.m4 m4/locale-zh.m4 m4/codeset.m4 @@ -20,6 +22,9 @@ verify configure.ac: AC_REQUIRE([gl_UCHAR_H]) +dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is +dnl determined. It describes how mbrtoc32 is implemented. +AC_REQUIRE([gl_MBSTATE_T_BROKEN]) AC_REQUIRE([gl_MBRTOC32_SANITYCHECK]) gl_UCHAR_MODULE_INDICATOR([c32isupper]) diff --git a/modules/c32isxdigit b/modules/c32isxdigit index 99b61b2223..efca10c6b2 100644 --- a/modules/c32isxdigit +++ b/modules/c32isxdigit @@ -6,7 +6,9 @@ Files: lib/c32isxdigit.c lib/c32is-impl.h m4/mbrtoc32.m4 +m4/mbrtowc.m4 m4/locale-fr.m4 +m4/locale-ja.m4 m4/locale-zh.m4 m4/codeset.m4 @@ -22,6 +24,9 @@ verify configure.ac: AC_REQUIRE([gl_UCHAR_H]) +dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is +dnl determined. It describes how mbrtoc32 is implemented. +AC_REQUIRE([gl_MBSTATE_T_BROKEN]) AC_REQUIRE([gl_MBRTOC32_SANITYCHECK]) gl_UCHAR_MODULE_INDICATOR([c32isxdigit]) -- 2.39.5