From: | Mikhail Terekhov <terekhov(at)emc(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Re: WIN32 errno patch |
Date: | 2001-08-09 19:08:12 |
Message-ID: | 3B72DF9C.9AB4B9A2@emc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers pgsql-patches |
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 application it is not a plain
variable but call to the _errno() and after #undef errno one will lose
errno completely. For the same reason it is impossible to use something
like 'errno=0;'.
Mikhail Terekhov
Tom Lane wrote:
>
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Any idea where we are on this?
>
> I'm planning to #undef errno around the three routines that need to get
> at plain errno. Not done yet though...
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
From | Date | Subject | |
---|---|---|---|
Next Message | Hiroshi Inoue | 2001-08-09 19:22:24 | pgsql/src include/access/Tag: include/access/R ... |
Previous Message | Peter Eisentraut - PostgreSQL | 2001-08-09 18:28:19 | pgsql/src backend/catalog/heap.c backend/catal ... |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-08-09 19:15:02 | Creating tables with unknown type columns |
Previous Message | Peter Eisentraut | 2001-08-09 18:08:12 | Re: GiST docs |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-08-09 19:40:16 | Re: Re: WIN32 errno patch |
Previous Message | Joe Conway | 2001-08-09 17:13:18 | Re: Random strings |