Re: Win32 Error descriptions + config

From: "Magnus Naeslund(f)" <mag(at)fbab(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Win32 Error descriptions + config
Date: 2002-04-15 05:15:02
Message-ID: 035901c1e43c$7f6b6580$020a0a0a@mnd
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> "Magnus Naeslund(f)" <mag(at)fbab(dot)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 as last 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 MUCH worse.
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 will catch 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", but then 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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2002-04-15 05:18:13 Re: contrib/dblink update
Previous Message Michael Loftis 2002-04-15 05:12:36 Re: ANSI Compliant Inserts