summaryrefslogtreecommitdiff
path: root/makedef.pl
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-05-10 22:01:30 -0600
committerKarl Williamson <khw@cpan.org>2016-05-12 20:19:59 -0600
commit3f1866a8f6c7a9d70d0c8bb1b4f20d2db63756f1 (patch)
tree112311440160a302ebddadd85a8b3745e8cc94e9 /makedef.pl
parent1f207a974e82d7673df119f7fe72a576a69db068 (diff)
downloadperl-3f1866a8f6c7a9d70d0c8bb1b4f20d2db63756f1.tar.gz
embed.fnc: Alter 'b' flag meaning
This commit changes this flag to mean that the backward compatibility functions are compiled unless the -DNO_MATHOMS cflag is specified to Configure. Previously the meaning was sort of like that but not precisely. Doing this means that the prototypes that needed to be manually added to mathoms.c are no longer needed. No special parameter assertions have to be made. makedef.pl no longer needs to parse mathoms.c and have special cases for it. And several special case entries in embed.fnc can be non-special cased.
Diffstat (limited to 'makedef.pl')
-rw-r--r--makedef.pl19
1 files changed, 3 insertions, 16 deletions
diff --git a/makedef.pl b/makedef.pl
index 84b439efd0..956914e7ed 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -437,21 +437,6 @@ unless ($define{'USE_DTRACE'}) {
);
}
-if ($define{'NO_MATHOMS'}) {
- # win32 builds happen in the win32/ subdirectory, but vms builds happen
- # at the top level, so we need to look in two candidate locations for
- # the mathoms.c file.
- my ($file) = grep { -f } qw( mathoms.c ../mathoms.c )
- or die "No mathoms.c file found in . or ..\n";
- open my $mathoms, '<', $file
- or die "Cannot open $file: $!\n";
- while (<$mathoms>) {
- ++$skip{$1} if /\A ( NATIVE_TO_NEED
- | ASCII_TO_NEED
- | Perl_\w+ ) \s* \( /axms;
- }
-}
-
unless ($define{'PERL_NEED_APPCTX'}) {
++$skip{PL_appctx};
}
@@ -692,7 +677,9 @@ unless ($define{'USE_QUADMATH'}) {
foreach (@$embed) {
my ($flags, $retval, $func, @args) = @$_;
next unless $func;
- if ($flags =~ /[AX]/ && $flags !~ /[xmi]/ || $flags =~ /b/) {
+ if ( ($flags =~ /[AX]/ && $flags !~ /[xmi]/)
+ || ($flags =~ /b/ && ! $define{'NO_MATHOMS'}))
+ {
# public API, so export
# If a function is defined twice, for example before and after