Re: Home dir changes have broken MSVC builds

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Cc: "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>, <tjtoocool(at)phreaker(dot)net>
Subject: Re: Home dir changes have broken MSVC builds
Date: 2005-01-09 21:24:35
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE476546@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>The error appears to be on line that uses NEAR and complains
>about it
>>>... I see that the MinGW windef.h defines NEAR as empty, while
>>>the MSVC
>>>windef.h defines it as "near". Don't know if that makes a difference.
>>>
>>>
>>
>>Some reading up on MSDN gives this:
>>http://msdn.microsoft.com/library/default.asp?url=/library/en-
>us/vccore9
>>8/html/_core_removing_near_and_far_type_declarations.asp
>>
>>>From what I can tell, NEAR is defined to near, which is then
>defined to
>>blank in my windef.h (from the platform SDK included in VS2003)
>>
>>Could it be that we need to include windef.h explicitly, before we
>>include this one? Worth a try.
>>
>>
>>
>
>I tried but it didn't work. However, I made some progress with
>changing
>the section to look like this:
>
>#ifdef WIN32
>#include "win32.h"
>#ifndef _WIN32_IE
>#define _WIN32_IE 0x0400

I beleive his will break if _WIN32_IE is previously defined as something
<0x0400. Not sure if we build with a patform SDK with that old defaults
at all, but just to be sure it's probably better to #undef it and then
#define it.

>#endif
>#ifdef near
>#undef near
>#endif
>#define near
>#include <shlobj.h>
>#else
>

//Magnus

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2005-01-09 22:05:01 Re: Home dir changes have broken MSVC builds
Previous Message Magnus Hagander 2005-01-09 21:23:12 Re: Home dir changes have broken MSVC builds