Thread: Preprocessor condition fix

Preprocessor condition fix

From
Christian Ullrich
Date:
Here is a one-line patch to fix a wrong preprocessor condition in 
pg_regress, found because the VS 2015 compiler warns on the cast in the 
32-bit branch where apparently earlier versions did not.

According to git grep, this is the only place where WIN64 is used 
without the leading underscore.

-- 
Christian

Re: Preprocessor condition fix

From
Tom Lane
Date:
Christian Ullrich <chris@chrullrich.net> writes:
> Here is a one-line patch to fix a wrong preprocessor condition in 
> pg_regress, found because the VS 2015 compiler warns on the cast in the 
> 32-bit branch where apparently earlier versions did not.

Pushed, thanks.

> According to git grep, this is the only place where WIN64 is used 
> without the leading underscore.

Hm, my grep found another one ...
        regards, tom lane



Re: Preprocessor condition fix

From
Christian Ullrich
Date:
* Tom Lane wrote:

> Christian Ullrich <chris@chrullrich.net> writes:

>> According to git grep, this is the only place where WIN64 is used
>> without the leading underscore.
>
> Hm, my grep found another one ...

Oh, sorry. I saw that one, but thought it was intentional because _WIN64 
is defined automatically anyway.

-- 
Christian





Re: Preprocessor condition fix

From
Tom Lane
Date:
Christian Ullrich <chris@chrullrich.net> writes:
> * Tom Lane wrote:
>> Hm, my grep found another one ...

> Oh, sorry. I saw that one, but thought it was intentional because _WIN64 
> is defined automatically anyway.

Oh?  Then we should not need that one (the /D switch in win32.mak) at all.
Should we just remove it?
        regards, tom lane



Re: Preprocessor condition fix

From
Christian Ullrich
Date:
* From: Tom Lane [mailto:tgl@sss.pgh.pa.us]

> Christian Ullrich <chris@chrullrich.net> writes:

> > * Tom Lane wrote:
> >> Hm, my grep found another one ...
>
> > Oh, sorry. I saw that one, but thought it was intentional because _WIN64
> > is defined automatically anyway.
>
> Oh?  Then we should not need that one (the /D switch in win32.mak) at all.
> Should we just remove it?

We have both confirmed several times that nothing depends on it. I think it can go.

--
Christian




Re: Preprocessor condition fix

From
Tom Lane
Date:
Christian Ullrich <chris@chrullrich.net> writes:
> * Tom Lane wrote:
>> Oh?  Then we should not need that one (the /D switch in win32.mak) at all.
>> Should we just remove it?

> We have both confirmed several times that nothing depends on it. I think it can go.

Done.
        regards, tom lane