]> granicus.if.org Git - postgresql/commitdiff
Prevent Perl from introducing a possibly-incompatible definition of type
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 22 Nov 2007 17:47:28 +0000 (17:47 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 22 Nov 2007 17:47:28 +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.h

index 27929fea3c9847451a4dadc82f58a536edf2896c..7d1d26281ec82ea51cadc8d1cd1c43349072c17c 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
  * Portions Copyright (c) 1995, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/pl/plperl/plperl.h,v 1.6 2007/01/05 22:20:01 momjian Exp $
+ * $PostgreSQL: pgsql/src/pl/plperl/plperl.h,v 1.7 2007/11/22 17:47:28 tgl Exp $
  */
 
 #ifndef PL_PERL_H
 #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);