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

Commitae8a9b8

Browse files
committed
Remove code to lookup WinSock error strings in netmsg.dll; according to
Magnus Hagander that DLL only contains error strings for the Net***functions, *not* WinSock. We need to look for a workable solution forolder Windows flavors ... but it won't happen for PG 7.2.
1 parentacf7aa6 commitae8a9b8

File tree

1 file changed

+6
-28
lines changed

1 file changed

+6
-28
lines changed

‎src/interfaces/libpq/fe-misc.c

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*
2626
*
2727
* IDENTIFICATION
28-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.64 2001/11/28 19:40:29 tgl Exp $
28+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.65 2001/12/03 00:28:24 tgl Exp $
2929
*
3030
*-------------------------------------------------------------------------
3131
*/
@@ -856,18 +856,17 @@ libpq_gettext(const char *msgid)
856856
/*
857857
* strerror replacement for windows:
858858
*
859-
*We don't know a fix for win9x yet, butthis should work for nt4 and win2k.
860-
*If you can verify this working on win9x or have a solution, let usknow, ok?
859+
*This works on WIN2000 and newer, butwe don't know where to find WinSock
860+
*error strings on older Windows flavors. If you know, clue usin.
861861
*/
862862
constchar*
863863
winsock_strerror(inteno)
864864
{
865865
staticcharerr_buf[512];
866-
#defineWSSE_MAXLEN (sizeof(err_buf)-1-13)/* 13 == " (0x00000000)" */
867-
HINSTANCEnetmsgModule;
866+
#defineWSSE_MAXLEN (sizeof(err_buf)-1-13)/* 13 for " (0x00000000)" */
868867
intlength;
869868

870-
/* First try the "system table", this works on Win2kpro */
869+
/* First try the "system table", this works on Win2kand up */
871870

872871
if (FormatMessage(
873872
FORMAT_MESSAGE_IGNORE_INSERTS |FORMAT_MESSAGE_FROM_SYSTEM,
@@ -879,28 +878,7 @@ winsock_strerror(int eno)
879878
NULL))
880879
gotoWSSE_GOODEXIT;
881880

882-
/* That didn't work, let's try the netmsg.dll */
883-
884-
netmsgModule=LoadLibraryEx("netmsg.dll",
885-
NULL,
886-
LOAD_LIBRARY_AS_DATAFILE);
887-
888-
if (netmsgModule!=NULL)
889-
{
890-
if (FormatMessage(
891-
FORMAT_MESSAGE_IGNORE_INSERTS |FORMAT_MESSAGE_FROM_HMODULE,
892-
netmsgModule,
893-
eno,
894-
MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT),
895-
err_buf,
896-
WSSE_MAXLEN,
897-
NULL))
898-
{
899-
FreeLibrary(netmsgModule);
900-
gotoWSSE_GOODEXIT;
901-
}
902-
FreeLibrary(netmsgModule);
903-
}
881+
/* Insert other possible lookup methods here ... */
904882

905883
/* Everything failed, just tell the user that we don't know the desc */
906884

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp