]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
mbrtowc: Work around a NetBSD bug in UTF-8 locales, part 2.
authorBruno Haible <bruno@clisp.org>
Tue, 2 Jun 2026 20:17:38 +0000 (22:17 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 2 Jun 2026 20:17:38 +0000 (22:17 +0200)
* m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Also set REPLACE_MBSRTOWCS
to 1 if gl_MBRTOWC_INVALID_UTF8 reports "no".
* m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Also set REPLACE_MBSNRTOWCS
to 1 if gl_MBRTOWC_INVALID_UTF8 reports "no".

ChangeLog
m4/mbsnrtowcs.m4
m4/mbsrtowcs.m4

index a9e4a2f0c2b3243746514f7a9b3fb69a52e9c1df..7090f0ade16b8469d6b1bee3e285d78e90dcf6eb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-06-02  Bruno Haible  <bruno@clisp.org>
+
+       mbrtowc: Work around a NetBSD bug in UTF-8 locales, part 2.
+       * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Also set REPLACE_MBSRTOWCS
+       to 1 if gl_MBRTOWC_INVALID_UTF8 reports "no".
+       * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Also set REPLACE_MBSNRTOWCS
+       to 1 if gl_MBRTOWC_INVALID_UTF8 reports "no".
+
 2026-06-02  Bruno Haible  <bruno@clisp.org>
 
        c32width etc.: Fix compilation error on GNU systems (regr. 2026-04-24).
index 500964f8e492005f231a4fb376ea2d2a0c91854b..089f58d6df8c0ea1146540ab011fdad39cf717ff 100644 (file)
@@ -1,5 +1,5 @@
 # mbsnrtowcs.m4
-# serial 11
+# serial 12
 dnl Copyright (C) 2008, 2010-2026 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -38,6 +38,13 @@ AC_DEFUN([gl_FUNC_MBSNRTOWCS],
           *) REPLACE_MBSNRTOWCS=1 ;;
         esac
       fi
+      if test $REPLACE_MBSNRTOWCS = 0; then
+        gl_MBRTOWC_INVALID_UTF8
+        case "$gl_cv_func_mbrtowc_invalid_UTF8" in
+          *yes) ;;
+          *) REPLACE_MBSNRTOWCS=1 ;;
+        esac
+      fi
     fi
   fi
 ])
index df48432b2b608d106c1a8a3907e8f38b60e53033..233fdcbc3a0a65ade8f85d81379af51eb5caa859 100644 (file)
@@ -1,5 +1,5 @@
 # mbsrtowcs.m4
-# serial 19
+# serial 20
 dnl Copyright (C) 2008-2026 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -41,6 +41,13 @@ AC_DEFUN([gl_FUNC_MBSRTOWCS],
           *) REPLACE_MBSRTOWCS=1 ;;
         esac
       fi
+      if test $REPLACE_MBSRTOWCS = 0; then
+        gl_MBRTOWC_INVALID_UTF8
+        case "$gl_cv_func_mbrtowc_invalid_UTF8" in
+          *yes) ;;
+          *) REPLACE_MBSRTOWCS=1 ;;
+        esac
+      fi
     fi
   fi
 ])