Message ID | Y7nEKiHZJhHBwJMf@mx3210.localdomain |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1420631wrt; Sat, 7 Jan 2023 11:13:15 -0800 (PST) X-Google-Smtp-Source: AMrXdXsAt+KY7edE6501wr4DH+ymqfQY9St5Vgk4hTHcJI385B/UqK/f5rDSnzQhW7IuG3PFvQZW X-Received: by 2002:a17:906:2489:b0:7c0:fa2d:9af3 with SMTP id e9-20020a170906248900b007c0fa2d9af3mr54565298ejb.45.1673118794961; Sat, 07 Jan 2023 11:13:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673118794; cv=none; d=google.com; s=arc-20160816; b=q3X3AHRCSAkWRC/VgO06lYeERsfo8bcJiQ/gVk2etOtGInFy/Rj74dUwctuUsIJV+h f/NcE+m1LkjCFW1plsIOsJlR8w7rTVK/z8xmpQJF4h8ZQoVPwfEkv4AIJsvZ+mkt0jIV sYExjyfODXHqD6+t/je+A42JnwRNLtElDjMPhEnhBmDzj88R8vUbTRUx0OxwC7T5k/hQ uFzaoy/8sOt9lpPtWHrf6J3EI3KSKkTSsm112Nm3QokDvZnvLYqlFuLLQhFrbdlz2ILJ gdQknCec5IbTHgnJY8kddXMKkmc/Ethle9oXuY3ZF4n4UNECRYYDl0A7t57OBhELwhcX RSOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:cc:to:from:date:dmarc-filter :delivered-to; bh=k3Rq9BBUReew77h5ydXJc4OD2c/AEkDbGL8kh3ZYVYE=; b=SmgW+JXrPpUrhrOMexn5NarP9QkdSty33Wd7xIuGx1NnG6fHI5PqlDYjlTgo223Mae w7FTZTnAkZz6agdrsT438UMmR+/H/i8jcJG+sHvBgyLoXuOLEajFPv4n5XjpMsI60LHL 7vFNkfDJqgBgIQ/lQvebmDlrpFkNvJSWo+FvhGgZo11QEGe4Fti+N4Gae0N5gSaAtmxa g8kHHyu6RKkjXy+IfiO63BNzqMgPFI59Xhms6m21tzcWE6KxvbWlawQc4BUms9Fwf0Ol Q3jgwGeGF9971slPijTAfTr92qi5SEmPfV3tfKUqv80IfrWu1e4UzibnQW/tgM9uV8cm c2Zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id gt37-20020a1709072da500b0084d34979415si2043684ejc.326.2023.01.07.11.13.14 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Jan 2023 11:13:14 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9408F3858CDB for <ouuuleilei@gmail.com>; Sat, 7 Jan 2023 19:13:09 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from dellerweb.de (dellerweb.de [173.249.48.176]) by sourceware.org (Postfix) with ESMTPS id BD9B93858D35 for <gcc-patches@gcc.gnu.org>; Sat, 7 Jan 2023 19:12:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD9B93858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bell.net Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=bell.net Received: from mx3210.localdomain (lgston2802w-grc-01-216-208-213-126.dsl.bell.ca [216.208.213.126]) by dellerweb.de (Postfix) with ESMTPSA id 71423160016E; Sat, 7 Jan 2023 20:12:44 +0100 (CET) Received: by mx3210.localdomain (Postfix, from userid 1000) id 9931E220133; Sat, 7 Jan 2023 19:12:42 +0000 (UTC) Date: Sat, 7 Jan 2023 19:12:42 +0000 From: John David Anglin <dave.anglin@bell.net> To: GCC Patches <gcc-patches@gcc.gnu.org> Cc: Nathan Sidwell <nathan@acm.org> Subject: [PATCH] c++tools: Fix compilation of server.cc on hpux Message-ID: <Y7nEKiHZJhHBwJMf@mx3210.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="aTHCHHlPQ0rV9gO6" Content-Disposition: inline X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754392213807825255?= X-GMAIL-MSGID: =?utf-8?q?1754392213807825255?= |
Series |
c++tools: Fix compilation of server.cc on hpux
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
John David Anglin
Jan. 7, 2023, 7:12 p.m. UTC
Tested on trunk and gcc-12 with hppa64-hp-hpux11.11. 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.
Comments
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) >
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)