Re: Re: WIN32 errno patch

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Re: WIN32 errno patch
Дата
Msg-id 200108091940.f79JeG313168@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Re: WIN32 errno patch  (Mikhail Terekhov <terekhov@emc.com>)
Список pgsql-hackers
Tom has applied these changes to the CVS snapshot.  Can you try it and
let us know.

> 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@candle.pha.pa.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@postgresql.org)
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Creating tables with unknown type columns
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Re: WIN32 errno patch