>From c67f26eb8394a4e3f63df1e84f777182f13f2f01 Mon Sep 17 00:00:00 2001 From: Bruno Haible
Date: Sun, 24 Nov 2019 13:28:03 +0100 Subject: [PATCH 1/5] Fix errors in C++ mode on Cygwin. * lib/sys_wait.in.h (waitpid): Use _GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS. --- ChangeLog | 6 ++++++ lib/sys_wait.in.h | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5c2f5c5..d70a898 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2019-11-24 Bruno Haible + Fix errors in C++ mode on Cygwin. + * lib/sys_wait.in.h (waitpid): Use _GL_CXXALIAS_SYS_CAST instead of + _GL_CXXALIAS_SYS. + +2019-11-24 Bruno Haible + time_r: Fix for mingw (regression from 2019-11-16). * m4/time_r.m4 (gl_TIME_R): Revert to using AC_CHECK_FUNCS_ONCE. Use the AC_LINK_IFELSE test only if the function does not appear to exist. diff --git a/lib/sys_wait.in.h b/lib/sys_wait.in.h index a4c52bb..52b13b3 100644 --- a/lib/sys_wait.in.h +++ b/lib/sys_wait.in.h @@ -114,7 +114,9 @@ # if defined _WIN32 && ! defined __CYGWIN__ _GL_FUNCDECL_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options)); # endif -_GL_CXXALIAS_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options)); +/* Need to cast, because on Cygwin, the second parameter is + __wait_status_ptr_t statusp. */ +_GL_CXXALIAS_SYS_CAST (waitpid, pid_t, (pid_t pid, int *statusp, int options)); _GL_CXXALIASWARN (waitpid); #elif defined GNULIB_POSIXCHECK # undef waitpid -- 2.7.4