diff options
author | Bruno Haible <bruno@clisp.org> | 2023-04-03 14:24:37 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-04-03 14:24:37 +0200 |
commit | 09a9ccc95ddd3e4ffbf386cca440b944c91d3412 (patch) | |
tree | d4de83c726e350ce34ae12fddea784721234cafe /m4 | |
parent | b330f8630dff4d43f4bc3e8868b4b8374cb37e0d (diff) | |
download | gnulib-09a9ccc95ddd3e4ffbf386cca440b944c91d3412.tar.gz |
mbrtoc32 tests: Add comment.
* m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): Add comment.
* m4/mbrtoc32.m4 (gl_MBRTOC32_C_LOCALE): Add comment.
* tests/test-mbrtoc32.c: Add comment.
* tests/test-mbrtoc32-5.sh: Use symmetric coding style.
* doc/posix-functions/mbrtoc32.texi: Update.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/mbrtoc32.m4 | 7 | ||||
-rw-r--r-- | m4/mbrtowc.m4 | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/m4/mbrtoc32.m4 b/m4/mbrtoc32.m4 index f2de33aff6..d6401fe2e4 100644 --- a/m4/mbrtoc32.m4 +++ b/m4/mbrtoc32.m4 @@ -1,4 +1,4 @@ -# mbrtoc32.m4 serial 10 +# mbrtoc32.m4 serial 11 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, @@ -101,6 +101,11 @@ changequote([,])dnl ]) ]) +dnl <https://pubs.opengroup.org/onlinepubs/9699919799/functions/mbrtowc.html> +dnl POSIX:2018 says regarding mbrtowc: "In the POSIX locale an [EILSEQ] error +dnl cannot occur since all byte values are valid characters." It is reasonable +dnl to expect mbrtoc32 to behave in the same way. + AC_DEFUN([gl_MBRTOC32_C_LOCALE], [ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4 index 4bf91bec3b..0c7a8bae69 100644 --- a/m4/mbrtowc.m4 +++ b/m4/mbrtowc.m4 @@ -712,6 +712,10 @@ dnl Test whether mbrtowc reports encoding errors in the C locale. dnl Although POSIX was never intended to allow this, the GNU C Library dnl and other implementations do it. See: dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932 +dnl POSIX has now clarified it: +dnl <https://pubs.opengroup.org/onlinepubs/9699919799/functions/mbrtowc.html> +dnl says: "In the POSIX locale an [EILSEQ] error cannot occur since all byte +dnl values are valid characters." AC_DEFUN([gl_MBRTOWC_C_LOCALE], [ |