+2019-11-24 Bruno Haible <bruno@clisp.org>
+
+ Fix errors in C++ mode on mingw.
+ * lib/arpa_inet.in.h (inet_ntop, inet_pton): Use _GL_CXXALIAS_SYS_CAST
+ instead of _GL_CXXALIAS_SYS.
+ * lib/signal.in.h (pthread_sigmask): Likewise.
+ * lib/spawn.in.h (posix_spawn_file_actions_addopen,
+ posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2):
+ Likewise.
+ * lib/wchar.in.h (btowc): Likewise.
+
2019-11-24 Bruno Haible <bruno@clisp.org>
sys_time: Fix errors in C++ mode on mingw.
(int af, const void *restrict src,
char *restrict dst, socklen_t cnt));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (inet_ntop);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef inet_ntop
# if HAVE_RAW_DECL_INET_NTOP
_GL_CXXALIAS_SYS (inet_pton, int,
(int af, const char *restrict src, void *restrict dst));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (inet_pton);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef inet_pton
# if HAVE_RAW_DECL_INET_PTON
_GL_CXXALIAS_SYS (pthread_sigmask, int,
(int how, const sigset_t *new_mask, sigset_t *old_mask));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (pthread_sigmask);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef pthread_sigmask
# if HAVE_RAW_DECL_PTHREAD_SIGMASK
int __fd,
const char *_Restrict_ __path, int __oflag, mode_t __mode));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (posix_spawn_file_actions_addopen);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef posix_spawn_file_actions_addopen
# if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
_GL_CXXALIAS_SYS (posix_spawn_file_actions_addclose, int,
(posix_spawn_file_actions_t *__file_actions, int __fd));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (posix_spawn_file_actions_addclose);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef posix_spawn_file_actions_addclose
# if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
(posix_spawn_file_actions_t *__file_actions,
int __fd, int __newfd));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (posix_spawn_file_actions_adddup2);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef posix_spawn_file_actions_adddup2
# if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
# if !@HAVE_BTOWC@
_GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
# endif
-_GL_CXXALIAS_SYS (btowc, wint_t, (int c));
+/* Need to cast, because on mingw, the return type is 'unsigned short'. */
+_GL_CXXALIAS_SYS_CAST (btowc, wint_t, (int c));
# endif
# if __GLIBC__ >= 2
_GL_CXXALIASWARN (btowc);