[pcre-dev] [Bug 761] Unable to compile PCRE with AIX

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 761] Unable to compile PCRE with AIX
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=761




--- Comment #1 from Philip Hazel <ph10@???> 2008-09-16 13:59:18 ---
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


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email