aboutsummaryrefslogtreecommitdiff
path: root/src/include/port.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/port.h')
-rw-r--r--src/include/port.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/include/port.h b/src/include/port.h
index b5c22cb0c4c..2a4f9b4818a 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/port.h,v 1.128 2010/01/02 16:58:00 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/port.h,v 1.129 2010/01/10 14:16:08 mha Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,9 +17,18 @@
#include <netdb.h>
#include <pwd.h>
+/* socket has a different definition on WIN32 */
+#ifndef WIN32
+typedef int pgsocket;
+#define PGINVALID_SOCKET -1
+#else
+typedef SOCKET pgsocket;
+#define PGINVALID_SOCKET INVALID_SOCKET
+#endif
+
/* non-blocking */
-extern bool pg_set_noblock(int sock);
-extern bool pg_set_block(int sock);
+extern bool pg_set_noblock(pgsocket sock);
+extern bool pg_set_block(pgsocket sock);
/* Portable path handling for Unix/Win32 (in path.c) */