summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 70796e7)
raw | patch | inline | side by side (parent: 70796e7)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 15 Jan 2006 13:31:12 +0000 (13:31 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 15 Jan 2006 13:31:12 +0000 (13:31 +0000) |
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@748 a5681a0c-68f1-0310-ab6d-d61299d08faa
bindings/perl-shared/RRDs.xs | patch | blob | history |
index f7e5360fe536b8a9bbe4faa1a316d1b1f260285e..76f86b8a1815314cbf8710175ece6e119b790d57 100644 (file)
}
#endif
+/*
+ * rrd_tool.h includes config.h, but at least on Ubuntu Breezy Badger
+ * 5.10 with gcc 4.0.2, the C preprocessor picks up Perl's config.h
+ * which is included from the Perl includes and never reads rrdtool's
+ * config.h. Without including rrdtool's config.h, this module does
+ * not compile, so include it here with an explicit path.
+ *
+ * Because rrdtool's config.h redefines VERSION which is originally
+ * set via Perl's Makefile.PL and passed down to the C compiler's
+ * command line, save the original value and reset it after the
+ * includes.
+ */
+#define VERSION_SAVED VERSION
+#undef VERSION
+#include "../../config.h"
#include "../../src/rrd_tool.h"
+#undef VERSION
+#define VERSION VERSION_SAVED
+#undef VERSION_SAVED
/* perl 5.004 compatibility */
#if PERLPATCHLEVEL < 5