Re: Win32 Error descriptions + config - Mailing list pgsql-patches

From Magnus Naeslund(f)
Subject Re: Win32 Error descriptions + config
Date
Msg-id 035901c1e43c$7f6b6580$020a0a0a@mnd
Whole thread Raw
In response to Win32 Error descriptions + config  ("Magnus Naeslund(f)" <mag@fbab.net>)
List pgsql-patches
From: "Tom Lane" <tgl@sss.pgh.pa.us>
> "Magnus Naeslund(f)" <mag@fbab.net> writes:
> > The DLL load thingy doesn't work on all win9x machines, so i made it go thru a lookup table instead, using the DLL
aslast resort. 
 
> 
> Is Windows really so lame that this information is not available from
> the system?  I do not like having to maintain our own error-message
> list.
> 
> regards, tom lane
> 

Sorry to say, yes.
The thing here is that if you build it on Win2k (as we do with our app(s)) and all is fine there, it will not work on
win9x,returning a "Unknown socket error (0xNUMBER)" message (with our old code) because the DLL thing fails, and that's
MUCHworse.
 
My rationale here is: This list is up-to-date with nt4 and if m$ add anything after that (win2k, XP) the DLL load thing
willcatch that.
 
It's a minor optimization even to just linearly scan the LUT compared to load a DLL (yeah i know it doesn't matter
:)).

It's very common in the Microsoft world that they mess up the first releases of a API, and the after makes it "right",
butthen it's too late.
 
Often you can check the version of the kernel/system but not in this case.
I've looked around quite a lot, and would be a darn happy penguin if anyone could prove me wrong.

Cheers

Magnus Naeslund

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Programmer/Networker [|] Magnus Naeslund
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

pgsql-patches by date:

Previous
From: Michael Loftis
Date:
Subject: Re: ANSI Compliant Inserts
Next
From: Joe Conway
Date:
Subject: Re: contrib/dblink update