[Orca-checkins] r515 - in orca/trunk: . packages/rrdtool-1.0.50/perl-shared
blair at orcaware.com
blair at orcaware.com
Sun Nov 27 23:25:31 PST 2005
Author: blair at orcaware.com
Date: Sun Nov 27 23:25:02 2005
New Revision: 515
Modified:
orca/trunk/configure.in
orca/trunk/packages/rrdtool-1.0.50/perl-shared/RRDs.pm
orca/trunk/packages/rrdtool-1.0.50/perl-shared/RRDs.xs
Log:
Fix a broken compile of the packaged RRDs.pm module on Ubuntu Breezy
Badger with gcc 4.0.2 and bump the module's version number. Without
this fix, the following error occurs:
$ cc -c -I.. -I../src -I../gd1.3 -D_REENTRANT -D_GNU_SOURCE
-DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-DHAVE_CONFIG_H -O2 -DVERSION=\"1.000503\"
-DXS_VERSION=\"1.000503\" -fPIC "-I/usr/lib/perl/5.8/CORE"
-DPERLPATCHLEVEL=8 RRDs.c
In file included from ../src/rrd_tool.h:25,
from RRDs.xs:13:
../src/config_aux.h:8:1: warning: "strchr" redefined
In file included from /usr/include/string.h:417,
from /usr/lib/perl/5.8/CORE/perl.h:731,
from RRDs.xs:6:
/usr/include/bits/string2.h:396:1: warning: this is the location
of the previous definition
In file included from ../src/rrd_tool.h:25,
from RRDs.xs:13:
../src/config_aux.h:80:2: error: #error "Can't compile without
finite function"
../src/config_aux.h:84:2: error: #error "Can't compile without
isinf function"
* configure.in:
Bump RRDs' required version number to 1.000503.
* packages/rrdtool-1.0.50/perl-shared/RRDs.pm:
Bump the RRDs module's version number to 1.000503.
* packages/rrdtool-1.0.50/perl-shared/RRDs.xs:
Fix the compilation problem by explicitly including rrdtool's
config.h using a relative path.
Modified: orca/trunk/configure.in
==============================================================================
--- orca/trunk/configure.in (original)
+++ orca/trunk/configure.in Sun Nov 27 23:25:02 2005
@@ -36,7 +36,7 @@
MATH_INTERVALSEARCH_DIR=Math-Interpolate-1.05
MATH_INTERVALSEARCH_VER=1.05
RRDTOOL_DIR=rrdtool-1.0.50
-RRDTOOL_VER=1.000502
+RRDTOOL_VER=1.000503
STORABLE_DIR=Storable-2.15
STORABLE_VER=2.15
TIME_HIRES_DIR=Time-HiRes-1.73
Modified: orca/trunk/packages/rrdtool-1.0.50/perl-shared/RRDs.pm
==============================================================================
--- orca/trunk/packages/rrdtool-1.0.50/perl-shared/RRDs.pm (original)
+++ orca/trunk/packages/rrdtool-1.0.50/perl-shared/RRDs.pm Sun Nov 27 23:25:02 2005
@@ -7,7 +7,7 @@
require DynaLoader;
-$VERSION = 1.000502;
+$VERSION = 1.000503;
bootstrap RRDs $VERSION;
Modified: orca/trunk/packages/rrdtool-1.0.50/perl-shared/RRDs.xs
==============================================================================
--- orca/trunk/packages/rrdtool-1.0.50/perl-shared/RRDs.xs (original)
+++ orca/trunk/packages/rrdtool-1.0.50/perl-shared/RRDs.xs Sun Nov 27 23:25:02 2005
@@ -10,8 +10,28 @@
}
#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
#define PL_sv_undef sv_undef
More information about the Orca-checkins
mailing list