diff options
Diffstat (limited to 'meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff')
-rw-r--r-- | meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff b/meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff deleted file mode 100644 index 9bdf41b47d..0000000000 --- a/meta/recipes-devtools/perl/perl/debian/fixes/perl-Cnn.diff +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | From 0ecf83f259db09cb38cb37c9b22e72be185afa8f Mon Sep 17 00:00:00 2001 | ||
2 | From: Hugo van der Sanden <hv@crypt.org> | ||
3 | Date: Thu, 11 Jun 2015 12:25:40 +0100 | ||
4 | Subject: fix -Cnn parsing | ||
5 | |||
6 | Commit 22ff313068 for [perl #123814] inadvertently changed the logic when | ||
7 | parsing a numeric parameter to the -C option, such that the successfully | ||
8 | parsed number was not saved as the option value if it parsed to the end | ||
9 | of the argument. | ||
10 | |||
11 | Bug: https://rt.perl.org/Ticket/Display.html?id=125381 | ||
12 | Bug-Debian: https://bugs.debian.org/788636 | ||
13 | Origin: upstream, http://perl5.git.perl.org/perl.git/commit/89d84ff965 | ||
14 | Patch-Name: fixes/perl-Cnn.diff | ||
15 | Upstream-Status: Pending | ||
16 | --- | ||
17 | t/run/switchC.t | 7 ++++++- | ||
18 | util.c | 17 ++++++++--------- | ||
19 | 2 files changed, 14 insertions(+), 10 deletions(-) | ||
20 | |||
21 | diff --git a/t/run/switchC.t b/t/run/switchC.t | ||
22 | index f6aa868..4f63c3b 100644 | ||
23 | --- a/t/run/switchC.t | ||
24 | +++ b/t/run/switchC.t | ||
25 | @@ -11,7 +11,7 @@ BEGIN { | ||
26 | skip_all_if_miniperl('-C and $ENV{PERL_UNICODE} are disabled on miniperl'); | ||
27 | } | ||
28 | |||
29 | -plan(tests => 13); | ||
30 | +plan(tests => 14); | ||
31 | |||
32 | my $r; | ||
33 | |||
34 | @@ -25,6 +25,11 @@ $r = runperl( switches => [ '-CO', '-w' ], | ||
35 | stderr => 1 ); | ||
36 | like( $r, qr/^$b(?:\r?\n)?$/s, '-CO: no warning on UTF-8 output' ); | ||
37 | |||
38 | +$r = runperl( switches => [ '-C2', '-w' ], | ||
39 | + prog => 'print chr(256)', | ||
40 | + stderr => 1 ); | ||
41 | +like( $r, qr/^$b(?:\r?\n)?$/s, '-C2: no warning on UTF-8 output' ); | ||
42 | + | ||
43 | SKIP: { | ||
44 | if (exists $ENV{PERL_UNICODE} && | ||
45 | ($ENV{PERL_UNICODE} eq "" || $ENV{PERL_UNICODE} =~ /[SO]/)) { | ||
46 | diff --git a/util.c b/util.c | ||
47 | index 8cf62f5..ee23314 100644 | ||
48 | --- a/util.c | ||
49 | +++ b/util.c | ||
50 | @@ -4420,16 +4420,15 @@ Perl_parse_unicode_opts(pTHX_ const char **popt) | ||
51 | if (isDIGIT(*p)) { | ||
52 | const char* endptr; | ||
53 | UV uv; | ||
54 | - if (grok_atoUV(p, &uv, &endptr) | ||
55 | - && uv <= U32_MAX | ||
56 | - && (p = endptr) | ||
57 | - && *p && *p != '\n' && *p != '\r' | ||
58 | - ) { | ||
59 | + if (grok_atoUV(p, &uv, &endptr) && uv <= U32_MAX) { | ||
60 | opt = (U32)uv; | ||
61 | - if (isSPACE(*p)) | ||
62 | - goto the_end_of_the_opts_parser; | ||
63 | - else | ||
64 | - Perl_croak(aTHX_ "Unknown Unicode option letter '%c'", *p); | ||
65 | + p = endptr; | ||
66 | + if (p && *p && *p != '\n' && *p != '\r') { | ||
67 | + if (isSPACE(*p)) | ||
68 | + goto the_end_of_the_opts_parser; | ||
69 | + else | ||
70 | + Perl_croak(aTHX_ "Unknown Unicode option letter '%c'", *p); | ||
71 | + } | ||
72 | } | ||
73 | } | ||
74 | else { | ||