Unix Technical Forum

Re: Home dir changes have broken MSVC builds

This is a discussion on Re: Home dir changes have broken MSVC builds within the pgsql Hackers forums, part of the PostgreSQL category; --> >>>The error appears to be on line that uses NEAR and complains >about it >>>... I see that the ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 03:14 AM
Magnus Hagander
 
Posts: n/a
Default Re: Home dir changes have broken MSVC builds

>>>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/de...l=/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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 03:14 AM
Andrew Dunstan
 
Posts: n/a
Default Re: Home dir changes have broken MSVC builds



Magnus Hagander wrote:

>>
>>#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
>>
>>
>>

>
>
>


Ok, I did that, made identical changes to src/port/path.c, and added
shell32.lib (not shell32.dll) to src/win32.mak - and with that it does
indeed complete. The make traces are shown below. Do any of these
warnings matter, or is this good enough to wrap up and send in a patch?
What's that one about the DESCRIPTION statement?

cheers

andrew


-----------------------
Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

cd include
if not exist pg_config.h copy pg_config.h.win32 pg_config.h
cd ..
cd interfaces\libpq
nmake /f win32.mak

Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

Building the Win32 static library...

cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12CF.tmp
getaddrinfo.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12D0.tmp
pgstrcasecmp.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12D1.tmp
thread.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12D2.tmp
inet_aton.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12D3.tmp
crypt.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12D4.tmp
noblock.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12D5.tmp
md5.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12D6.tmp
ip.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12D7.tmp
wchar.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12D8.tmp
encnames.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12D9.tmp
win32.c
fe-auth.c
fe-protocol2.c
fe-protocol3.c
fe-connect.c
fe-exec.c
fe-lobj.c
fe-misc.c
fe-print.c
fe-secure.c
pqexpbuffer.c
pqsignal.c
pthread-win32.c
link.exe -lib @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12DA.tmp
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12DB.tmp
libpqdll.c
rc.exe /l 0x409 /fo".\Release\libpq.res" libpq.rc
link.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12DC.tmp
libpqdll.def(3) : warning LNK4017: DESCRIPTION statement not supported
for the target platform; ignored
Creating library .\Release\libpqdll.lib and object .\Release\libpqdll.exp
cd ..\..\bin\psql
nmake /f win32.mak

Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12E2.tmp
exec.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12E3.tmp
getopt.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12E4.tmp
getopt_long.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12E5.tmp
path.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12E6.tmp
pgstrcasecmp.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12E7.tmp
sprompt.c
cl.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12E8.tmp
command.c
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\direct.h(124) : warning C4003: not enough actual
parameters for macro 'mkdir'
common.c
common.c(616) : warning C4018: '<' : signed/unsigned mismatch
copy.c
describe.c
help.c
input.c
large_obj.c
mainloop.c
mbprint.c
print.c
print.c(1238) : warning C4090: 'function' : different 'const' qualifiers
print.c(1239) : warning C4090: 'function' : different 'const' qualifiers
prompt.c
psqlscan.c
startup.c
stringutils.c
tab-complete.c
variables.c
link.exe @C:\DOCUME~1\adunstan\LOCALS~1\Temp\nm12E9.tmp
cd ..\..
echo All Win32 parts have been built!
All Win32 parts have been built!



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:19 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com