From patchwork Mon May 29 08:30:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 100180 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1369030vqr; Mon, 29 May 2023 01:52:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4KxXhEV/UoJiYLLkL+2oOEfseSNuZgc2RCj5VuBpzQwPkE8F0lZD7PBXWok1X8GnjbajZ3 X-Received: by 2002:a17:907:3ea2:b0:973:e784:1fe with SMTP id hs34-20020a1709073ea200b00973e78401femr5617152ejc.24.1685350356683; Mon, 29 May 2023 01:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685350356; cv=none; d=google.com; s=arc-20160816; b=tU6i6slnKDvMz/ChbwHsTIYV4fm1cp6RX71xxAJNaNLtkk+vFp8WZ/pd7H5GiDetXc e1lx886nHYrZIxyjC+E97++XkQ2AKGBhIaxky5aBpi0ki3/EaxPWuuvBC72BL5vdWs63 MUuWYPCGOf4GI8p1rE1hn6Zqfn+8d+Cl8DRSmq4wUyo+ApWrVKWgZKTYKnsMVz409J/M iykhyqZefKqO9oWkw88pbdJWDv17wUEZ67Hrj6cYQhbM/JTFw3ZYMIDPvvVaboyWTNcA yPzGo0qewJ3SNUDTA5QFXViboMhqJulmpXenFX6jDghqzWbClHXMutqo27yQ8hDHzalu NbYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=LPQ/zMLiIZF3Q4riujhMK1+sZ3u5Wi3su1ARGKMCL7U=; b=g7AkC+Eqng6vwLHDqm76uEphDpjh8ruap+kvhYVK3JMhJAyT/dQIpOeEF6cq9ea099 mYPUs7Fe+GztcRwPZi5xX7CyHcOn6dTbyLJMYd/wi12I06BRJPn2dS/CyveLKYJ+n0OX ZWgoPbBwwJ/kDGrksCPuIa3WZUdPaY4pdTR/CMSlnrDx38MSoWT8wVSlOwgJ/uGkDDo8 ezIN/b2gGiWQaWkjTGsn1GznyWHj3DJSoURTwQ0rDO+IILiPfg1Iomj3/CM9lDHppHbz U3NF2DFBrXISmbg38xoyXl0JSlJD0yLD5nqlJnZXZFFBM1Dl7LPP45hq9IuvvApPvwCH s44g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=f2bMQcBl; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id v9-20020a17090690c900b0096f4248a649si6150252ejw.709.2023.05.29.01.52.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 01:52:36 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=f2bMQcBl; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 601053953827 for ; Mon, 29 May 2023 08:42:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 601053953827 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685349738; bh=LPQ/zMLiIZF3Q4riujhMK1+sZ3u5Wi3su1ARGKMCL7U=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=f2bMQcBlL+4S3YzyTijre7rfrJE6Lb34/qV9ipamq/JtCKBnQ4THbPeRXxVTfpvJl Aj0vXSWLJ9Sp0qpZIWezu2DUmp9itsJ15pcNe7nqwoINv6WmxzGz/YEqkFhrGfdobl BOWgQmpj01U1lzyx9mO5ruMffpv3cTRe7K3BdffE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id C3DDE38498E2 for ; Mon, 29 May 2023 08:30:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C3DDE38498E2 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-30addbb1b14so1408034f8f.2 for ; Mon, 29 May 2023 01:30:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685349003; x=1687941003; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LPQ/zMLiIZF3Q4riujhMK1+sZ3u5Wi3su1ARGKMCL7U=; b=fT2qPQGhEAzL0LZlYA/VGOcO9yLtazRCVws+SSYm/LRzuHHS20qiJGpo+1eltmbg/2 u3Fki5HG0yFgZ7aTQ5ONT7ie4N6ZZ8//d1hTipUGCpvqPCx2dkmv9rXeieqhRArHHgOh LfAPCYBzgeE4FZmiiRyv1c9FbUIG+BngcXgjvyam0WjTOvGxIl4nPXFdM3X6NfB9Siio /rLWFXjG6mrat2audcN8PKTUPwWgH4tHLzr4qIbs8nCUZZSdU5eL4SNoxW5+HZVGpEsa CiEKUffmrjrRB84rWJbR1SjPAat9CjjnPzv+GlmqoBX9SihTbD7TXLtkLd/bcekEk5m8 sudQ== X-Gm-Message-State: AC+VfDwjc1/b93sxYaY/ii8QJV1dsvzHBLw87kOXK0XbnFfYkplg4QnF 68w9XDSy49RWAwfLsmqGR1V4H7uqrW1YtwGttyNKkA== X-Received: by 2002:a5d:5648:0:b0:309:433b:8414 with SMTP id j8-20020a5d5648000000b00309433b8414mr7995943wrw.54.1685349003733; Mon, 29 May 2023 01:30:03 -0700 (PDT) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id e7-20020adfef07000000b003079ed1f0a0sm12976720wro.44.2023.05.29.01.30.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 01:30:03 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Cedric Landet Subject: [COMMITTED] ada: Define sigset for systems that does not suport sockets Date: Mon, 29 May 2023 10:30:02 +0200 Message-Id: <20230529083002.2411498-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= From: =?utf-8?q?Marc_Poulhi=C3=A8s?= Reply-To: =?utf-8?q?Marc_Poulhi=C3=A8s?= Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767217935660539746?= X-GMAIL-MSGID: =?utf-8?q?1767217935660539746?= From: Cedric Landet In s-oscons-tmplt.c, sigset is defined inside the HAVE_SOCKETS bloc. A platform could require sigset without supporting sockets. gcc/ada/ * s-oscons-tmplt.c: move the definition of sigset out of the HAVE_SOCKETS bloc. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/s-oscons-tmplt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c index 5480e55a5bb..28d42c5a459 100644 --- a/gcc/ada/s-oscons-tmplt.c +++ b/gcc/ada/s-oscons-tmplt.c @@ -1796,11 +1796,6 @@ CND(SIZEOF_struct_hostent, "struct hostent") #define SIZEOF_struct_servent (sizeof (struct servent)) CND(SIZEOF_struct_servent, "struct servent") -#if defined (__linux__) || defined (__ANDROID__) || defined (__QNX__) -#define SIZEOF_sigset (sizeof (sigset_t)) -CND(SIZEOF_sigset, "sigset") -#endif - #if defined(_WIN32) || defined(__vxworks) #define SIZEOF_nfds_t sizeof (int) * 8 #define SIZEOF_socklen_t sizeof (size_t) @@ -1938,6 +1933,11 @@ CST(Poll_Linkname, "") #endif /* HAVE_SOCKETS */ +#if defined (__linux__) || defined (__ANDROID__) || defined (__QNX__) +#define SIZEOF_sigset (sizeof (sigset_t)) +CND(SIZEOF_sigset, "sigset") +#endif + /* ---------------------