+2023-04-07 Bruno Haible <bruno@clisp.org>
+
+ stdio: Fix compilation error in C++ mode on macOS.
+ * lib/stdio.in.h (getw, putw): Repeat the declaration even if the
+ function is already supposed to be declared.
+
2023-04-07 Bruno Haible <bruno@clisp.org>
vasnwprintf-posix tests: Avoid test failure on mingw.
_GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream));
# else
# if @HAVE_DECL_GETW@
+# if defined __APPLE__ && defined __MACH__
+/* The presence of the declaration depends on _POSIX_C_SOURCE. */
+_GL_FUNCDECL_SYS (getw, int, (FILE *restrict stream));
+# endif
_GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream));
# endif
# endif
_GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream));
# else
# if @HAVE_DECL_PUTW@
+# if defined __APPLE__ && defined __MACH__
+/* The presence of the declaration depends on _POSIX_C_SOURCE. */
+_GL_FUNCDECL_SYS (putw, int, (int w, FILE *restrict stream));
+# endif
_GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream));
# endif
# endif