On Sun, Jan 30, 2011 at 16:47, Andrew Dunstan <and...@dunslane.net> wrote: > > The attached patch allows building a 64 bit Windows Postgres using the > mingw64 compiler from > <http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/>. > It works both as a native compiler and for cross-compiling (which I tested > on 32 bit Windows, but could in theory be done on any of the supported > hosts, including Linux, Darwin and Cygwin). > > The required changes are very modest, and I'd like to commit this so we can > get some buildfarm coverage (I don't have an available 64 bit Windows > machine for running a buildfarm member right now. but maybe someone else > does.) > > There will be some small consequent documentation changes.
+#ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 +#endif That seems unsafe in general. What if _WIN32_WINNT is already defined, but to something lower than 0x0501?Might be better to do: #ifdef _WIN32_WINNT #undef _WIN32_WINNT #endif instead? +#ifndef WIN64 #define _WINSOCKAPI_ Did you verify that that's not needed on win64-msvc? (my VM isn't booted right now, so I didn't actually test it) Other than those comments, looks good to me. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers