mirror of
https://github.com/postgres/postgres.git
synced 2025-08-31 17:02:12 +03:00
> Ok, where's a "system dependent hack" :)
> It seems that win9x doesn't have the "netmsg.dll" so it defaults to "normal" > FormatMessage. > I wonder if one could load wsock32.dll or winsock.dll on those systems > instead of netmsg.dll. > > Mikhail, could you please test this code on your nt4 system? > Could someone else test this code on a win98/95 system? > > It works on win2k over here. It works on win2k here too but not on win98/95 or winNT. Anyway, attached is the patch which uses Magnus's my_sock_strerror function (renamed to winsock_strerror). The only difference is that I put the code to load and unload netmsg.dll in the libpqdll.c (is this OK Magnus?). Mikhail Terekhov
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <winsock.h>
|
||||
#include "win32.h"
|
||||
|
||||
BOOL WINAPI
|
||||
DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
|
||||
@@ -20,8 +21,13 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
|
||||
*/
|
||||
return FALSE;
|
||||
}
|
||||
if (netmsgModule == NULL){
|
||||
netmsgModule=LoadLibraryEx("netmsg.dll",NULL,LOAD_LIBRARY_AS_DATAFILE);
|
||||
}
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
if (netmsgModule != NULL)
|
||||
FreeLibrary(netmsgModule);
|
||||
WSACleanup();
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user