From patchwork Fri Nov 4 14:06:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 15565 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp429106wru; Fri, 4 Nov 2022 07:15:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5KcpkXzu+h097b3KSt2Z2YQ8fyMdhgynxc93pw9y6zGKMwQmdM7IZlGPcZ2wkPyZ6H/0GX X-Received: by 2002:a17:907:8c81:b0:7ad:f0ae:f4b4 with SMTP id td1-20020a1709078c8100b007adf0aef4b4mr18690953ejc.563.1667571306594; Fri, 04 Nov 2022 07:15:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667571306; cv=none; d=google.com; s=arc-20160816; b=CJMGcfv4LEp2DIv3GP5iCkKcsTGZ3EZycrvrgjz6TWkETHpc0bhwLY+vUQy/OFOPyq jMnV2J/FAguYwYp/u50HDmb0OK0GKTptkLdpXWinYjVVZBMY75GPNe+cToWmWjPIaHCF 28gcrDcmJWZ2NLTOwMNz57QSPnQhbFrgVB7yypa/FScUhHYqGiXjT4TaBDbIudh9Veg7 14pDQEd/ytalVVrL6LjhWqC865A4I501zjFP2oLFSy5zdWnLGdxTJg3u7wbvVQup2011 PjTSiF14q3N7shPeGm7bOVjjuLs1YZ4PQZnLrkMYVfHexJRHFUY9e/snQFA0FHrlKlQe QMFw== 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:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=ub3tBBj9P4LccaZALmNc/czCAXsLUIRmifdmrVG2qig=; b=eDpnqikPGfPZfHxniLhb2xKtL4D7ieJyLM8aECoQ5E21uhgt5161AzzEdtP1QmDHZP 25n7Z/EZ+mpwdBZMmpelKwXupLjeQIkEEqJH1JAbqBBDvk4TzpJl/SqfY5TzBrLgE8It D843cf+na1r7qfBV++0Mu7wW4qfgCcuWMnvNinUAbRccFRsA23cyWX5D+ooQ+4MbNV5u ov/SanC6gvRXDFudJexqbv0Y22nJplO7LEhH9veBoBwhixWwMzWXCSU4tyfGvfygKsjU xWkf+TiRqUPECRAm+Hiz5xrjpoHkwPJitiJYvCC5uzc/3NP2BTm8835YKp3I2ECViFHv bqcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=o4qAVySf; 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 f26-20020a50ee9a000000b00461d04246fesi4124533edr.440.2022.11.04.07.15.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 07:15:06 -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=o4qAVySf; 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 6FC183810B5C for ; Fri, 4 Nov 2022 14:07:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6FC183810B5C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667570823; bh=ub3tBBj9P4LccaZALmNc/czCAXsLUIRmifdmrVG2qig=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=o4qAVySfedaa/m9dSMs3tAaQCqG1ikyqlOo4hpdU6kKwN+J1omlCCP1em7ymRwfxW vwdmJ4wbYMR00A1dC2Bpmp0MLAr1Ibpx/j76XlpbQfN1tFOtAbxkdfmJT9NQoX/4H0 Ux14ndksSXVfhWOc4nV2xyCUo3MIN2+AChJQyfYs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id B31DA3895FF4 for ; Fri, 4 Nov 2022 14:06:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B31DA3895FF4 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-638-l_OP0zr7OZqm21-9ViVPBA-1; Fri, 04 Nov 2022 10:06:14 -0400 X-MC-Unique: l_OP0zr7OZqm21-9ViVPBA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6D6E81C075AC; Fri, 4 Nov 2022 14:06:13 +0000 (UTC) Received: from localhost (unknown [10.33.37.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 37781C15BA5; Fri, 4 Nov 2022 14:06:13 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Define _GNU_SOURCE for secure_getenv on Cygwin [PR107511] Date: Fri, 4 Nov 2022 14:06:12 +0000 Message-Id: <20221104140612.834725-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely 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?1748575250599270725?= X-GMAIL-MSGID: =?utf-8?q?1748575250599270725?= Tested powerpc64le-linux. Pushed to trunk. -- >8 -- As in r12-6867-ge20486d508afdf we need to define _GNU_SOURCE explicitly for Cygwin, because configure finds it in libc but it isn't declared unless we request it. libstdc++-v3/ChangeLog: PR libstdc++/107511 * libsupc++/eh_alloc.cc (_GNU_SOURCE): Define. --- libstdc++-v3/libsupc++/eh_alloc.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libstdc++-v3/libsupc++/eh_alloc.cc b/libstdc++-v3/libsupc++/eh_alloc.cc index e93f14c887b..83d15f39ca4 100644 --- a/libstdc++-v3/libsupc++/eh_alloc.cc +++ b/libstdc++-v3/libsupc++/eh_alloc.cc @@ -25,6 +25,11 @@ // This is derived from the C++ ABI for IA-64. Where we diverge // for cross-architecture compatibility are noted with "@@@". +#ifndef _GNU_SOURCE +// Cygwin needs this for secure_getenv +# define _GNU_SOURCE 1 +#endif + #include // std::exception #include // std::terminate #include // std::malloc, std::free, std::strtoul