Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013

From: Christian Ullrich <chris(at)chrullrich(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-committers <pgsql-committers(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013
Date: 2016-04-25 19:42:42
Message-ID: 9d5c6a49-774c-44de-83fc-65c5b431f8d9@chrullrich.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

* Andrew Dunstan wrote:

> On 04/25/2016 09:27 AM, Christian Ullrich wrote:
>> * Magnus Hagander wrote:
>>
>>> On Sun, Apr 24, 2016 at 9:56 PM, Christian Ullrich
>>> <chris(at)chrullrich(dot)net> wrote:

>>>> Just noticed something. This DLL detection by name has never worked in
>>>> debug builds where the DLL names end in "d". Is that important?
>>
>>> That's an interesting point. I guess our release builds are never with
>>> debugging info - but could it make the buildfarm "wrong"?

> What if both are present? Is a release build prevented from loading a
> debug dll and vice versa?

Debug and release are simply two separate CRTs. If your process contains
a module that needs the one, and another that needs the other, you will
have both loaded at once.

I had hoped they might share state, but they don't, at least as far as
putenv()/getenv() are concerned.

> Alternatively, can we detect at compile time if we are a debug build and
> if so add the suffix?

No; same reason as above.

--
Christian

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Kevin Grittner 2016-04-25 20:49:08 pgsql: Fix C comment typo and redundant test
Previous Message Tom Lane 2016-04-25 19:21:13 pgsql: New method for preventing compile-time calculation of degree con

Browse pgsql-hackers by date

  From Date Subject
Next Message Shay Rojansky 2016-04-25 19:52:46 Re: Proposed change to make cancellations safe
Previous Message Andrew Dunstan 2016-04-25 19:18:40 Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013