summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-08-20 13:35:09 +0200
committerNicholas Clark <nick@ccl4.org>2011-08-22 15:08:50 +0200
commitf526348b03790a912fff80ad5e71b95decfac116 (patch)
treec2b706052f035e036706358f5ed55a9656c7c4fa
parente18249a59ddbc899823227d1eaead27682016237 (diff)
downloadperl-f526348b03790a912fff80ad5e71b95decfac116.tar.gz
In makedef.pl, no longer any need to duplicate logic from perl.hsmoke-me/makedef0
PL_OP_SLAB_ALLOC, MULTIPLICITY, PERL_IMPLICIT_CONTEXT and USE_REENTRANT_API are all now correctly picked up from Config::bincompat_options(). This also removes a really subtle bug in the diagnostics, present since the logic duplication was introduced in 18c4b137c9980e71 - this code: $define{PERL_IMPLICIT_CONTEXT} ||= $define{USE_ITHREADS} || $define{MULTIPLICITY} ; will always add a key for PERL_IMPLICIT_CONTEXT in %define, hence the later use of keys %define for output to STDERR previously always used to report PERL_IMPLICIT_CONTEXT, even though the value was (usually) undef. The code later in makedef.pl uses a truth test, so is not affected by this bug.
-rw-r--r--makedef.pl22
-rw-r--r--perl.h6
2 files changed, 0 insertions, 28 deletions
diff --git a/makedef.pl b/makedef.pl
index a4b5ced556..384eab35c5 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -114,28 +114,6 @@ while (<CFG>) {
}
close(CFG);
-# perl.h logic duplication begins
-
-if ($define{PERL_IMPLICIT_SYS}) {
- $define{PL_OP_SLAB_ALLOC} = 1;
-}
-
-if ($define{USE_ITHREADS}) {
- if (!$define{MULTIPLICITY}) {
- $define{MULTIPLICITY} = 1;
- }
-}
-
-$define{PERL_IMPLICIT_CONTEXT} ||=
- $define{USE_ITHREADS} ||
- $define{MULTIPLICITY} ;
-
-if ($define{USE_ITHREADS} && $ARGS{PLATFORM} ne 'win32' && $^O ne 'darwin') {
- $define{USE_REENTRANT_API} = 1;
-}
-
-# perl.h logic duplication ends
-
print STDERR "Defines: (" . join(' ', sort keys %define) . ")\n";
my $sym_ord = 0;
diff --git a/perl.h b/perl.h
index 200e416dbd..2dae428bcd 100644
--- a/perl.h
+++ b/perl.h
@@ -44,10 +44,6 @@
/* See L<perlguts/"The Perl API"> for detailed notes on
* PERL_IMPLICIT_CONTEXT and PERL_IMPLICIT_SYS */
-/* Note that from here --> to <-- the same logic is
- * repeated in makedef.pl, so be certain to update
- * both places when editing. */
-
#ifdef PERL_IMPLICIT_SYS
/* PERL_IMPLICIT_SYS implies PerlMemShared != PerlMem
so use slab allocator to avoid lots of MUTEX overhead
@@ -114,8 +110,6 @@
# define USE_REENTRANT_API
#endif
-/* <--- here ends the logic shared by perl.h and makedef.pl */
-
/*
* PERL_DARWIN for MacOSX (__APPLE__ exists but is not officially sanctioned)
* (The -DPERL_DARWIN comes from the hints/darwin.sh.)