Prevent Perl from introducing a possibly-incompatible definition of type
authorTom Lane <[email protected]>
Thu, 22 Nov 2007 17:47:40 +0000 (17:47 +0000)
committerTom Lane <[email protected]>
Thu, 22 Nov 2007 17:47:40 +0000 (17:47 +0000)
"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
src/pl/plperl/spi_internal.h

index b40a6229aa47bcf3f634f8631ebb0a2cc6728a95..0c5af2c9105b80f77bde364822570960bfdd0342 100644 (file)
 #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
index 4d2c407ee169743ac034a7a90d8d758cbe991388..c4d1aa3f06ab5278c982d46f37689a497ef5825a 100644 (file)
@@ -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);