summaryrefslogtreecommitdiff
path: root/makedef.pl
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafayette.edu>2013-03-27 20:11:34 -0400
committerAndy Dougherty <doughera@lafayette.edu>2013-03-28 16:48:28 -0400
commitcbe4d57f99858fe05f2e924ad9125b9b9e50504e (patch)
tree64a9f235768231ca11080e9bd90358f7d7ffcca4 /makedef.pl
parentb5de49e55f04e3a6c36012d250a46eb301a2be38 (diff)
downloadperl-cbe4d57f99858fe05f2e924ad9125b9b9e50504e.tar.gz
makedef.pl shouldn't prepend Perl_ to symbols already starting with Perl_.
In the next patch, I have Perl_croak_memory_wrap defined in embed.fnc with the 'nroX' flags, since this is a private function used by public macros. I used the long form of the name Perl_croak_memory_wrap everywhere, and used the 'o' flag so that embed.h wouldn't contain a useless #define croak_memory_wrap Perl_croak_memory_wrap. Unfortunately, makedef.pl (used by the Win32 build process) didn't know what to do with that entry and created an entry Perl_Perl_croak_memory_wrap. Changing makedef.pl to use the 'o' flag to decide whether to add the Perl_ prefix resulted in over 50 other symbols changing in the output of makedef.pl. I don't know if the changes are correct or if the 'o' flag is in error on those entries in embed.fnc, but I don't have time to check them all out. This patch just stops makedef.pl from adding a Perl_ prefix if there is already one there.
Diffstat (limited to 'makedef.pl')
-rw-r--r--makedef.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/makedef.pl b/makedef.pl
index 950af858e4..d2c5f5e739 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -755,7 +755,8 @@ if ($define{'USE_PERLIO'}) {
# within the block, as the *first* definition may have flags which
# mean "don't export"
next if $seen{$func}++;
- $func = "Perl_$func" if $flags =~ /[pbX]/;
+ # Should we also skip adding the Perl_ prefix if $flags =~ /o/ ?
+ $func = "Perl_$func" if ($flags =~ /[pbX]/ && $func !~ /^Perl_/);
++$export{$func} unless exists $skip{$func};
}
}