From a7e156c4dc415c211d234a814ec00e7e9eece11b Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 22 Nov 2007 17:47:46 +0000 Subject: [PATCH] Prevent Perl from introducing a possibly-incompatible definition of type "bool" into plperl.c. This has always been a hazard since Perl allows a platform-specific choice to define bool as int rather than char, but evidently this didn't happen on any platform we support ... until OS X 10.5. Per report from Brandon Maust. Back-patch as far as 8.0 --- a bit arbitrary, but it seems unlikely anyone will be trying to port 7.x onto new platforms. --- src/pl/plperl/plperl.c | 5 +++++ src/pl/plperl/spi_internal.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index 5a978a8178..404e806327 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -70,6 +70,11 @@ #define pTHX void #endif +/* perl may have a different width of "bool", don't buy it */ +#ifdef bool +#undef bool +#endif + /********************************************************************** * The information we cache about loaded procedures diff --git a/src/pl/plperl/spi_internal.h b/src/pl/plperl/spi_internal.h index b66f43eb2e..628b4143fc 100644 --- a/src/pl/plperl/spi_internal.h +++ b/src/pl/plperl/spi_internal.h @@ -3,6 +3,11 @@ #include "XSUB.h" #include "ppport.h" +/* perl may have a different width of "bool", don't buy it */ +#ifdef bool +#undef bool +#endif + int spi_DEBUG(void); int spi_LOG(void); -- 2.39.5