To fix this: > 2) The CI reports a compilation error on many platforms: > > In file included from ./uchar.h:61, > from ../../gllib/btoc32.c:23: > ./wchar.h:815:61: error: macro "_GL_FUNCDECL_RPL" passed 4 arguments, but > takes just 3 > 815 | _GL_FUNCDECL_RPL (btowc, wint_t, (int c), _GL_ATTRIBUTE_PURE); > | ^ > In file included from ./uchar.h:61, > from ../../gllib/btoc32.c:23: > ./wchar.h:287: note: macro "_GL_FUNCDECL_RPL" defined here > 287 | #define _GL_FUNCDECL_RPL(func,rettype,parameters) \ > | > make[4]: *** [Makefile:11826: btoc32.o] Error 1
I am committing this stop-gap fix. But really, I would find it better to revert this entire thing and use a 4-arguments _GL_FUNCDECL_RPL / _GL_FUNCDECL_SYS everywhere, with empty attributes where needed. 2024-09-16 Bruno Haible <br...@clisp.org> wchar: Fix compilation error (regression yesterday). * lib/wchar.in.h (btowc): Use _GL_FUNCATTR_RPL, _GL_FUNCATTR_SYS here as well. diff --git a/lib/wchar.in.h b/lib/wchar.in.h index c7db23bef4..9be9a60efe 100644 --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -269,11 +269,11 @@ _GL_EXTERN_C void free (void *); # undef btowc # define btowc rpl_btowc # endif -_GL_FUNCDECL_RPL (btowc, wint_t, (int c), _GL_ATTRIBUTE_PURE); +_GL_FUNCATTR_RPL (btowc, wint_t, (int c), _GL_ATTRIBUTE_PURE); _GL_CXXALIAS_RPL (btowc, wint_t, (int c)); # else # if !@HAVE_BTOWC@ -_GL_FUNCDECL_SYS (btowc, wint_t, (int c), _GL_ATTRIBUTE_PURE); +_GL_FUNCATTR_SYS (btowc, wint_t, (int c), _GL_ATTRIBUTE_PURE); # endif /* Need to cast, because on mingw, the return type is 'unsigned short'. */ _GL_CXXALIAS_SYS_CAST (btowc, wint_t, (int c));