diff options
author | Andrew Fresh <afresh1@cvs.openbsd.org> | 2014-03-24 14:59:01 +0000 |
---|---|---|
committer | Andrew Fresh <afresh1@cvs.openbsd.org> | 2014-03-24 14:59:01 +0000 |
commit | d3d1d6d08ce0ea5afdc0506666bb26f1b2344199 (patch) | |
tree | 2090862134eeb898641dd5403774a193f115a3c8 /gnu | |
parent | 6d54972d6142d6b38de4ac487ad74a1c833059d6 (diff) |
Import perl-5.18.2
OK espie@ sthen@ deraadt@
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/perl/META.json | 21 | ||||
-rw-r--r-- | gnu/usr.bin/perl/dist/Module-CoreList/lib/Module/CoreList/Utils.pm | 133 | ||||
-rw-r--r-- | gnu/usr.bin/perl/dist/Module-CoreList/t/is_core.t | 6 | ||||
-rw-r--r-- | gnu/usr.bin/perl/hv_func.h | 12 | ||||
-rw-r--r-- | gnu/usr.bin/perl/inline.h | 189 |
5 files changed, 21 insertions, 340 deletions
diff --git a/gnu/usr.bin/perl/META.json b/gnu/usr.bin/perl/META.json index 82f25dad7d1..970798e9b40 100644 --- a/gnu/usr.bin/perl/META.json +++ b/gnu/usr.bin/perl/META.json @@ -4,7 +4,7 @@ "perl5-porters@perl.org" ], "dynamic_config" : 1, - "generated_by" : "CPAN::Meta version 2.140640", + "generated_by" : "CPAN::Meta version 2.120921", "license" : [ "perl_5" ], @@ -21,11 +21,11 @@ "dist/bignum", "dist/Carp", "dist/constant", + "dist/Cwd", "dist/Data-Dumper", "dist/Devel-SelfStubber", "dist/Dumpvalue", "dist/Env", - "dist/Exporter", "dist/ExtUtils-CBuilder", "dist/ExtUtils-Command", "dist/ExtUtils-Install", @@ -33,6 +33,7 @@ "dist/ExtUtils-ParseXS", "dist/Filter-Simple", "dist/I18N-Collate", + "dist/I18N-LangTags", "dist/if", "dist/IO/", "dist/lib/", @@ -42,7 +43,6 @@ "dist/Math-BigRat", "dist/Module-CoreList", "dist/Net-Ping", - "dist/PathTools", "dist/Safe", "dist/Search-Dict", "dist/SelfLoader", @@ -56,6 +56,7 @@ "dist/threads-shared", "dist/Tie-File", "dist/XSLoader", + "lib/version", "mad", "win32" ], @@ -104,21 +105,23 @@ "dist/lib/lib_pm.PL", "dist/lib/Makefile.PL", "dist/lib/t/01lib.t", + "lib/Exporter.pm", + "lib/Exporter.t", + "lib/Exporter/Heavy.pm", "lib/unicore/mktables", + "lib/version.pm", + "lib/version.pod", "pod/perlfilter.pod", "pod/perlpodstyle.pod", "Porting/Maintainers.pm", "Porting/perldelta_template.pod", - "TestInit.pm", - "vutil.c", - "vutil.h", - "vxs.inc" + "TestInit.pm" ] }, "release_status" : "stable", "resources" : { "bugtracker" : { - "web" : "https://rt.perl.org/" + "web" : "http://rt.perl.org/perlbug/" }, "homepage" : "http://www.perl.org/", "license" : [ @@ -128,5 +131,5 @@ "url" : "http://perl5.git.perl.org/" } }, - "version" : "5.020002" + "version" : "5.018002" } diff --git a/gnu/usr.bin/perl/dist/Module-CoreList/lib/Module/CoreList/Utils.pm b/gnu/usr.bin/perl/dist/Module-CoreList/lib/Module/CoreList/Utils.pm index b9fde3e27a2..5967e032ad5 100644 --- a/gnu/usr.bin/perl/dist/Module-CoreList/lib/Module/CoreList/Utils.pm +++ b/gnu/usr.bin/perl/dist/Module-CoreList/lib/Module/CoreList/Utils.pm @@ -6,7 +6,7 @@ use vars qw[$VERSION %utilities]; use Module::CoreList; use Module::CoreList::TieHashDelta; -$VERSION = '5.20150214'; +$VERSION = '3.03'; sub utilities { my $perl = shift; @@ -822,20 +822,6 @@ my %delta = ( removed => { } }, - 5.018003 => { - delta_from => 5.018000, - changed => { - }, - removed => { - } - }, - 5.018004 => { - delta_from => 5.018000, - changed => { - }, - removed => { - } - }, 5.019000 => { delta_from => 5.018000, changed => { @@ -896,123 +882,6 @@ my %delta = ( removed => { } }, - 5.019008 => { - delta_from => 5.019007, - changed => { - }, - removed => { - } - }, - 5.019009 => { - delta_from => 5.019008, - changed => { - }, - removed => { - } - }, - 5.019010 => { - delta_from => 5.019009, - changed => { - }, - removed => { - } - }, - 5.019011 => { - delta_from => 5.019010, - changed => { - }, - removed => { - } - }, - 5.020000 => { - delta_from => 5.019011, - changed => { - }, - removed => { - } - }, - 5.021000 => { - delta_from => 5.020000, - changed => { - }, - removed => { - } - }, - 5.021001 => { - delta_from => 5.021000, - changed => { - }, - removed => { - 'a2p' => 1, - 'config_data' => 1, - 'find2perl' => 1, - 'psed' => 1, - 's2p' => 1, - } - }, - 5.021002 => { - delta_from => 5.021001, - changed => { - }, - removed => { - } - }, - 5.021003 => { - delta_from => 5.021002, - changed => { - }, - removed => { - } - }, - 5.020001 => { - delta_from => 5.02, - changed => { - }, - removed => { - } - }, - 5.021004 => { - delta_from => 5.021003, - changed => { - }, - removed => { - } - }, - 5.021005 => { - delta_from => 5.021004, - changed => { - }, - removed => { - } - }, - 5.021006 => { - delta_from => 5.021005, - changed => { - }, - removed => { - } - }, - 5.021007 => { - delta_from => 5.021006, - changed => { - }, - removed => { - } - }, - 5.021008 => { - delta_from => 5.021007, - changed => { - }, - removed => { - } - }, - 5.020002 => { - delta_from => 5.020001, - changed => { - }, - removed => { - } - }, ); for my $version (sort { $a <=> $b } keys %delta) { diff --git a/gnu/usr.bin/perl/dist/Module-CoreList/t/is_core.t b/gnu/usr.bin/perl/dist/Module-CoreList/t/is_core.t index 869aa37fb67..712221f21e6 100644 --- a/gnu/usr.bin/perl/dist/Module-CoreList/t/is_core.t +++ b/gnu/usr.bin/perl/dist/Module-CoreList/t/is_core.t @@ -1,14 +1,10 @@ #!perl -w use strict; use Module::CoreList; -use Test::More tests => 34; +use Test::More tests => 33; BEGIN { require_ok('Module::CoreList'); } -# Check default perl - -ok(Module::CoreList::is_core('IO::File', $Module::CoreList::version{$]}{'IO::File'}), "is_core is self-consistent"); - ok(!Module::CoreList::is_core('Module::Path'), 'Module::Path has never been in core'); ok(!Module::CoreList::is_core('Module::Path', undef, '5.016003'), 'Module::Path has never been in core'); ok(!Module::CoreList::is_core('Module::Path', undef), 'Module::Path has never been in core'); diff --git a/gnu/usr.bin/perl/hv_func.h b/gnu/usr.bin/perl/hv_func.h index 191912a6cc7..7678807d883 100644 --- a/gnu/usr.bin/perl/hv_func.h +++ b/gnu/usr.bin/perl/hv_func.h @@ -93,7 +93,7 @@ */ #if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \ - || defined(_MSC_VER) || defined (__TURBOC__) + || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__) #define U8TO16_LE(d) (*((const U16 *) (d))) #endif @@ -472,16 +472,6 @@ S_perl_hash_sdbm(const unsigned char * const seed, const unsigned char *str, con return hash; } -/* - ONE_AT_A_TIME_HARD is the 5.17+ recommend ONE_AT_A_TIME algorithm - * - ONE_AT_A_TIME_OLD is the unmodified 5.16 and older algorithm - * - ONE_AT_A_TIME is a 5.17+ tweak of ONE_AT_A_TIME_OLD to - * prevent strings of only \0 but different lengths from colliding - * - * Security-wise, from best to worst, - * ONE_AT_A_TIME_HARD > ONE_AT_A_TIME > ONE_AT_A_TIME_OLD - * There is a big drop-off in security between ONE_AT_A_TIME_HARD and - * ONE_AT_A_TIME - * */ /* This is the "One-at-a-Time" algorithm by Bob Jenkins * from requirements by Colin Plumb. diff --git a/gnu/usr.bin/perl/inline.h b/gnu/usr.bin/perl/inline.h index 0fe8a0eee1a..953bb33cffb 100644 --- a/gnu/usr.bin/perl/inline.h +++ b/gnu/usr.bin/perl/inline.h @@ -14,7 +14,7 @@ /* ------------------------------- av.h ------------------------------- */ -PERL_STATIC_INLINE SSize_t +PERL_STATIC_INLINE I32 S_av_top_index(pTHX_ AV *av) { PERL_ARGS_ASSERT_AV_TOP_INDEX; @@ -32,56 +32,6 @@ S_CvDEPTHp(const CV * const sv) return &((XPVCV*)SvANY(sv))->xcv_depth; } -/* - CvPROTO returns the prototype as stored, which is not necessarily what - the interpreter should be using. Specifically, the interpreter assumes - that spaces have been stripped, which has been the case if the prototype - was added by toke.c, but is generally not the case if it was added elsewhere. - Since we can't enforce the spacelessness at assignment time, this routine - provides a temporary copy at parse time with spaces removed. - I<orig> is the start of the original buffer, I<len> is the length of the - prototype and will be updated when this returns. - */ - -#ifdef PERL_CORE -PERL_STATIC_INLINE char * -S_strip_spaces(pTHX_ const char * orig, STRLEN * const len) -{ - SV * tmpsv; - char * tmps; - tmpsv = newSVpvn_flags(orig, *len, SVs_TEMP); - tmps = SvPVX(tmpsv); - while ((*len)--) { - if (!isSPACE(*orig)) - *tmps++ = *orig; - orig++; - } - *tmps = '\0'; - *len = tmps - SvPVX(tmpsv); - return SvPVX(tmpsv); -} -#endif - -/* ------------------------------- mg.h ------------------------------- */ - -#if defined(PERL_CORE) || defined(PERL_EXT) -/* assumes get-magic and stringification have already occurred */ -PERL_STATIC_INLINE STRLEN -S_MgBYTEPOS(pTHX_ MAGIC *mg, SV *sv, const char *s, STRLEN len) -{ - assert(mg->mg_type == PERL_MAGIC_regex_global); - assert(mg->mg_len != -1); - if (mg->mg_flags & MGf_BYTES || !DO_UTF8(sv)) - return (STRLEN)mg->mg_len; - else { - const STRLEN pos = (STRLEN)mg->mg_len; - /* Without this check, we may read past the end of the buffer: */ - if (pos > sv_or_pv_len_utf8(sv, s, len)) return len+1; - return sv_or_pv_pos_u2b(sv, s, pos, NULL); - } -} -#endif - /* ----------------------------- regexp.h ----------------------------- */ PERL_STATIC_INLINE struct regexp * @@ -117,7 +67,7 @@ S_SvREFCNT_dec(pTHX_ SV *sv) { if (LIKELY(sv != NULL)) { U32 rc = SvREFCNT(sv); - if (LIKELY(rc > 1)) + if (rc > 1) SvREFCNT(sv) = rc - 1; else Perl_sv_free2(aTHX_ sv, rc); @@ -128,7 +78,7 @@ PERL_STATIC_INLINE void S_SvREFCNT_dec_NN(pTHX_ SV *sv) { U32 rc = SvREFCNT(sv); - if (LIKELY(rc > 1)) + if (rc > 1) SvREFCNT(sv) = rc - 1; else Perl_sv_free2(aTHX_ sv, rc); @@ -171,11 +121,10 @@ S_SvPADSTALE_off(SV *sv) assert(SvFLAGS(sv) & SVs_PADMY); return SvFLAGS(sv) &= ~SVs_PADSTALE; } -#if defined(PERL_CORE) || defined (PERL_EXT) +#ifdef PERL_CORE PERL_STATIC_INLINE STRLEN S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp) { - PERL_ARGS_ASSERT_SV_OR_PV_POS_U2B; if (SvGAMAGIC(sv)) { U8 *hopped = utf8_hop((U8 *)pv, pos); if (lenp) *lenp = (STRLEN)(utf8_hop(hopped, *lenp) - hopped); @@ -185,89 +134,10 @@ S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp) } #endif -/* ------------------------------- handy.h ------------------------------- */ - -/* saves machine code for a common noreturn idiom typically used in Newx*() */ -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-function" -#endif -static void -S_croak_memory_wrap(void) -{ - Perl_croak_nocontext("%s",PL_memory_wrap); -} -#ifdef __clang__ -#pragma clang diagnostic pop -#endif - -#ifdef BOOTSTRAP_CHARSET -static bool -S_bootstrap_ctype(U8 character, UV classnum, bool full_Latin1) -{ - /* See comments in handy.h. This is placed in this file primarily to avoid - * having to have an entry for it in embed.fnc */ - - dTHX; - - if (! full_Latin1 && ! isASCII(character)) { - return FALSE; - } - - switch (classnum) { - case _CC_ALPHANUMERIC: return isALPHANUMERIC_L1(character); - case _CC_ALPHA: return isALPHA_L1(character); - case _CC_ASCII: return isASCII_L1(character); - case _CC_BLANK: return isBLANK_L1(character); - case _CC_CASED: return isLOWER_L1(character) - || isUPPER_L1(character); - case _CC_CNTRL: return isCNTRL_L1(character); - case _CC_DIGIT: return isDIGIT_L1(character); - case _CC_GRAPH: return isGRAPH_L1(character); - case _CC_LOWER: return isLOWER_L1(character); - case _CC_PRINT: return isPRINT_L1(character); - case _CC_PSXSPC: return isPSXSPC_L1(character); - case _CC_PUNCT: return isPUNCT_L1(character); - case _CC_SPACE: return isSPACE_L1(character); - case _CC_UPPER: return isUPPER_L1(character); - case _CC_WORDCHAR: return isWORDCHAR_L1(character); - case _CC_XDIGIT: return isXDIGIT_L1(character); - case _CC_VERTSPACE: return isSPACE_L1(character) && ! isBLANK_L1(character); - case _CC_IDFIRST: return isIDFIRST_L1(character); - case _CC_QUOTEMETA: return _isQUOTEMETA(character); - case _CC_CHARNAME_CONT: return isCHARNAME_CONT(character); - case _CC_NONLATIN1_FOLD: return _HAS_NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C_AND_REGEXEC_DOT_C(character); - case _CC_NON_FINAL_FOLD: return _IS_NON_FINAL_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C(character); - case _CC_IS_IN_SOME_FOLD: return _IS_IN_SOME_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C(character); - case _CC_BACKSLASH_FOO_LBRACE_IS_META: return 0; - - - default: break; - } - Perl_croak(aTHX_ "panic: bootstrap_ctype() has an unexpected character class '%" UVxf "'", classnum); -} -#endif - /* ------------------------------- utf8.h ------------------------------- */ -PERL_STATIC_INLINE void -S_append_utf8_from_native_byte(const U8 byte, U8** dest) -{ - /* Takes an input 'byte' (Latin1 or EBCDIC) and appends it to the UTF-8 - * encoded string at '*dest', updating '*dest' to include it */ - - PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE; - - if (NATIVE_BYTE_IS_INVARIANT(byte)) - *(*dest)++ = byte; - else { - *(*dest)++ = UTF8_EIGHT_BIT_HI(byte); - *(*dest)++ = UTF8_EIGHT_BIT_LO(byte); - } -} - -/* These two exist only to replace the macros they formerly were so that their - * use can be deprecated */ +/* These exist only to replace the macros they formerly were so that their use + * can be deprecated */ PERL_STATIC_INLINE bool S_isIDFIRST_lazy(pTHX_ const char* p) @@ -284,50 +154,3 @@ S_isALNUM_lazy(pTHX_ const char* p) return isALNUM_lazy_if(p,1); } - -/* ------------------------------- perl.h ----------------------------- */ - -/* -=for apidoc AiR|bool|is_safe_syscall|const char *pv|STRLEN len|const char *what|const char *op_name - -Test that the given C<pv> doesn't contain any internal C<NUL> characters. -If it does, set C<errno> to ENOENT, optionally warn, and return FALSE. - -Return TRUE if the name is safe. - -Used by the IS_SAFE_SYSCALL() macro. - -=cut -*/ - -PERL_STATIC_INLINE bool -S_is_safe_syscall(pTHX_ const char *pv, STRLEN len, const char *what, const char *op_name) { - /* While the Windows CE API provides only UCS-16 (or UTF-16) APIs - * perl itself uses xce*() functions which accept 8-bit strings. - */ - - PERL_ARGS_ASSERT_IS_SAFE_SYSCALL; - - if (pv && len > 1) { - char *null_at; - if (UNLIKELY((null_at = (char *)memchr(pv, 0, len-1)) != NULL)) { - SETERRNO(ENOENT, LIB_INVARG); - Perl_ck_warner(aTHX_ packWARN(WARN_SYSCALLS), - "Invalid \\0 character in %s for %s: %s\\0%s", - what, op_name, pv, null_at+1); - return FALSE; - } - } - - return TRUE; -} - -/* - * Local variables: - * c-indentation-style: bsd - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - * - * ex: set ts=8 sts=4 sw=4 et: - */ |