Disble some Win32-specific code in win32-client-only builds:
authorBruce Momjian <bruce@momjian.us>
Thu, 8 Dec 2005 17:52:11 +0000 (17:52 +0000)
committerBruce Momjian <bruce@momjian.us>
Thu, 8 Dec 2005 17:52:11 +0000 (17:52 +0000)
commit4ebd4224a59e496f5a4f9f8478ce82a5fbf3fa64
tree8bf739e32db91406025e1e2149236419e8b3f00f
parentf38c3e778a7c778da2e07d813288ac72aab934c9
Disble some Win32-specific code in win32-client-only builds:

I have the problem, when building by MS-VC6.
An error occurs in the 8.1.0 present source codes.

nmake -f win32.mak
..\..\port\getaddrinfo.c(244) : error C2065: 'WSA_NOT_ENOUGH_MEMORY'
..\..\port\getaddrinfo.c(342) : error C2065: 'WSATYPE_NOT_FOUND'

This is used by winsock2.h. However, Construction of a windows base is
winsock.h.
Then, Since MinGW has special environment, this is right. but, it is not
found in VC6.
Furthermore, in getaddrinfo.c, IPV6-API is used by
LoadLibraryA("ws2_32");
Referring to of dll the external memory generates this violation by VC6
specification.

I considered whether the whole should have been converted into winsock2.
However, Now, DLL of MinGW creation operates wonderfully as it is.
That's right, it has pliability by replacement of simple DLL.
Then, I propose the system using winsock(non IPV6) in construction of
VC6.

Hiroshi Saito
src/bin/pg_config/win32.mak
src/include/getaddrinfo.h
src/port/getaddrinfo.c