From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74221 invoked by alias); 3 Jul 2017 15:26:52 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 73140 invoked by uid 89); 3 Jul 2017 15:26:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Jul 2017 15:26:50 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A7114C0587DE; Mon, 3 Jul 2017 15:26:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A7114C0587DE Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=sergiodj@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A7114C0587DE Received: from localhost (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 481568B297; Mon, 3 Jul 2017 15:26:49 +0000 (UTC) From: Sergio Durigan Junior To: Yao Qi Cc: Anton Kolesov , "gdb-patches\@sourceware.org" , Francois Bedard Subject: Re: [PATCH] Fix build breakage on MinGW due to missing setenv References: <20170703100258.15837-1-Anton.Kolesov@synopsys.com> Date: Mon, 03 Jul 2017 15:26:00 -0000 In-Reply-To: (Yao Qi's message of "Mon, 3 Jul 2017 12:21:02 +0100") Message-ID: <87shid8rt3.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00012.txt.bz2 On Monday, July 03 2017, Yao Qi wrote: > On Mon, Jul 3, 2017 at 11:02 AM, Anton Kolesov > wrote: >> Patch [1] broke a build on MinGW hosts, because MinGW doesn't provide POSIX >> functions setenv () and unsetenv (), instead there is a putenv () wrapper >> around WinAPI function, although with a different signature. >> >> [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=9a6c7d9c0 > > The better fix, IMO, is to use setenv and unsetenv > module in gnulib. However, I didn't check gnulib > manual about portability problems not fixed by gnulib. According to: There is only one portability problem not fixed by gnulib, and I don't think it affects us: Older versions of POSIX required that setenv(NULL,"",0) gracefully fail with EINVAL, but not all implementations guarantee this, and the requirement was removed. So it should be possible to import setenv from gnulib without problems, I think. Cheers, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/