summaryrefslogtreecommitdiff
path: root/configpm
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2017-10-23 17:22:34 +0100
committerAaron Crane <arc@cpan.org>2017-10-23 17:22:34 +0100
commit6c2ae6421675ba5ff81dd43f9167136f02dfe9d9 (patch)
treec21162b897f98f3bbc15814d0dee1cd620e9ca3d /configpm
parent0f00948681dc0ceca5f81f143dec277c5a598141 (diff)
downloadperl-6c2ae6421675ba5ff81dd43f9167136f02dfe9d9.tar.gz
RT#132347: fix building Tk
The Tk distribution has its own portability layer that expects to find certain settings in %Config, as well as some cpp symbols defined in perl.h. The recent Perl changes to require a C89 compiler caused some of the metaconfig units defining those %Config settings and cpp symbols to be omitted. This commit restores compatibility with Tk, by ensuring that the things it wants are available even though they are no longer provided by metaconfig.
Diffstat (limited to 'configpm')
-rwxr-xr-xconfigpm15
1 files changed, 14 insertions, 1 deletions
diff --git a/configpm b/configpm
index 09b9e67aab..ebbaaa9b44 100755
--- a/configpm
+++ b/configpm
@@ -212,6 +212,19 @@ my $in_v = 0;
my %Data = ();
my $quote;
+# These variables were set in older versions of Perl, but are no longer needed
+# by the core. However, some CPAN modules may rely on them; in particular, Tk
+# (at least up to version 804.034) fails to build without them. We force them
+# to be emitted to Config_heavy.pl for backcompat with such modules (and we may
+# find that this set needs to be extended in future). See RT#132347.
+my @v_forced = map "$_\n", split /\n+/, <<'EOT';
+i_limits='define'
+i_stdlib='define'
+i_string='define'
+i_time='define'
+prototype='define'
+EOT
+
my %seen_quotes;
{
@@ -567,7 +580,7 @@ $heavy_txt .= join('',
map {
/^([^=]+)/ ? [ $1, $_ ]
: [ $_, $_ ] # shouldnt happen
- } @v_others
+ } @v_others, @v_forced
) . "!END!\n";
# Only need the dynamic byteorder code in Config.pm if 'byteorder' is one of