From 3f1866a8f6c7a9d70d0c8bb1b4f20d2db63756f1 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Tue, 10 May 2016 22:01:30 -0600 Subject: 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. --- makedef.pl | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'makedef.pl') 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 -- cgit v1.2.1