This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add atoi to avoidables.
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 21 Jul 2014 14:53:10 +0000 (10:53 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 23 Jul 2014 01:31:41 +0000 (21:31 -0400)
t/porting/libperl.t

index 7bd2198..cf6dbca 100644 (file)
@@ -482,7 +482,7 @@ for my $symbol (sort keys %expected) {
 # (One exception: for certain floating point outputs
 # the native sprintf is still used in some platforms, see below.)
 #
-# XXX: add atoi() to %unexpected - unsafe and undefined failure modes.
+# atoi has unsafe and undefined failure modes, and is affected by locale.
 #
 
 my %unexpected;
@@ -493,6 +493,7 @@ for my $stdio (qw(gets fgets tmpfile sprintf vsprintf)) {
 for my $str (qw(strcat strcpy strncat strncpy)) {
     $unexpected{$str} = undef; # No Configure symbol for these.
 }
+$unexpected{atoi} = undef; # No Configure symbol for atoi.
 
 for my $symbol (sort keys %unexpected) {
     if (defined $unexpected{$symbol} && !$Config{$unexpected{$symbol}}) {