Re: APR 1.0 released
От | Bruce Momjian |
---|---|
Тема | Re: APR 1.0 released |
Дата | |
Msg-id | 200409101517.i8AFHXb17590@candle.pha.pa.us обсуждение исходный текст |
Ответ на | APR 1.0 released (Gaetano Mendola <mendola@bigfoot.com>) |
Ответы |
Re: APR 1.0 released
|
Список | pgsql-hackers |
pgman wrote: > Andrew Dunstan wrote: > > >>I think Bruce was mostly trying to make all the similar tests look > > >>alike. Also I agree that "if a && !b" is clearer than "if !b && a"; > > >>the latter requires a bit more thought to parse the extent of the ! > > >>operator... > > >> > > >> > > > > > >Right, just consistency. > > > > > > > > > > > > Ok. I understand now. > > > > I'm not sure exactly what Bruce checked, so I just spent a few cycles > > making sure that we did not inadvertantly pick up a define of WIN32 from > > windows.h anywhere else. I *think* we are OK on that. However, ISTM this > > is a foot just waiting to be shot - in retrospect using WIN32 as our > > marker for native Windows, which we do in a great many places (around > > 300 by my count) was a less than stellar choice, given that it is > > defined by windows.h, and especially since we use that header for Cygwin > > as well as for Windows native in a few places. > > The use of WIN32 was because it usually does mean MinGW and Cygwin. We > had lots of Cygwin-specific defines in there already so Win32 just means > both Mingw and Cygwin. You will see only a few cases where we want > Mingw and not Cygwin, but in those case we often also want MSVC and > Borland, so it really is WIN32 && ! __CYGWIN__. We do have one or two > tests for __MINGW32__ where we really do want just that. OK, I am wrong above. Coding assumes WIN32 is only for port named WIN32, which is mingw, and for BCC and VCC. I was not aware Cygwin defined it at all. Are we sure it does in a header file? I wonder if we should just call the port mingw and change the proper defines to __MINGW__. We would then create a define called WIN32_NATIVE that is defined for __MINGW__, BVC and VCC. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania19073
В списке pgsql-hackers по дате отправления: