summaryrefslogtreecommitdiff
path: root/embed.pl
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2003-01-21 01:52:49 +0000
committerhv <hv@crypt.org>2003-01-21 01:52:49 +0000
commitde37762f3a9822aa6b4b8e833f672685d8ce22a5 (patch)
tree3debdf24685cc8b36b1c6d2e6ec3ed126c7b1efd /embed.pl
parent7e8c5daceba7cb185532328a3b67d4ca7ba4811b (diff)
downloadperl-de37762f3a9822aa6b4b8e833f672685d8ce22a5.tar.gz
integrate #18366-18370 from maint-5.8:
Implement the CPP namespace protection from [perl #8610]; unless a function has an 'A' flag, it's defined only if PERL_CORE. (Why do we have so many many functions with an 'A' flag, is another matter.) (The number of #ifdef PERL_COREs could be cut down further by having a state variable and inserting #ifdefs and #endifs when the state flips.) Caught by change #18366; thanks to the re extension we have some functions that are file static but yet part of "the public API"... Maybe a new class of exportability (a new embed.fnc flag) is required for this case. Continue on change #18367; implement the said flag, 'E'. (Some nm output studying was needed to get the right set of re symbols defined.) In AIX (strict symbol exports) the cxinc is needed for List::Util. p4raw-link: @18367 on //depot/maint-5.8/perl: 6f21c313c98cc4764e09fbbce2c8792576c90d7d p4raw-link: @18366 on //depot/maint-5.8/perl: 704f60d9cfa8683df64f005e872b37aea8f9d60e p4raw-id: //depot/perl@18531
Diffstat (limited to 'embed.pl')
-rwxr-xr-xembed.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/embed.pl b/embed.pl
index bec3ca157e..a2a509e964 100755
--- a/embed.pl
+++ b/embed.pl
@@ -340,6 +340,13 @@ walk_table {
$ret .= hide($func,"Perl_$func");
}
}
+ unless ($flags =~ /A/) {
+ if ($flags =~ /E/) {
+ $ret = "#if defined(PERL_CORE) || defined(PERL_EXT)\n$ret#endif\n";
+ } else {
+ $ret = "#ifdef PERL_CORE\n$ret#endif\n";
+ }
+ }
}
$ret;
} \*EM, "";
@@ -393,6 +400,13 @@ walk_table {
$ret .= $alist . ")\n";
}
}
+ unless ($flags =~ /A/) {
+ if ($flags =~ /E/) {
+ $ret = "#if defined(PERL_CORE) || defined(PERL_EXT)\n$ret#endif\n";
+ } else {
+ $ret = "#ifdef PERL_CORE\n$ret#endif\n";
+ }
+ }
}
$ret;
} \*EM, "";