From patchwork Mon Dec 26 08:55:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonny Grant X-Patchwork-Id: 36568 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp813990wrt; Mon, 26 Dec 2022 00:56:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXsHABtucBTkUAv8aIG4OHSEJBiLVBrgKoFVlWCqOWgVVYljMQ4kl+ymoDrN8E7Q0Kk6knJk X-Received: by 2002:a17:907:7844:b0:7c0:eba2:f9dd with SMTP id lb4-20020a170907784400b007c0eba2f9ddmr14453527ejc.53.1672044979035; Mon, 26 Dec 2022 00:56:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672044979; cv=none; d=google.com; s=arc-20160816; b=lSduV4JMr/W6coHX8AlH1XoBgoXVSiXMeKSBmsdGXEg3nF6yPn2F4bAsAXQnOkyu3x R5Kcs0ZNm+Ul7AYDBF6MZ5JOpVKAzBKtCi9EWvahZQj4xEE4UAnZuQqlyj6QHU4XcikV vPoHhAUx4NBSh0dOiI5w6xf43Rqmqg8InadDlft2M7Qngy4XmcTrjpBKNfj9Zy6VqQaI lUDaMfALIm+mlr9SsOd2wau3bHbIoJL2I/1Qa21CxpZwatdJtAe++xp0PR0FT9N/rhY8 5FzIKzZ5Rdw5BlY+I2EMuM39p3lkwPZbIhUjsP3W9mFtzMladdGhTcqdDOQtFBjtfLpy 1ljA== 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-transfer-encoding :subject:from:to:content-language:user-agent:mime-version:date :message-id:dkim-signature:dmarc-filter:delivered-to; bh=ncbgEE8t6u3M9oUu/T6dNvajkn6BImXKN7Iq9bDSSXc=; b=uuLRyK3OQ9ewyqs8GAZIoW5YzRGFp5ccRt9HtVCPiI+FKCV7X2QEmXIkJNqSEK4BDJ OjEmXoObAU/Vk9hXPOwjoJSNAzrBP1iZBGap3u0EkfEzJPANAkQJNj8bXn440ufkFZEs 7IF/mIjXUatTgEOG5O2uScOMQzm+fZLQDJktmHAFsaBa09CMTqBNZpiIlf/onbyfsUmJ PiW/i1+MHBum11DEtmnpp529YG2nu0GlNiC4stoSsnhiAIgsCBTVqAFRchlVy68lWLV0 P6hskeBcURC+Jq7HZfbQKmsA1SKHfwPbXZxBJ8R51vKUUwjxxyJbTbE9riFi62IWHOHP 91gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jguk.org header.s=google header.b=S7SABY3P; 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 nc25-20020a1709071c1900b007c1891ecc5asi8011867ejc.189.2022.12.26.00.56.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Dec 2022 00:56:19 -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; dkim=pass header.i=@jguk.org header.s=google header.b=S7SABY3P; 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 CD02B3858C3A for ; Mon, 26 Dec 2022 08:56:17 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 2FA103858D33 for ; Mon, 26 Dec 2022 08:55:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2FA103858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=jguk.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jguk.org Received: by mail-wr1-x42d.google.com with SMTP id j17so4219107wrr.7 for ; Mon, 26 Dec 2022 00:55:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jguk.org; s=google; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=ncbgEE8t6u3M9oUu/T6dNvajkn6BImXKN7Iq9bDSSXc=; b=S7SABY3P4S2/rJMaxTbU3Mt8FvzDHj3RyAzLCwzIgune3m2BJT2WDzGm15mhnthghz Wyll3PvSH0J70NFeqtQqUXWwB7CGxjXlprJVr5Dap2Wkphz48GRmW7Am7Jwk7eVIOVXz 3jZpysQUefu2cWfJJEHwr5fea6wbklb8bTkcbCzrpglNeCXXT6t5mvnHhlTkCq5nSGf1 VTSjoU4pUfIQfDWfT9W9JpZEgPGU9yW2SfsWblSX2/tAK2gHj790xtz6hJK69Lfil2td 7h9sTU2thWpcQOydWhHD6/zyIOy8UW9NB7qClR9zz29kJcaSl/AZZKkLOabqQrhHECOW d9zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ncbgEE8t6u3M9oUu/T6dNvajkn6BImXKN7Iq9bDSSXc=; b=pqfDieolltXJA6IxkOyv8Umy1/Y6BpMgXMjXxpeOEFcEzDjWXj+vbnN0kr53PdPspp 0N77LK2X6A2y/v10mZ4zNy2IfaLZ6Yik85/8ZncuMk+SpHGza21aNQdcL42NeRB72Mfi ejFckPOF3CJzlGBE6Nh1tG+1jV6XtW385G/EH/rB6P3nlgtooPodX0vGYkFcovnVBG38 B3X+uKVHHZWH4tfpy6EBUSA9is/vuUEsf4jAB0bYlHxyJWcNTQP1Ub7/07XjVC6//ceV S5u5Lu19MIXAHwYpTgxtbekXNK/nFqCtsbtunrSH6jZ4dCDVk/VotmBloB4U7/20/OT3 oGjw== X-Gm-Message-State: AFqh2krY8XQs+m8DTJr5Knz31/Ie1ut89jmYNBdHWRcWx9xXvHJiDKYH FqHYuR1VUGj0W+uHdvAR/gZ6EkpPbiNQY3aG X-Received: by 2002:adf:e5cd:0:b0:241:fd48:dccd with SMTP id a13-20020adfe5cd000000b00241fd48dccdmr10514135wrn.63.1672044946638; Mon, 26 Dec 2022 00:55:46 -0800 (PST) Received: from [192.168.0.12] (cpc87345-slou4-2-0-cust172.17-4.cable.virginm.net. [81.101.252.173]) by smtp.gmail.com with ESMTPSA id p11-20020adfe60b000000b002366e3f1497sm10107455wrm.6.2022.12.26.00.55.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Dec 2022 00:55:46 -0800 (PST) Message-ID: <881e795d-34c8-0445-74cf-cb68192d2dfe@jguk.org> Date: Mon, 26 Dec 2022 08:55:45 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-GB To: gcc-patches@gcc.gnu.org From: Jonny Grant Subject: [Bug c/108224] [PATCH] add srandom random initstate setstate X-Spam-Status: No, score=-9.3 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 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: , 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?1753266235826864154?= X-GMAIL-MSGID: =?utf-8?q?1753266235826864154?= From 6ff344979af46dbcd739dd9068d6d595547e4c27 Mon Sep 17 00:00:00 2001 From: Jonathan Grant Date: Sun, 25 Dec 2022 22:38:44 +0000 Subject: [PATCH] add srandom random initstate setstate --- gcc/c-family/known-headers.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/c-family/known-headers.cc b/gcc/c-family/known-headers.cc index 9c256173b82..ade9fa2dcc0 100644 --- a/gcc/c-family/known-headers.cc +++ b/gcc/c-family/known-headers.cc @@ -171,6 +171,10 @@ get_stdlib_header_for_name (const char *name, enum stdlib lib) {"getenv", {"", ""} }, {"malloc", {"", ""} }, {"realloc", {"", ""} }, + {"random", {"", ""} }, + {"srandom", {"", ""} }, + {"initstate", {"", ""} }, + {"setstate", {"", ""} }, /* and . */ {"memchr", {"", ""} },