Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Vasily <vas.gurevich@gmail.com> Change-Id: I823482163763c38b7113759e65461b3f9e95d74a Conflicts: perl.changes perl.spec Signed-off-by: Carsten Munk <carsten.munk@jollamobile.com>
- Loading branch information
Showing
15 changed files
with
2,046 additions
and
751 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff -up perl-5.14.1/cpan/File-Temp/t/fork.t.off perl-5.14.1/cpan/File-Temp/t/fork.t | ||
--- perl-5.14.1/cpan/File-Temp/t/fork.t.off 2011-04-13 13:36:34.000000000 +0200 | ||
+++ perl-5.14.1/cpan/File-Temp/t/fork.t 2011-06-20 10:29:31.536282611 +0200 | ||
@@ -12,12 +12,8 @@ BEGIN { | ||
$Config::Config{useithreads} and | ||
$Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/ | ||
); | ||
- if ( $can_fork ) { | ||
- print "1..8\n"; | ||
- } else { | ||
- print "1..0 # Skip No fork available\n"; | ||
+ print "1..0 # Skip Koji doesn't work with Perl fork tests\n"; | ||
exit; | ||
- } | ||
} | ||
|
||
use File::Temp; |
13 changes: 13 additions & 0 deletions
13
perl-5.14.2-find2perl-transtate-question-mark-properly.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff -up a/x2p/find2perl.PL b/x2p/find2perl.PL | ||
--- a/x2p/find2perl.PL 2010-12-30 03:07:17.000000000 +0100 | ||
+++ b/x2p/find2perl.PL 2012-05-29 10:18:11.697683643 +0200 | ||
@@ -681,7 +681,8 @@ sub tab () { | ||
sub fileglob_to_re ($) { | ||
my $x = shift; | ||
$x =~ s#([./^\$()+])#\\$1#g; | ||
- $x =~ s#([?*])#.$1#g; | ||
+ $x =~ s#\*#.*#g; | ||
+ $x =~ s#\?#.#g; | ||
"^$x\\z"; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
From 78787052b6a68c0f54cfa983a69c44276de9daa4 Mon Sep 17 00:00:00 2001 | ||
From: Jesse Luehrs <doy@tozt.net> | ||
Date: Tue, 26 Jun 2012 00:13:54 -0500 | ||
Subject: [PATCH] use a less broken test for locale radix in atof [perl #109318] | ||
|
||
--- | ||
lib/locale.t | 33 +++++++++++++++++++++++++++++++++ | ||
numeric.c | 25 +++++++++++++++---------- | ||
2 files changed, 48 insertions(+), 10 deletions(-) | ||
|
||
diff --git a/lib/locale.t b/lib/locale.t | ||
index dfc6d2b..26a7bd4 100644 | ||
--- a/lib/locale.t | ||
+++ b/lib/locale.t | ||
@@ -1247,6 +1247,39 @@ foreach $Locale (@Locale) { | ||
print "# failed $locales_test_number locale '$Locale' characters @f\n" | ||
} | ||
} | ||
+ | ||
+ # [perl #109318] | ||
+ { | ||
+ my @f = (); | ||
+ ++$locales_test_number; | ||
+ $test_names{$locales_test_number} = 'Verify atof with locale radix and negative exponent'; | ||
+ | ||
+ my $radix = POSIX::localeconv()->{decimal_point}; | ||
+ my @nums = ( | ||
+ "3.14e+9", "3${radix}14e+9", "3.14e-9", "3${radix}14e-9", | ||
+ "-3.14e+9", "-3${radix}14e+9", "-3.14e-9", "-3${radix}14e-9", | ||
+ ); | ||
+ | ||
+ if (! $is_utf8_locale) { | ||
+ use locale; | ||
+ for my $num (@nums) { | ||
+ push @f, $num | ||
+ unless sprintf("%g", $num) =~ /3.+14/; | ||
+ } | ||
+ } | ||
+ else { | ||
+ use locale ':not_characters'; | ||
+ for my $num (@nums) { | ||
+ push @f, $num | ||
+ unless sprintf("%g", $num) =~ /3.+14/; | ||
+ } | ||
+ } | ||
+ | ||
+ tryneoalpha($Locale, $locales_test_number, @f == 0); | ||
+ if (@f) { | ||
+ print "# failed $locales_test_number locale '$Locale' numbers @f\n" | ||
+ } | ||
+ } | ||
} | ||
|
||
my $final_locales_test_number = $locales_test_number; | ||
diff --git a/numeric.c b/numeric.c | ||
index be86f3a..3eb8a0e 100644 | ||
--- a/numeric.c | ||
+++ b/numeric.c | ||
@@ -847,17 +847,22 @@ Perl_my_atof(pTHX_ const char* s) | ||
|
||
PERL_ARGS_ASSERT_MY_ATOF; | ||
|
||
- if (PL_numeric_local && IN_SOME_LOCALE_FORM) { | ||
- NV y; | ||
+ if (PL_numeric_local && PL_numeric_radix_sv && IN_SOME_LOCALE_FORM) { | ||
+ char *standard = NULL, *local = NULL; | ||
+ bool use_standard_radix; | ||
|
||
- /* Scan the number twice; once using locale and once without; | ||
- * choose the larger result (in absolute value). */ | ||
- Perl_atof2(s, x); | ||
- SET_NUMERIC_STANDARD(); | ||
- Perl_atof2(s, y); | ||
- SET_NUMERIC_LOCAL(); | ||
- if ((y < 0.0 && y < x) || (y > 0.0 && y > x)) | ||
- return y; | ||
+ standard = strchr(s, '.'); | ||
+ local = strstr(s, SvPV_nolen(PL_numeric_radix_sv)); | ||
+ | ||
+ use_standard_radix = standard && (!local || standard < local); | ||
+ | ||
+ if (use_standard_radix) | ||
+ SET_NUMERIC_STANDARD(); | ||
+ | ||
+ Perl_atof2(s, x); | ||
+ | ||
+ if (use_standard_radix) | ||
+ SET_NUMERIC_LOCAL(); | ||
} | ||
else | ||
Perl_atof2(s, x); | ||
-- | ||
1.7.4.1 | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.