This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
makedef.pl: don't hard-code list of mathoms
authorAaron Crane <arc@cpan.org>
Sun, 7 Dec 2014 15:41:33 +0000 (15:41 +0000)
committerAaron Crane <arc@cpan.org>
Sun, 14 Dec 2014 15:04:38 +0000 (15:04 +0000)
commit075eb5c9b6ef85efb89747446c485e936a61a207
tree1f233b7c52c626423e7cfa5ed52a45cf363d8da4
parent3e8dbc7f06ff46f6041bf3820b4fc57a485a9418
makedef.pl: don't hard-code list of mathoms

It's easy enough to read the list out of mathoms.c directly, and this should
prevent almost all bugs of the sort that were fixed by
083750a56b7927292a4bf7b1bf64aa26dd2a6858. (Only names that don't begin with
"Perl_" will cause a problem.)

The list of names detected automatically may actually differ slightly from
the hard-coded list; for example, the definition of Perl_huge() is inside
"#if defined(HUGE_VAL) || (defined(USE_LONG_DOUBLE) && defined(HUGE_VALL))",
but the new code in makedef.pl ignores preprocessor conditions. However, the
list is used as names to *skip*, rather than to include, so it's not a
problem if makedef.pl is willing to skip names that it will never be asked
to include.
makedef.pl
mathoms.c