compiling postgres for 64 bit windows using mingw64

Started by McWilliams, Stevenalmost 17 years ago2 messagesgeneral
Jump to latest
#1McWilliams, Steven
Steven_McWilliams@bmc.com

Hello,

I am wondering if anyone has successfully compiled postgres for 64 bit windows using mingw64? I tried doing so but the "configure" step fails with the following message:

conftest.c:50: error: conflicting types for 'accept'

The config.log file shows the following additional message:

c:/mingw_64/lib/gcc../../x86_64-w64-mingw32/include/winsock2.h:1291: note: previous declaration of 'accept' was here

The definition of 'accept' in winsock2.h is: "WINSOCK_API_LINKAGE SOCKET WSAPI accept(SOCKET s, struct sockaddr *addr, int *addrlen);", where "SOCKET" is defined as "int *". The definition of "SOCKET" back in the 32 bit version of mingw was "unsigned int", which appears to be what the postgres "configure" tool expects.

Thanks in advance for any help,
Steve

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: McWilliams, Steven (#1)
Re: compiling postgres for 64 bit windows using mingw64

"McWilliams, Steven" <Steven_McWilliams@bmc.com> writes:

I am wondering if anyone has successfully compiled postgres for 64 bit
windows using mingw64?

We don't currently support 64-bit builds on Windows. There are a pile
of issues there, most coming from Microsoft's nonstandard decision to
make sizeof(long) != sizeof(pointer). In practice you probably wouldn't
get any noticeable performance improvement over a 32-bit build anyway,
seeing that large shared_buffers settings don't seem to be useful on
Windows.

regards, tom lane