>> Test program attached, results below. It returns NULL for
>> whatever I try with LC_MESSAGES.
>It looks like LC_MESSAGES just plain does not work on Windows. I did
>some googling and found some pages suggesting this, for instance
Yes, that's exactly the link I had in my original mail.
> The patch you suggest looks remarkably ugly; in particular it is
> generally unsafe to pass a local variable to putenv. Perhaps that
> does not matter on Windows but I wonder whether the putenv part
> just be dropped.
I got that from the gettext FAQ.
The problem is that MSVCRT caches the environment, and that's what you
access using getenv() and putenv(). And this is what gettext uses
internally. The API call is to change the actual process environment.
That's why you need both.
As for the dangers of passing a local variable - there is nothing abot
that in the putenv documentation on MSDN. So I would assume it's safe on
> And why bother with ZeroMemory?
Oops. that's a leftover from some previous hacking.
pgsql-patches by date
|Next:||From: Tom Lane||Date: 2004-10-17 19:49:25|
|Subject: Re: strange result from contrib/seg regression on windows |
|Previous:||From: Andrew Dunstan||Date: 2004-10-17 19:35:10|
|Subject: strange result from contrib/seg regression on windows|