Re: APR 1.0 released

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: pgman(at)candle(dot)pha(dot)pa(dot)us
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: APR 1.0 released
Date: 2004-09-10 15:17:33
Message-ID: 200409101517.i8AFHXb17590@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-09-10 15:18:33 Re: APR 1.0 released
Previous Message Grant Finnemore 2004-09-10 15:05:17 Re: Failed assertion, CVS head