From: | Brandon Maust <bmaust(at)u(dot)washington(dot)edu> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: plperl failure on OS X 10.5(.1) |
Date: | 2007-11-21 19:23:39 |
Message-ID: | 36E3A00F-9957-4309-8CF2-94A55D3A2075@u.washington.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 21 Nov, 2007, at 10:50 , Tom Lane wrote:
> Brandon Maust <bmaust(at)u(dot)washington(dot)edu> writes:
>> On 21 Nov, 2007, at 08:39 , Tom Lane wrote:
>>> Seems the question is not so much about OS X as it is about what
>>> perl you're using ...
>
>> it's 5.8.8, as provided by apple (same for gcc, etc):
>
>> perl on OS X does look to be constitutively defining a 'bool' as
>> _Bool
>> via gcc's stdbool.h, so perhaps this is more of a compiler issue?
>
> No, because I see the identical content in stdbool.h on OS X 10.4
> (perl 5.8.6) and it is not causing a problem here. Apparently 5.8.8
> is sucking stdbool.h into the compile where 5.8.6 did not. Can you
> track down just what the inclusion path is?
yes, it is sucking it in (via handy.h), at least in 10.5:
/* XXX Configure ought to have a test for a boolean type, if I can
just figure out all the headers such a test needs.
Andy Dougherty August 1996
*/
/* bool is built-in for g++-2.6.3 and later, which might be used
for extensions. <_G_config.h> defines _G_HAVE_BOOL, but we can't
be sure _G_config.h will be included before this file. _G_config.h
also defines _G_HAVE_BOOL for both gcc and g++, but only g++
actually has bool. Hence, _G_HAVE_BOOL is pretty useless for us.
g++ can be identified by __GNUG__.
Andy Dougherty February 2000
*/
#if 1 /* always on Mac OS X */
# include <stdbool.h>
# ifndef HAS_BOOL
# define HAS_BOOL 1
# endif
#endif
> I'm tempted to fix this with
>
> #ifdef bool
> #undef bool
> #endif
>
> in plperl.h after pulling in the Perl headers. However, it's not
> clear
> to me why you aren't seeing warnings about "false" and "true" getting
> redefined, if stdbool.h is really getting included.
>
> For reference, the interesting part of stdbool.h on 10.4 looks like
>
> #define false 0
> #define true 1
>
> #define bool _Bool
> #if __STDC_VERSION__ < 199901L && __GNUC__ < 3
> typedef int _Bool;
> #endif
>
> Since this is gcc 3, I suppose that the typedef isn't being used here
> but must get supplied internally by the compiler...
stdbool.h looks the same in 10.5.
--
Brandon
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-11-21 19:26:26 | Re: plperl failure on OS X 10.5(.1) |
Previous Message | Guillaume Smet | 2007-11-21 19:04:29 | 8.3devel slower than 8.2 under read-only load |