summaryrefslogtreecommitdiffstats
path: root/src/include/port/win32
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:15:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:15:05 +0000
commit46651ce6fe013220ed397add242004d764fc0153 (patch)
tree6e5299f990f88e60174a1d3ae6e48eedd2688b2b /src/include/port/win32
parentInitial commit. (diff)
downloadpostgresql-14-46651ce6fe013220ed397add242004d764fc0153.tar.xz
postgresql-14-46651ce6fe013220ed397add242004d764fc0153.zip
Adding upstream version 14.5.upstream/14.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/include/port/win32')
-rw-r--r--src/include/port/win32/arpa/inet.h3
-rw-r--r--src/include/port/win32/dlfcn.h1
-rw-r--r--src/include/port/win32/grp.h1
-rw-r--r--src/include/port/win32/netdb.h1
-rw-r--r--src/include/port/win32/netinet/in.h3
-rw-r--r--src/include/port/win32/pwd.h3
-rw-r--r--src/include/port/win32/sys/socket.h33
-rw-r--r--src/include/port/win32/sys/wait.h3
8 files changed, 48 insertions, 0 deletions
diff --git a/src/include/port/win32/arpa/inet.h b/src/include/port/win32/arpa/inet.h
new file mode 100644
index 0000000..ad18031
--- /dev/null
+++ b/src/include/port/win32/arpa/inet.h
@@ -0,0 +1,3 @@
+/* src/include/port/win32/arpa/inet.h */
+
+#include <sys/socket.h>
diff --git a/src/include/port/win32/dlfcn.h b/src/include/port/win32/dlfcn.h
new file mode 100644
index 0000000..b6e43c0
--- /dev/null
+++ b/src/include/port/win32/dlfcn.h
@@ -0,0 +1 @@
+/* src/include/port/win32/dlfcn.h */
diff --git a/src/include/port/win32/grp.h b/src/include/port/win32/grp.h
new file mode 100644
index 0000000..8b4f213
--- /dev/null
+++ b/src/include/port/win32/grp.h
@@ -0,0 +1 @@
+/* src/include/port/win32/grp.h */
diff --git a/src/include/port/win32/netdb.h b/src/include/port/win32/netdb.h
new file mode 100644
index 0000000..ad0627e
--- /dev/null
+++ b/src/include/port/win32/netdb.h
@@ -0,0 +1 @@
+/* src/include/port/win32/netdb.h */
diff --git a/src/include/port/win32/netinet/in.h b/src/include/port/win32/netinet/in.h
new file mode 100644
index 0000000..a4e22f8
--- /dev/null
+++ b/src/include/port/win32/netinet/in.h
@@ -0,0 +1,3 @@
+/* src/include/port/win32/netinet/in.h */
+
+#include <sys/socket.h>
diff --git a/src/include/port/win32/pwd.h b/src/include/port/win32/pwd.h
new file mode 100644
index 0000000..b8c7178
--- /dev/null
+++ b/src/include/port/win32/pwd.h
@@ -0,0 +1,3 @@
+/*
+ * src/include/port/win32/pwd.h
+ */
diff --git a/src/include/port/win32/sys/socket.h b/src/include/port/win32/sys/socket.h
new file mode 100644
index 0000000..9b2cdf3
--- /dev/null
+++ b/src/include/port/win32/sys/socket.h
@@ -0,0 +1,33 @@
+/*
+ * src/include/port/win32/sys/socket.h
+ */
+#ifndef WIN32_SYS_SOCKET_H
+#define WIN32_SYS_SOCKET_H
+
+/*
+ * Unfortunately, <wingdi.h> of VC++ also defines ERROR.
+ * To avoid the conflict, we include <windows.h> here and undefine ERROR
+ * immediately.
+ *
+ * Note: Don't include <wingdi.h> directly. It causes compile errors.
+ */
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#include <windows.h>
+
+#undef ERROR
+#undef small
+
+/* Restore old ERROR value */
+#ifdef PGERROR
+#define ERROR PGERROR
+#endif
+
+/*
+ * we can't use the windows gai_strerror{AW} functions because
+ * they are defined inline in the MS header files. So we'll use our
+ * own
+ */
+#undef gai_strerror
+
+#endif /* WIN32_SYS_SOCKET_H */
diff --git a/src/include/port/win32/sys/wait.h b/src/include/port/win32/sys/wait.h
new file mode 100644
index 0000000..eaeb566
--- /dev/null
+++ b/src/include/port/win32/sys/wait.h
@@ -0,0 +1,3 @@
+/*
+ * src/include/port/win32/sys/wait.h
+ */