diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-09-21 01:02:04 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-10-09 19:14:35 +0300 |
commit | 2a969b7f4bdb223d3626dc14b684701942ccafb2 (patch) | |
tree | 5b317acd47e5183b7dd127417cd0017c39f28f94 /libpq/postgresql/port/win32/sys | |
parent | 05ac4b76f5d30def9d51815c7f25d54316592f45 (diff) |
Make package to be source rather than stub
Diffstat (limited to 'libpq/postgresql/port/win32/sys')
-rw-r--r-- | libpq/postgresql/port/win32/sys/socket.h | 33 | ||||
-rw-r--r-- | libpq/postgresql/port/win32/sys/wait.h | 3 |
2 files changed, 36 insertions, 0 deletions
diff --git a/libpq/postgresql/port/win32/sys/socket.h b/libpq/postgresql/port/win32/sys/socket.h new file mode 100644 index 0000000..edaee6a --- /dev/null +++ b/libpq/postgresql/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/libpq/postgresql/port/win32/sys/wait.h b/libpq/postgresql/port/win32/sys/wait.h new file mode 100644 index 0000000..eaeb566 --- /dev/null +++ b/libpq/postgresql/port/win32/sys/wait.h @@ -0,0 +1,3 @@ +/* + * src/include/port/win32/sys/wait.h + */ |