From: Nathan Sidwell <nathan@acm.org>
To: John David Anglin <dave.anglin@bell.net>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] c++tools: Fix compilation of server.cc on hpux
Date: Mon, 9 Jan 2023 06:14:43 -0500 [thread overview]
Message-ID: <5e8dd94a-3bed-689c-9c20-ec3a12785c14@acm.org> (raw)
In-Reply-To: <Y7nEKiHZJhHBwJMf@mx3210.localdomain>
On 1/7/23 14:12, John David Anglin wrote:
> Tested on trunk and gcc-12 with hppa64-hp-hpux11.11.
ah, I see that is the use that was unprotected, ok.
>
> Okay?
>
> Dave
> ---
>
> Fix compilation of server.cc on hpux.
>
> Select and FD_ISSET are declared in sys/time.h on most versions
> of hpux. As a result, HAVE_PSELECT and HAVE_SELECT can be 0.
>
> 2023-01-07 John David Anglin <danglin@gcc.gnu.org>
>
> c++tools/ChangeLog:
>
> PR c++tools/107616
> * server.cc (server): Don't call FD_ISSET when HAVE_PSELECT
> and HAVE_SELECT are zero.
>
> diff --git a/c++tools/server.cc b/c++tools/server.cc
> index 00154a05925..693aec6820a 100644
> --- a/c++tools/server.cc
> +++ b/c++tools/server.cc
> @@ -753,8 +753,10 @@ server (bool ipv6, int sock_fd, module_resolver *resolver)
> }
> }
>
> +#if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
> if (active < 0 && sock_fd >= 0 && FD_ISSET (sock_fd, &readers))
> active = -1;
> +#endif
> }
>
> if (active >= 0)
>
--
Nathan Sidwell
prev parent reply other threads:[~2023-01-09 11:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-07 19:12 John David Anglin
2023-01-09 11:14 ` Nathan Sidwell [this message]
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=5e8dd94a-3bed-689c-9c20-ec3a12785c14@acm.org \
--to=nathan@acm.org \
--cc=dave.anglin@bell.net \
--cc=gcc-patches@gcc.gnu.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).