Re: plperl failure on OS X 10.5(.1)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brandon Maust <bmaust(at)u(dot)washington(dot)edu>
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:38:12
Message-ID: 16534.1195673892@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Brandon Maust <bmaust(at)u(dot)washington(dot)edu> writes:
> yes, it is sucking it in (via handy.h), at least in 10.5:

> #if 1 /* always on Mac OS X */
> # include <stdbool.h>
> # ifndef HAS_BOOL
> # define HAS_BOOL 1
> # endif
> #endif

Nasty. I'm still surprised that there's no redefinition warning for
"false" and "true", but that's not too important, since the cast to
(bool) isn't really critical. I guess what we need is as attached;
would you try it and see?

How far back should we patch this? Is anyone likely to care about
pre-8.2 plperl on Leopard?

Another thought here is that c.h tries to cater to the possibility
of bool being #define'd by system headers, but if that did actually
happen anywhere then this patch would fail. We'd have pretty serious
problems anyway if bool were not char-size, since pg_type.h hardwires
its size as 1 byte. So I'm a bit tempted to remove the "#ifndef bool"
from c.h, or else make it do "#undef bool". Comments?

regards, tom lane

Attachment Content-Type Size
unknown_filename text/plain 376 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-11-21 20:33:53 Re: Re: pgsql: New versions of mingw have gettimeofday(), so add an autoconf
Previous Message Tom Lane 2007-11-21 19:26:26 Re: plperl failure on OS X 10.5(.1)