Re: plperl failure on OS X 10.5(.1)
От | Tom Lane |
---|---|
Тема | Re: plperl failure on OS X 10.5(.1) |
Дата | |
Msg-id | 16534.1195673892@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: plperl failure on OS X 10.5(.1) (Brandon Maust <bmaust@u.washington.edu>) |
Ответы |
Re: plperl failure on OS X 10.5(.1)
|
Список | pgsql-hackers |
Brandon Maust <bmaust@u.washington.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 *** src/pl/plperl/plperl.h.orig Fri Jan 5 17:20:01 2007 --- src/pl/plperl/plperl.h Wed Nov 21 14:31:54 2007 *************** *** 38,43 **** --- 38,48 ---- #define pTHX void #endif + /* perl may have a different width of "bool", don't buy it */ + #ifdef bool + #undef bool + #endif + /* routines from spi_internal.c */ int spi_DEBUG(void); int spi_LOG(void);
В списке pgsql-hackers по дате отправления: