diff options
Diffstat (limited to 'gnu/usr.bin/perl')
53 files changed, 486 insertions, 598 deletions
diff --git a/gnu/usr.bin/perl/Configure b/gnu/usr.bin/perl/Configure index 684a9c07686..4b869dcede1 100644 --- a/gnu/usr.bin/perl/Configure +++ b/gnu/usr.bin/perl/Configure @@ -5483,6 +5483,25 @@ default|recommended) eval $checkccflag ;; esac + case "$gccversion" in + 1*) ;; + 2*) ;; + ?*) echo " " + echo "Checking if your compiler accepts -fno-delete-null-pointer-checks" 2>&1 + echo 'int main(void) { return 0; }' > gcctest.c + if $cc -O2 -fno-delete-null-pointer-checks -o gcctest gcctest.c; then + echo "Yes, it does." 2>&1 + case "$ccflags" in + *delete-null-pointer-checks*) + echo "Leaving current flags $ccflags alone." 2>&1 + ;; + *) dflt="$dflt -fno-delete-null-pointer-checks" ;; + esac + else + echo "Nope, it doesn't, but that's ok." 2>&1 + fi + ;; + esac # For gcc, adding -pipe speeds up compilations for some, but apparently # some assemblers can't read from stdin. (It also slows down compilations # in other cases, but those are apparently rarer these days.) AD 5/2004. @@ -20574,9 +20593,9 @@ case "$ccflags" in ;; esac -randfunc=Perl_drand48 -drand01="Perl_drand48()" -seedfunc="Perl_drand48_init" +randfunc=drand48 +drand01="drand48()" +seedfunc="srand48" randbits=48 randseedtype=U32 @@ -23427,6 +23446,7 @@ xs_extensions='' find_extensions=' for xxx in *; do case "$xxx" in + CVS) ;; DynaLoader|dynaload) ;; *) this_ext=`echo "$xxx" | $sed -e s/-/\\\//g`; @@ -23664,6 +23684,8 @@ esac nonxs_ext='' for xxx in $nonxs_extensions ; do case "$xxx" in + CVS|RCS|SCCS|.svn) + ;; VMS*) ;; *) nonxs_ext="$nonxs_ext $xxx" diff --git a/gnu/usr.bin/perl/MANIFEST b/gnu/usr.bin/perl/MANIFEST index 5ef609b4c09..be24967b2e2 100644 --- a/gnu/usr.bin/perl/MANIFEST +++ b/gnu/usr.bin/perl/MANIFEST @@ -17,6 +17,7 @@ caretx.c C file to create $^X cflags.SH A script that emits C compilation flags per file Changes Describe how to peruse changes between releases charclass_invlists.h Compiled-in inversion lists +config.over Site-specific overrides for Configure defaults config_h.SH Produces config.h configpm Produces lib/Config.pm Configure Portability tool @@ -1491,6 +1492,16 @@ cpan/NEXT/t/dynamically_scoped_regex_vars.t NEXT cpan/NEXT/t/next.t NEXT cpan/NEXT/t/stringify.t NEXT cpan/NEXT/t/unseen.t NEXT +cpan/OpenBSD-MkTemp/lib/OpenBSD/MkTemp.pm OpenBSD::MkTemp +cpan/OpenBSD-MkTemp/MkTemp.xs OpenBSD::MkTemp +cpan/OpenBSD-MkTemp/README OpenBSD::MkTemp Readme +cpan/OpenBSD-MkTemp/t/OpenBSD-MkTemp.t OpenBSD::MkTemp test file +cpan/OpenBSD-Pledge/lib/OpenBSD/Pledge.pm OpenBSD::Pledge +cpan/OpenBSD-Pledge/Pledge.xs OpenBSD::Pledge +cpan/OpenBSD-Pledge/t/OpenBSD-Pledge.t OpenBSD::Pledge test file +cpan/OpenBSD-Unveil/lib/OpenBSD/Unveil.pm OpenBSD::Unveil +cpan/OpenBSD-Unveil/t/OpenBSD-Unveil.t OpenBSD::Unveil test file +cpan/OpenBSD-Unveil/Unveil.xs OpenBSD::Unveil cpan/Params-Check/lib/Params/Check.pm Params::Check cpan/Params-Check/t/01_Params-Check.t Params::Check tests cpan/parent/lib/parent.pm Establish an ISA relationship with base classes at compile time @@ -2007,6 +2018,17 @@ cpan/Term-ANSIColor/t/module/stringify.t cpan/Term-ANSIColor/t/taint/basic.t cpan/Term-Cap/Cap.pm Perl module supporting termcap usage cpan/Term-Cap/test.pl See if Term::Cap works +cpan/Term-ReadKey/Changes Term::ReadKey +cpan/Term-ReadKey/Configure.pm Term::ReadKey +cpan/Term-ReadKey/example/test.pl Term::ReadKey +cpan/Term-ReadKey/genchars.pl Term::ReadKey +cpan/Term-ReadKey/Makefile.PL Term::ReadKey +cpan/Term-ReadKey/ppport.h Term::ReadKey +cpan/Term-ReadKey/ReadKey.pm Term::ReadKey +cpan/Term-ReadKey/ReadKey.xs Term::ReadKey +cpan/Term-ReadKey/README Term::ReadKey +cpan/Term-ReadKey/t/01_basic.t Term::ReadKey +cpan/Term-ReadKey/t/02_terminal_functions.t Term::ReadKey cpan/Test-Harness/bin/prove The prove harness utility cpan/Test-Harness/lib/App/Prove.pm Gubbins for the prove utility cpan/Test-Harness/lib/App/Prove/State.pm Gubbins for the prove utility @@ -3939,7 +3961,6 @@ ext/B/B/Showlex.pm Compiler Showlex backend ext/B/B/Terse.pm Compiler Terse backend ext/B/B/Xref.pm Compiler Xref backend ext/B/hints/darwin.pl Hints for named architecture -ext/B/hints/openbsd.pl Hints for named architecture ext/B/Makefile.PL Compiler backend makefile writer ext/B/O.pm Compiler front-end module (-MO=...) ext/B/t/b.t See if B works @@ -4411,6 +4432,7 @@ fakesdio.h stdio in terms of PerlIO feature.h Feature header form.h Public declarations for formats generate_uudmap.c Generate uudmap.h, the uuencode decoding map +git_version.h Pre-generated git_version.h for OpenBSD globals.c File to declare global symbols (for shared library) globvar.sym Global variables that need hiding when embedded gv.c Glob value code @@ -4556,6 +4578,7 @@ lib/Class/Struct.t See if Class::Struct works lib/Config.t See if Config works lib/Config/Extensions.pm Convenient hash lookup for built extensions lib/Config/Extensions.t See if Config::Extensions works +lib/Config_git.pl Pre-generated Config_git.pl for OpenBSD lib/CORE.pod document the CORE namespace lib/DB.pm Debugger API (draft) lib/DB.t See if DB works diff --git a/gnu/usr.bin/perl/Makefile.SH b/gnu/usr.bin/perl/Makefile.SH index be624491e62..dc9e5b6d07b 100644 --- a/gnu/usr.bin/perl/Makefile.SH +++ b/gnu/usr.bin/perl/Makefile.SH @@ -487,7 +487,7 @@ shextract=`SH_to_target $SH` ## In the following dollars and backticks do not need the extra backslash. $spitshell >>$Makefile <<!GROK!THIS! -private = preplibrary \$(CONFIGPM) \$(CONFIGPOD) git_version.h lib/buildcustomize.pl +private = preplibrary \$(CONFIGPM) \$(CONFIGPOD) lib/buildcustomize.pl # Files to be built with variable substitution before miniperl # is available. @@ -646,15 +646,16 @@ $(MANIFEST_SRT): MANIFEST $(PERL_EXE) .PHONY: all utilities +# OpenBSD uses pre-generated lib/Config_git.pl and git_version.h files # Both git_version.h and lib/Config_git.pl are built # by make_patchnum.pl. -git_version.h: lib/Config_git.pl - -lib/Config_git.pl: $(MINIPERL_EXE) make_patchnum.pl - $(MINIPERL) make_patchnum.pl - -# make sure that we recompile perl.c if the git version changes -perl$(OBJ_EXT): git_version.h +#git_version.h: lib/Config_git.pl +# +#lib/Config_git.pl: $(MINIPERL_EXE) make_patchnum.pl +# $(MINIPERL) make_patchnum.pl +# +## make sure that we recompile perl.c if the git version changes +#perl$(OBJ_EXT): git_version.h !NO!SUBS! @@ -820,11 +821,11 @@ CCDLFLAGS = `echo $ccdlflags|sed -e 's@-bE:.*/perl\.exp@-bE:perl.exp@'` LIBPERL_NONSHR = libperl_nonshr$(LIB_EXT) MINIPERL_NONSHR = miniperl_nonshr$(EXE_EXT) -$(LIBPERL_NONSHR): $(perllib_objs) - $(RMS) $(LIBPERL_NONSHR) - $(AR) rc $(LIBPERL_NONSHR) $(perllib_objs) +#$(LIBPERL_NONSHR): $(perllib_objs) +# $(RMS) $(LIBPERL_NONSHR) +# $(AR) rc $(LIBPERL_NONSHR) $(perllib_objs) -$(MINIPERL_NONSHR): $(LIBPERL_NONSHR) miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perlmini$(OBJ_EXT) +$(MINIPERL_NONSHR): miniperlmain$(OBJ_EXT) opmini$(OBJ_EXT) perlmini$(OBJ_EXT) $(CC) $(LDFLAGS) -o $(MINIPERL_NONSHR) miniperlmain$(OBJ_EXT) \ opmini$(OBJ_EXT) perlmini$(OBJ_EXT) $(LIBPERL_NONSHR) $(LIBS) @@ -923,33 +924,33 @@ $(DTRACE_MAIN_O): perldtrace.d perlmain$(OBJ_EXT) !NO!SUBS! ;; esac - $spitshell >>$Makefile <<'!NO!SUBS!' -$(LIBPERL): $& $(perllib_dep) $(DYNALOADER) $(LIBPERLEXPORT) -!NO!SUBS! - case "$useshrplib" in - true) - $spitshell >>$Makefile <<'!NO!SUBS!' - rm -f $@ - $(LD) -o $@ $(SHRPLDFLAGS) $(perllib_objs) $(DYNALOADER) $(libs) -!NO!SUBS! - case "$osname" in - aix) - $spitshell >>$Makefile <<'!NO!SUBS!' - rm -f libperl$(OBJ_EXT) - mv $@ libperl$(OBJ_EXT) - $(AR) qv $(LIBPERL) libperl$(OBJ_EXT) -!NO!SUBS! - ;; - esac - ;; - *) - $spitshell >>$Makefile <<'!NO!SUBS!' - rm -f $(LIBPERL) - $(AR) rc $(LIBPERL) $(perllib_objs) $(DYNALOADER) - @$(ranlib) $(LIBPERL) -!NO!SUBS! - ;; - esac +# $spitshell >>$Makefile <<'!NO!SUBS!' +#$(LIBPERL): $& $(perllib_dep) $(DYNALOADER) $(LIBPERLEXPORT) +#!NO!SUBS! +# case "$useshrplib" in +# true) +# $spitshell >>$Makefile <<'!NO!SUBS!' +# rm -f $@ +# $(LD) -o $@ $(SHRPLDFLAGS) $(perllib_objs) $(DYNALOADER) $(libs) +#!NO!SUBS! +# case "$osname" in +# aix) +# $spitshell >>$Makefile <<'!NO!SUBS!' +# rm -f libperl$(OBJ_EXT) +# mv $@ libperl$(OBJ_EXT) +# $(AR) qv $(LIBPERL) libperl$(OBJ_EXT) +#!NO!SUBS! +# ;; +# esac +# ;; +# *) +# $spitshell >>$Makefile <<'!NO!SUBS!' +# rm -f $(LIBPERL) +# $(AR) rc $(LIBPERL) $(perllib_objs) $(DYNALOADER) +# @$(ranlib) $(LIBPERL) +#!NO!SUBS! +# ;; +# esac $spitshell >>$Makefile <<'!NO!SUBS!' # How to build executables. @@ -1015,10 +1016,6 @@ NAMESPACEFLAGS = -force_flat_namespace esac $spitshell >>$Makefile <<'!NO!SUBS!' lib/buildcustomize.pl: $& $(miniperl_objs) write_buildcustomize.pl - -@rm -f miniperl.xok - $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \ - $(miniperl_objs) $(libs) - $(LDLIBPTH) ./miniperl$(HOST_EXE_EXT) -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1' $(MINIPERL) -f write_buildcustomize.pl !NO!SUBS! ;; @@ -1132,10 +1129,7 @@ $(CONFIGPOD): config.sh $(MINIPERL_EXE) configpm Porting/Glossary lib/Config_git unidatafiles $(unidatafiles) pod/perluniprops.pod: uni.data uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext) - $(MINIPERL) lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p -# Commented out so always runs, mktables looks at far more files than we -# can in this makefile to decide if needs to run or not -# touch uni.data + touch uni.data # $(PERL_EXE) and ext because pod_lib.pl needs Digest::MD5 # But also this ensures that all extensions are built before we try to scan @@ -1382,7 +1376,7 @@ _mopup: -rm -f *perl.xok -rm -f cygwin.c libperl*.def libperl*.dll cygperl*.dll *.exe.stackdump -rm -f $(PERL_EXE) $(MINIPERL_EXE) $(LIBPERL) libperl.* microperl - -rm -f config.arch config.over $(DTRACE_H) + -rm -f $(DTRACE_H) _cleaner1: -cd os2; rm -f Makefile @@ -1447,10 +1441,10 @@ _cleaner2: -rmdir lib/Sys/Syslog lib/Sys lib/Sub lib/Search lib/Scalar -rmdir lib/Pod/Text lib/Pod/Simple lib/Pod/Perldoc lib/PerlIO/via -rmdir lib/PerlIO lib/Perl lib/Parse/CPAN lib/Parse lib/Params - -rmdir lib/Net/FTP lib/Module/Load lib/Module/CoreList lib/Module - -rmdir lib/Memoize lib/Math/BigInt lib/Math/BigFloat lib/Math lib/MIME - -rmdir lib/Locale/Maketext lib/Locale lib/List/Util lib/List - -rmdir lib/JSON/PP lib/JSON lib/IPC lib/IO/Uncompress/Adapter + -rmdir lib/OpenBSD lib/Net/FTP lib/Module/Load lib/Module/CoreList + -rmdir lib/Module lib/Memoize lib/Math/BigInt lib/Math/BigFloat + -rmdir lib/Math lib/MIME lib/Locale/Maketext lib/Locale lib/List/Util + -rmdir lib/List lib/JSON/PP lib/JSON lib/IPC lib/IO/Uncompress/Adapter -rmdir lib/IO/Uncompress lib/IO/Socket lib/IO/Compress/Zlib -rmdir lib/IO/Compress/Zip lib/IO/Compress/Gzip lib/IO/Compress/Base -rmdir lib/IO/Compress/Adapter lib/IO/Compress lib/IO diff --git a/gnu/usr.bin/perl/Makefile.bsd-wrapper1 b/gnu/usr.bin/perl/Makefile.bsd-wrapper1 index a6c9c467f88..8e4c5a1836f 100644 --- a/gnu/usr.bin/perl/Makefile.bsd-wrapper1 +++ b/gnu/usr.bin/perl/Makefile.bsd-wrapper1 @@ -111,6 +111,7 @@ _quick3p= perl5280delta 1 pod/perl5280delta.pod \ perl5281delta 1 pod/perl5281delta.pod \ perl5282delta 1 pod/perl5282delta.pod \ + perl5300delta 1 pod/perl5300delta.pod \ perl561delta 1 pod/perl561delta.pod \ perl56delta 1 pod/perl56delta.pod \ perl581delta 1 pod/perl581delta.pod \ @@ -249,7 +250,6 @@ _quick3p= App::Prove::State::Result::Test 3p lib/App/Prove/State/Result/Test.pm \ Archive::Tar 3p lib/Archive/Tar.pm \ Archive::Tar::File 3p lib/Archive/Tar/File.pm \ - arybase 3p lib/arybase.pm \ Attribute::Handlers 3p lib/Attribute/Handlers.pm \ attributes 3p lib/attributes.pm \ autodie 3p lib/autodie.pm \ @@ -265,7 +265,6 @@ _quick3p= autouse 3p lib/autouse.pm \ B 3p lib/B.pm \ B::Concise 3p lib/B/Concise.pm \ - B::Debug 3p lib/B/Debug.pm \ B::Deparse 3p lib/B/Deparse.pm \ B::Op_private 3p lib/B/Op_private.pm \ B::Showlex 3p lib/B/Showlex.pm \ @@ -509,30 +508,15 @@ _quick3p= List::Util 3p lib/List/Util.pm \ List::Util::XS 3p lib/List/Util/XS.pm \ locale 3p lib/locale.pm \ - Locale::Codes 3p lib/Locale/Codes.pod \ - Locale::Codes::Changes 3p lib/Locale/Codes/Changes.pod \ - Locale::Codes::Country 3p lib/Locale/Codes/Country.pod \ - Locale::Codes::Currency 3p lib/Locale/Codes/Currency.pod \ - Locale::Codes::LangExt 3p lib/Locale/Codes/LangExt.pod \ - Locale::Codes::LangFam 3p lib/Locale/Codes/LangFam.pod \ - Locale::Codes::Language 3p lib/Locale/Codes/Language.pod \ - Locale::Codes::LangVar 3p lib/Locale/Codes/LangVar.pod \ - Locale::Codes::Script 3p lib/Locale/Codes/Script.pod \ - Locale::Codes::Types 3p lib/Locale/Codes/Types.pod \ - Locale::Country 3p lib/Locale/Country.pod \ - Locale::Currency 3p lib/Locale/Currency.pod \ - Locale::Language 3p lib/Locale/Language.pod \ Locale::Maketext 3p lib/Locale/Maketext.pod \ Locale::Maketext::Cookbook 3p lib/Locale/Maketext/Cookbook.pod \ Locale::Maketext::Guts 3p lib/Locale/Maketext/Guts.pm \ Locale::Maketext::GutsLoader 3p lib/Locale/Maketext/GutsLoader.pm \ Locale::Maketext::Simple 3p lib/Locale/Maketext/Simple.pm \ Locale::Maketext::TPJ13 3p lib/Locale/Maketext/TPJ13.pod \ - Locale::Script 3p lib/Locale/Script.pod \ Math::BigFloat 3p lib/Math/BigFloat.pm \ Math::BigInt 3p lib/Math/BigInt.pm \ Math::BigInt::Calc 3p lib/Math/BigInt/Calc.pm \ - Math::BigInt::CalcEmu 3p lib/Math/BigInt/CalcEmu.pm \ Math::BigInt::FastCalc 3p lib/Math/BigInt/FastCalc.pm \ Math::BigInt::Lib 3p lib/Math/BigInt/Lib.pm \ Math::BigRat 3p lib/Math/BigRat.pm \ @@ -743,7 +727,9 @@ _quick3p= Test2::EventFacet::Assert 3p lib/Test2/EventFacet/Assert.pm \ Test2::EventFacet::Control 3p lib/Test2/EventFacet/Control.pm \ Test2::EventFacet::Error 3p lib/Test2/EventFacet/Error.pm \ + Test2::EventFacet::Hub 3p lib/Test2/EventFacet/Hub.pm \ Test2::EventFacet::Info 3p lib/Test2/EventFacet/Info.pm \ + Test2::EventFacet::Info::Table 3p lib/Test2/EventFacet/Info/Table.pm \ Test2::EventFacet::Meta 3p lib/Test2/EventFacet/Meta.pm \ Test2::EventFacet::Parent 3p lib/Test2/EventFacet/Parent.pm \ Test2::EventFacet::Plan 3p lib/Test2/EventFacet/Plan.pm \ diff --git a/gnu/usr.bin/perl/Porting/Maintainers.pl b/gnu/usr.bin/perl/Porting/Maintainers.pl index dfc7b50441b..4a0e489ef7d 100644 --- a/gnu/usr.bin/perl/Porting/Maintainers.pl +++ b/gnu/usr.bin/perl/Porting/Maintainers.pl @@ -1423,6 +1423,9 @@ use File::Glob qw(:case); lib/vmsish.{pm,t} ], }, + 'openbsd' => { + 'FILES' => q[lib/Config_git.pl], + }, ); # legacy CPAN flag diff --git a/gnu/usr.bin/perl/Porting/pumpkin.pod b/gnu/usr.bin/perl/Porting/pumpkin.pod index 55131822a53..6f4ef812bc5 100644 --- a/gnu/usr.bin/perl/Porting/pumpkin.pod +++ b/gnu/usr.bin/perl/Porting/pumpkin.pod @@ -544,9 +544,9 @@ Here's how I generate a new patch. I'll use the hypothetical 5.004_07 to 5.004_08 patch as an example. # unpack perl5.004_07/ - gzip -d -c perl5.004_07.tar.gz | tar -xof - + gzip -d -c perl5.004_07.tar.gz | tar -xf - # unpack perl5.004_08/ - gzip -d -c perl5.004_08.tar.gz | tar -xof - + gzip -d -c perl5.004_08.tar.gz | tar -xf - makepatch perl5.004_07 perl5.004_08 > perl5.004_08.pat Makepatch will automatically generate appropriate B<rm> commands to remove diff --git a/gnu/usr.bin/perl/configpm b/gnu/usr.bin/perl/configpm index c8de8bfd155..ad22cc0fdd5 100644 --- a/gnu/usr.bin/perl/configpm +++ b/gnu/usr.bin/perl/configpm @@ -1130,6 +1130,18 @@ my $orig_heavy_txt = ""; } if ($orig_config_txt ne $config_txt or $orig_heavy_txt ne $heavy_txt) { + # During the build don't look in /usr/local for libs or includes + # but after, we want to let modules look there. + my $install_heavy_txt = $heavy_txt; + $install_heavy_txt =~ s,^(ccflags|cppflags)[^=]*='[^']+,$& -I/usr/local/include,gm; + $install_heavy_txt =~ s,^(ldflags|lddlflags)[^=]*='[^']+,$& -L/usr/local/lib,gm; + + open INSTALL_CONFIG_HEAVY, ">", "$Config_heavy.install" + or die "Can't open install $Config_heavy: $!\n"; + print INSTALL_CONFIG_HEAVY $install_heavy_txt; + close INSTALL_CONFIG_HEAVY; + print "updated install $Config_heavy\n"; + open CONFIG, ">", $Config_PM or die "Can't open $Config_PM: $!\n"; open CONFIG_HEAVY, ">", $Config_heavy or die "Can't open $Config_heavy: $!\n"; print CONFIG $config_txt; diff --git a/gnu/usr.bin/perl/cpan/Compress-Raw-Bzip2/private/MakeUtil.pm b/gnu/usr.bin/perl/cpan/Compress-Raw-Bzip2/private/MakeUtil.pm index 12fa26fd05f..037782b9498 100644 --- a/gnu/usr.bin/perl/cpan/Compress-Raw-Bzip2/private/MakeUtil.pm +++ b/gnu/usr.bin/perl/cpan/Compress-Raw-Bzip2/private/MakeUtil.pm @@ -35,7 +35,8 @@ sub MY::libscan my $path = shift; return undef - if $path =~ /(~|\.bak|_bak)$/ || + if $path =~ /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/ || + $path =~ /(~|\.bak|_bak)$/ || $path =~ /\..*\.sw(o|p)$/ || $path =~ /\B\.svn\b/; diff --git a/gnu/usr.bin/perl/cpan/Compress-Raw-Zlib/private/MakeUtil.pm b/gnu/usr.bin/perl/cpan/Compress-Raw-Zlib/private/MakeUtil.pm index 12fa26fd05f..037782b9498 100644 --- a/gnu/usr.bin/perl/cpan/Compress-Raw-Zlib/private/MakeUtil.pm +++ b/gnu/usr.bin/perl/cpan/Compress-Raw-Zlib/private/MakeUtil.pm @@ -35,7 +35,8 @@ sub MY::libscan my $path = shift; return undef - if $path =~ /(~|\.bak|_bak)$/ || + if $path =~ /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/ || + $path =~ /(~|\.bak|_bak)$/ || $path =~ /\..*\.sw(o|p)$/ || $path =~ /\B\.svn\b/; diff --git a/gnu/usr.bin/perl/cpan/Digest-MD5/MD5.xs b/gnu/usr.bin/perl/cpan/Digest-MD5/MD5.xs index a48d951056c..fda44bbe4a9 100644 --- a/gnu/usr.bin/perl/cpan/Digest-MD5/MD5.xs +++ b/gnu/usr.bin/perl/cpan/Digest-MD5/MD5.xs @@ -39,6 +39,8 @@ extern "C" { #include "EXTERN.h" #include "perl.h" #include "XSUB.h" +#include <sys/types.h> +#include <md5.h> #ifdef __cplusplus } #endif @@ -88,61 +90,6 @@ static MAGIC *THX_sv_magicext(pTHX_ SV *sv, SV *obj, int type, # define SvPVbyte(sv, lp) (sv_utf8_downgrade((sv), 0), SvPV((sv), (lp))) #endif -/* Perl does not guarantee that U32 is exactly 32 bits. Some system - * has no integral type with exactly 32 bits. For instance, A Cray has - * short, int and long all at 64 bits so we need to apply this macro - * to reduce U32 values to 32 bits at appropriate places. If U32 - * really does have 32 bits then this is a no-op. - */ -#if BYTEORDER > 0x4321 || defined(TRUNCATE_U32) - #define TO32(x) ((x) & 0xFFFFffff) - #define TRUNC32(x) ((x) &= 0xFFFFffff) -#else - #define TO32(x) (x) - #define TRUNC32(x) /*nothing*/ -#endif - -/* The MD5 algorithm is defined in terms of little endian 32-bit - * values. The following macros (and functions) allow us to convert - * between native integers and such values. - */ -#undef BYTESWAP -#ifndef U32_ALIGNMENT_REQUIRED - #if BYTEORDER == 0x1234 /* 32-bit little endian */ - #define BYTESWAP(x) (x) /* no-op */ - - #elif BYTEORDER == 0x4321 /* 32-bit big endian */ - #define BYTESWAP(x) ((((x)&0xFF)<<24) \ - |(((x)>>24)&0xFF) \ - |(((x)&0x0000FF00)<<8) \ - |(((x)&0x00FF0000)>>8) ) - #endif -#endif - -#ifndef BYTESWAP -static void u2s(U32 u, U8* s) -{ - *s++ = (U8)(u & 0xFF); - *s++ = (U8)((u >> 8) & 0xFF); - *s++ = (U8)((u >> 16) & 0xFF); - *s = (U8)((u >> 24) & 0xFF); -} - -#define s2u(s,u) ((u) = (U32)(*s) | \ - ((U32)(*(s+1)) << 8) | \ - ((U32)(*(s+2)) << 16) | \ - ((U32)(*(s+3)) << 24)) -#endif - -/* This structure keeps the current state of algorithm. - */ -typedef struct { - U32 A, B, C, D; /* current digest */ - U32 bytes_low; /* counts bytes in message */ - U32 bytes_high; /* turn it into a 64-bit counter */ - U8 buffer[128]; /* collect complete 64 byte blocks */ -} MD5_CTX; - #if defined(USE_ITHREADS) && defined(MGf_DUP) STATIC int dup_md5_ctx(pTHX_ MAGIC *mg, CLONE_PARAMS *params) { @@ -179,325 +126,6 @@ STATIC const struct { }; #endif - -/* Padding is added at the end of the message in order to fill a - * complete 64 byte block (- 8 bytes for the message length). The - * padding is also the reason the buffer in MD5_CTX have to be - * 128 bytes. - */ -static const unsigned char PADDING[64] = { - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* Constants for MD5Transform routine. - */ -#define S11 7 -#define S12 12 -#define S13 17 -#define S14 22 -#define S21 5 -#define S22 9 -#define S23 14 -#define S24 20 -#define S31 4 -#define S32 11 -#define S33 16 -#define S34 23 -#define S41 6 -#define S42 10 -#define S43 15 -#define S44 21 - -/* F, G, H and I are basic MD5 functions. - */ -#define F(x, y, z) ((((x) & ((y) ^ (z))) ^ (z))) -#define G(x, y, z) F(z, x, y) -#define H(x, y, z) ((x) ^ (y) ^ (z)) -#define I(x, y, z) ((y) ^ ((x) | (~z))) - -/* ROTATE_LEFT rotates x left n bits. - */ -#define ROTATE_LEFT(x, n) (((x) << (n) | ((x) >> (32-(n))))) - -/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. - * Rotation is separate from addition to prevent recomputation. - */ -#define FF(a, b, c, d, s, ac) \ - (a) += F ((b), (c), (d)) + (NEXTx) + (U32)(ac); \ - TRUNC32((a)); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - TRUNC32((a)); - -#define GG(a, b, c, d, x, s, ac) \ - (a) += G ((b), (c), (d)) + X[x] + (U32)(ac); \ - TRUNC32((a)); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - TRUNC32((a)); - -#define HH(a, b, c, d, x, s, ac) \ - (a) += H ((b), (c), (d)) + X[x] + (U32)(ac); \ - TRUNC32((a)); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - TRUNC32((a)); - -#define II(a, b, c, d, x, s, ac) \ - (a) += I ((b), (c), (d)) + X[x] + (U32)(ac); \ - TRUNC32((a)); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ - TRUNC32((a)); - - -static void -MD5Init(MD5_CTX *ctx) -{ - /* Start state */ - ctx->A = 0x67452301; - ctx->B = 0xefcdab89; - ctx->C = 0x98badcfe; - ctx->D = 0x10325476; - - /* message length */ - ctx->bytes_low = ctx->bytes_high = 0; -} - - -static void -MD5Transform(MD5_CTX* ctx, const U8* buf, STRLEN blocks) -{ -#ifdef MD5_DEBUG - static int tcount = 0; -#endif - - U32 A = ctx->A; - U32 B = ctx->B; - U32 C = ctx->C; - U32 D = ctx->D; - -#ifndef U32_ALIGNMENT_REQUIRED - const U32 *x = (U32*)buf; /* really just type casting */ -#endif - - do { - U32 a = A; - U32 b = B; - U32 c = C; - U32 d = D; - -#if BYTEORDER == 0x1234 && !defined(U32_ALIGNMENT_REQUIRED) - const U32 *X = x; - #define NEXTx (*x++) -#else - U32 X[16]; /* converted values, used in round 2-4 */ - U32 *uptr = X; - U32 tmp; - #ifdef BYTESWAP - #define NEXTx (tmp=*x++, *uptr++ = BYTESWAP(tmp)) - #else - #define NEXTx (s2u(buf,tmp), buf += 4, *uptr++ = tmp) - #endif -#endif - -#ifdef MD5_DEBUG - if (buf == ctx->buffer) - fprintf(stderr,"%5d: Transform ctx->buffer", ++tcount); - else - fprintf(stderr,"%5d: Transform %p (%d)", ++tcount, buf, blocks); - - { - int i; - fprintf(stderr,"["); - for (i = 0; i < 16; i++) { - fprintf(stderr,"%x,", x[i]); - } - fprintf(stderr,"]\n"); - } -#endif - - /* Round 1 */ - FF (a, b, c, d, S11, 0xd76aa478); /* 1 */ - FF (d, a, b, c, S12, 0xe8c7b756); /* 2 */ - FF (c, d, a, b, S13, 0x242070db); /* 3 */ - FF (b, c, d, a, S14, 0xc1bdceee); /* 4 */ - FF (a, b, c, d, S11, 0xf57c0faf); /* 5 */ - FF (d, a, b, c, S12, 0x4787c62a); /* 6 */ - FF (c, d, a, b, S13, 0xa8304613); /* 7 */ - FF (b, c, d, a, S14, 0xfd469501); /* 8 */ - FF (a, b, c, d, S11, 0x698098d8); /* 9 */ - FF (d, a, b, c, S12, 0x8b44f7af); /* 10 */ - FF (c, d, a, b, S13, 0xffff5bb1); /* 11 */ - FF (b, c, d, a, S14, 0x895cd7be); /* 12 */ - FF (a, b, c, d, S11, 0x6b901122); /* 13 */ - FF (d, a, b, c, S12, 0xfd987193); /* 14 */ - FF (c, d, a, b, S13, 0xa679438e); /* 15 */ - FF (b, c, d, a, S14, 0x49b40821); /* 16 */ - - /* Round 2 */ - GG (a, b, c, d, 1, S21, 0xf61e2562); /* 17 */ - GG (d, a, b, c, 6, S22, 0xc040b340); /* 18 */ - GG (c, d, a, b, 11, S23, 0x265e5a51); /* 19 */ - GG (b, c, d, a, 0, S24, 0xe9b6c7aa); /* 20 */ - GG (a, b, c, d, 5, S21, 0xd62f105d); /* 21 */ - GG (d, a, b, c, 10, S22, 0x2441453); /* 22 */ - GG (c, d, a, b, 15, S23, 0xd8a1e681); /* 23 */ - GG (b, c, d, a, 4, S24, 0xe7d3fbc8); /* 24 */ - GG (a, b, c, d, 9, S21, 0x21e1cde6); /* 25 */ - GG (d, a, b, c, 14, S22, 0xc33707d6); /* 26 */ - GG (c, d, a, b, 3, S23, 0xf4d50d87); /* 27 */ - GG (b, c, d, a, 8, S24, 0x455a14ed); /* 28 */ - GG (a, b, c, d, 13, S21, 0xa9e3e905); /* 29 */ - GG (d, a, b, c, 2, S22, 0xfcefa3f8); /* 30 */ - GG (c, d, a, b, 7, S23, 0x676f02d9); /* 31 */ - GG (b, c, d, a, 12, S24, 0x8d2a4c8a); /* 32 */ - - /* Round 3 */ - HH (a, b, c, d, 5, S31, 0xfffa3942); /* 33 */ - HH (d, a, b, c, 8, S32, 0x8771f681); /* 34 */ - HH (c, d, a, b, 11, S33, 0x6d9d6122); /* 35 */ - HH (b, c, d, a, 14, S34, 0xfde5380c); /* 36 */ - HH (a, b, c, d, 1, S31, 0xa4beea44); /* 37 */ - HH (d, a, b, c, 4, S32, 0x4bdecfa9); /* 38 */ - HH (c, d, a, b, 7, S33, 0xf6bb4b60); /* 39 */ - HH (b, c, d, a, 10, S34, 0xbebfbc70); /* 40 */ - HH (a, b, c, d, 13, S31, 0x289b7ec6); /* 41 */ - HH (d, a, b, c, 0, S32, 0xeaa127fa); /* 42 */ - HH (c, d, a, b, 3, S33, 0xd4ef3085); /* 43 */ - HH (b, c, d, a, 6, S34, 0x4881d05); /* 44 */ - HH (a, b, c, d, 9, S31, 0xd9d4d039); /* 45 */ - HH (d, a, b, c, 12, S32, 0xe6db99e5); /* 46 */ - HH (c, d, a, b, 15, S33, 0x1fa27cf8); /* 47 */ - HH (b, c, d, a, 2, S34, 0xc4ac5665); /* 48 */ - - /* Round 4 */ - II (a, b, c, d, 0, S41, 0xf4292244); /* 49 */ - II (d, a, b, c, 7, S42, 0x432aff97); /* 50 */ - II (c, d, a, b, 14, S43, 0xab9423a7); /* 51 */ - II (b, c, d, a, 5, S44, 0xfc93a039); /* 52 */ - II (a, b, c, d, 12, S41, 0x655b59c3); /* 53 */ - II (d, a, b, c, 3, S42, 0x8f0ccc92); /* 54 */ - II (c, d, a, b, 10, S43, 0xffeff47d); /* 55 */ - II (b, c, d, a, 1, S44, 0x85845dd1); /* 56 */ - II (a, b, c, d, 8, S41, 0x6fa87e4f); /* 57 */ - II (d, a, b, c, 15, S42, 0xfe2ce6e0); /* 58 */ - II (c, d, a, b, 6, S43, 0xa3014314); /* 59 */ - II (b, c, d, a, 13, S44, 0x4e0811a1); /* 60 */ - II (a, b, c, d, 4, S41, 0xf7537e82); /* 61 */ - II (d, a, b, c, 11, S42, 0xbd3af235); /* 62 */ - II (c, d, a, b, 2, S43, 0x2ad7d2bb); /* 63 */ - II (b, c, d, a, 9, S44, 0xeb86d391); /* 64 */ - - A += a; TRUNC32(A); - B += b; TRUNC32(B); - C += c; TRUNC32(C); - D += d; TRUNC32(D); - - } while (--blocks); - ctx->A = A; - ctx->B = B; - ctx->C = C; - ctx->D = D; -} - - -#ifdef MD5_DEBUG -static char* -ctx_dump(MD5_CTX* ctx) -{ - static char buf[1024]; - sprintf(buf, "{A=%x,B=%x,C=%x,D=%x,%d,%d(%d)}", - ctx->A, ctx->B, ctx->C, ctx->D, - ctx->bytes_low, ctx->bytes_high, (ctx->bytes_low&0x3F)); - return buf; -} -#endif - - -static void -MD5Update(MD5_CTX* ctx, const U8* buf, STRLEN len) -{ - STRLEN blocks; - STRLEN fill = ctx->bytes_low & 0x3F; - -#ifdef MD5_DEBUG - static int ucount = 0; - fprintf(stderr,"%5i: Update(%s, %p, %d)\n", ++ucount, ctx_dump(ctx), - buf, len); -#endif - - ctx->bytes_low += len; - if (ctx->bytes_low < len) /* wrap around */ - ctx->bytes_high++; - - if (fill) { - STRLEN missing = 64 - fill; - if (len < missing) { - Copy(buf, ctx->buffer + fill, len, U8); - return; - } - Copy(buf, ctx->buffer + fill, missing, U8); - MD5Transform(ctx, ctx->buffer, 1); - buf += missing; - len -= missing; - } - - blocks = len >> 6; - if (blocks) - MD5Transform(ctx, buf, blocks); - if ( (len &= 0x3F)) { - Copy(buf + (blocks << 6), ctx->buffer, len, U8); - } -} - - -static void -MD5Final(U8* digest, MD5_CTX *ctx) -{ - STRLEN fill = ctx->bytes_low & 0x3F; - STRLEN padlen = (fill < 56 ? 56 : 120) - fill; - U32 bits_low, bits_high; -#ifdef MD5_DEBUG - fprintf(stderr," Final: %s\n", ctx_dump(ctx)); -#endif - Copy(PADDING, ctx->buffer + fill, padlen, U8); - fill += padlen; - - bits_low = ctx->bytes_low << 3; - bits_high = (ctx->bytes_high << 3) | (ctx->bytes_low >> 29); -#ifdef BYTESWAP - *(U32*)(ctx->buffer + fill) = BYTESWAP(bits_low); fill += 4; - *(U32*)(ctx->buffer + fill) = BYTESWAP(bits_high); fill += 4; -#else - u2s(bits_low, ctx->buffer + fill); fill += 4; - u2s(bits_high, ctx->buffer + fill); fill += 4; -#endif - - MD5Transform(ctx, ctx->buffer, fill >> 6); -#ifdef MD5_DEBUG - fprintf(stderr," Result: %s\n", ctx_dump(ctx)); -#endif - -#ifdef BYTESWAP - *(U32*)digest = BYTESWAP(ctx->A); digest += 4; - *(U32*)digest = BYTESWAP(ctx->B); digest += 4; - *(U32*)digest = BYTESWAP(ctx->C); digest += 4; - *(U32*)digest = BYTESWAP(ctx->D); -#else - u2s(ctx->A, digest); - u2s(ctx->B, digest+4); - u2s(ctx->C, digest+8); - u2s(ctx->D, digest+12); -#endif -} - -#ifndef INT2PTR -#define INT2PTR(any,d) (any)(d) -#endif - static MD5_CTX* get_md5_ctx(pTHX_ SV* sv) { MAGIC *mg; @@ -678,7 +306,7 @@ addfile(self, fh) InputStream fh PREINIT: MD5_CTX* context = get_md5_ctx(aTHX_ self); - STRLEN fill = context->bytes_low & 0x3F; + STRLEN fill = (context->count >> 3) & (MD5_BLOCK_LENGTH - 1); #ifdef USE_HEAP_INSTEAD_OF_STACK unsigned char* buffer; #else @@ -743,14 +371,12 @@ context(ctx, ...) PPCODE: if (items > 2) { STRLEN len; - unsigned long blocks = SvUV(ST(1)); + ctx->count = SvUV(ST(1)) << 3; unsigned char *buf = (unsigned char *)(SvPV(ST(2), len)); - ctx->A = buf[ 0] | (buf[ 1]<<8) | (buf[ 2]<<16) | (buf[ 3]<<24); - ctx->B = buf[ 4] | (buf[ 5]<<8) | (buf[ 6]<<16) | (buf[ 7]<<24); - ctx->C = buf[ 8] | (buf[ 9]<<8) | (buf[10]<<16) | (buf[11]<<24); - ctx->D = buf[12] | (buf[13]<<8) | (buf[14]<<16) | (buf[15]<<24); - ctx->bytes_low = blocks << 6; - ctx->bytes_high = blocks >> 26; + ctx->state[0] = buf[ 0] | (buf[ 1]<<8) | (buf[ 2]<<16) | (buf[ 3]<<24); + ctx->state[1] = buf[ 4] | (buf[ 5]<<8) | (buf[ 6]<<16) | (buf[ 7]<<24); + ctx->state[2] = buf[ 8] | (buf[ 9]<<8) | (buf[10]<<16) | (buf[11]<<24); + ctx->state[3] = buf[12] | (buf[13]<<8) | (buf[14]<<16) | (buf[15]<<24); if (items == 4) { buf = (unsigned char *)(SvPV(ST(3), len)); MD5Update(ctx, buf, len); @@ -760,17 +386,20 @@ context(ctx, ...) XSRETURN(0); } - w=ctx->A; out[ 0]=w; out[ 1]=(w>>8); out[ 2]=(w>>16); out[ 3]=(w>>24); - w=ctx->B; out[ 4]=w; out[ 5]=(w>>8); out[ 6]=(w>>16); out[ 7]=(w>>24); - w=ctx->C; out[ 8]=w; out[ 9]=(w>>8); out[10]=(w>>16); out[11]=(w>>24); - w=ctx->D; out[12]=w; out[13]=(w>>8); out[14]=(w>>16); out[15]=(w>>24); + w=ctx->state[0]; out[ 0]=w; out[ 1]=(w>>8); out[ 2]=(w>>16); out[ 3]=(w>>24); + w=ctx->state[1]; out[ 4]=w; out[ 5]=(w>>8); out[ 6]=(w>>16); out[ 7]=(w>>24); + w=ctx->state[2]; out[ 8]=w; out[ 9]=(w>>8); out[10]=(w>>16); out[11]=(w>>24); + w=ctx->state[3]; out[12]=w; out[13]=(w>>8); out[14]=(w>>16); out[15]=(w>>24); EXTEND(SP, 3); - ST(0) = sv_2mortal(newSVuv(ctx->bytes_high << 26 | - ctx->bytes_low >> 6)); + ST(0) = sv_2mortal(newSViv((ctx->count >> 3) + - ((ctx->count >> 3) % MD5_BLOCK_LENGTH))); ST(1) = sv_2mortal(newSVpv(out, 16)); - ST(2) = sv_2mortal(newSVpv((char *)ctx->buffer, - ctx->bytes_low & 0x3F)); + ST(2) = sv_2mortal(newSVpv("",0)); + if (((ctx->count >> 3) & (MD5_BLOCK_LENGTH - 1)) != 0) + ST(2) = sv_2mortal(newSVpv((char *)ctx->buffer, + (ctx->count >> 3) & (MD5_BLOCK_LENGTH - 1))); + XSRETURN(3); void diff --git a/gnu/usr.bin/perl/cpan/Digest-MD5/t/files.t b/gnu/usr.bin/perl/cpan/Digest-MD5/t/files.t index 63479c24a30..728ceb130b8 100755 --- a/gnu/usr.bin/perl/cpan/Digest-MD5/t/files.t +++ b/gnu/usr.bin/perl/cpan/Digest-MD5/t/files.t @@ -21,7 +21,7 @@ EOT # This is the output of: 'md5sum README MD5.xs rfc1321.txt' $EXPECT = <<EOT; 2f93400875dbb56f36691d5f69f3eba5 README -9572832f3628e3bebcdd54f47c43dc5a MD5.xs +641f5e20d5d53222c50ba99fbddabd15 MD5.xs 754b9db19f79dbc4992f7166eb0f37ce rfc1321.txt EOT } diff --git a/gnu/usr.bin/perl/cpan/ExtUtils-Install/lib/ExtUtils/Install.pm b/gnu/usr.bin/perl/cpan/ExtUtils-Install/lib/ExtUtils/Install.pm index 047c007145e..7bcd941bd2a 100644 --- a/gnu/usr.bin/perl/cpan/ExtUtils-Install/lib/ExtUtils/Install.pm +++ b/gnu/usr.bin/perl/cpan/ExtUtils-Install/lib/ExtUtils/Install.pm @@ -108,6 +108,7 @@ $INSTALL_QUIET = 1 $ENV{MAKEFLAGS} =~ /\b(s|silent|quiet)\b/); my $Curdir = File::Spec->curdir; +my $Perm_Dir = $ENV{PERL_CORE} ? 0770 : 0755; sub _estr(@) { return join "\n",'!' x 72,@_,'!' x 72,''; @@ -799,7 +800,7 @@ sub install { #XXX OS-SPECIFIC _chdir($cwd); } foreach my $targetdir (sort keys %check_dirs) { - _mkpath( $targetdir, 0, 0755, $verbose, $dry_run ); + _mkpath( $targetdir, 0, $Perm_Dir, $verbose, $dry_run ); } foreach my $found (@found_files) { my ($diff, $ffd, $origfile, $mode, $size, $atime, $mtime, @@ -813,7 +814,7 @@ sub install { #XXX OS-SPECIFIC $targetfile= _unlink_or_rename( $targetfile, 'tryhard', 'install' ) unless $dry_run; } elsif ( ! -d $targetdir ) { - _mkpath( $targetdir, 0, 0755, $verbose, $dry_run ); + _mkpath( $targetdir, 0, $Perm_Dir, $verbose, $dry_run ); } print "Installing $targetfile\n"; @@ -853,7 +854,7 @@ sub install { #XXX OS-SPECIFIC if ($pack{'write'}) { $dir = install_rooted_dir(dirname($pack{'write'})); - _mkpath( $dir, 0, 0755, $verbose, $dry_run ); + _mkpath( $dir, 0, $Perm_Dir, $verbose, $dry_run ); print "Writing $pack{'write'}\n" if $verbose; $packlist->write(install_rooted_file($pack{'write'})) unless $dry_run; } @@ -1199,7 +1200,7 @@ environment variable will silence this output. sub pm_to_blib { my($fromto,$autodir,$pm_filter) = @_; - _mkpath($autodir,0,0755) if defined $autodir; + _mkpath($autodir,0,$Perm_Dir) if defined $autodir; while(my($from, $to) = each %$fromto) { if( -f $to && -s $from == -s $to && -M $to < -M $from ) { print "Skip $to (unchanged)\n" unless $INSTALL_QUIET; @@ -1222,7 +1223,7 @@ sub pm_to_blib { # we wont try hard here. its too likely to mess things up. forceunlink($to); } else { - _mkpath(dirname($to),0,0755); + _mkpath(dirname($to),0,$Perm_Dir); } if ($need_filtering) { run_filter($pm_filter, $from, $to); diff --git a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm index 1a3893c30b6..f0106a44c9d 100644 --- a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm +++ b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm @@ -1088,9 +1088,9 @@ manifypods : pure_all config $dependencies END my @man_cmds; - foreach my $section (qw(1 3)) { - my $pods = $self->{"MAN${section}PODS"}; - my $p2m = sprintf <<'CMD', $section, $] > 5.008 ? " -u" : ""; + foreach my $num (qw(1 3)) { + my $pods = $self->{"MAN${num}PODS"}; + my $p2m = sprintf <<'CMD', "\$(MAN${num}SECTION)", "$]" > 5.008 ? " -u" : ""; $(NOECHO) $(POD2MAN) --section=%s --perm_rw=$(PERM_RW)%s CMD push @man_cmds, $self->split_command($p2m, map {($_,$pods->{$_})} sort keys %$pods); diff --git a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm index fe53be12efd..45ab3e85bc4 100644 --- a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm +++ b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm @@ -398,6 +398,7 @@ sub constants { INST_ARCHLIB INST_SCRIPT INST_BIN INST_LIB INST_MAN1DIR INST_MAN3DIR MAN1EXT MAN3EXT + MAN1SECTION MAN3SECTION INSTALLDIRS INSTALL_BASE DESTDIR PREFIX PERLPREFIX SITEPREFIX VENDORPREFIX ), @@ -1450,6 +1451,24 @@ sub init_MANPODS { $self->$init_method(); } } + + # logic similar to picking man${num}ext in perl's Configure script + foreach my $num (1,3) { + my $installdirs = uc $self->{INSTALLDIRS}; + $installdirs = '' if $installdirs eq 'PERL'; + my $mandir = $self->_expand_macros( + $self->{ "INSTALL${installdirs}MAN${num}DIR" } ); + my $section = $num; + + foreach ($num, "${num}p", "${num}pm", qw< l n o C L >, "L$num") { + if ( $mandir =~ /\b(?:man|cat)$_$/ ) { + $section = $_; + last; + } + } + + $self->{"MAN${num}SECTION"} = $section; + } } @@ -2134,7 +2153,8 @@ Called by init_main. Initializes PERL_* sub init_PERM { my($self) = shift; - $self->{PERM_DIR} = 755 unless defined $self->{PERM_DIR}; + my $perm_dir = $self->{PERL_CORE} ? 770 : 755; + $self->{PERM_DIR} = $perm_dir unless defined $self->{PERM_DIR}; $self->{PERM_RW} = 644 unless defined $self->{PERM_RW}; $self->{PERM_RWX} = 755 unless defined $self->{PERM_RWX}; diff --git a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/build_man.t b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/build_man.t index d4649e7598c..b35c4c16bf9 100755 --- a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/build_man.t +++ b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/build_man.t @@ -7,9 +7,10 @@ BEGIN { } use strict; -use Test::More tests => 9; +use Test::More tests => 46; use File::Spec; +use File::Temp qw[tempdir]; use TieOut; use MakeMaker::Test::Utils; use MakeMaker::Test::Setup::BFD; @@ -22,29 +23,36 @@ use ExtUtils::MakeMaker::Config; $Config{installman3dir} = 'none'; chdir 't'; +perl_lib; # sets $ENV{PERL5LIB} relative to t/ -perl_lib(); +my $tmpdir = tempdir( DIR => '../t', CLEANUP => 1 ); +use Cwd; my $cwd = getcwd; END { chdir $cwd } # so File::Temp can cleanup +chdir $tmpdir; ok( setup_recurs(), 'setup' ); END { - ok( chdir File::Spec->updir ); - ok( teardown_recurs(), 'teardown' ); + ok chdir File::Spec->updir, 'chdir updir'; + ok teardown_recurs(), 'teardown'; } ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) || diag("chdir failed: $!"); +my $README = 'README.pod'; +{ open my $fh, '>', $README or die "$README: $!"; } -ok( my $stdout = tie *STDOUT, 'TieOut' ); +ok((my $stdout = tie *STDOUT, 'TieOut'), 'tie stdout'); { local $Config{installman3dir} = File::Spec->catdir(qw(t lib)); - my $mm = WriteMakefile( NAME => 'Big::Dummy', VERSION_FROM => 'lib/Big/Dummy.pm', ); - - ok( keys %{ $mm->{MAN3PODS} } ); + my %got = %{ $mm->{MAN3PODS} }; + # because value too OS-specific + my $delete_key = $^O eq 'VMS' ? '[.lib.Big]Dummy.pm' : 'lib/Big/Dummy.pm'; + ok delete($got{$delete_key}), 'normal man3pod'; + is_deeply \%got, {}, 'no extra man3pod'; } { @@ -53,28 +61,126 @@ ok( my $stdout = tie *STDOUT, 'TieOut' ); VERSION_FROM => 'lib/Big/Dummy.pm', INSTALLMAN3DIR => 'none' ); - - is_deeply( $mm->{MAN3PODS}, {} ); + is_deeply $mm->{MAN3PODS}, {}, 'suppress man3pod with "none"'; } - { my $mm = WriteMakefile( NAME => 'Big::Dummy', VERSION_FROM => 'lib/Big/Dummy.pm', MAN3PODS => {} ); - - is_deeply( $mm->{MAN3PODS}, { } ); + is_deeply $mm->{MAN3PODS}, {}, 'suppress man3pod with {}'; } - { my $mm = WriteMakefile( NAME => 'Big::Dummy', VERSION_FROM => 'lib/Big/Dummy.pm', MAN3PODS => { "Foo.pm" => "Foo.1" } ); + is_deeply $mm->{MAN3PODS}, { "Foo.pm" => "Foo.1" }, 'override man3pod'; +} + +unlink $README; - is_deeply( $mm->{MAN3PODS}, { "Foo.pm" => "Foo.1" } ); +# Check that we find the manage section from the directory +{ + local $Config{installman1dir} = ''; + local $Config{installman3dir} = ''; + local $Config{installsiteman1dir} = ''; + local $Config{installsiteman3dir} = ''; + local $Config{installvendorman1dir} = ''; + local $Config{installvendorman3dir} = ''; + local $Config{usevendorprefix} = ''; + local $Config{vendorprefixexp} = ''; + + my $INSTALLDIRS = 'site'; + + my $sections_ok = sub { + my ( $man1section, $man3section, $m ) = @_; + local $Test::Builder::Level = $Test::Builder::Level + 1; + + my $stdout = tie *STDOUT, 'TieOut' or die; + my $mm = WriteMakefile( + NAME => 'Big::Dummy', + VERSION_FROM => 'lib/Big/Dummy.pm', + INSTALLDIRS => $INSTALLDIRS, + ); + + is( $mm->{MAN1SECTION}, $man1section, + "$m man1section is $man1section" ); + is( $mm->{MAN3SECTION}, $man3section, + "$m man3section is $man3section" ); + }; + + # Correctly detect known man sections + foreach my $s ( '{num}', '{num}p', '{num}pm', qw< l n o C L >, "L{num}", ) + { + ( my $man1section = $s ) =~ s/\{num\}/1/; + ( my $man3section = $s ) =~ s/\{num\}/3/; + + $Config{installman1dir} + = File::Spec->catdir( 'foo', "man$man1section" ); + $Config{installman3dir} + = File::Spec->catdir( 'foo', "man$man3section" ); + + $sections_ok->( $man1section, $man3section, "From main [$s]" ); + } + + # Ignore unknown man sections + foreach my $s ( '', qw< 2 2p 33 >, "C{num}" ) { + ( my $man1section = $s ) =~ s/\{num\}/1/; + ( my $man3section = $s ) =~ s/\{num\}/3/; + + $Config{installman1dir} + = File::Spec->catdir( 'foo', "man$man1section" ); + $Config{installman3dir} + = File::Spec->catdir( 'foo', "man$man3section" ); + + $sections_ok->( 1, 3, "Ignore unrecognized [$s]" ); + } + + # Look in the right installman?dir based on INSTALLDIRS + { + $Config{installman1dir} = File::Spec->catdir( 'foo', 'cat1p' ); + $Config{installman3dir} = File::Spec->catdir( 'foo', 'cat3p' ); + $Config{installsiteman1dir} = File::Spec->catdir( 'foo', 'catL' ); + $Config{installsiteman3dir} = File::Spec->catdir( 'foo', 'catL3' ); + + $sections_ok->( 'L', 'L3', "From site" ); + + my $installwas = $INSTALLDIRS; + $INSTALLDIRS = 'perl'; + $sections_ok->( '1p', '3p', "From main" ); + $INSTALLDIRS = $installwas; + + } + + # Set MAN?SECTION in Makefile + { + $Config{installman1dir} = File::Spec->catdir( 'foo', 'man1pm' ); + $Config{installman3dir} = File::Spec->catdir( 'foo', 'man3pm' ); + $Config{installsiteman1dir} = ''; + $Config{installsiteman3dir} = ''; + + my $stdout = tie *STDOUT, 'TieOut' or die; + my $mm = WriteMakefile( + NAME => 'Big::Dummy', + VERSION_FROM => 'lib/Big/Dummy.pm', + MAN1PODS => { foo => 'foo.1' }, + INSTALLDIRS => $INSTALLDIRS, + ); + + my $makefile = slurp('Makefile'); + + like $makefile, qr/^\QMAN1SECTION = 1pm\E$/xms, "Set MAN1SECTION"; + like $makefile, qr/^\QMAN3SECTION = 3pm\E$/xms, "Set MAN3SECTION"; + + like $makefile, qr/\Q$(POD2MAN) --section=$(MAN1SECTION) \E/, + "Set POD2MAN section to \$(MAN1SECTION)"; + like $makefile, qr/\Q$(POD2MAN) --section=$(MAN3SECTION) \E/, + "Set POD2MAN section to \$(MAN3SECTION)"; + } } + diff --git a/gnu/usr.bin/perl/cpan/IO-Compress/private/MakeUtil.pm b/gnu/usr.bin/perl/cpan/IO-Compress/private/MakeUtil.pm index 12fa26fd05f..037782b9498 100644 --- a/gnu/usr.bin/perl/cpan/IO-Compress/private/MakeUtil.pm +++ b/gnu/usr.bin/perl/cpan/IO-Compress/private/MakeUtil.pm @@ -35,7 +35,8 @@ sub MY::libscan my $path = shift; return undef - if $path =~ /(~|\.bak|_bak)$/ || + if $path =~ /^(?:RCS|CVS|SCCS|\.svn|_darcs)$/ || + $path =~ /(~|\.bak|_bak)$/ || $path =~ /\..*\.sw(o|p)$/ || $path =~ /\B\.svn\b/; diff --git a/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/lib/OpenBSD/Pledge.pm b/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/lib/OpenBSD/Pledge.pm index 67ad847393b..6512423c12e 100644 --- a/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/lib/OpenBSD/Pledge.pm +++ b/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/lib/OpenBSD/Pledge.pm @@ -1,4 +1,4 @@ -# $OpenBSD: Pledge.pm,v 1.4 2019/07/24 22:22:59 afresh1 Exp $ # +# $OpenBSD: Pledge.pm,v 1.5 2019/12/30 02:15:17 afresh1 Exp $ # package OpenBSD::Pledge; use 5.020002; diff --git a/gnu/usr.bin/perl/cpan/Pod-Parser/lib/Pod/PlainText.pm b/gnu/usr.bin/perl/cpan/Pod-Parser/lib/Pod/PlainText.pm index 3db4d903cd6..03252e93c71 100644 --- a/gnu/usr.bin/perl/cpan/Pod-Parser/lib/Pod/PlainText.pm +++ b/gnu/usr.bin/perl/cpan/Pod-Parser/lib/Pod/PlainText.pm @@ -139,6 +139,19 @@ sub initialize { return $self->SUPER::initialize; } +# pod2text and pod2man re-use the same parser on a list of files, +# and will lose some information if some intermediate documents produce +# unbalanced calls to begin_cmd/end_cmd. +# via r1.4 of OpenBSD src/gnu/usr.bin/perl/lib/Pod/PlainText.pm +sub begin_pod { + my $self = shift; + + $$self{VERBATIM} = 0; + $$self{EXCLUDE} = 0; + + return $self->SUPER::begin_pod(@_); +} + ############################################################################ # Core overrides diff --git a/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc.pm b/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc.pm index bb6ffc83efb..42ed4b49d54 100644 --- a/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc.pm +++ b/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc.pm @@ -486,6 +486,8 @@ sub init_formatter_class_list { $self->opt_M_with('Pod::Perldoc::ToPod'); # the always-there fallthru $self->opt_o_with('text'); + $self->opt_o_with('man') + if $ENV{TERM} && $ENV{TERM} !~ /dumb|emacs|none|unknown/i; return; } diff --git a/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm b/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm index bfcb5c40ee6..d8e42b1703b 100644 --- a/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm +++ b/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm @@ -144,7 +144,9 @@ sub _get_podman_switches { # # See RT #77465 # - #push @switches, 'utf8' => 1; + # Then again, do *not* comment it out on OpenBSD: + # mandoc handles UTF-8 input just fine. + push @switches, 'utf8' => 1; $self->debug( "Pod::Man switches are [@switches]\n" ); @@ -209,12 +211,6 @@ sub _have_groff_with_utf8 { $version ge $minimum_groff_version; } -sub _have_mandoc_with_utf8 { - my( $self ) = @_; - - $self->_is_mandoc and not system 'mandoc -Tlocale -V > /dev/null 2>&1'; - } - sub _collect_nroff_switches { my( $self ) = shift; @@ -227,6 +223,10 @@ sub _collect_nroff_switches { push @render_switches, '-rLL=' . (int $c) . 'n' if $cols > 80; } + if( $self->_is_mandoc ) { + push @render_switches, '-Owidth=' . $self->_get_columns; + } + # I hear persistent reports that adding a -c switch to $render # solves many people's problems. But I also hear that some mans # don't have a -c switch, so that unconditionally adding it here @@ -242,7 +242,6 @@ sub _get_device_switches { if( $self->_is_nroff ) { qw() } elsif( $self->_have_groff_with_utf8 ) { qw(-Kutf8 -Tutf8) } elsif( $self->_is_ebcdic ) { qw(-Tcp1047) } - elsif( $self->_have_mandoc_with_utf8 ) { qw(-Tlocale) } elsif( $self->_is_mandoc ) { qw() } else { qw(-Tlatin1) } } @@ -358,6 +357,9 @@ sub _filter_through_nroff { length $done ); + # wait for it to exit + waitpid( $pid, 0 ); + if( $? ) { $self->warn( "Error from pipe to $render!\n" ); $self->debug( 'Error: ' . do { local $/; <$err> } ); diff --git a/gnu/usr.bin/perl/cpan/Sys-Syslog/Makefile.PL b/gnu/usr.bin/perl/cpan/Sys-Syslog/Makefile.PL index d09ba69fc90..c76963d0b96 100644 --- a/gnu/usr.bin/perl/cpan/Sys-Syslog/Makefile.PL +++ b/gnu/usr.bin/perl/cpan/Sys-Syslog/Makefile.PL @@ -14,7 +14,7 @@ if ($] < 5.008) { } # create a lib/ dir in order to avoid warnings in Test::Distribution -mkdir "lib", 0755; +mkdir "lib", $ENV{PERL_CORE} ? 0770 : 0755; # virtual paths given to EU::MM my %virtual_path = ( 'Syslog.pm' => '$(INST_LIBDIR)/Syslog.pm' ); diff --git a/gnu/usr.bin/perl/cpan/Text-Balanced/lib/Text/Balanced.pm b/gnu/usr.bin/perl/cpan/Text-Balanced/lib/Text/Balanced.pm index f1a5780a0b9..4fbb1bc6315 100644 --- a/gnu/usr.bin/perl/cpan/Text-Balanced/lib/Text/Balanced.pm +++ b/gnu/usr.bin/perl/cpan/Text-Balanced/lib/Text/Balanced.pm @@ -1508,7 +1508,7 @@ C<extract_tagged> returns the complete text up to the point of failure. If the string is "PARA", C<extract_tagged> returns only the first paragraph after the tag (up to the first line that is either empty or contains only whitespace characters). -If the string is "", the the default behaviour (i.e. failure) is reinstated. +If the string is "", the default behaviour (i.e. failure) is reinstated. For example, suppose the start tag "/para" introduces a paragraph, which then continues until the next "/endpara" tag or until another "/para" tag is diff --git a/gnu/usr.bin/perl/cpan/podlators/lib/Pod/Man.pm b/gnu/usr.bin/perl/cpan/podlators/lib/Pod/Man.pm index 6ebab1e0e5c..71798c2533e 100644 --- a/gnu/usr.bin/perl/cpan/podlators/lib/Pod/Man.pm +++ b/gnu/usr.bin/perl/cpan/podlators/lib/Pod/Man.pm @@ -903,6 +903,8 @@ sub devise_title { $cut = $i + 1; $cut++ if ($dirs[$i + 1] && $dirs[$i + 1] eq 'lib'); last; + } elsif ($dirs[$i] eq 'lib' && $dirs[$i + 1] && $dirs[0] eq 'ext') { + $cut = $i + 1; } } if ($cut > 0) { diff --git a/gnu/usr.bin/perl/cpan/podlators/scripts/pod2man.PL b/gnu/usr.bin/perl/cpan/podlators/scripts/pod2man.PL index bc455d88291..cc6f955350d 100644 --- a/gnu/usr.bin/perl/cpan/podlators/scripts/pod2man.PL +++ b/gnu/usr.bin/perl/cpan/podlators/scripts/pod2man.PL @@ -71,12 +71,13 @@ my $stdin; # Parse our options, trying to retain backward compatibility with pod2man but # allowing short forms as well. --lax is currently ignored. my %options; +$options{utf8} = 1; Getopt::Long::config ('bundling_override'); GetOptions (\%options, 'center|c=s', 'date|d=s', 'errors=s', 'fixed=s', 'fixedbold=s', 'fixeditalic=s', 'fixedbolditalic=s', 'help|h', 'lax|l', 'lquote=s', 'name|n=s', 'nourls', 'official|o', 'quotes|q=s', 'release|r=s', 'rquote=s', 'section|s=s', 'stderr', - 'verbose|v', 'utf8|u') + 'verbose|v', 'utf8|u!') or exit 1; pod2usage (0) if $options{help}; @@ -126,7 +127,7 @@ exit $status; __END__ =for stopwords -en em --stderr stderr --utf8 UTF-8 overdo markup MT-LEVEL Allbery Solaris URL +en em --stderr stderr --no-utf8 UTF-8 overdo markup MT-LEVEL Allbery Solaris URL troff troff-specific formatters uppercased Christiansen --nourls UTC prepend lquote rquote @@ -141,7 +142,7 @@ pod2man [B<--center>=I<string>] [B<--date>=I<string>] [B<--errors>=I<style>] [B<--fixedbolditalic>=I<font>] [B<--name>=I<name>] [B<--nourls>] [B<--official>] [B<--release>=I<version>] [B<--section>=I<manext>] [B<--quotes>=I<quotes>] [B<--lquote>=I<quote>] [B<--rquote>=I<quote>] - [B<--stderr>] [B<--utf8>] [B<--verbose>] [I<input> [I<output>] ...] + [B<--stderr>] [B<--no-utf8>] [B<--verbose>] [I<input> [I<output>] ...] pod2man B<--help> @@ -344,19 +345,10 @@ to C<--errors=stderr> and is supported for backward compatibility. =item B<-u>, B<--utf8> -By default, B<pod2man> produces the most conservative possible *roff -output to try to ensure that it will work with as many different *roff -implementations as possible. Many *roff implementations cannot handle -non-ASCII characters, so this means all non-ASCII characters are converted -either to a *roff escape sequence that tries to create a properly accented -character (at least for troff output) or to C<X>. - -This option says to instead output literal UTF-8 characters. If your -*roff implementation can handle it, this is the best output format to use -and avoids corruption of documents containing non-ASCII characters. -However, be warned that *roff source with literal UTF-8 characters is not -supported by many implementations and may even result in segfaults and -other bad behavior. +This option allows B<pod2man> to output literal UTF-8 characters. +On OpenBSD, it is enabled by default and can be disabled with +B<--no-utf8>, in which case non-ASCII characters are converted +either to *roff escape sequences or to C<X>. Be aware that, when using this option, the input encoding of your POD source should be properly declared unless it's US-ASCII. Pod::Simple will diff --git a/gnu/usr.bin/perl/dist/IO/t/cachepropagate-unix.t b/gnu/usr.bin/perl/dist/IO/t/cachepropagate-unix.t index e3e438ea1ca..d1ba4880d23 100644 --- a/gnu/usr.bin/perl/dist/IO/t/cachepropagate-unix.t +++ b/gnu/usr.bin/perl/dist/IO/t/cachepropagate-unix.t @@ -14,10 +14,25 @@ use Test::More; plan skip_all => "UNIX domain sockets not implemented on $^O" if ($^O =~ m/^(?:qnx|nto|vos|MSWin32|VMS)$/); -plan tests => 15; - my $socketpath = catfile(tempdir( CLEANUP => 1 ), 'testsock'); +# check the socketpath fits in sun_path. +# +# pack_sockaddr_un() just truncates the path, this may change, but how +# it will handle such a condition is undetermined (and we might need +# to work with older versions of Socket outside of a perl build) +# https://rt.cpan.org/Ticket/Display.html?id=116819 + +my $name = eval { pack_sockaddr_un($socketpath) }; +if (defined $name) { + my ($packed_name) = eval { unpack_sockaddr_un($name) }; + if (!defined $packed_name || $packed_name ne $socketpath) { + plan skip_all => "socketpath too long for sockaddr_un"; + } +} + +plan tests => 15; + # start testing stream sockets: my $listener = IO::Socket::UNIX->new(Type => SOCK_STREAM, Listen => 1, @@ -88,6 +103,8 @@ SKIP: { skip "no Socket::SO_PROTOCOL", 1 if !defined(eval { Socket::SO_PROTOCOL }); skip "SO_PROTOCOL defined but not implemented", 1 if !defined $new->sockopt(Socket::SO_PROTOCOL); + skip "SO_PROTOCOL returns chosen protocol on OpenBSD" + if $^O eq 'openbsd'; is($new->protocol(), $p, 'protocol match'); } SKIP: { diff --git a/gnu/usr.bin/perl/dist/threads-shared/t/stress.t b/gnu/usr.bin/perl/dist/threads-shared/t/stress.t index 1dd95e39595..e3c1441288e 100755 --- a/gnu/usr.bin/perl/dist/threads-shared/t/stress.t +++ b/gnu/usr.bin/perl/dist/threads-shared/t/stress.t @@ -83,7 +83,7 @@ use threads::shared; print "# Looping for $busycount iterations should take about 0.025s\n"; } - my $TIMEOUT = 60; + my $TIMEOUT = 600; my $mutex = 1; share($mutex); diff --git a/gnu/usr.bin/perl/ext/DynaLoader/Makefile.PL b/gnu/usr.bin/perl/ext/DynaLoader/Makefile.PL index 864af3ed8e2..81bd54665a7 100644 --- a/gnu/usr.bin/perl/ext/DynaLoader/Makefile.PL +++ b/gnu/usr.bin/perl/ext/DynaLoader/Makefile.PL @@ -65,8 +65,8 @@ sub MY::static { return " $object : \$(FIRST_MAKEFILE) \$(OBJECT) - \$(RM_RF) $object - \$(CP) \$(OBJECT) $object + #\$(RM_RF) $object + #\$(CP) \$(OBJECT) $object static :: $object "; diff --git a/gnu/usr.bin/perl/ext/NDBM_File/Makefile.PL b/gnu/usr.bin/perl/ext/NDBM_File/Makefile.PL index fe2cb407f57..539a377488f 100644 --- a/gnu/usr.bin/perl/ext/NDBM_File/Makefile.PL +++ b/gnu/usr.bin/perl/ext/NDBM_File/Makefile.PL @@ -1,7 +1,7 @@ use ExtUtils::MakeMaker; WriteMakefile( NAME => 'NDBM_File', - LIBS => ["-L/usr/local/lib -lndbm", "-ldbm -lucb"], + #LIBS => ["-L/usr/local/lib -lndbm", "-ldbm -lucb"], XSPROTOARG => '-noprototypes', # XXX remove later? VERSION_FROM => 'NDBM_File.pm', ); diff --git a/gnu/usr.bin/perl/hints/openbsd.sh b/gnu/usr.bin/perl/hints/openbsd.sh index 66db8e2ce1e..0b165077739 100644 --- a/gnu/usr.bin/perl/hints/openbsd.sh +++ b/gnu/usr.bin/perl/hints/openbsd.sh @@ -84,6 +84,8 @@ esac # around for old NetBSD binaries. libswanted=`echo $libswanted | sed 's/ crypt / /'` +libswanted=`echo $libswanted | sed 's/ util / /'` + # Configure can't figure this out non-interactively d_suidsafe=$define @@ -101,6 +103,13 @@ m88k-3.4) ;; esac +# Special per-arch specific ccflags +case "${ARCH}-${osvers}" in + vax-*) + ccflags="-DUSE_PERL_ATOF=0 $ccflags" + ;; +esac + # This script UU/usethreads.cbu will get 'called-back' by Configure # after it has prompted the user for whether to use threads. cat > UU/usethreads.cbu <<'EOCBU' @@ -122,6 +131,9 @@ $define|true|[yY]*) # Broken up to OpenBSD 3.6, fixed in OpenBSD 3.7 d_getservbyname_r=$undef ;; esac + ;; +*) + libswanted=`echo $libswanted | sed 's/ pthread / /'` esac EOCBU @@ -140,12 +152,12 @@ case "$openbsd_distribution" in siteprefix='/usr/local' siteprefixexp='/usr/local' # Ports installs non-std libs in /usr/local/lib so look there too - locincpth='/usr/local/include' - loclibpth='/usr/local/lib' + locincpth='' + loclibpth='' # Link perl with shared libperl - if [ "$usedl" = "$define" -a -r shlib_version ]; then + if [ "$usedl" = "$define" -a -r $src/shlib_version ]; then useshrplib=true - libperl=`. ./shlib_version; echo libperl.so.${major}.${minor}` + libperl=`. $src/shlib_version; echo libperl.so.${major}.${minor}` fi ;; esac diff --git a/gnu/usr.bin/perl/install_lib.pl b/gnu/usr.bin/perl/install_lib.pl index ac17bd81d81..8ca801b00a6 100644 --- a/gnu/usr.bin/perl/install_lib.pl +++ b/gnu/usr.bin/perl/install_lib.pl @@ -6,7 +6,7 @@ use strict; use vars qw($Is_VMS $Is_W32 $Is_OS2 $Is_Cygwin $Is_Darwin $Is_NetWare $Is_AmigaOS %opts $packlist); -use subs qw(unlink link chmod); +use subs qw(unlink link chmod chown); require File::Path; require File::Copy; @@ -99,6 +99,9 @@ sub link { unless -f $to and (chmod(0666, $to), unlink $to) and File::Copy::copy($from, $to) and ++$success; } + if (defined($opts{uid}) || defined($opts{gid})) { + chown($opts{uid}, $opts{gid}, $to) if $success; + } $packlist->{$xto} = { type => 'file' }; } $success; @@ -114,6 +117,16 @@ sub chmod { unless $opts{notify}; } +sub chown { + my($uid,$gid,$name) = @_; + + return if ($^O eq 'dos'); + printf " chown %s:%s %s\n", $uid, $gid, $name if $opts{verbose}; + CORE::chown($uid,$gid,$name) + || warn sprintf("Couldn't chown %s:%s %s: $!\n", $uid, $gid, $name) + unless $opts{notify}; +} + sub samepath { my($p1, $p2) = @_; @@ -145,7 +158,8 @@ sub safe_rename { } sub mkpath { - File::Path::mkpath(shift , $opts{verbose}, 0777) unless $opts{notify}; + File::Path::make_path(shift, {owner=>$opts{uid}, group=>$opts{gid}, + mode=>0777, verbose=>$opts{verbose}}) unless $opts{notify}; } sub unixtoamiga diff --git a/gnu/usr.bin/perl/installperl b/gnu/usr.bin/perl/installperl index 6cd65a09238..1ca3b992623 100644 --- a/gnu/usr.bin/perl/installperl +++ b/gnu/usr.bin/perl/installperl @@ -77,8 +77,8 @@ $opts{destdir} = ''; my $usage = 0; if (!GetOptions(\%opts, 'notify|n', 'strip|s', 'silent|S', 'skip-otherperls|o', 'force|f', 'verbose|V', 'archname|A', - 'netware', 'nopods|p', 'destdir:s', 'help|h|?', - 'versiononly|v' => \$versiononly, '<>' => sub { + 'netware', 'nopods|p', 'destdir:s', 'help|h|?', 'user|u:s', + 'group|g:s', 'versiononly|v' => \$versiononly, '<>' => sub { if ($_[0] eq '+v') { $versiononly = 0; } else { @@ -107,6 +107,8 @@ Usage $0: [switches] -A Also install perl with the architecture's name in the perl binary's name. -p Don't install the pod files. [This will break use diagnostics;] + -g group install files with the specified group + -u user install files with the specified user -netware Install correctly on a Netware server. -destdir Prefix installation directories by this string. -h Display this help message. @@ -114,6 +116,8 @@ EOT exit $usage; } } +$opts{'uid'} = getpwnam($opts{'user'}) if exists($opts{'user'}); +$opts{'gid'} = getgrnam($opts{'group'}) if exists($opts{'group'}); $versiononly = 1 if $Config{versiononly} && !defined $versiononly; my (@scripts, @tolink); @@ -153,7 +157,7 @@ if ((-e "testcompile") && (defined($ENV{'COMPILE'}))) { } # Exclude nonxs extensions that are not architecture dependent -my @nonxs = grep(!/^Errno$/, split(' ', $Config{'nonxs_ext'})); +my @nonxs = grep(!/^(Errno|IO\/Compress)$/, split(' ', $Config{'nonxs_ext'})); my @ext_dirs = qw(cpan dist ext); foreach my $ext_dir (@ext_dirs) { @@ -199,7 +203,7 @@ my $installprivlib = "$opts{destdir}$Config{installprivlib}"; my $installarchlib = "$opts{destdir}$Config{installarchlib}"; my $installsitelib = "$opts{destdir}$Config{installsitelib}"; my $installsitearch = "$opts{destdir}$Config{installsitearch}"; -my $installman1dir = "$opts{destdir}$Config{installman1dir}"; +my $installman1dir = "none"; my $man1ext = $Config{man1ext}; my $libperl = $Config{libperl}; # Shared library and dynamic loading suffixes. @@ -239,8 +243,6 @@ if ($Is_VMS) { # Hang in there until File::Spec hits the big time $installbin || die "No installbin directory in config.sh\n"; -d $installbin || mkpath($installbin); -d $installbin || $opts{notify} || die "$installbin is not a directory\n"; --w $installbin || $opts{notify} || die "$installbin is not writable by you\n" - unless $installbin =~ m#^/afs/# || $opts{notify}; if (!$Is_NetWare) { if (!$Is_VMS) { @@ -253,9 +255,9 @@ else { } } --f 't/rantests' || $Is_W32 - || warn "WARNING: You've never run 'make test' or", - " some tests failed! (Installing anyway.)\n"; +#-f 't/rantests' || $Is_W32 +# || warn "WARNING: You've never run 'make test' or", +# " some tests failed! (Installing anyway.)\n"; } #if (!$Is_NetWare) # This will be used to store the packlist @@ -281,6 +283,10 @@ if (($Is_W32 and ! $Is_NetWare) or $Is_Cygwin) { $packlist->{"$Config{installbin}/$perldll"} = { type => 'file' }; } # if (($Is_W32 and ! $Is_NetWare) or $Is_Cygwin) +# Get the install command and flags from the environment +my @installcmd = $ENV{"INSTALL"} || "install"; +push(@installcmd, $ENV{"INSTALL_COPY"} || "-c"); + # First we install the version-numbered executables. if ($Is_VMS) { @@ -301,11 +307,8 @@ if ($Is_VMS) { } elsif ($^O ne 'dos') { if (!$Is_NetWare) { - safe_unlink("$installbin/$perl_verbase$ver$exe_ext"); - copy("perl$exe_ext", "$installbin/$perl_verbase$ver$exe_ext"); - strip("$installbin/$perl_verbase$ver$exe_ext"); - fix_dep_names("$installbin/$perl_verbase$ver$exe_ext"); - chmod(0755, "$installbin/$perl_verbase$ver$exe_ext"); + my $ver = ''; # don't install a versioned perl binary + install("perl$exe_ext", "$installbin/$perl_verbase$ver$exe_ext", "0755"); } else { # If installing onto a NetWare server @@ -378,7 +381,9 @@ elsif ($Is_Cygwin) { # On Cygwin symlink it to CORE to make Makefile happy @corefiles = <*.h>; } else { # [als] hard-coded 'libperl' name... not good! - @corefiles = <*.h libperl*.* perl*$Config{lib_ext}>; + #@corefiles = <*.h libperl*.* perl*$Config{lib_ext}>; + @corefiles = <*.h *.inc perl*$Config{lib_ext}>; + push(@corefiles,<libperl*.*>) unless defined($ENV{"NOLIBINSTALL"}); # AIX needs perl.exp installed as well. push(@corefiles,'perl.exp') if $^O eq 'aix'; @@ -407,7 +412,8 @@ if ($Is_W32) { #linking lib isn't made in root but in CORE on Win32 # Install main perl executables # Make links to ordinary names if installbin directory isn't current directory. -if (! $versiononly && ! samepath($installbin, '.') && ($^O ne 'dos') && ! $Is_VMS && ! $Is_NetWare) { +if (0) { # don't install a versioned perl binary +#if (! $versiononly && ! samepath($installbin, '.') && ($^O ne 'dos') && ! $Is_VMS && ! $Is_NetWare) { safe_unlink("$installbin/$perl$exe_ext", "$installbin/suid$perl$exe_ext"); if ($^O eq 'vos') { # VOS doesn't support hard links, so use a symlink. @@ -545,6 +551,9 @@ if (!$opts{nopods} && (!$versiononly || ($installprivlib =~ m/\Q$vershort/))) { $packlist->write() unless $opts{notify}; +if (defined($opts{uid}) || defined($opts{gid})) { + chown($opts{uid}, $opts{gid}, $packlist->packlist_file()); +} print " Installation complete\n" if $opts{verbose}; exit 0; @@ -583,6 +592,7 @@ sub safe_unlink { sub copy { my($from,$to) = @_; + my($success) = 0; my $xto = $to; $xto =~ s/^\Q$opts{destdir}\E//; @@ -590,12 +600,32 @@ sub copy { unless $opts{silent}; print " creating new version of $xto\n" if $Is_VMS and -e $to and !$opts{silent}; - unless ($opts{notify} or File::Copy::copy($from, $to)) { + unless ($opts{notify} or File::Copy::copy($from, $to) and ++$success) { # Might have been that F::C::c can't overwrite the target warn "Couldn't copy $from to $to: $!\n" unless -f $to and (chmod(0666, $to), unlink $to) - and File::Copy::copy($from, $to); + and File::Copy::copy($from, $to) and ++$success; } + if (defined($opts{uid}) || defined($opts{gid})) { + chown($opts{uid}, $opts{gid}, $to) if $success; + } + $packlist->{$xto} = { type => 'file' }; +} + +sub install { + my($from,$to,$mode) = @_; + + my $xto = $to; + my $cmd = join(' ', @installcmd); + $cmd .= " -m $mode" if $mode; + $cmd .= " -o $opts{uid}" if defined($opts{uid}); + $cmd .= " -g $opts{gid}" if defined($opts{gid}); + $cmd .= " -s" if $opts{strip}; + $cmd .= " $from $to"; + $xto =~ s/^\Q$opts{destdir}\E// if $opts{destdir}; + print $opts{verbose} ? " install $from $xto\n" : " $xto\n" unless $opts{silent}; + system($cmd); + warn "Couldn't $cmd\n" if $?; $packlist->{$xto} = { type => 'file' }; } @@ -627,6 +657,10 @@ sub installlib { return; } + # If we have different install version, install that instead + return if -e "$_.install"; + $name =~ s/\.install$//; + # ignore patch backups, RCS files, emacs backup & temp files and the # .exists files, .PL files, and test files. return if $name =~ m{\.orig$|\.rej$|~$|^#.+#$|,v$|^\.exists|\.PL$|\.plc$|\.t$|^test\.pl$|^dbm_filter_util\.pl$|^filter-util\.pl$|^uupacktool\.pl$|^\.gitignore$} || diff --git a/gnu/usr.bin/perl/lib/AnyDBM_File.pm b/gnu/usr.bin/perl/lib/AnyDBM_File.pm index 4153af2de2d..3b41a4a100b 100644 --- a/gnu/usr.bin/perl/lib/AnyDBM_File.pm +++ b/gnu/usr.bin/perl/lib/AnyDBM_File.pm @@ -22,8 +22,6 @@ __END__ AnyDBM_File - provide framework for multiple DBMs -NDBM_File, DB_File, GDBM_File, SDBM_File, ODBM_File - various DBM implementations - =head1 SYNOPSIS use AnyDBM_File; diff --git a/gnu/usr.bin/perl/perl.c b/gnu/usr.bin/perl/perl.c index f2de4795cb3..b125056a4c3 100644 --- a/gnu/usr.bin/perl/perl.c +++ b/gnu/usr.bin/perl/perl.c @@ -2019,6 +2019,8 @@ S_Internals_V(pTHX_ CV *cv) # endif #endif +#undef PERL_BUILD_DATE + #ifdef PERL_BUILD_DATE PUSHs(Perl_newSVpvn_flags(aTHX_ STR_WITH_LEN("Compiled at " PERL_BUILD_DATE), diff --git a/gnu/usr.bin/perl/pod/perlmodinstall.pod b/gnu/usr.bin/perl/pod/perlmodinstall.pod index 72728f69e14..6ce5c84d7e5 100644 --- a/gnu/usr.bin/perl/pod/perlmodinstall.pod +++ b/gnu/usr.bin/perl/pod/perlmodinstall.pod @@ -79,11 +79,11 @@ You can get gzip from L<ftp://prep.ai.mit.edu/pub/gnu/> Or, you can combine this step with the next to save disk space: - gzip -dc yourmodule.tar.gz | tar -xof - + gzip -dc yourmodule.tar.gz | tar -xf - B. UNPACK -Unpack the result with C<tar -xof yourmodule.tar> +Unpack the result with C<tar -xf yourmodule.tar> C. BUILD diff --git a/gnu/usr.bin/perl/pod/perlmodlib.PL b/gnu/usr.bin/perl/pod/perlmodlib.PL index 063e56cafd9..9571b58f022 100644 --- a/gnu/usr.bin/perl/pod/perlmodlib.PL +++ b/gnu/usr.bin/perl/pod/perlmodlib.PL @@ -64,6 +64,7 @@ for my $filename (@files) { die "p5p-controlled module $filename missing =head1 NAME\n" if $filename !~ m{^(dist/|cpan/)}n # under our direct control && $filename !~ m{/_[^/]+\z} # not private + && $filename !~ m{/unicore/} # not unicore && $filename ne 'lib/meta_notation.pm' # no pod && $filename ne 'lib/overload/numbers.pm'; # no pod warn "$filename missing =head1 NAME\n" unless $Quiet; diff --git a/gnu/usr.bin/perl/pod/perlop.pod b/gnu/usr.bin/perl/pod/perlop.pod index dd658bf5fbe..5b60a3b63c4 100644 --- a/gnu/usr.bin/perl/pod/perlop.pod +++ b/gnu/usr.bin/perl/pod/perlop.pod @@ -1660,7 +1660,7 @@ and although they often accept just C<"\012">, they seldom tolerate just C<"\015">. If you get in the habit of using C<"\n"> for networking, you may be burned some day. X<newline> X<line terminator> X<eol> X<end of line> -X<\n> X<\r> X<\r\n> +X<\r> For constructs that do interpolate, variables beginning with "C<$>" or "C<@>" are interpolated. Subscripted variables such as C<$a[3]> or diff --git a/gnu/usr.bin/perl/pp.c b/gnu/usr.bin/perl/pp.c index babf34843e2..6d419cc7626 100644 --- a/gnu/usr.bin/perl/pp.c +++ b/gnu/usr.bin/perl/pp.c @@ -2944,12 +2944,13 @@ PP(pp_srand) "Integer overflow in srand"); anum = UV_MAX; } + (void)srand48_deterministic((Rand_seed_t)anum); } else { anum = seed(); + (void)seedDrand01((Rand_seed_t)anum); } - (void)seedDrand01((Rand_seed_t)anum); PL_srand_called = TRUE; if (anum) XPUSHu(anum); diff --git a/gnu/usr.bin/perl/regen/lib_cleanup.pl b/gnu/usr.bin/perl/regen/lib_cleanup.pl index 5c5c4e24ef6..61039b2838f 100644 --- a/gnu/usr.bin/perl/regen/lib_cleanup.pl +++ b/gnu/usr.bin/perl/regen/lib_cleanup.pl @@ -74,6 +74,12 @@ foreach my $file (@ext) { $package = $1; last; } + elsif (/^\s*package\s*$/) { + # If they're hiding their package name, we ignore them + ++$ignore{"/$path"}; + $package=''; + last; + } } close $fh or die "Can't close $file: $!"; diff --git a/gnu/usr.bin/perl/shlib_version b/gnu/usr.bin/perl/shlib_version index 0aab0406bf8..a5757c1bcc6 100644 --- a/gnu/usr.bin/perl/shlib_version +++ b/gnu/usr.bin/perl/shlib_version @@ -1,2 +1,2 @@ -major=19 +major=20 minor=0 diff --git a/gnu/usr.bin/perl/t/lib/h2ph.pht b/gnu/usr.bin/perl/t/lib/h2ph.pht index f068d6dae46..cda8d21051c 100644 --- a/gnu/usr.bin/perl/t/lib/h2ph.pht +++ b/gnu/usr.bin/perl/t/lib/h2ph.pht @@ -90,10 +90,6 @@ unless(defined(&_H2PH_H_)) { } eval("sub flim () { 0; }") unless defined(&flim); eval("sub flam () { 1; }") unless defined(&flam); - eval 'sub blli_in_use { - my($blli) = @_; - eval q({ ($blli->{l2_proto}) || ($blli->{l3_proto}); }); - }' unless defined(&blli_in_use); eval 'sub multiline () {"multilinestring";}' unless defined(&multiline); } 1; diff --git a/gnu/usr.bin/perl/t/op/getppid.t b/gnu/usr.bin/perl/t/op/getppid.t index 0a5dbcef1aa..fc0fa529705 100755 --- a/gnu/usr.bin/perl/t/op/getppid.t +++ b/gnu/usr.bin/perl/t/op/getppid.t @@ -100,7 +100,7 @@ sub fork_and_retrieve { } } else { # Fudge it by waiting a bit more: - sleep 2; + sleep 3; } my $ppid2 = getppid(); print $w "$how,$ppid1,$ppid2\n"; diff --git a/gnu/usr.bin/perl/t/porting/customized.dat b/gnu/usr.bin/perl/t/porting/customized.dat index dd41c3d4537..fd805115f60 100644 --- a/gnu/usr.bin/perl/t/porting/customized.dat +++ b/gnu/usr.bin/perl/t/porting/customized.dat @@ -2,6 +2,7 @@ # cd t # ./perl -I../lib porting/customized.t --regen Digest cpan/Digest/Digest.pm 43f7f544cb11842b2f55c73e28930da50774e081 +Digest::MD5 cpan/Digest-MD5/t/files.t f8fe234035918d3b7324eba05f73e7e903a45ca0 Locale::Maketext::Simple cpan/Locale-Maketext-Simple/lib/Locale/Maketext/Simple.pm 57ed38905791a17c150210cd6f42ead22a7707b6 Math::Complex cpan/Math-Complex/lib/Math/Complex.pm 198ea6c6c584f5ea79a0fd7e9d411d0878f3b2af Math::Complex cpan/Math-Complex/t/Complex.t 4f307ed6fc59f1e5fb0e6b11103fc631b6bdb335 @@ -17,7 +18,7 @@ Pod::Checker cpan/Pod-Checker/t/pod/contains_bad_pod.xr 73538fd80dfe6e19ad561fe0 Pod::Checker cpan/Pod-Checker/t/pod/selfcheck.t 8ce3cfd38e4b9bcf5bc7fe7f2a14195e49aed7d8 Pod::Checker cpan/Pod-Checker/t/pod/testcmp.pl a0cd5c8eca775c7753f4464eee96fa916e3d8a16 Pod::Checker cpan/Pod-Checker/t/pod/testpchk.pl b2072c7f4379fd050e15424175d7cac5facf5b3b -Pod::Perldoc cpan/Pod-Perldoc/lib/Pod/Perldoc.pm 582be34c077c9ff44d99914724a0cc2140bcd48c +Pod::Perldoc cpan/Pod-Perldoc/lib/Pod/Perldoc.pm d97aa26b722e6e3120b19ee0d7cf9af04dfdfb7f autodie cpan/autodie/lib/autodie/exception.pm b99e4e35a9ed36de94d54437888822ced4936207 autodie cpan/autodie/lib/autodie/hints.pm e1998fec61fb4e82fe46585bd82c73200be6f262 autodie cpan/autodie/t/exceptions.t ad315a208f875e06b0964012ce8d65daa438c036 @@ -26,4 +27,4 @@ autodie cpan/autodie/t/mkdir.t 9e70d2282a3cc7d76a78bf8144fccba20fb37dac autodie cpan/autodie/t/recv.t 63bea2daa330e44b67714527ddf701c1bf3a6954 experimental cpan/experimental/t/basic.t cb9da8dd05b854375809872a05dd32637508d5da version cpan/version/lib/version.pm 7ef9219d1d5f1d71f08a79f3b0577df138b21b12 -version vutil.c 105543ef1824fbc2429a7d5ebd19189c8081fede +version vutil.c 074fb201e9a20a845764f671eb1021a6020ebea1 diff --git a/gnu/usr.bin/perl/t/porting/dual-life.t b/gnu/usr.bin/perl/t/porting/dual-life.t index 4ad2256ef29..fdfc9b692d4 100644 --- a/gnu/usr.bin/perl/t/porting/dual-life.t +++ b/gnu/usr.bin/perl/t/porting/dual-life.t @@ -24,6 +24,12 @@ use File::Spec::Functions; # Exceptions that are found in dual-life bin dirs but aren't # installed by default; some occur only during testing: my $not_installed = qr{^(?: + \.\./cpan/Archive-Tar/bin/ptar.* + | + \.\./cpan/JSON-PP/bin/json_pp + | + \.\./cpan/IO-Compress/bin/zipdetails + | \.\./cpan/Encode/bin/u(?:cm(?:2table|lint|sort)|nidump) | \.\./cpan/Module-(?:Metadata|Build) diff --git a/gnu/usr.bin/perl/t/re/speed.t b/gnu/usr.bin/perl/t/re/speed.t index 9a57de167f8..af0e4330a01 100644 --- a/gnu/usr.bin/perl/t/re/speed.t +++ b/gnu/usr.bin/perl/t/re/speed.t @@ -42,7 +42,7 @@ run_tests() unless caller; sub run_tests { - watchdog(($::running_as_thread && $::running_as_thread) ? 150 : 225); + watchdog(($::running_as_thread && $::running_as_thread) ? 150 : 540); { # [perl #120446] @@ -153,7 +153,7 @@ PROG my $substr= substr( $str, 1 ); 1 while $substr=~m/0/g; $elapsed += time; - ok( $elapsed <= 1, "should not COW on long string with substr and m//g"); + ok( $elapsed <= 2, "should not COW on long string with substr and m//g"); } # [perl #133185] Infinite loop diff --git a/gnu/usr.bin/perl/util.c b/gnu/usr.bin/perl/util.c index e5320c8b8c6..a9357004d6f 100644 --- a/gnu/usr.bin/perl/util.c +++ b/gnu/usr.bin/perl/util.c @@ -4449,6 +4449,9 @@ Perl_parse_unicode_opts(pTHX_ const char **popt) U32 Perl_seed(pTHX) { +#if defined(__OpenBSD__) + return arc4random(); +#else /* * This is really just a quick hack which grabs various garbage * values. It really should be a real hash algorithm which @@ -4517,6 +4520,7 @@ Perl_seed(pTHX) u += SEED_C5 * (U32)PTR2UV(&when); #endif return u; +#endif } void diff --git a/gnu/usr.bin/perl/utils.lst b/gnu/usr.bin/perl/utils.lst index 8d65a622625..2564f6e308a 100644 --- a/gnu/usr.bin/perl/utils.lst +++ b/gnu/usr.bin/perl/utils.lst @@ -10,19 +10,13 @@ utils/encguess utils/h2ph utils/h2xs utils/instmodsh -utils/json_pp utils/libnetcfg -utils/perlbug # link = utils/perlthanks +utils/perlbug utils/perldoc utils/perlivp utils/piconv utils/pl2pm utils/pod2html utils/prove -utils/ptar -utils/ptardiff -utils/ptargrep -utils/shasum utils/splain utils/xsubpp -utils/zipdetails diff --git a/gnu/usr.bin/perl/utils/Makefile.PL b/gnu/usr.bin/perl/utils/Makefile.PL index f9f80ed451d..8c2a786df12 100644 --- a/gnu/usr.bin/perl/utils/Makefile.PL +++ b/gnu/usr.bin/perl/utils/Makefile.PL @@ -35,9 +35,9 @@ print $fh <<'EOT'; # Files to be built with variable substitution after miniperl is # available. Dependencies handled manually below (for now). -pl = corelist.PL cpan.PL h2ph.PL h2xs.PL instmodsh.PL json_pp.PL perlbug.PL perldoc.PL perlivp.PL pl2pm.PL prove.PL ptar.PL ptardiff.PL ptargrep.PL shasum.PL splain.PL libnetcfg.PL piconv.PL enc2xs.PL encguess.PL xsubpp.PL pod2html.PL zipdetails.PL -plextract = corelist cpan h2ph h2xs instmodsh json_pp perlbug perldoc perlivp pl2pm prove ptar ptardiff ptargrep shasum splain libnetcfg piconv enc2xs encguess xsubpp pod2html zipdetails -plextractexe = ./corelist ./cpan ./h2ph ./h2xs ./json_pp ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./ptar ./ptardiff ./ptargrep ./shasum ./splain ./libnetcfg ./piconv ./enc2xs ./encguess ./xsubpp ./pod2html ./zipdetails +pl = corelist.PL cpan.PL h2ph.PL h2xs.PL instmodsh.PL perlbug.PL perldoc.PL perlivp.PL pl2pm.PL prove.PL splain.PL libnetcfg.PL piconv.PL enc2xs.PL encguess.PL xsubpp.PL pod2html.PL +plextract = corelist cpan h2ph h2xs instmodsh perlbug perldoc perlivp pl2pm prove splain libnetcfg piconv enc2xs encguess xsubpp pod2html +plextractexe = ./corelist ./cpan ./h2ph ./h2xs ./instmodsh ./perlbug ./perldoc ./perlivp ./pl2pm ./prove ./splain ./libnetcfg ./piconv ./enc2xs ./encguess ./xsubpp ./pod2html all: $(plextract) @@ -54,8 +54,6 @@ h2xs: h2xs.PL ../config.sh instmodsh: instmodsh.PL ../config.sh -json_pp: json_pp.PL ../config.sh - perlbug: perlbug.PL ../config.sh ../patchlevel.h perldoc: perldoc.PL ../config.sh @@ -64,16 +62,8 @@ perlivp: perlivp.PL ../config.sh prove: prove.PL ../config.sh -ptar: ptar.PL ../config.sh - -ptardiff: ptardiff.PL ../config.sh - -ptargrep: ptargrep.PL ../config.sh - pl2pm: pl2pm.PL ../config.sh -shasum: shasum.PL ../config.sh - splain: splain.PL ../config.sh ../lib/diagnostics.pm libnetcfg: libnetcfg.PL ../config.sh @@ -86,8 +76,6 @@ enc2xs: encguess.PL ../config.sh xsubpp: xsubpp.PL ../config.sh -zipdetails: zipdetails.PL ../config.sh - pod2html: pod2html.PL ../config.sh ../ext/Pod-Html/bin/pod2html clean: diff --git a/gnu/usr.bin/perl/utils/h2ph.PL b/gnu/usr.bin/perl/utils/h2ph.PL index db787499ebe..36317d37278 100644 --- a/gnu/usr.bin/perl/utils/h2ph.PL +++ b/gnu/usr.bin/perl/utils/h2ph.PL @@ -573,7 +573,7 @@ sub next_line $in =~ s/\?\?</{/g; # | ??<| {| $in =~ s/\?\?>/}/g; # | ??>| }| } - if ($in =~ /^\#ifdef __LANGUAGE_PASCAL__/) { + if ($in =~ s/^\#ifdef __LANGUAGE_PASCAL__//) { # Tru64 disassembler.h evilness: mixed C and Pascal. while (<IN>) { last if /^\#endif/; @@ -581,8 +581,8 @@ sub next_line $in = ""; next READ; } - if ($in =~ /^extern inline / && # Inlined assembler. - $^O eq 'linux' && $file =~ m!(?:^|/)asm/[^/]+\.h$!) { + # Skip inlined functions in headers + if ($in =~ s/^(extern|static) (__inline__|inline) .*[^;]\s*$//) { while (<IN>) { last if /^}/; } diff --git a/gnu/usr.bin/perl/utils/perlbug.PL b/gnu/usr.bin/perl/utils/perlbug.PL index d1eb1e04a87..2f7a9e8d675 100644 --- a/gnu/usr.bin/perl/utils/perlbug.PL +++ b/gnu/usr.bin/perl/utils/perlbug.PL @@ -358,15 +358,14 @@ sub Query { This program provides an easy way to send a thank-you message back to the authors and maintainers of perl. -If you wish to submit a bug report, please run it without the -T flag -(or run the program perlbug rather than perlthanks) +If you wish to submit a bug report, please run it without the -T flag. EOF } else { paraprint <<"EOF"; This program provides an easy way to create a message reporting a bug in the core perl distribution (along with tests or patches) to the volunteers who maintain perl at $address. To send a thank-you -note to $thanksaddress instead of a bug report, please run 'perlthanks'. +note to $thanksaddress instead of a bug report, please use the -T flag. Please do not use $0 to send test messages, test whether perl works, or to report bugs in perl modules from CPAN. @@ -1273,8 +1272,6 @@ S<[ B<-S> ]> S<[ B<-t> ]> S<[ B<-d> ]> S<[ B<-A> ]> S<[ B<-h> ]> S<[ B<-T> ]> B<perlbug> S<[ B<-v> ]> S<[ B<-r> I<returnaddress> ]> S<[ B<-A> ]> S<[ B<-ok> | B<-okay> | B<-nok> | B<-nokay> ]> -B<perlthanks> - =head1 DESCRIPTION @@ -1427,8 +1424,8 @@ description of what's wrong is fine. =item Can you use C<perlbug> to submit a thank-you note? -Yes, you can do this by either using the C<-T> option, or by invoking -the program as C<perlthanks>. Thank-you notes are good. It makes people +Yes, you can do this by using the C<-T> option. +Thank-you notes are good. It makes people smile. =back diff --git a/gnu/usr.bin/perl/vutil.c b/gnu/usr.bin/perl/vutil.c index 23674891534..8aa1f261a59 100644 --- a/gnu/usr.bin/perl/vutil.c +++ b/gnu/usr.bin/perl/vutil.c @@ -614,7 +614,11 @@ VER_NV: /* may get too much accuracy */ char tbuf[64]; +#ifdef __vax__ + SV *sv = SvNVX(ver) > 10e37 ? newSV(64) : 0; +#else SV *sv = SvNVX(ver) > 10e50 ? newSV(64) : 0; +#endif char *buf; #if PERL_VERSION_GE(5,19,0) diff --git a/gnu/usr.bin/perl/win32/GNUmakefile b/gnu/usr.bin/perl/win32/GNUmakefile index 76aadaf9925..b0eb5e7248e 100644 --- a/gnu/usr.bin/perl/win32/GNUmakefile +++ b/gnu/usr.bin/perl/win32/GNUmakefile @@ -1834,6 +1834,7 @@ distclean: realclean -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP + -if exist $(LIBDIR)\OpenBSD rmdir /s /q $(LIBDIR)\OpenBSD -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl diff --git a/gnu/usr.bin/perl/win32/Makefile b/gnu/usr.bin/perl/win32/Makefile index 8c97e64a878..40a12ef2e48 100644 --- a/gnu/usr.bin/perl/win32/Makefile +++ b/gnu/usr.bin/perl/win32/Makefile @@ -1356,6 +1356,7 @@ distclean: realclean -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP + -if exist $(LIBDIR)\OpenBSD rmdir /s /q $(LIBDIR)\OpenBSD -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl diff --git a/gnu/usr.bin/perl/win32/makefile.mk b/gnu/usr.bin/perl/win32/makefile.mk index 9af6a79d8e2..bdcfab1dd53 100644 --- a/gnu/usr.bin/perl/win32/makefile.mk +++ b/gnu/usr.bin/perl/win32/makefile.mk @@ -1751,6 +1751,7 @@ distclean: realclean -if exist $(LIBDIR)\MIME rmdir /s /q $(LIBDIR)\MIME -if exist $(LIBDIR)\Module rmdir /s /q $(LIBDIR)\Module -if exist $(LIBDIR)\Net\FTP rmdir /s /q $(LIBDIR)\Net\FTP + -if exist $(LIBDIR)\OpenBSD rmdir /s /q $(LIBDIR)\OpenBSD -if exist $(LIBDIR)\Params rmdir /s /q $(LIBDIR)\Params -if exist $(LIBDIR)\Parse rmdir /s /q $(LIBDIR)\Parse -if exist $(LIBDIR)\Perl rmdir /s /q $(LIBDIR)\Perl |