This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: MinGW compilation warnings in libiberty's waitpid.c
- From: DJ Delorie <dj at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org, gdb-patches at sourceware dot org
- Date: Tue, 23 May 2017 15:37:32 -0400
- Subject: Re: MinGW compilation warnings in libiberty's waitpid.c
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dj at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A81A080472
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A81A080472
Eli Zaretskii <eliz@gnu.org> writes:
> Instead of making waitpid an always-failing stub on MinGW, wouldn't it
> be better to make it work on MinGW? Like this:
That's up to you, if it's target-specific. What about mingw64?
> --- libiberty/waitpid.c~0 2016-08-01 18:50:21.000000000 +0300
> +++ libiberty/waitpid.c 2017-05-23 21:19:34.302415000 +0300
> @@ -23,6 +23,11 @@ does the return value. The third argume
> #include <sys/wait.h>
> #endif
>
> +#ifdef __MINGW32__
> +#include <process.h>
> +#define wait(s) _cwait(s,pid,_WAIT_CHILD)
> +#endif
> +
> pid_t
> waitpid (pid_t pid, int *stat_loc, int options ATTRIBUTE_UNUSED)
> {