Allow libpq to build on MS Visual Studio .NET 2003 on Windows XP.
authorBruce Momjian <bruce@momjian.us>
Wed, 1 Dec 2004 23:42:26 +0000 (23:42 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 1 Dec 2004 23:42:26 +0000 (23:42 +0000)
src/include/port/win32.h
src/interfaces/libpq/fe-connect.c

index b1e2a98dbac3c00447fd4b0147588e4e78feb2e9..7df5daae0bd4f659cd133b440840a1a31090e5f4 100644 (file)
@@ -210,6 +210,10 @@ typedef int gid_t;
 #endif
 typedef long key_t;
 
+#ifdef WIN32_CLIENT_ONLY
+typedef int pid_t;
+#endif
+
 /*
  * Supplement to <sys/stat.h>.
  */
index 4c427db096c5319643c94726dfe41724982702f0..195324db0f9fe0b3418711f5d3386147ff8df4de 100644 (file)
@@ -20,7 +20,9 @@
 #include <fcntl.h>
 #include <ctype.h>
 #include <time.h>
+#ifndef WIN32_CLIENT_ONLY
 #include <unistd.h>
+#endif
 
 #ifndef HAVE_STRDUP
 #include "strdup.h"
@@ -35,7 +37,6 @@
 #include "win32.h"
 #else
 #include <sys/socket.h>
-#include <unistd.h>
 #include <netdb.h>
 #include <netinet/in.h>
 #ifdef HAVE_NETINET_TCP_H