* 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>
+
+ 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-08 Bruno Haible <bruno@clisp.org>
Avoid Autoconf "was expanded before it was required" warning.
/* Convert multibyte character to 32-bit wide character.
- Copyright (C) 2020-2022 Free Software Foundation, Inc.
+ Copyright (C) 2020-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
/* 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 */
-# mbrtoc32.m4 serial 9
-dnl Copyright (C) 2014-2022 Free Software Foundation, Inc.
+# mbrtoc32.m4 serial 9.1
+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,
dnl with or without modifications, as long as this notice is preserved.
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])