Fw: [PATCHES] Re: [HACKERS] Re: WIN32 errno patch

2001-08-17 Thread Magnus Naeslund\(f\)
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

[HACKERS] Re: WIN32 errno patch

2001-08-15 Thread Mikhail Terekhov
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

Re: [HACKERS] Re: WIN32 errno patch

2001-08-09 Thread Mikhail Terekhov
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

Re: [HACKERS] Re: WIN32 errno patch

2001-08-09 Thread Tom Lane
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

Re: [HACKERS] Re: WIN32 errno patch

2001-08-09 Thread Mikhail Terekhov
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

[HACKERS] Re: WIN32 errno patch

2001-07-21 Thread Tom Lane
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

[HACKERS] Re: WIN32 errno patch

2001-07-21 Thread Bruce Momjian
> 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