As usual i didn't cc the list :)
Magnus
- Original Message -
From: "Magnus Naeslund(f)" <[EMAIL PROTECTED]>
To: "Tom Lane" <[EMAIL PROTECTED]>
Sent: Friday, August 17, 2001 6:55 PM
Subject: Re: [PATCHES] Re: [HACKERS] Re: WIN32 errno patch
Tom Lane wrote:
>
> When someone sends me a Windoze implementation of the proposed
> SOCK_STRERROR() macro, I'll see about fixing it. Till then
> I can't do much.
>
> regards, tom lane
>
Could you please review the following patch for libpq.
I've implemented the SOCK
Tom Lane wrote:
>
> Mikhail Terekhov <[EMAIL PROTECTED]> writes:
> > One can't just #undef errno on windows because it is defined as
> > follows:
>
> I was wondering if Windows might play any games with errno. However,
> we've had at least one instance of "errno = 0;" in the libpq sources
> s
Mikhail Terekhov <[EMAIL PROTECTED]> writes:
> One can't just #undef errno on windows because it is defined as
> follows:
I was wondering if Windows might play any games with errno. However,
we've had at least one instance of "errno = 0;" in the libpq sources
since 7.0 or before, and no one has
One can't just #undef errno on windows because it is defined as follows:
#if defined(_MT) || defined(_DLL)
extern int * __cdecl _errno(void);
#define errno (*_errno())
#else /* ndef _MT && ndef _DLL */
extern int errno;
#endif /* _MT || _DLL */
So when building a dll or a multithreaded ap
Bruce Momjian <[EMAIL PROTECTED]> writes:
> At this point, I am just happy we have this WIN32 errno thing working.
My point is that it isn't "working", it's broken.
> My guess is that we should have two errno's. One the normal errno that
> is the same on Win32 and Unix and a sockerrno that is
> Upon review, I don't think these patches are very good at all.
> #defining errno as WSAGetLastError() is a fairly blunt instrument,
> and it breaks all the places that do actually need to use errno,
> such as PQoidValue, lo_import, lo_export. I'm also concerned that
> PQrequestCancel may need t