diff options
author | Bruno Haible <bruno@clisp.org> | 2023-04-09 18:02:51 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-04-09 23:46:48 +0200 |
commit | 70f1f0e64c1c1d722cb60560b76e4aef3f5d8d61 (patch) | |
tree | f051d82d38ac9572ea367038a21efd294922a852 | |
parent | 98931826a8cd55f6ee2c1aac9755109081ed8e94 (diff) | |
download | gnulib-70f1f0e64c1c1d722cb60560b76e4aef3f5d8d61.tar.gz |
mbrtoc32: Add comments.
* lib/mbrtoc32.c: Add comment regarding AIX.
* m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32): Add comment regarding
GNULIB_defined_mbstate_t.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/mbrtoc32.c | 7 | ||||
-rw-r--r-- | m4/mbrtoc32.m4 | 5 |
3 files changed, 18 insertions, 1 deletions
@@ -1,5 +1,12 @@ 2023-04-09 Bruno Haible <bruno@clisp.org> + mbrtoc32: Add comments. + * lib/mbrtoc32.c: Add comment regarding AIX. + * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32): Add comment regarding + GNULIB_defined_mbstate_t. + +2023-04-09 Bruno Haible <bruno@clisp.org> + doc: Mention a NetBSD bug. * doc/posix-functions/towlower.texi: Mention NetBSD bug 57339. * doc/posix-functions/towupper.texi: Likewise. diff --git a/lib/mbrtoc32.c b/lib/mbrtoc32.c index bd90132086..2dca9e1e50 100644 --- a/lib/mbrtoc32.c +++ b/lib/mbrtoc32.c @@ -30,6 +30,13 @@ /* Implement mbrtoc32() on top of mbtowc() for the non-UTF-8 locales and directly for the UTF-8 locales. */ +/* Note: On AIX (64-bit) we can implement mbrtoc32 in two equivalent ways: + - in a way that parallels the override of mbrtowc; this is the code branch + here; + - in a way that invokes the overridden mbrtowc; this would be the #else + branch below. + They are equivalent. */ + # if defined _WIN32 && !defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN /* avoid including junk */ diff --git a/m4/mbrtoc32.m4 b/m4/mbrtoc32.m4 index acbd7f537c..ed0234fbc0 100644 --- a/m4/mbrtoc32.m4 +++ b/m4/mbrtoc32.m4 @@ -1,4 +1,4 @@ -# mbrtoc32.m4 serial 12 +# mbrtoc32.m4 serial 13 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, @@ -9,6 +9,9 @@ AC_DEFUN([gl_FUNC_MBRTOC32], AC_REQUIRE([gl_UCHAR_H_DEFAULTS]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) + 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_TYPE_CHAR32_T]) |