summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/win32.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2006-06-07 22:24:46 +0000
committerBruce Momjian <bruce@momjian.us>2006-06-07 22:24:46 +0000
commit399a36a75d2d06bfdb91402713d408271b4833ba (patch)
treeb8391f6bda4680d37ac430c3270c67bde979d842 /src/interfaces/libpq/win32.c
parent877e296306a2017a18fc7086e9742c8ee3e0a665 (diff)
downloadpostgresql-399a36a75d2d06bfdb91402713d408271b4833ba.tar.gz
Prepare code to be built by MSVC:
o remove many WIN32_CLIENT_ONLY defines o add WIN32_ONLY_COMPILER define o add 3rd argument to open() for portability o add include/port/win32_msvc directory for system includes Magnus Hagander
Diffstat (limited to 'src/interfaces/libpq/win32.c')
-rw-r--r--src/interfaces/libpq/win32.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/interfaces/libpq/win32.c b/src/interfaces/libpq/win32.c
index 28b6a1a5bd..2c5a58bef1 100644
--- a/src/interfaces/libpq/win32.c
+++ b/src/interfaces/libpq/win32.c
@@ -26,12 +26,18 @@
#define NOCRYPT
#include <windows.h>
-#include <winsock.h>
#include <stdio.h>
#include "win32.h"
-#include "postgres_fe.h"
-#include "libpq-fe.h"
-#include "libpq-int.h"
+
+/* Declared here to avoid pulling in all includes, which causes name collissions */
+#ifdef ENABLE_NLS
+extern char *
+libpq_gettext(const char *msgid)
+__attribute__((format_arg(1)));
+#else
+#define libpq_gettext(x) (x)
+#endif
+
static struct WSErrorEntry
{