From: Eli Zaretskii <eliz@gnu.org>
To: DJ Delorie <dj@redhat.com>
Cc: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org
Subject: Re: MinGW compilation warnings in libiberty's waitpid.c
Date: Tue, 23 May 2017 19:26:00 -0000 [thread overview]
Message-ID: <83poezml4x.fsf@gnu.org> (raw)
In-Reply-To: <xnk258hebj.fsf@greed.delorie.com> (message from DJ Delorie on Mon, 22 May 2017 15:38:40 -0400)
> From: DJ Delorie <dj@redhat.com>
> Cc: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org
> Date: Mon, 22 May 2017 15:38:40 -0400
>
> Since (or "if") nobody will (should) use waitpid() on mingw anyway, and
> since libiberty really wants to include waitpid.o, how difficult would
> it be to use some #ifdefs to have waitpid() just return an error on
> mingw? That at least gets past the mingw build problem.
Instead of making waitpid an always-failing stub on MinGW, wouldn't it
be better to make it work on MinGW? Like this:
--- 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)
{
next prev parent reply other threads:[~2017-05-23 19:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-08 15:30 Eli Zaretskii
2017-05-19 15:40 ` Pedro Alves
2017-05-19 17:26 ` Eli Zaretskii
2017-05-20 5:02 ` DJ Delorie
2017-05-21 16:12 ` Eli Zaretskii
2017-05-22 19:55 ` DJ Delorie
2017-05-23 19:26 ` Eli Zaretskii [this message]
2017-05-23 19:38 ` DJ Delorie
2017-05-24 2:26 ` Eli Zaretskii
2017-05-24 3:31 ` DJ Delorie
2017-05-24 18:47 ` Eli Zaretskii
2017-05-24 22:16 ` DJ Delorie
2017-05-26 8:54 ` Eli Zaretskii
2017-05-26 16:38 ` Joel Brobecker
2017-05-26 18:04 ` Eli Zaretskii
2017-05-27 0:28 ` Joel Brobecker
2017-05-26 18:14 ` DJ Delorie
2017-05-27 15:58 ` Iain Buclaw
2017-05-30 17:23 ` Joel Brobecker
2017-06-06 17:54 ` Iain Buclaw
2017-06-07 12:38 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83poezml4x.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dj@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).