Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4ebd422

Browse files
committed
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 iswinsock.h.Then, Since MinGW has special environment, this is right. but, it is notfound in VC6.Furthermore, in getaddrinfo.c, IPV6-API is used byLoadLibraryA("ws2_32");Referring to of dll the external memory generates this violation by VC6specification.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 ofVC6.Hiroshi Saito
1 parentf38c3e7 commit4ebd422

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

‎src/bin/pg_config/win32.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ CPP_SBRS=.
5555

5656
LINK32=link.exe
5757
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
58-
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
58+
advapi32.lib shell32.libshfolder.libole32.lib oleaut32.lib uuid.lib odbc32.lib\
5959
odbccp32.lib wsock32.lib /nologo /subsystem:console /incremental:no\
6060
/pdb:"$(OUTDIR)\pg_config.pdb" /machine:I386$(LOPT) /out:"$(OUTDIR)\pg_config.exe"
6161
LINK32_OBJS=\

‎src/include/getaddrinfo.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* Copyright (c) 2003-2005, PostgreSQL Global Development Group
1717
*
18-
* $PostgreSQL: pgsql/src/include/getaddrinfo.h,v 1.17 2005/10/15 02:49:41 momjian Exp $
18+
* $PostgreSQL: pgsql/src/include/getaddrinfo.h,v 1.18 2005/12/08 17:52:11 momjian Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -42,6 +42,10 @@
4242
#defineEAI_MEMORY(-10)
4343
#defineEAI_SYSTEM(-11)
4444
#else/* WIN32 */
45+
#if defined(WIN32_CLIENT_ONLY)
46+
#defineWSA_NOT_ENOUGH_MEMORY (WSAENOBUFS)
47+
#defineWSATYPE_NOT_FOUND (WSABASEERR+109)
48+
#endif
4549
#defineEAI_AGAINWSATRY_AGAIN
4650
#defineEAI_BADFLAGSWSAEINVAL
4751
#defineEAI_FAILWSANO_RECOVERY

‎src/port/getaddrinfo.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Copyright (c) 2003-2005, PostgreSQL Global Development Group
1717
*
1818
* IDENTIFICATION
19-
* $PostgreSQL: pgsql/src/port/getaddrinfo.c,v 1.21 2005/10/15 02:49:51 momjian Exp $
19+
* $PostgreSQL: pgsql/src/port/getaddrinfo.c,v 1.22 2005/12/08 17:52:11 momjian Exp $
2020
*
2121
*-------------------------------------------------------------------------
2222
*/
@@ -40,6 +40,7 @@
4040

4141
#include<windows.h>
4242

43+
#if !defined(WIN32_CLIENT_ONLY)
4344
/*
4445
* The native routines may or may not exist on the Windows platform we are on,
4546
* so we dynamically look up the routines, and call them via function pointers.
@@ -129,6 +130,7 @@ haveNativeWindowsIPv6routines(void)
129130
return (getaddrinfo_ptr!=NULL);
130131
}
131132
#endif
133+
#endif
132134

133135

134136
/*
@@ -149,7 +151,7 @@ getaddrinfo(const char *node, const char *service,
149151
*psin;
150152
structaddrinfohints;
151153

152-
#ifdefWIN32
154+
#if defined(WIN32)&& !defined(WIN32_CLIENT_ONLY)
153155

154156
/*
155157
* If Windows has native IPv6 support, use the native Windows routine.
@@ -272,7 +274,7 @@ freeaddrinfo(struct addrinfo * res)
272274
{
273275
if (res)
274276
{
275-
#ifdefWIN32
277+
#if defined(WIN32)&& !defined(WIN32_CLIENT_ONLY)
276278

277279
/*
278280
* If Windows has native IPv6 support, use the native Windows routine.
@@ -364,7 +366,7 @@ getnameinfo(const struct sockaddr * sa, int salen,
364366
char*node,intnodelen,
365367
char*service,intservicelen,intflags)
366368
{
367-
#ifdefWIN32
369+
#if defined(WIN32)&& !defined(WIN32_CLIENT_ONLY)
368370

369371
/*
370372
* If Windows has native IPv6 support, use the native Windows routine.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp