From: Pedro Alves <palves@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>, gcc-patches@gcc.gnu.org
Cc: gdb-patches@sourceware.org
Subject: Re: MinGW compilation warnings in libiberty's waitpid.c
Date: Fri, 19 May 2017 15:40:00 -0000 [thread overview]
Message-ID: <68029888-74e5-7cd3-1a66-2e58919a6435@redhat.com> (raw)
In-Reply-To: <83inlbcqsp.fsf@gnu.org>
On 05/08/2017 04:27 PM, Eli Zaretskii wrote:
> When compiling libiberty (as part of GDB) with MinGW on MS-Windows, I
> see the following warning:
>
> gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -D__USE_MINGW_ACCESS -I. -I./../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -D_GNU_SOURCE ./waitpid.c -o waitpid.o
> ./waitpid.c: In function 'waitpid':
> ./waitpid.c:31:18: warning: implicit declaration of function 'wait' [-Wimplicit-function-declaration]
> int wpid = wait(stat_loc);
> ^
>
> The file waitpid.c should not be built on MinGW, as it is not needed
> on Windows, and will not work if the function is called (because
> there's no 'wait' function on MS-Windows).
>
Makes sense, but did you check whether there's an obvious place such
a change could be done in configure.ac?
I wonder what code relies on this replacement, actually. In liberty,
the only waitpid calls are in pex-unix.c, but those are all guarded
by HAVE_WAITPID.
Maybe it was used at some point when libiberty was a target library?
So I wonder whether we could just unconditionally remove the waitpid
replacement instead.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2017-05-19 15:36 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 [this message]
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
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=68029888-74e5-7cd3-1a66-2e58919a6435@redhat.com \
--to=palves@redhat.com \
--cc=eliz@gnu.org \
--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).