Hello community, here is the log from the commit of package perl-version for openSUSE:Factory checked in at 2018-04-25 10:01:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-version (Old) and /work/SRC/openSUSE:Factory/.perl-version.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-version" Wed Apr 25 10:01:25 2018 rev:10 rq:599897 version:0.9924 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-version/perl-version.changes 2017-04-29 10:52:53.797548186 +0200 +++ /work/SRC/openSUSE:Factory/.perl-version.new/perl-version.changes 2018-04-25 10:01:29.926518740 +0200 @@ -1,0 +2,35 @@ +Sat Apr 21 06:09:08 UTC 2018 - co...@suse.com + +- updated to 0.9924 + see /usr/share/doc/packages/perl-version/CHANGES + +------------------------------------------------------------------- +Thu Apr 12 06:13:27 UTC 2018 - co...@suse.com + +- updated to 0.9921 + see /usr/share/doc/packages/perl-version/CHANGES + + 0.9921 - 2018-04-11 + * Silence overly compulsive GCC 7 warning + https://rt.cpan.org/Ticket/Display.html?id=123477 + + * Improve docs regarding trailing zeros + https://rt.cpan.org/Ticket/Display.html?id=122858 + +------------------------------------------------------------------- +Mon Apr 9 06:09:59 UTC 2018 - co...@suse.com + +- updated to 0.9920 + see /usr/share/doc/packages/perl-version/CHANGES + + 0.9920 - 2018-04-08 + + * Backwards compatible locale handling + https://rt.cpan.org/Ticket/Display.html?id=125042 + + 0.9919 - 2018-04-08 + + * Core improvements to locale handling + https://rt.cpan.org/Ticket/Display.html?id=124563 + +------------------------------------------------------------------- Old: ---- version-0.9918.tar.gz New: ---- version-0.9924.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-version.spec ++++++ --- /var/tmp/diff_new_pack.bjtSDu/_old 2018-04-25 10:01:31.018478677 +0200 +++ /var/tmp/diff_new_pack.bjtSDu/_new 2018-04-25 10:01:31.038477943 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-version # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,11 +17,11 @@ Name: perl-version -Version: 0.9918 +Version: 0.9924 Release: 0 %define cpan_name version Summary: Perl extension for Version Objects -License: Artistic-1.0 or GPL-1.0+ +License: Artistic-1.0 OR GPL-1.0-or-later Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/version/ Source0: https://cpan.metacpan.org/authors/id/J/JP/JPEACOCK/%{cpan_name}-%{version}.tar.gz ++++++ version-0.9918.tar.gz -> version-0.9924.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/CHANGES new/version-0.9924/CHANGES --- old/version-0.9918/CHANGES 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/CHANGES 2018-04-20 01:46:32.000000000 +0200 @@ -2,7 +2,35 @@ This is not a complete list of changes. See repository for full details: - https://bitbucket.org/jpeacock/version (primary) + https://github.com/JohnPeacock/version.pm.git + +0.9924 - 2018-04-19 + * Revise CPAN metadata to advertise correct repo + Patch from Ed <ej...@hotmail.com> + +0.9923 - 2018-04-15 + * Add back spaces for picky C++ compilers + Patch from Karl Williamson <k...@cpan.org> + +0.9922 - 2018-04-12 + * Switch master repo to github + +0.9921 - 2018-04-11 + * Silence overly compulsive GCC 7 warning + https://rt.cpan.org/Ticket/Display.html?id=123477 + + * Improve docs regarding trailing zeros + https://rt.cpan.org/Ticket/Display.html?id=122858 + +0.9920 - 2018-04-08 + + * Backwards compatible locale handling + https://rt.cpan.org/Ticket/Display.html?id=125042 + +0.9919 - 2018-04-08 + + * Core improvements to locale handling + https://rt.cpan.org/Ticket/Display.html?id=124563 0.9918 - 2017-04-15 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/MANIFEST.SKIP new/version-0.9924/MANIFEST.SKIP --- old/version-0.9918/MANIFEST.SKIP 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/MANIFEST.SKIP 2018-04-13 15:59:53.000000000 +0200 @@ -4,7 +4,7 @@ .+\.bak .+~ .+\.orig -.hg +.git .shipit tags Makefile$ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/META.json new/version-0.9924/META.json --- old/version-0.9918/META.json 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/META.json 2018-04-20 01:47:44.000000000 +0200 @@ -4,7 +4,7 @@ "John Peacock <jpeac...@cpan.org>" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150010", + "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -53,10 +53,11 @@ "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=version" }, "repository" : { - "type" : "hg", - "url" : "https://bitbucket.org/jpeacock/version" + "type" : "git", + "url" : "git://github.com/JohnPeacock/version.pm.git", + "web" : "http://github.com/JohnPeacock/version.pm" } }, - "version" : "0.9918", - "x_serialization_backend" : "JSON::PP version 2.27300" + "version" : "0.9924", + "x_serialization_backend" : "JSON::PP version 2.27400_02" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/META.yml new/version-0.9924/META.yml --- old/version-0.9918/META.yml 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/META.yml 2018-04-20 01:47:44.000000000 +0200 @@ -10,7 +10,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150010' +generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -26,6 +26,6 @@ perl: '5.006002' resources: bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=version - repository: https://bitbucket.org/jpeacock/version -version: '0.9918' + repository: git://github.com/JohnPeacock/version.pm.git +version: '0.9924' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/Makefile.PL new/version-0.9924/Makefile.PL --- old/version-0.9918/Makefile.PL 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/Makefile.PL 2018-04-20 01:47:41.000000000 +0200 @@ -16,7 +16,8 @@ EOL } -use vars qw ($no_xs $force_xs); +my ($no_xs, $force_xs); + unlink 'pm_to_blib'; # belts and braces if ($ENV{PERL_ONLY}) { @@ -51,7 +52,7 @@ 'parent' => 0.221, ); - WriteMakefile( VERSION => '0.9918', + WriteMakefile( VERSION => '0.9924', NAME => 'version', LICENSE => 'perl', MIN_PERL_VERSION=> 5.006002, @@ -94,8 +95,9 @@ "meta-spec" => { version => 2 }, resources => { repository => { - type => 'hg', - url => 'https://bitbucket.org/jpeacock/version' + type => 'git', + url => 'git://github.com/JohnPeacock/version.pm.git', + web => 'http://github.com/JohnPeacock/version.pm', }, bugtracker => { web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=version', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/README new/version-0.9924/README --- old/version-0.9918/README 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/README 2018-04-20 01:46:32.000000000 +0200 @@ -1,4 +1,4 @@ -version 0.9918 +version 0.9924 ================================== Object oriented versions for all Perl releases from 5.6.2 onward. Replaces @@ -6,10 +6,9 @@ Although this code has been fully integrated into the latest Perl release itself (e.g. bleadperl), the CPAN release is considered upstream. The source -code itself is available from two mirrors: +code itself is available from: - https://bitbucket.org/jpeacock/version (primary) - https://github.com/JohnPeacock/version.git (secondary) + https://github.com/JohnPeacock/version.pm.git and a bug queue here: @@ -55,5 +54,5 @@ This module can be distributed under the same terms as Perl. -Copyright (C) 2004-2017 John Peacock +Copyright (C) 2004-2018 John Peacock diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/lib/version/regex.pm new/version-0.9924/lib/version/regex.pm --- old/version-0.9918/lib/version/regex.pm 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/lib/version/regex.pm 2018-04-20 01:46:32.000000000 +0200 @@ -2,13 +2,7 @@ use strict; -use vars qw( - $VERSION $CLASS $STRICT $LAX - $STRICT_DECIMAL_VERSION $STRICT_DOTTED_DECIMAL_VERSION - $LAX_DECIMAL_VERSION $LAX_DOTTED_DECIMAL_VERSION -); - -$VERSION = 0.9918; +our $VERSION = 0.9924; #--------------------------------------------------------------------------# # Version regexp components @@ -61,19 +55,19 @@ # Strict decimal version number. -$STRICT_DECIMAL_VERSION = +our $STRICT_DECIMAL_VERSION = qr/ $STRICT_INTEGER_PART $FRACTION_PART? /x; # Strict dotted-decimal version number. Must have both leading "v" and # at least three parts, to avoid confusion with decimal syntax. -$STRICT_DOTTED_DECIMAL_VERSION = +our $STRICT_DOTTED_DECIMAL_VERSION = qr/ v $STRICT_INTEGER_PART $STRICT_DOTTED_DECIMAL_PART{2,} /x; # Complete strict version number syntax -- should generally be used # anchored: qr/ \A $STRICT \z /x -$STRICT = +our $STRICT = qr/ $STRICT_DECIMAL_VERSION | $STRICT_DOTTED_DECIMAL_VERSION /x; #--------------------------------------------------------------------------# @@ -84,7 +78,7 @@ # allowing an alpha suffix or allowing a leading or trailing # decimal-point -$LAX_DECIMAL_VERSION = +our $LAX_DECIMAL_VERSION = qr/ $LAX_INTEGER_PART (?: $FRACTION_PART | \. )? $LAX_ALPHA_PART? | $FRACTION_PART $LAX_ALPHA_PART? @@ -96,7 +90,7 @@ # enough, without the leading "v", Perl takes .1.2 to mean v0.1.2, # so when there is no "v", the leading part is optional -$LAX_DOTTED_DECIMAL_VERSION = +our $LAX_DOTTED_DECIMAL_VERSION = qr/ v $LAX_INTEGER_PART (?: $LAX_DOTTED_DECIMAL_PART+ $LAX_ALPHA_PART? )? | @@ -109,7 +103,7 @@ # The string 'undef' is a special case to make for easier handling # of return values from ExtUtils::MM->parse_version -$LAX = +our $LAX = qr/ undef | $LAX_DOTTED_DECIMAL_VERSION | $LAX_DECIMAL_VERSION /x; #--------------------------------------------------------------------------# diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/lib/version.pm new/version-0.9924/lib/version.pm --- old/version-0.9918/lib/version.pm 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/lib/version.pm 2018-04-20 01:46:32.000000000 +0200 @@ -8,10 +8,9 @@ warnings::register_categories(qw/version/); } -use vars qw(@ISA $VERSION $CLASS $STRICT $LAX *declare *qv); - -$VERSION = 0.9918; -$CLASS = 'version'; +our $VERSION = 0.9924; +our $CLASS = 'version'; +our (@ISA, $STRICT, $LAX); # !!!!Delete this next block completely when adding to Perl core!!!! { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/lib/version.pod new/version-0.9924/lib/version.pod --- old/version-0.9918/lib/version.pod 2017-04-15 18:55:28.000000000 +0200 +++ new/version-0.9924/lib/version.pod 2018-04-12 02:09:09.000000000 +0200 @@ -266,10 +266,9 @@ =head2 numify() -Returns a value representing the object in a pure decimal form without -trailing zeroes. +Returns a value representing the object in a pure decimal. - version->declare('v1.2')->numify; # 1.002 + version->declare('v1.2')->numify; # 1.002000 version->parse('1.2')->numify; # 1.200 =head2 stringify() @@ -280,7 +279,7 @@ a version object is interpolated into a string. version->declare('v1.2')->stringify; # v1.2 - version->parse('1.200')->stringify; # 1.200 + version->parse('1.200')->stringify; # 1.2 version->parse(1.02_30)->stringify; # 1.023 =head1 EXPORTED FUNCTIONS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/t/00impl-pp.t new/version-0.9924/t/00impl-pp.t --- old/version-0.9918/t/00impl-pp.t 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/t/00impl-pp.t 2018-04-20 01:46:32.000000000 +0200 @@ -14,7 +14,7 @@ ) ); require $coretests; - use_ok('version::vpp', 0.9918); + use_ok('version::vpp', 0.9924); } BaseTests("version::vpp","new","qv"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/t/01base.t new/version-0.9924/t/01base.t --- old/version-0.9918/t/01base.t 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/t/01base.t 2018-04-20 01:46:32.000000000 +0200 @@ -14,7 +14,7 @@ ) ); require $coretests; - use_ok('version', 0.9918); + use_ok('version', 0.9924); } BaseTests("version","new","qv"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/t/02derived.t new/version-0.9924/t/02derived.t --- old/version-0.9918/t/02derived.t 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/t/02derived.t 2018-04-20 01:46:32.000000000 +0200 @@ -15,7 +15,7 @@ ) ); require $coretests; - use_ok("version", 0.9918); + use_ok("version", 0.9924); # If we made it this far, we are ok. } @@ -51,8 +51,7 @@ # This is an empty subclass package $package; use parent 'version'; -use vars '\$VERSION'; -\$VERSION=0.001; +our \$VERSION = 0.001; EOF close $fh; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/t/03require.t new/version-0.9924/t/03require.t --- old/version-0.9918/t/03require.t 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/t/03require.t 2018-04-20 01:46:32.000000000 +0200 @@ -19,7 +19,7 @@ # Don't want to use, because we need to make sure that the import doesn't # fire just yet (some code does this to avoid importing qv() and delare()). require_ok("version"); -is $version::VERSION, 0.9918, "Make sure we have the correct class"; +is $version::VERSION, 0.9924, "Make sure we have the correct class"; ok(!"main"->can("qv"), "We don't have the imported qv()"); ok(!"main"->can("declare"), "We don't have the imported declare()"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/t/05sigdie.t new/version-0.9924/t/05sigdie.t --- old/version-0.9918/t/05sigdie.t 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/t/05sigdie.t 2018-04-20 01:46:32.000000000 +0200 @@ -14,7 +14,7 @@ } BEGIN { - use version 0.9918; + use version 0.9924; } pass "Didn't get caught by the wrong DIE handler, which is a good thing"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/t/06noop.t new/version-0.9924/t/06noop.t --- old/version-0.9918/t/06noop.t 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/t/06noop.t 2018-04-20 01:46:32.000000000 +0200 @@ -7,7 +7,7 @@ use Test::More qw/no_plan/; BEGIN { - use_ok('version', 0.9918); + use_ok('version', 0.9924); } my $v1 = version->new('1.2'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/t/07locale.t new/version-0.9924/t/07locale.t --- old/version-0.9918/t/07locale.t 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/t/07locale.t 2018-04-20 01:46:32.000000000 +0200 @@ -11,7 +11,7 @@ use Config; BEGIN { - use_ok('version', 0.9918); + use_ok('version', 0.9924); } SKIP: { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/t/08_corelist.t new/version-0.9924/t/08_corelist.t --- old/version-0.9918/t/08_corelist.t 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/t/08_corelist.t 2018-04-20 01:46:32.000000000 +0200 @@ -5,7 +5,7 @@ ######################### use Test::More tests => 3; -use_ok("version", 0.9918); +use_ok("version", 0.9924); # do strict lax tests in a sub to isolate a package to test importing SKIP: { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/t/09_list_util.t new/version-0.9924/t/09_list_util.t --- old/version-0.9918/t/09_list_util.t 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/t/09_list_util.t 2018-04-20 01:46:32.000000000 +0200 @@ -4,7 +4,7 @@ ######################### use strict; -use_ok("version", 0.9918); +use_ok("version", 0.9924); use Test::More; BEGIN { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/vperl/vpp.pm new/version-0.9924/vperl/vpp.pm --- old/version-0.9918/vperl/vpp.pm 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/vperl/vpp.pm 2018-04-20 01:46:32.000000000 +0200 @@ -122,9 +122,11 @@ use warnings::register; use Config; -use vars qw($VERSION $CLASS @ISA $LAX $STRICT $WARN_CATEGORY); -$VERSION = 0.9918; -$CLASS = 'version::vpp'; + +our $VERSION = 0.9924; +our $CLASS = 'version::vpp'; +our ($LAX, $STRICT, $WARN_CATEGORY); + if ($] > 5.015) { warnings::register_categories(qw/version/); $WARN_CATEGORY = 'version'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/vutil/lib/version/vxs.pm new/version-0.9924/vutil/lib/version/vxs.pm --- old/version-0.9918/vutil/lib/version/vxs.pm 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/vutil/lib/version/vxs.pm 2018-04-20 01:46:32.000000000 +0200 @@ -4,9 +4,9 @@ use v5.10; use strict; -use vars qw(@ISA $VERSION $CLASS ); -$VERSION = 0.9918; -$CLASS = 'version::vxs'; +our $VERSION = 0.9924; +our $CLASS = 'version::vxs'; +our @ISA; eval { require XSLoader; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/vutil/vutil.c new/version-0.9924/vutil/vutil.c --- old/version-0.9918/vutil/vutil.c 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/vutil/vutil.c 2018-04-15 15:12:41.000000000 +0200 @@ -618,54 +618,121 @@ goto VER_PV; } #endif - #ifdef USE_LOCALE_NUMERIC - { - const char * const cur_numeric = setlocale(LC_NUMERIC, NULL); - assert(cur_numeric); - /* XS code can set the locale without us knowing. To protect the - * version number parsing, which requires the radix character to be a - * dot, update our records as to what the locale is, so that our - * existing macro mechanism can correctly change it to a dot and back - * if necessary. This code is extremely unlikely to be in a loop, so - * the extra work will have a negligible performance impact. See [perl - * #121930]. - * - * If the current locale is a standard one, but we are expecting it to - * be a different, underlying locale, update our records to make the - * underlying locale this (standard) one. If the current locale is not - * a standard one, we should be expecting a non-standard one, the same - * one that we have recorded as the underlying locale. If not, update - * our records. */ - if (strEQ(cur_numeric, "C") || strEQ(cur_numeric, "POSIX")) { - if (! PL_numeric_standard) { - new_numeric(cur_numeric); - } - } - else if (PL_numeric_standard - || ! PL_numeric_name - || strNE(PL_numeric_name, cur_numeric)) - { - new_numeric(cur_numeric); + { + /* This may or may not be called from code that has switched + * locales without letting perl know, therefore we have to find it + * from first principals. See [perl #121930]. */ + + /* In windows, or not threaded, or not thread-safe, if it isn't C, + * set it to C. */ + +# ifndef USE_POSIX_2008_LOCALE + + const char * locale_name_on_entry; + + LC_NUMERIC_LOCK(0); /* Start critical section */ + + locale_name_on_entry = setlocale(LC_NUMERIC, NULL); + if ( strNE(locale_name_on_entry, "C") + && strNE(locale_name_on_entry, "POSIX")) + { + setlocale(LC_NUMERIC, "C"); + } + else { /* This value indicates to the restore code that we didn't + change the locale */ + locale_name_on_entry = NULL; + } + +# else + + const locale_t locale_obj_on_entry = uselocale((locale_t) 0); + const char * locale_name_on_entry = NULL; + DECLARATION_FOR_LC_NUMERIC_MANIPULATION; + + if (locale_obj_on_entry == LC_GLOBAL_LOCALE) { + + /* in the global locale, we can call system setlocale and if it + * isn't C, set it to C. */ + LC_NUMERIC_LOCK(0); + + locale_name_on_entry = setlocale(LC_NUMERIC, NULL); + if ( strNE(locale_name_on_entry, "C") + && strNE(locale_name_on_entry, "POSIX")) + { + setlocale(LC_NUMERIC, "C"); + } + else { /* This value indicates to the restore code that we + didn't change the locale */ + locale_name_on_entry = NULL; } } + else if (locale_obj_on_entry == PL_underlying_numeric_obj) { + /* Here, the locale appears to have been changed to use the + * program's underlying locale. Just use our mechanisms to + * switch back to C. It might be possible for this pointer to + * actually refer to something else if it got released and + * reused somehow. But it doesn't matter, our mechanisms will + * work even so */ + STORE_LC_NUMERIC_SET_STANDARD(); + } + else if (locale_obj_on_entry != PL_C_locale_obj) { + /* The C object should be unchanged during a program's + * execution, so it should be safe to assume it means what it + * says, so if we are in it, no locale change is required. + * Otherwise, simply use the thread-safe operation. */ + uselocale(PL_C_locale_obj); + } + +# endif + + /* Prevent recursed calls from trying to change back */ + LOCK_LC_NUMERIC_STANDARD(); + #endif - { /* Braces needed because macro just below declares a variable */ - STORE_NUMERIC_LOCAL_SET_STANDARD(); - LOCK_NUMERIC_STANDARD(); + if (sv) { - Perl_sv_catpvf(aTHX_ sv, "%.9"NVff, SvNVX(ver)); + Perl_sv_catpvf(aTHX_ sv, "%.9" NVff, SvNVX(ver)); len = SvCUR(sv); buf = SvPVX(sv); } else { - len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVff, SvNVX(ver)); + len = my_snprintf(tbuf, sizeof(tbuf), "%.9" NVff, SvNVX(ver)); buf = tbuf; } - UNLOCK_NUMERIC_STANDARD(); - RESTORE_NUMERIC_LOCAL(); + +#ifdef USE_LOCALE_NUMERIC + + UNLOCK_LC_NUMERIC_STANDARD(); + +# ifndef USE_POSIX_2008_LOCALE + + if (locale_name_on_entry) { + setlocale(LC_NUMERIC, locale_name_on_entry); + } + + LC_NUMERIC_UNLOCK; /* End critical section */ + +# else + + if (locale_name_on_entry) { + setlocale(LC_NUMERIC, locale_name_on_entry); + LC_NUMERIC_UNLOCK; + } + else if (locale_obj_on_entry == PL_underlying_numeric_obj) { + RESTORE_LC_NUMERIC(); + } + else if (locale_obj_on_entry != PL_C_locale_obj) { + uselocale(locale_obj_on_entry); + } + +# endif + } + +#endif /* USE_LOCALE_NUMERIC */ + while (buf[len-1] == '0' && len > 0) len--; if ( buf[len-1] == '.' ) len--; /* eat the trailing decimal */ version = savepvn(buf, len); @@ -922,11 +989,11 @@ SV * tsv = *av_fetch(av, 0, 0); digit = SvIV(tsv); } - sv = Perl_newSVpvf(aTHX_ "v%"IVdf, (IV)digit); + sv = Perl_newSVpvf(aTHX_ "v%" IVdf, (IV)digit); for ( i = 1 ; i <= len ; i++ ) { SV * tsv = *av_fetch(av, i, 0); digit = SvIV(tsv); - Perl_sv_catpvf(aTHX_ sv, ".%"IVdf, (IV)digit); + Perl_sv_catpvf(aTHX_ sv, ".%" IVdf, (IV)digit); } if ( len <= 2 ) { /* short version, must be at least three */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/vutil/vutil.h new/version-0.9924/vutil/vutil.h --- old/version-0.9918/vutil/vutil.h 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/vutil/vutil.h 2018-04-12 02:09:09.000000000 +0200 @@ -223,29 +223,43 @@ #endif -#if PERL_VERSION_LT(5,19,0) -# undef STORE_NUMERIC_LOCAL_SET_STANDARD -# undef RESTORE_NUMERIC_LOCAL -# ifdef USE_LOCALE -# define STORE_NUMERIC_LOCAL_SET_STANDARD()\ - char *loc = savepv(setlocale(LC_NUMERIC, NULL)); \ - SAVEFREEPV(loc); \ - setlocale(LC_NUMERIC, "C"); - -# define RESTORE_NUMERIC_LOCAL()\ - setlocale(LC_NUMERIC, loc); -# else -# define STORE_NUMERIC_LOCAL_SET_STANDARD() -# define RESTORE_NUMERIC_LOCAL() -# endif +#if PERL_VERSION_LT(5,27,9) +# define LC_NUMERIC_LOCK +# define LC_NUMERIC_UNLOCK +# if PERL_VERSION_LT(5,19,0) +# undef STORE_LC_NUMERIC_SET_STANDARD +# undef RESTORE_LC_NUMERIC +# undef DECLARATION_FOR_LC_NUMERIC_MANIPULATION +# ifdef USE_LOCALE +# define DECLARATION_FOR_LC_NUMERIC_MANIPULATION char *loc +# define STORE_NUMERIC_SET_STANDARD()\ + loc = savepv(setlocale(LC_NUMERIC, NULL)); \ + SAVEFREEPV(loc); \ + setlocale(LC_NUMERIC, "C"); +# define RESTORE_LC_NUMERIC()\ + setlocale(LC_NUMERIC, loc); +# else +# define DECLARATION_FOR_LC_NUMERIC_MANIPULATION +# define STORE_LC_NUMERIC_SET_STANDARD() +# define RESTORE_LC_NUMERIC() +# endif +# endif #endif #ifndef LOCK_NUMERIC_STANDARD -#define LOCK_NUMERIC_STANDARD() +# define LOCK_NUMERIC_STANDARD() #endif #ifndef UNLOCK_NUMERIC_STANDARD -#define UNLOCK_NUMERIC_STANDARD() +# define UNLOCK_NUMERIC_STANDARD() +#endif + +/* The names of these changed in 5.28 */ +#ifndef LOCK_LC_NUMERIC_STANDARD +# define LOCK_LC_NUMERIC_STANDARD() LOCK_NUMERIC_STANDARD() +#endif +#ifndef UNLOCK_LC_NUMERIC_STANDARD +# define UNLOCK_LC_NUMERIC_STANDARD() UNLOCK_NUMERIC_STANDARD() #endif /* ex: set ro: */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/version-0.9918/vutil/vxs.inc new/version-0.9924/vutil/vxs.inc --- old/version-0.9918/vutil/vxs.inc 2017-04-21 13:32:33.000000000 +0200 +++ new/version-0.9924/vutil/vxs.inc 2018-04-12 02:09:09.000000000 +0200 @@ -138,7 +138,7 @@ name, SvPVx_nolen_const(req)); #else Perl_croak(aTHX_ - "%" HEKf " does not define $%"HEKf + "%" HEKf " does not define $%" HEKf "::VERSION--version check failed", HEKfARG(name), HEKfARG(name)); #endif @@ -219,7 +219,7 @@ SvGETMAGIC(vs); if(SvOK(vs)) break; - /* drop through */ + /* fall through */ case 1: /* no param or explicit undef */ /* create empty object */