Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: Anton Kolesov <Anton.Kolesov@synopsys.com>,
	 "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>,
	 Francois Bedard <Francois.Bedard@synopsys.com>
Subject: Re: [PATCH] Fix build breakage on MinGW due to missing setenv
Date: Mon, 03 Jul 2017 15:26:00 -0000	[thread overview]
Message-ID: <87shid8rt3.fsf@redhat.com> (raw)
In-Reply-To: <CAH=s-PO5oSxNCTFqqvK+f=4-q40c_soPii+MtonoKmP6capZpg@mail.gmail.com>	(Yao Qi's message of "Mon, 3 Jul 2017 12:21:02 +0100")

On Monday, July 03 2017, Yao Qi wrote:

> On Mon, Jul 3, 2017 at 11:02 AM, Anton Kolesov
> <Anton.Kolesov@synopsys.com> 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:

  <https://www.gnu.org/software/gnulib/manual/html_node/setenv.html#setenv>

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/


  reply	other threads:[~2017-07-03 15:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-03 10:04 Anton Kolesov
2017-07-03 11:21 ` Yao Qi
2017-07-03 15:26   ` Sergio Durigan Junior [this message]
2017-07-03 16:27     ` [PATCH] Import setenv and unsetenv from gnulib Anton Kolesov
2017-07-03 19:35       ` Sergio Durigan Junior
2017-07-04 10:20       ` Yao Qi
2017-07-04 18:06         ` Anton Kolesov
     [not found]           ` <8737ac6j91.fsf@redhat.com>
2017-07-05  9:50             ` Anton Kolesov
2017-07-06 15:34               ` Sergio Durigan Junior
2017-07-05  9:56           ` Pedro Alves
2017-07-05 10:32             ` Anton Kolesov
2017-07-07  8:24           ` Yao Qi
2017-07-07  9:35             ` Anton Kolesov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87shid8rt3.fsf@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=Anton.Kolesov@synopsys.com \
    --cc=Francois.Bedard@synopsys.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox