summaryrefslogtreecommitdiff
path: root/cpan/Time-HiRes
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-04-26 12:18:41 +0200
committerNicholas Clark <nick@ccl4.org>2013-05-03 13:35:15 +0200
commitc7627e6d4346964cad693419f41c942591ebaf35 (patch)
treed065cc489af9e206f6352aa6a089c4824f574c0e /cpan/Time-HiRes
parent4f650b80ec9c5c9641951c5c41c2a5ac37012b7d (diff)
downloadperl-c7627e6d4346964cad693419f41c942591ebaf35.tar.gz
If PERL_NO_INLINE_FUNCTIONS is defined, don't include "inline.h"
This permits test code to include the perl headers for definitions without creating a link dependency on the perl library (which may not exist yet). Some of the static inline functions in inline.h reference functions in the perl object files, and some compilers aren't smart enough to eliminate unused static inline functions, hence including the inline.h in probe code can cause link errors even though the probe code uses none of the functions it declares. When probing, a failed link is taken as meaning that the probed-for function is not present, as the assumption is that the link fails because of it. Hence other causes of link failures cause the probing code to generate incorrect results, and action (and bugs) at a distance.
Diffstat (limited to 'cpan/Time-HiRes')
-rw-r--r--cpan/Time-HiRes/Makefile.PL3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpan/Time-HiRes/Makefile.PL b/cpan/Time-HiRes/Makefile.PL
index 6f6a790077..f27439e800 100644
--- a/cpan/Time-HiRes/Makefile.PL
+++ b/cpan/Time-HiRes/Makefile.PL
@@ -115,7 +115,8 @@ __EOD__
}
}
- my $ccflags = $Config{'ccflags'} . ' ' . "-I$COREincdir";
+ my $ccflags = $Config{'ccflags'} . ' ' . "-I$COREincdir"
+ . ' -DPERL_NO_INLINE_FUNCTIONS';
if ($^O eq 'VMS') {
$cccmd = "$Config{'cc'} /include=($COREincdir) $tmp.c";