--- src/bin/pg_config/win32.mak.orig Wed Jun 28 01:43:26 2006 +++ src/bin/pg_config/win32.mak Wed Jun 28 01:44:49 2006 @@ -48,7 +48,7 @@ CPP_PROJ=/nologo $(OPT) /W3 /GX /D "WIN32" $(DEBUGDEF) /D "_CONSOLE" /D\ "_MBCS" /Fp"$(INTDIR)\pg_config.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c \ /I ..\..\include /I ..\..\interfaces\libpq /I ..\..\include\port\win32 \ - /D "HAVE_STRDUP" /D "FRONTEND" + /I ..\..\include\port\win32_msvc /D "HAVE_STRDUP" /D "FRONTEND" CPP_OBJS=$(INTDIR)/ CPP_SBRS=. @@ -63,6 +63,7 @@ "$(INTDIR)\pgstrcasecmp.obj" \ "$(OUTDIR)\path.obj" \ "$(INTDIR)\exec.obj" \ + "$(INTDIR)\snprintf.obj" \ !IFDEF DEBUG "..\..\interfaces\libpq\Debug\libpqddll.lib" !ELSE @@ -87,6 +88,11 @@ "$(INTDIR)\exec.obj" : ..\..\port\exec.c $(CPP) @<< $(CPP_PROJ) ..\..\port\exec.c +<< + +"$(INTDIR)\snprintf.obj" : ..\..\port\snprintf.c + $(CPP) @<< + $(CPP_PROJ) ..\..\port\snprintf.c << .c{$(CPP_OBJS)}.obj:: --- src/bin/pg_dump/win32.mak.orig Wed Jun 28 01:38:08 2006 +++ src/bin/pg_dump/win32.mak Wed Jun 28 01:41:01 2006 @@ -30,7 +30,8 @@ CPP_PROJ=/nologo $(OPT) /W3 /GX /D "WIN32" $(DEBUGDEF) /D "_CONSOLE" /D\ "_MBCS" /Fp"$(INTDIR)\pg_dump.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c \ - /I ..\..\include /I ..\..\interfaces\libpq /I ..\..\include\port\win32 /I ..\..\backend \ + /I ..\..\include /I ..\..\interfaces\libpq /I ..\..\include\port\win32 \ + /I ..\..\include\port\win32_msvc /I ..\..\backend \ /D "HAVE_STRDUP" /D "FRONTEND" CPP_OBJS=$(INTDIR)/ @@ -56,6 +57,7 @@ -@erase "$(INTDIR)\path.obj" -@erase "$(INTDIR)\pgstrcasecmp.obj" -@erase "$(INTDIR)\sprompt.obj" + -@erase "$(INTDIR)\snprintf.obj" -@erase "$(INTDIR)\pg_dump.pch" -@erase "$(OUTDIR)\pg_dump.obj" -@erase "$(OUTDIR)\pg_dump.exe" @@ -92,7 +94,8 @@ "$(INTDIR)\getopt_long.obj" \ "$(INTDIR)\path.obj" \ "$(INTDIR)\pgstrcasecmp.obj" \ - "$(INTDIR)\sprompt.obj" + "$(INTDIR)\sprompt.obj" \ + "$(INTDIR)\snprintf.obj" LINK32_OBJS_DMP= \ "$(INTDIR)\common.obj" \ @@ -171,6 +174,11 @@ "$(INTDIR)\sprompt.obj" : "$(INTDIR)" ..\..\port\sprompt.c $(CPP) @<< $(CPP_PROJ) ..\..\port\sprompt.c +<< + +"$(INTDIR)\snprintf.obj" : "$(INTDIR)" ..\..\port\snprintf.c + $(CPP) @<< + $(CPP_PROJ) ..\..\port\snprintf.c << ..\..\backend\parser\parse.h : ..\..\backend\parser\gram.y --- src/win32.mak.orig Wed Jun 28 00:52:42 2006 +++ src/win32.mak Wed Jun 28 00:53:04 2006 @@ -13,6 +13,7 @@ ALL: cd include if not exist pg_config.h copy pg_config.h.win32 pg_config.h + if not exist pg_config_os.h copy port\win32.h pg_config_os.h cd .. cd interfaces\libpq nmake /f win32.mak $(MAKEMACRO) --- src/include/pg_config.h.win32.orig Wed Jun 28 01:21:36 2006 +++ src/include/pg_config.h.win32 Wed Jun 28 02:18:04 2006 @@ -247,13 +247,17 @@ /* Define to 1 if constants of type 'long long int' should have the suffix LL. */ +#if (_MSC_VER > 1200) #define HAVE_LL_CONSTANTS 1 +#endif /* Define to 1 if `long int' works and is 64 bits. */ /* #undef HAVE_LONG_INT_64 */ /* Define to 1 if `long long int' works and is 64 bits. */ +#if (_MSC_VER > 1200) #define HAVE_LONG_LONG_INT_64 +#endif /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 @@ -395,7 +399,9 @@ /* #undef HAVE_STRTOUQ */ /* Define to 1 if the system has the type `struct addrinfo'. */ +#if (_MSC_VER > 1200) #define HAVE_STRUCT_ADDRINFO 1 +#endif /* Define to 1 if the system has the type `struct cmsgcred'. */ /* #undef HAVE_STRUCT_CMSGCRED */ @@ -410,10 +416,14 @@ /* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */ /* Define to 1 if the system has the type `struct sockaddr_storage'. */ +#if (_MSC_VER > 1200) #define HAVE_STRUCT_SOCKADDR_STORAGE 1 +#endif /* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */ +#if (_MSC_VER > 1200) #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 +#endif /* Define to 1 if `ss_len' is member of `struct sockaddr_storage'. */ /* #undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN */ --- src/include/getaddrinfo.h.orig Wed Jun 28 01:25:28 2006 +++ src/include/getaddrinfo.h Wed Jun 28 01:26:46 2006 @@ -41,7 +41,9 @@ #define EAI_SYSTEM (-11) #else /* WIN32 */ #ifdef WIN32_ONLY_COMPILER +#ifndef WSA_NOT_ENOUGH_MEMORY #define WSA_NOT_ENOUGH_MEMORY (WSAENOBUFS) +#endif #define WSATYPE_NOT_FOUND (WSABASEERR+109) #endif #define EAI_AGAIN WSATRY_AGAIN --- src/port/thread.c.orig Wed Jun 28 01:31:25 2006 +++ src/port/thread.c Wed Jun 28 01:33:47 2006 @@ -16,7 +16,11 @@ #include #if defined(FRONTEND) && defined(ENABLE_THREAD_SAFETY) +#ifdef WIN32 +#include "pthread-win32.h" +#else #include +#endif #endif