Re: APR 1.0 released - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: APR 1.0 released
Date
Msg-id 200409100232.i8A2WPo09671@candle.pha.pa.us
Whole thread Raw
In response to Re: APR 1.0 released  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: APR 1.0 released  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
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.

Would you look around and see if this can be improved.  I can't see any.

--  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 by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [BUGS] 8.0.0beta1: Ownership of implicit sequences after dump/restore
Next
From: Robert Treat
Date:
Subject: Re: psql questions: SQL, progname, copyright dates