Re: [pcre-dev] [Bug 761] New: Unable to compile PCRE with AI…

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: 761
CC: pcre-dev
Subject: Re: [pcre-dev] [Bug 761] New: Unable to compile PCRE with AIX
On Tue, 16 Sep 2008, Scott MacVicar wrote:

> Unable to compile PCRE with AIX using gcc, probably due to the ifndef check at
> ext/pcre/pcrelib/pcre_internal.h:565:
>
> #ifndef FALSE
> typedef int BOOL;
>
> #define FALSE   0
> #define TRUE    1
> #endif

>
> I supposed FALSE is already defined (but apparently not BOOL), and hence
> compilation fails.


That was a contributed patch; I did wonder about it, but as it worked
for me (on Linux), I left it alone.

> Perhaps two checks instead would fix this? Something like:
>
> #ifndef BOOL
> typedef int BOOL;
> #endif
>
> #ifndef FALSE
> #define FALSE   0
> #define TRUE    1
> #endif


Not quite, since a typedef is not a #define. I suspect that we probably
have to do the typedef int BOOL unconditionally (as it used to be) and
whoever's system gives a compiler warning will just have to live with
it.

Philip

--
Philip Hazel