diff options
author | Bruce Momjian <bruce@momjian.us> | 2005-12-08 17:52:20 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2005-12-08 17:52:20 +0000 |
commit | a3e1e996745a249b5b531a25d3a216bb2dad3088 (patch) | |
tree | 585d10bc319f46017c8d519677baa5640eb76eb6 /src/include | |
parent | 5ca6ab404d1820b61abea8fc2922ec2e227d2565 (diff) | |
download | postgresql-a3e1e996745a249b5b531a25d3a216bb2dad3088.tar.gz postgresql-a3e1e996745a249b5b531a25d3a216bb2dad3088.zip |
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
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/getaddrinfo.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/getaddrinfo.h b/src/include/getaddrinfo.h index f0a3a820207..6967731dfe3 100644 --- a/src/include/getaddrinfo.h +++ b/src/include/getaddrinfo.h @@ -15,7 +15,7 @@ * * Copyright (c) 2003-2005, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/getaddrinfo.h,v 1.17 2005/10/15 02:49:41 momjian Exp $ + * $PostgreSQL: pgsql/src/include/getaddrinfo.h,v 1.17.2.1 2005/12/08 17:52:20 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -42,6 +42,10 @@ #define EAI_MEMORY (-10) #define EAI_SYSTEM (-11) #else /* WIN32 */ +#if defined(WIN32_CLIENT_ONLY) +#define WSA_NOT_ENOUGH_MEMORY (WSAENOBUFS) +#define WSATYPE_NOT_FOUND (WSABASEERR+109) +#endif #define EAI_AGAIN WSATRY_AGAIN #define EAI_BADFLAGS WSAEINVAL #define EAI_FAIL WSANO_RECOVERY |