# see the -P and -I option in perl.man
-+;# $Date = &ctime(time);
-+
-+CONFIG: {
-+ package ctime;
-+
-+ @DoW = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
-+ @MoY = ('Jan','Feb','Mar','Apr','May','Jun',
-+ 'Jul','Aug','Sep','Oct','Nov','Dec');
-+}
-+
-+sub ctime {
-+ package ctime;
-+
-+ local($time) = @_;
-+ local($[) = 0;
-+ local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst);
-+
-+ # Determine what time zone is in effect.
-+ # Use GMT if TZ is defined as null, local time if TZ undefined.
-+ # There's no portable way to find the system default timezone.
-+
-+ $TZ = defined($ENV{'TZ'}) ? ( $ENV{'TZ'} ? $ENV{'TZ'} : 'GMT' ) : '';
-+ ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
-+ ($TZ eq 'GMT') ? gmtime($time) : localtime($time);
-+
-+ # Hack to deal with 'PST8PDT' format of TZ
-+ # Note that this can't deal with all the esoteric forms, but it
-+ # does recognize the most common: [:]STDoff[DST[off][,rule]]
-+
-+ if($TZ=~/^([^:\d+\-,]{3,})([+-]?\d{1,2}(:\d{1,2}){0,2})([^\d+\-,]{3,})?/){
-+ $TZ = $isdst ? $4 : $1;
-+ }
-+ $TZ .= ' ' unless $TZ eq '';
-+
-+ $year += 1900;
-+ sprintf("%s %s %2d %2d:%02d:%02d %s%4d\n",
-+ $DoW[$wday], $MoY[$mon], $mday, $hour, $min, $sec, $TZ, $year);
-+}
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/dotsh.pl perl-5.16.3/lib/dotsh.pl
---- perl-5.16.3-orig/lib/dotsh.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/dotsh.pl 2016-08-18 10:07:06.481442093 +0200
-@@ -0,0 +1,74 @@
-+#
-+# @(#)dotsh.pl 03/19/94
-+#
-+# This library is no longer being maintained, and is included for backward
-+# compatibility with Perl 4 programs which may require it.
-+#
-+# In particular, this should not be used as an example of modern Perl
-+# programming techniques.
-+#
-+#
-+# Author: Charles Collins
-+#
-+# Description:
-+# This routine takes a shell script and 'dots' it into the current perl
-+# environment. This makes it possible to use existing system scripts
-+# to alter environment variables on the fly.
-+#
-+# Usage:
-+# &dotsh ('ShellScript', 'DependentVariable(s)');
-+#
-+# where
-+#
-+# 'ShellScript' is the full name of the shell script to be dotted
-+#
-+# 'DependentVariable(s)' is an optional list of shell variables in the
-+# form VARIABLE=VALUE,VARIABLE=VALUE,... that 'ShellScript' is
-+# dependent upon. These variables MUST be defined using shell syntax.
-+#
-+# Example:
-+# &dotsh ('/foo/bar', 'arg1');
-+# &dotsh ('/foo/bar');
-+# &dotsh ('/foo/bar arg1 ... argN');
-+#
-+sub dotsh {
-+ local(@sh) = @_;
-+ local($tmp,$key,$shell,$command,$args,$vars) = '';
-+ local(*dotsh);
-+ undef *dotsh;
-+ $dotsh = shift(@sh);
-+ @dotsh = split (/\s/, $dotsh);
-+ $command = shift (@dotsh);
-+ $args = join (" ", @dotsh);
-+ $vars = join ("\n", @sh);
-+ open (_SH_ENV, "$command") || die "Could not open $dotsh!\n";
-+ chop($_ = <_SH_ENV>);
-+ $shell = "$1 -c" if ($_ =~ /^\#\!\s*(\S+(\/sh|\/ksh|\/zsh|\/csh))\s*$/);
-+ close (_SH_ENV);
-+ if (!$shell) {
-+ if ($ENV{'SHELL'} =~ /\/sh$|\/ksh$|\/zsh$|\/bash$|\/csh$/) {
-+ $shell = "$ENV{'SHELL'} -c";
-+ } else {
-+ print "SHELL not recognized!\nUsing /bin/sh...\n";
-+ $shell = "/bin/sh -c";
-+ }
-+ }
-+ if (length($vars) > 0) {
-+ open (_SH_ENV, "$shell \"$vars && . $command $args && set \" |") || die;
-+ } else {
-+ open (_SH_ENV, "$shell \". $command $args && set \" |") || die;
-+ }
-+
-+ while (<_SH_ENV>) {
-+ chop;
-+ m/^([^=]*)=(.*)/s;
-+ $ENV{$1} = $2;
-+ }
-+ close (_SH_ENV);
-+
-+ foreach $key (keys(%ENV)) {
-+ $tmp .= "\$$key = \$ENV{'$key'};" if $key =~ /^[A-Za-z]\w*$/;
-+ }
-+ eval $tmp;
-+}
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/exceptions.pl perl-5.16.3/lib/exceptions.pl
---- perl-5.16.3-orig/lib/exceptions.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/exceptions.pl 2016-08-18 10:07:06.491442049 +0200
-@@ -0,0 +1,61 @@
-+# exceptions.pl
-+# tchrist@convex.com
-+#
-+# This library is no longer being maintained, and is included for backward
-+# compatibility with Perl 4 programs which may require it.
-+#
-+# In particular, this should not be used as an example of modern Perl
-+# programming techniques.
-+#
-+#
-+# Here's a little code I use for exception handling. It's really just
-+# glorfied eval/die. The way to use use it is when you might otherwise
-+# exit, use &throw to raise an exception. The first enclosing &catch
-+# handler looks at the exception and decides whether it can catch this kind
-+# (catch takes a list of regexps to catch), and if so, it returns the one it
-+# caught. If it *can't* catch it, then it will reraise the exception
-+# for someone else to possibly see, or to die otherwise.
-+#
-+# I use oddly named variables in order to make darn sure I don't conflict
-+# with my caller. I also hide in my own package, and eval the code in his.
-+#
-+# The EXCEPTION: prefix is so you can tell whether it's a user-raised
-+# exception or a perl-raised one (eval error).
-+#
-+# --tom
-+#
-+# examples:
-+# if (&catch('/$user_input/', 'regexp', 'syntax error') {
-+# warn "oops try again";
-+# redo;
-+# }
-+#
-+# if ($error = &catch('&subroutine()')) { # catches anything
-+#
-+# &throw('bad input') if /^$/;
-+
-+sub catch {
-+ package exception;
-+ local($__code__, @__exceptions__) = @_;
-+ local($__package__) = caller;
-+ local($__exception__);
-+
-+ eval "package $__package__; $__code__";
-+ if ($__exception__ = &'thrown) {
-+ for (@__exceptions__) {
-+ return $__exception__ if /$__exception__/;
-+ }
-+ &'throw($__exception__);
-+ }
-+}
-+
-+sub throw {
-+ local($exception) = @_;
-+ die "EXCEPTION: $exception\n";
-+}
-+
-+sub thrown {
-+ $@ =~ /^(EXCEPTION: )+(.+)/ && $2;
-+}
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/fastcwd.pl perl-5.16.3/lib/fastcwd.pl
---- perl-5.16.3-orig/lib/fastcwd.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/fastcwd.pl 2016-08-18 10:07:06.501442005 +0200
-@@ -0,0 +1,43 @@
-+# By John Bazik
-+#
-+# This library is no longer being maintained, and is included for backward
-+# compatibility with Perl 4 programs which may require it.
-+#
-+# In particular, this should not be used as an example of modern Perl
-+# programming techniques.
-+#
-+# Suggested alternative: Cwd
-+#
-+# Usage: $cwd = &fastcwd;
-+#
-+# This is a faster version of getcwd. It's also more dangerous because
-+# you might chdir out of a directory that you can't chdir back into.
-+
-+sub fastcwd {
-+ local($odev, $oino, $cdev, $cino, $tdev, $tino);
-+ local(@path, $path);
-+ local(*DIR);
-+
-+ ($cdev, $cino) = stat('.');
-+ for (;;) {
-+ ($odev, $oino) = ($cdev, $cino);
-+ chdir('..');
-+ ($cdev, $cino) = stat('.');
-+ last if $odev == $cdev && $oino == $cino;
-+ opendir(DIR, '.');
-+ for (;;) {
-+ $_ = readdir(DIR);
-+ next if $_ eq '.';
-+ next if $_ eq '..';
-+
-+ last unless $_;
-+ ($tdev, $tino) = lstat($_);
-+ last unless $tdev != $odev || $tino != $oino;
-+ }
-+ closedir(DIR);
-+ unshift(@path, $_);
-+ }
-+ chdir($path = '/' . join('/', @path));
-+ $path;
-+}
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/find.pl perl-5.16.3/lib/find.pl
---- perl-5.16.3-orig/lib/find.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/find.pl 2016-08-18 10:07:06.510441965 +0200
-@@ -0,0 +1,47 @@
-+# Usage:
-+# require "find.pl";
-+#
-+# &find('/foo','/bar');
-+#
-+# sub wanted { ... }
-+# where wanted does whatever you want. $dir contains the
-+# current directory name, and $_ the current filename within
-+# that directory. $name contains "$dir/$_". You are cd'ed
-+# to $dir when the function is called. The function may
-+# set $prune to prune the tree.
-+#
-+# This library is primarily for find2perl, which, when fed
-+#
-+# find2perl / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune
-+#
-+# spits out something like this
-+#
-+# sub wanted {
-+# /^\.nfs.*$/ &&
-+# (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
-+# int(-M _) > 7 &&
-+# unlink($_)
-+# ||
-+# ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) &&
-+# $dev < 0 &&
-+# ($prune = 1);
-+# }
-+#
-+# Set the variable $dont_use_nlink if you're using AFS, since AFS cheats.
-+
-+use File::Find ();
-+
-+*name = *File::Find::name;
-+*prune = *File::Find::prune;
-+*dir = *File::Find::dir;
-+*topdir = *File::Find::topdir;
-+*topdev = *File::Find::topdev;
-+*topino = *File::Find::topino;
-+*topmode = *File::Find::topmode;
-+*topnlink = *File::Find::topnlink;
-+
-+sub find {
-+ &File::Find::find(\&wanted, @_);
-+}
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/finddepth.pl perl-5.16.3/lib/finddepth.pl
---- perl-5.16.3-orig/lib/finddepth.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/finddepth.pl 2016-08-18 10:07:06.520441921 +0200
-@@ -0,0 +1,46 @@
-+# Usage:
-+# require "finddepth.pl";
-+#
-+# &finddepth('/foo','/bar');
-+#
-+# sub wanted { ... }
-+# where wanted does whatever you want. $dir contains the
-+# current directory name, and $_ the current filename within
-+# that directory. $name contains "$dir/$_". You are cd'ed
-+# to $dir when the function is called. The function may
-+# set $prune to prune the tree.
-+#
-+# This library is primarily for find2perl, which, when fed
-+#
-+# find2perl / -name .nfs\* -mtime +7 -exec rm -f {} \; -o -fstype nfs -prune
-+#
-+# spits out something like this
-+#
-+# sub wanted {
-+# /^\.nfs.*$/ &&
-+# (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) &&
-+# int(-M _) > 7 &&
-+# unlink($_)
-+# ||
-+# ($nlink || (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_))) &&
-+# $dev < 0 &&
-+# ($prune = 1);
-+# }
-+
-+
-+use File::Find ();
-+
-+*name = *File::Find::name;
-+*prune = *File::Find::prune;
-+*dir = *File::Find::dir;
-+*topdir = *File::Find::topdir;
-+*topdev = *File::Find::topdev;
-+*topino = *File::Find::topino;
-+*topmode = *File::Find::topmode;
-+*topnlink = *File::Find::topnlink;
-+
-+sub finddepth {
-+ &File::Find::finddepth(\&wanted, @_);
-+}
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/flush.pl perl-5.16.3/lib/flush.pl
---- perl-5.16.3-orig/lib/flush.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/flush.pl 2016-08-18 10:07:06.529441881 +0200
-@@ -0,0 +1,32 @@
-+#
-+# This library is no longer being maintained, and is included for backward
-+# compatibility with Perl 4 programs which may require it.
-+#
-+# In particular, this should not be used as an example of modern Perl
-+# programming techniques.
-+#
-+# Suggested alternative: IO::Handle
-+#
-+;# Usage: &flush(FILEHANDLE)
-+;# flushes the named filehandle
-+
-+;# Usage: &printflush(FILEHANDLE, "prompt: ")
-+;# prints arguments and flushes filehandle
-+
-+sub flush {
-+ local($old) = select(shift);
-+ $| = 1;
-+ print "";
-+ $| = 0;
-+ select($old);
-+}
-+
-+sub printflush {
-+ local($old) = select(shift);
-+ $| = 1;
-+ print @_;
-+ $| = 0;
-+ select($old);
-+}
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/getcwd.pl perl-5.16.3/lib/getcwd.pl
---- perl-5.16.3-orig/lib/getcwd.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/getcwd.pl 2016-08-18 10:07:06.540441833 +0200
-@@ -0,0 +1,71 @@
-+# By Brandon S. Allbery
-+#
-+# This library is no longer being maintained, and is included for backward
-+# compatibility with Perl 4 programs which may require it.
-+#
-+# In particular, this should not be used as an example of modern Perl
-+# programming techniques.
-+#
-+# Suggested alternative: Cwd
-+#
-+#
-+# Usage: $cwd = &getcwd;
-+
-+sub getcwd
-+{
-+ local($dotdots, $cwd, @pst, @cst, $dir, @tst);
-+
-+ unless (@cst = stat('.'))
-+ {
-+ warn "stat(.): $!";
-+ return '';
-+ }
-+ $cwd = '';
-+ do
-+ {
-+ $dotdots .= '/' if $dotdots;
-+ $dotdots .= '..';
-+ @pst = @cst;
-+ unless (opendir(getcwd'PARENT, $dotdots)) #'))
-+ {
-+ warn "opendir($dotdots): $!";
-+ return '';
-+ }
-+ unless (@cst = stat($dotdots))
-+ {
-+ warn "stat($dotdots): $!";
-+ closedir(getcwd'PARENT); #');
-+ return '';
-+ }
-+ if ($pst[$[] == $cst[$[] && $pst[$[ + 1] == $cst[$[ + 1])
-+ {
-+ $dir = '';
-+ }
-+ else
-+ {
-+ do
-+ {
-+ unless (defined ($dir = readdir(getcwd'PARENT))) #'))
-+ {
-+ warn "readdir($dotdots): $!";
-+ closedir(getcwd'PARENT); #');
-+ return '';
-+ }
-+ unless (@tst = lstat("$dotdots/$dir"))
-+ {
-+ # warn "lstat($dotdots/$dir): $!";
-+ # closedir(getcwd'PARENT); #');
-+ # return '';
-+ }
-+ }
-+ while ($dir eq '.' || $dir eq '..' || $tst[$[] != $pst[$[] ||
-+ $tst[$[ + 1] != $pst[$[ + 1]);
-+ }
-+ $cwd = "$dir/$cwd";
-+ closedir(getcwd'PARENT); #');
-+ } while ($dir ne '');
-+ chop($cwd);
-+ $cwd;
-+}
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/getopt.pl perl-5.16.3/lib/getopt.pl
---- perl-5.16.3-orig/lib/getopt.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/getopt.pl 2016-08-18 10:07:06.548441797 +0200
-@@ -0,0 +1,49 @@
-+;# $RCSfile: getopt.pl,v $$Revision: 4.1 $$Date: 92/08/07 18:23:58 $
-+#
-+# This library is no longer being maintained, and is included for backward
-+# compatibility with Perl 4 programs which may require it.
-+#
-+# In particular, this should not be used as an example of modern Perl
-+# programming techniques.
-+#
-+# Suggested alternatives: Getopt::Long or Getopt::Std
-+#
-+;# Process single-character switches with switch clustering. Pass one argument
-+;# which is a string containing all switches that take an argument. For each
-+;# switch found, sets $opt_x (where x is the switch name) to the value of the
-+;# argument, or 1 if no argument. Switches which take an argument don't care
-+;# whether there is a space between the switch and the argument.
-+
-+;# Usage:
-+;# do Getopt('oDI'); # -o, -D & -I take arg. Sets opt_* as a side effect.
-+
-+sub Getopt {
-+ local($argumentative) = @_;
-+ local($_,$first,$rest);
-+ local($[) = 0;
-+
-+ while (@ARGV && ($_ = $ARGV[0]) =~ /^-(.)(.*)/) {
-+ ($first,$rest) = ($1,$2);
-+ if (index($argumentative,$first) >= $[) {
-+ if ($rest ne '') {
-+ shift(@ARGV);
-+ }
-+ else {
-+ shift(@ARGV);
-+ $rest = shift(@ARGV);
-+ }
-+ ${"opt_$first"} = $rest;
-+ }
-+ else {
-+ ${"opt_$first"} = 1;
-+ if ($rest ne '') {
-+ $ARGV[0] = "-$rest";
-+ }
-+ else {
-+ shift(@ARGV);
-+ }
-+ }
-+ }
-+}
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/getopts.pl perl-5.16.3/lib/getopts.pl
---- perl-5.16.3-orig/lib/getopts.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/getopts.pl 2016-08-18 10:07:06.557441758 +0200
-@@ -0,0 +1,66 @@
-+;# getopts.pl - a better getopt.pl
-+#
-+# This library is no longer being maintained, and is included for backward
-+# compatibility with Perl 4 programs which may require it.
-+#
-+# In particular, this should not be used as an example of modern Perl
-+# programming techniques.
-+#
-+# Suggested alternatives: Getopt::Long or Getopt::Std
-+#
-+;# Usage:
-+;# do Getopts('a:bc'); # -a takes arg. -b & -c not. Sets opt_* as a
-+;# # side effect.
-+
-+sub Getopts {
-+ local($argumentative) = @_;
-+ local(@args,$_,$first,$rest);
-+ local($errs) = 0;
-+ local($[) = 0;
-+
-+ @args = split( / */, $argumentative );
-+ while(@ARGV && ($_ = $ARGV[0]) =~ /^-(.)(.*)/) {
-+ ($first,$rest) = ($1,$2);
-+ $pos = index($argumentative,$first);
-+ if($pos >= $[) {
-+ if($args[$pos+1] eq ':') {
-+ shift(@ARGV);
-+ if($rest eq '') {
-+ ++$errs unless(@ARGV);
-+ $rest = shift(@ARGV);
-+ }
-+ eval "
-+ push(\@opt_$first, \$rest);
-+ if (!defined \$opt_$first or \$opt_$first eq '') {
-+ \$opt_$first = \$rest;
-+ }
-+ else {
-+ \$opt_$first .= ' ' . \$rest;
-+ }
-+ ";
-+ }
-+ else {
-+ eval "\$opt_$first = 1";
-+ if($rest eq '') {
-+ shift(@ARGV);
-+ }
-+ else {
-+ $ARGV[0] = "-$rest";
-+ }
-+ }
-+ }
-+ else {
-+ print STDERR "Unknown option: $first\n";
-+ ++$errs;
-+ if($rest ne '') {
-+ $ARGV[0] = "-$rest";
-+ }
-+ else {
-+ shift(@ARGV);
-+ }
-+ }
-+ }
-+ $errs == 0;
-+}
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/hostname.pl perl-5.16.3/lib/hostname.pl
---- perl-5.16.3-orig/lib/hostname.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/hostname.pl 2016-08-18 10:07:06.567441713 +0200
-@@ -0,0 +1,31 @@
-+# From: asherman@fmrco.com (Aaron Sherman)
-+#
-+# This library is no longer being maintained, and is included for backward
-+# compatibility with Perl 4 programs which may require it.
-+#
-+# In particular, this should not be used as an example of modern Perl
-+# programming techniques.
-+#
-+# Suggested alternative: Sys::Hostname
-+#
-+sub hostname
-+{
-+ local(*P,@tmp,$hostname,$_);
-+ if (open(P,"hostname 2>&1 |") && (@tmp = ) && close(P))
-+ {
-+ chop($hostname = $tmp[$#tmp]);
-+ }
-+ elsif (open(P,"uname -n 2>&1 |") && (@tmp =
) && close(P))
-+ {
-+ chop($hostname = $tmp[$#tmp]);
-+ }
-+ else
-+ {
-+ die "$0: Cannot get hostname from 'hostname' or 'uname -n'\n";
-+ }
-+ @tmp = ();
-+ close P; # Just in case we failed in an odd spot....
-+ $hostname;
-+}
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/importenv.pl perl-5.16.3/lib/importenv.pl
---- perl-5.16.3-orig/lib/importenv.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/importenv.pl 2016-08-18 10:07:06.577441669 +0200
-@@ -0,0 +1,14 @@
-+;# This file, when interpreted, pulls the environment into normal variables.
-+;# Usage:
-+;# require 'importenv.pl';
-+;# or
-+;# #include
-+
-+local($tmp,$key) = '';
-+
-+foreach $key (keys(%ENV)) {
-+ $tmp .= "\$$key = \$ENV{'$key'};" if $key =~ /^[A-Za-z]\w*$/;
-+}
-+eval $tmp;
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/look.pl perl-5.16.3/lib/look.pl
---- perl-5.16.3-orig/lib/look.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/look.pl 2016-08-18 10:07:06.586441630 +0200
-@@ -0,0 +1,50 @@
-+;# Usage: &look(*FILEHANDLE,$key,$dict,$fold)
-+#
-+# This library is no longer being maintained, and is included for backward
-+# compatibility with Perl 4 programs which may require it.
-+#
-+# In particular, this should not be used as an example of modern Perl
-+# programming techniques.
-+#
-+;# Sets file position in FILEHANDLE to be first line greater than or equal
-+;# (stringwise) to $key. Pass flags for dictionary order and case folding.
-+
-+sub look {
-+ local(*FH,$key,$dict,$fold) = @_;
-+ local($max,$min,$mid,$_);
-+ local($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
-+ $blksize,$blocks) = stat(FH);
-+ $blksize = 8192 unless $blksize;
-+ $key =~ s/[^\w\s]//g if $dict;
-+ $key = lc $key if $fold;
-+ $max = int($size / $blksize);
-+ while ($max - $min > 1) {
-+ $mid = int(($max + $min) / 2);
-+ seek(FH,$mid * $blksize,0);
-+ $_ = if $mid; # probably a partial line
-+ $_ = ;
-+ chop;
-+ s/[^\w\s]//g if $dict;
-+ $_ = lc $_ if $fold;
-+ if ($_ lt $key) {
-+ $min = $mid;
-+ }
-+ else {
-+ $max = $mid;
-+ }
-+ }
-+ $min *= $blksize;
-+ seek(FH,$min,0);
-+ if $min;
-+ while () {
-+ chop;
-+ s/[^\w\s]//g if $dict;
-+ $_ = lc $_ if $fold;
-+ last if $_ ge $key;
-+ $min = tell(FH);
-+ }
-+ seek(FH,$min,0);
-+ $min;
-+}
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/newgetopt.pl perl-5.16.3/lib/newgetopt.pl
---- perl-5.16.3-orig/lib/newgetopt.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/newgetopt.pl 2016-08-18 10:07:06.595441590 +0200
-@@ -0,0 +1,75 @@
-+# $Id: newgetopt.pl,v 1.18 2001/09/21 13:34:59 jv Exp $
-+
-+# This library is no longer being maintained, and is included for backward
-+# compatibility with Perl 4 programs which may require it.
-+# It is now just a wrapper around the Getopt::Long module.
-+#
-+# In particular, this should not be used as an example of modern Perl
-+# programming techniques.
-+#
-+# Suggested alternative: Getopt::Long
-+
-+{ package newgetopt;
-+
-+ # Values for $order. See GNU getopt.c for details.
-+ $REQUIRE_ORDER = 0;
-+ $PERMUTE = 1;
-+ $RETURN_IN_ORDER = 2;
-+
-+ # Handle POSIX compliancy.
-+ if ( defined $ENV{"POSIXLY_CORRECT"} ) {
-+ $autoabbrev = 0; # no automatic abbrev of options (???)
-+ $getopt_compat = 0; # disallow '+' to start options
-+ $option_start = "(--|-)";
-+ $order = $REQUIRE_ORDER;
-+ $bundling = 0;
-+ $passthrough = 0;
-+ }
-+ else {
-+ $autoabbrev = 1; # automatic abbrev of options
-+ $getopt_compat = 1; # allow '+' to start options
-+ $option_start = "(--|-|\\+)";
-+ $order = $PERMUTE;
-+ $bundling = 0;
-+ $passthrough = 0;
-+ }
-+
-+ # Other configurable settings.
-+ $debug = 0; # for debugging
-+ $ignorecase = 1; # ignore case when matching options
-+ $argv_end = "--"; # don't change this!
-+}
-+
-+use Getopt::Long;
-+
-+################ Subroutines ################
-+
-+sub NGetOpt {
-+
-+ $Getopt::Long::debug = $newgetopt::debug
-+ if defined $newgetopt::debug;
-+ $Getopt::Long::autoabbrev = $newgetopt::autoabbrev
-+ if defined $newgetopt::autoabbrev;
-+ $Getopt::Long::getopt_compat = $newgetopt::getopt_compat
-+ if defined $newgetopt::getopt_compat;
-+ $Getopt::Long::option_start = $newgetopt::option_start
-+ if defined $newgetopt::option_start;
-+ $Getopt::Long::order = $newgetopt::order
-+ if defined $newgetopt::order;
-+ $Getopt::Long::bundling = $newgetopt::bundling
-+ if defined $newgetopt::bundling;
-+ $Getopt::Long::ignorecase = $newgetopt::ignorecase
-+ if defined $newgetopt::ignorecase;
-+ $Getopt::Long::ignorecase = $newgetopt::ignorecase
-+ if defined $newgetopt::ignorecase;
-+ $Getopt::Long::passthrough = $newgetopt::passthrough
-+ if defined $newgetopt::passthrough;
-+
-+ &GetOptions;
-+}
-+
-+################ Package return ################
-+
-+1;
-+
-+################ End of newgetopt.pl ################
-diff -ENwbur perl-5.16.3-orig/lib/open2.pl perl-5.16.3/lib/open2.pl
---- perl-5.16.3-orig/lib/open2.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/open2.pl 2016-08-18 10:07:06.605441546 +0200
-@@ -0,0 +1,12 @@
-+# This is a compatibility interface to IPC::Open2. New programs should
-+# do
-+#
-+# use IPC::Open2;
-+#
-+# instead of
-+#
-+# require 'open2.pl';
-+
-+package main;
-+use IPC::Open2 'open2';
-+1
-diff -ENwbur perl-5.16.3-orig/lib/open3.pl perl-5.16.3/lib/open3.pl
---- perl-5.16.3-orig/lib/open3.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/open3.pl 2016-08-18 10:07:06.615441502 +0200
-@@ -0,0 +1,12 @@
-+# This is a compatibility interface to IPC::Open3. New programs should
-+# do
-+#
-+# use IPC::Open3;
-+#
-+# instead of
-+#
-+# require 'open3.pl';
-+
-+package main;
-+use IPC::Open3 'open3';
-+1
-diff -ENwbur perl-5.16.3-orig/lib/pwd.pl perl-5.16.3/lib/pwd.pl
---- perl-5.16.3-orig/lib/pwd.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/pwd.pl 2016-08-18 10:07:06.625441458 +0200
-@@ -0,0 +1,67 @@
-+;# pwd.pl - keeps track of current working directory in PWD environment var
-+;#
-+#
-+# This library is no longer being maintained, and is included for backward
-+# compatibility with Perl 4 programs which may require it.
-+#
-+# In particular, this should not be used as an example of modern Perl
-+# programming techniques.
-+#
-+# Suggested alternative: Cwd
-+#
-+;# $RCSfile: pwd.pl,v $$Revision: 4.1 $$Date: 92/08/07 18:24:11 $
-+;#
-+;# $Log: pwd.pl,v $
-+;#
-+;# Usage:
-+;# require "pwd.pl";
-+;# &initpwd;
-+;# ...
-+;# &chdir($newdir);
-+
-+package pwd;
-+
-+sub main'initpwd {
-+ if ($ENV{'PWD'}) {
-+ local($dd,$di) = stat('.');
-+ local($pd,$pi) = stat($ENV{'PWD'});
-+ if (!defined $dd or !defined $pd or $di != $pi or $dd != $pd) {
-+ chop($ENV{'PWD'} = `pwd`);
-+ }
-+ }
-+ else {
-+ chop($ENV{'PWD'} = `pwd`);
-+ }
-+ if ($ENV{'PWD'} =~ m|(/[^/]+(/[^/]+/[^/]+))(.*)|) {
-+ local($pd,$pi) = stat($2);
-+ local($dd,$di) = stat($1);
-+ if (defined $pd and defined $dd and $di == $pi and $dd == $pd) {
-+ $ENV{'PWD'}="$2$3";
-+ }
-+ }
-+}
-+
-+sub main'chdir {
-+ local($newdir) = shift;
-+ $newdir =~ s|/{2,}|/|g;
-+ if (chdir $newdir) {
-+ if ($newdir =~ m#^/#) {
-+ $ENV{'PWD'} = $newdir;
-+ }
-+ else {
-+ local(@curdir) = split(m#/#,$ENV{'PWD'});
-+ @curdir = '' unless @curdir;
-+ foreach $component (split(m#/#, $newdir)) {
-+ next if $component eq '.';
-+ pop(@curdir),next if $component eq '..';
-+ push(@curdir,$component);
-+ }
-+ $ENV{'PWD'} = join('/',@curdir) || '/';
-+ }
-+ }
-+ else {
-+ 0;
-+ }
-+}
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/shellwords.pl perl-5.16.3/lib/shellwords.pl
---- perl-5.16.3-orig/lib/shellwords.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/shellwords.pl 2016-08-18 10:07:06.635441413 +0200
-@@ -0,0 +1,14 @@
-+;# shellwords.pl
-+;#
-+;# Usage:
-+;# require 'shellwords.pl';
-+;# @words = shellwords($line);
-+;# or
-+;# @words = shellwords(@lines);
-+;# or
-+;# @words = shellwords(); # defaults to $_ (and clobbers it)
-+
-+require Text::ParseWords;
-+*shellwords = \&Text::ParseWords::old_shellwords;
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/stat.pl perl-5.16.3/lib/stat.pl
---- perl-5.16.3-orig/lib/stat.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/stat.pl 2016-08-18 10:07:06.644441374 +0200
-@@ -0,0 +1,29 @@
-+;# Usage:
-+;# require 'stat.pl';
-+;# @ary = stat(foo);
-+;# $st_dev = @ary[$ST_DEV];
-+;#
-+$ST_DEV = 0 + $[;
-+$ST_INO = 1 + $[;
-+$ST_MODE = 2 + $[;
-+$ST_NLINK = 3 + $[;
-+$ST_UID = 4 + $[;
-+$ST_GID = 5 + $[;
-+$ST_RDEV = 6 + $[;
-+$ST_SIZE = 7 + $[;
-+$ST_ATIME = 8 + $[;
-+$ST_MTIME = 9 + $[;
-+$ST_CTIME = 10 + $[;
-+$ST_BLKSIZE = 11 + $[;
-+$ST_BLOCKS = 12 + $[;
-+
-+;# Usage:
-+;# require 'stat.pl';
-+;# do Stat('foo'); # sets st_* as a side effect
-+;#
-+sub Stat {
-+ ($st_dev,$st_ino,$st_mode,$st_nlink,$st_uid,$st_gid,$st_rdev,$st_size,
-+ $st_atime,$st_mtime,$st_ctime,$st_blksize,$st_blocks) = stat(shift(@_));
-+}
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/syslog.pl perl-5.16.3/lib/syslog.pl
---- perl-5.16.3-orig/lib/syslog.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/syslog.pl 2016-08-18 10:07:06.656441321 +0200
-@@ -0,0 +1,199 @@
-+#
-+# syslog.pl
-+#
-+# $Log: syslog.pl,v $
-+#
-+# tom christiansen
-+# modified to use sockets by Larry Wall
-+# NOTE: openlog now takes three arguments, just like openlog(3)
-+#
-+# call syslog() with a string priority and a list of printf() args
-+# like syslog(3)
-+#
-+# usage: require 'syslog.pl';
-+#
-+# then (put these all in a script to test function)
-+#
-+#
-+# do openlog($program,'cons,pid','user');
-+# do syslog('info','this is another test');
-+# do syslog('mail|warning','this is a better test: %d', time);
-+# do closelog();
-+#
-+# do syslog('debug','this is the last test');
-+# do openlog("$program $$",'ndelay','user');
-+# do syslog('notice','fooprogram: this is really done');
-+#
-+# $! = 55;
-+# do syslog('info','problem was %m'); # %m == $! in syslog(3)
-+
-+package syslog;
-+
-+use warnings::register;
-+
-+$host = 'localhost' unless $host; # set $syslog'host to change
-+
-+if ($] >= 5 && warnings::enabled()) {
-+ warnings::warn("You should 'use Sys::Syslog' instead; continuing");
-+}
-+
-+require 'syslog.ph';
-+
-+ eval 'use Socket; 1' ||
-+ eval { require "socket.ph" } ||
-+ require "sys/socket.ph";
-+
-+$maskpri = &LOG_UPTO(&LOG_DEBUG);
-+
-+sub main'openlog {
-+ ($ident, $logopt, $facility) = @_; # package vars
-+ $lo_pid = $logopt =~ /\bpid\b/;
-+ $lo_ndelay = $logopt =~ /\bndelay\b/;
-+ $lo_cons = $logopt =~ /\bcons\b/;
-+ $lo_nowait = $logopt =~ /\bnowait\b/;
-+ &connect if $lo_ndelay;
-+}
-+
-+sub main'closelog {
-+ $facility = $ident = '';
-+ &disconnect;
-+}
-+
-+sub main'setlogmask {
-+ local($oldmask) = $maskpri;
-+ $maskpri = shift;
-+ $oldmask;
-+}
-+
-+sub main'syslog {
-+ local($priority) = shift;
-+ local($mask) = shift;
-+ local($message, $whoami);
-+ local(@words, $num, $numpri, $numfac, $sum);
-+ local($facility) = $facility; # may need to change temporarily.
-+
-+ die "syslog: expected both priority and mask" unless $mask && $priority;
-+
-+ @words = split(/\W+/, $priority, 2);# Allow "level" or "level|facility".
-+ undef $numpri;
-+ undef $numfac;
-+ foreach (@words) {
-+ $num = &xlate($_); # Translate word to number.
-+ if (/^kern$/ || $num < 0) {
-+ die "syslog: invalid level/facility: $_\n";
-+ }
-+ elsif ($num <= &LOG_PRIMASK) {
-+ die "syslog: too many levels given: $_\n" if defined($numpri);
-+ $numpri = $num;
-+ return 0 unless &LOG_MASK($numpri) & $maskpri;
-+ }
-+ else {
-+ die "syslog: too many facilities given: $_\n" if defined($numfac);
-+ $facility = $_;
-+ $numfac = $num;
-+ }
-+ }
-+
-+ die "syslog: level must be given\n" unless defined($numpri);
-+
-+ if (!defined($numfac)) { # Facility not specified in this call.
-+ $facility = 'user' unless $facility;
-+ $numfac = &xlate($facility);
-+ }
-+
-+ &connect unless $connected;
-+
-+ $whoami = $ident;
-+
-+ if (!$ident && $mask =~ /^(\S.*):\s?(.*)/) {
-+ $whoami = $1;
-+ $mask = $2;
-+ }
-+
-+ unless ($whoami) {
-+ ($whoami = getlogin) ||
-+ ($whoami = getpwuid($<)) ||
-+ ($whoami = 'syslog');
-+ }
-+
-+ $whoami .= "[$$]" if $lo_pid;
-+
-+ $mask =~ s/%m/$!/g;
-+ $mask .= "\n" unless $mask =~ /\n$/;
-+ $message = sprintf ($mask, @_);
-+
-+ $sum = $numpri + $numfac;
-+ unless (send(SYSLOG,"<$sum>$whoami: $message",0)) {
-+ if ($lo_cons) {
-+ if ($pid = fork) {
-+ unless ($lo_nowait) {
-+ do {$died = wait;} until $died == $pid || $died < 0;
-+ }
-+ }
-+ else {
-+ open(CONS,">/dev/console");
-+ print CONS "<$facility.$priority>$whoami: $message\r";
-+ exit if defined $pid; # if fork failed, we're parent
-+ close CONS;
-+ }
-+ }
-+ }
-+}
-+
-+sub xlate {
-+ local($name) = @_;
-+ $name = uc $name;
-+ $name = "LOG_$name" unless $name =~ /^LOG_/;
-+ $name = "syslog'$name";
-+ defined &$name ? &$name : -1;
-+}
-+
-+sub connect {
-+ $pat = 'S n C4 x8';
-+
-+ $af_unix = &AF_UNIX;
-+ $af_inet = &AF_INET;
-+
-+ $stream = &SOCK_STREAM;
-+ $datagram = &SOCK_DGRAM;
-+
-+ ($name,$aliases,$proto) = getprotobyname('udp');
-+ $udp = $proto;
-+
-+ ($name,$aliases,$port,$proto) = getservbyname('syslog','udp');
-+ $syslog = $port;
-+
-+ if (chop($myname = `hostname`)) {
-+ ($name,$aliases,$addrtype,$length,@addrs) = gethostbyname($myname);
-+ die "Can't lookup $myname\n" unless $name;
-+ @bytes = unpack("C4",$addrs[0]);
-+ }
-+ else {
-+ @bytes = (0,0,0,0);
-+ }
-+ $this = pack($pat, $af_inet, 0, @bytes);
-+
-+ if ($host =~ /^\d+\./) {
-+ @bytes = split(/\./,$host);
-+ }
-+ else {
-+ ($name,$aliases,$addrtype,$length,@addrs) = gethostbyname($host);
-+ die "Can't lookup $host\n" unless $name;
-+ @bytes = unpack("C4",$addrs[0]);
-+ }
-+ $that = pack($pat,$af_inet,$syslog,@bytes);
-+
-+ socket(SYSLOG,$af_inet,$datagram,$udp) || die "socket: $!\n";
-+ bind(SYSLOG,$this) || die "bind: $!\n";
-+ connect(SYSLOG,$that) || die "connect: $!\n";
-+
-+ local($old) = select(SYSLOG); $| = 1; select($old);
-+ $connected = 1;
-+}
-+
-+sub disconnect {
-+ close SYSLOG;
-+ $connected = 0;
-+}
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/tainted.pl perl-5.16.3/lib/tainted.pl
---- perl-5.16.3-orig/lib/tainted.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/tainted.pl 2016-08-18 10:07:06.670441259 +0200
-@@ -0,0 +1,9 @@
-+# This subroutine returns true if its argument is tainted, false otherwise.
-+
-+sub tainted {
-+ local($@);
-+ eval { kill 0 * $_[0] };
-+ $@ =~ /^Insecure/;
-+}
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/termcap.pl perl-5.16.3/lib/termcap.pl
---- perl-5.16.3-orig/lib/termcap.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/termcap.pl 2016-08-18 10:07:06.678441224 +0200
-@@ -0,0 +1,178 @@
-+;# $RCSfile: termcap.pl,v $$Revision: 4.1 $$Date: 92/08/07 18:24:16 $
-+#
-+# This library is no longer being maintained, and is included for backward
-+# compatibility with Perl 4 programs which may require it.
-+#
-+# In particular, this should not be used as an example of modern Perl
-+# programming techniques.
-+#
-+# Suggested alternative: Term::Cap
-+#
-+;#
-+;# Usage:
-+;# require 'ioctl.pl';
-+;# ioctl(TTY,$TIOCGETP,$foo);
-+;# ($ispeed,$ospeed) = unpack('cc',$foo);
-+;# require 'termcap.pl';
-+;# &Tgetent('vt100'); # sets $TC{'cm'}, etc.
-+;# &Tputs(&Tgoto($TC{'cm'},$col,$row), 0, 'FILEHANDLE');
-+;# &Tputs($TC{'dl'},$affcnt,'FILEHANDLE');
-+;#
-+sub Tgetent {
-+ local($TERM) = @_;
-+ local($TERMCAP,$_,$entry,$loop,$field);
-+
-+ # warn "Tgetent: no ospeed set" unless $ospeed;
-+ foreach $key (keys %TC) {
-+ delete $TC{$key};
-+ }
-+ $TERM = $ENV{'TERM'} unless $TERM;
-+ $TERM =~ s/(\W)/\\$1/g;
-+ $TERMCAP = $ENV{'TERMCAP'};
-+ $TERMCAP = '/etc/termcap' unless $TERMCAP;
-+ if ($TERMCAP !~ m:^/:) {
-+ if ($TERMCAP !~ /(^|\|)$TERM[:\|]/) {
-+ $TERMCAP = '/etc/termcap';
-+ }
-+ }
-+ if ($TERMCAP =~ m:^/:) {
-+ $entry = '';
-+ do {
-+ $loop = "
-+ open(TERMCAP,'<$TERMCAP') || die \"Can't open $TERMCAP\";
-+ while () {
-+ next if /^#/;
-+ next if /^\t/;
-+ if (/(^|\\|)${TERM}[:\\|]/) {
-+ chop;
-+ while (chop eq '\\\\') {
-+ \$_ .= ;
-+ chop;
-+ }
-+ \$_ .= ':';
-+ last;
-+ }
-+ }
-+ close TERMCAP;
-+ \$entry .= \$_;
-+ ";
-+ eval $loop;
-+ } while s/:tc=([^:]+):/:/ && ($TERM = $1);
-+ $TERMCAP = $entry;
-+ }
-+
-+ foreach $field (split(/:[\s:\\]*/,$TERMCAP)) {
-+ if ($field =~ /^\w\w$/) {
-+ $TC{$field} = 1;
-+ }
-+ elsif ($field =~ /^(\w\w)#(.*)/) {
-+ $TC{$1} = $2 if $TC{$1} eq '';
-+ }
-+ elsif ($field =~ /^(\w\w)=(.*)/) {
-+ $entry = $1;
-+ $_ = $2;
-+ s/\\E/\033/g;
-+ s/\\(200)/pack('c',0)/eg; # NUL character
-+ s/\\(0\d\d)/pack('c',oct($1))/eg; # octal
-+ s/\\(0x[0-9A-Fa-f][0-9A-Fa-f])/pack('c',hex($1))/eg; # hex
-+ s/\\(\d\d\d)/pack('c',$1 & 0177)/eg;
-+ s/\\n/\n/g;
-+ s/\\r/\r/g;
-+ s/\\t/\t/g;
-+ s/\\b/\b/g;
-+ s/\\f/\f/g;
-+ s/\\\^/\377/g;
-+ s/\^\?/\177/g;
-+ s/\^(.)/pack('c',ord($1) & 31)/eg;
-+ s/\\(.)/$1/g;
-+ s/\377/^/g;
-+ $TC{$entry} = $_ if $TC{$entry} eq '';
-+ }
-+ }
-+ $TC{'pc'} = "\0" if $TC{'pc'} eq '';
-+ $TC{'bc'} = "\b" if $TC{'bc'} eq '';
-+}
-+
-+@Tputs = (0,200,133.3,90.9,74.3,66.7,50,33.3,16.7,8.3,5.5,4.1,2,1,.5,.2);
-+
-+sub Tputs {
-+ local($string,$affcnt,$FH) = @_;
-+ local($ms);
-+ if ($string =~ /(^[\d.]+)(\*?)(.*)$/) {
-+ $ms = $1;
-+ $ms *= $affcnt if $2;
-+ $string = $3;
-+ $decr = $Tputs[$ospeed];
-+ if ($decr > .1) {
-+ $ms += $decr / 2;
-+ $string .= $TC{'pc'} x ($ms / $decr);
-+ }
-+ }
-+ print $FH $string if $FH;
-+ $string;
-+}
-+
-+sub Tgoto {
-+ local($string) = shift(@_);
-+ local($result) = '';
-+ local($after) = '';
-+ local($code,$tmp) = @_;
-+ local(@tmp);
-+ @tmp = ($tmp,$code);
-+ local($online) = 0;
-+ while ($string =~ /^([^%]*)%(.)(.*)/) {
-+ $result .= $1;
-+ $code = $2;
-+ $string = $3;
-+ if ($code eq 'd') {
-+ $result .= sprintf("%d",shift(@tmp));
-+ }
-+ elsif ($code eq '.') {
-+ $tmp = shift(@tmp);
-+ if ($tmp == 0 || $tmp == 4 || $tmp == 10) {
-+ if ($online) {
-+ ++$tmp, $after .= $TC{'up'} if $TC{'up'};
-+ }
-+ else {
-+ ++$tmp, $after .= $TC{'bc'};
-+ }
-+ }
-+ $result .= sprintf("%c",$tmp);
-+ $online = !$online;
-+ }
-+ elsif ($code eq '+') {
-+ $result .= sprintf("%c",shift(@tmp)+ord($string));
-+ $string = substr($string,1,99);
-+ $online = !$online;
-+ }
-+ elsif ($code eq 'r') {
-+ ($code,$tmp) = @tmp;
-+ @tmp = ($tmp,$code);
-+ $online = !$online;
-+ }
-+ elsif ($code eq '>') {
-+ ($code,$tmp,$string) = unpack("CCa99",$string);
-+ if ($tmp[$[] > $code) {
-+ $tmp[$[] += $tmp;
-+ }
-+ }
-+ elsif ($code eq '2') {
-+ $result .= sprintf("%02d",shift(@tmp));
-+ $online = !$online;
-+ }
-+ elsif ($code eq '3') {
-+ $result .= sprintf("%03d",shift(@tmp));
-+ $online = !$online;
-+ }
-+ elsif ($code eq 'i') {
-+ ($code,$tmp) = @tmp;
-+ @tmp = ($code+1,$tmp+1);
-+ }
-+ else {
-+ return "OOPS";
-+ }
-+ }
-+ $result . $string . $after;
-+}
-+
-+1;
-diff -ENwbur perl-5.16.3-orig/lib/timelocal.pl perl-5.16.3/lib/timelocal.pl
---- perl-5.16.3-orig/lib/timelocal.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/timelocal.pl 2016-08-18 10:07:06.689441175 +0200
-@@ -0,0 +1,18 @@
-+;# timelocal.pl
-+;#
-+;# Usage:
-+;# $time = timelocal($sec,$min,$hours,$mday,$mon,$year);
-+;# $time = timegm($sec,$min,$hours,$mday,$mon,$year);
-+
-+;# This file has been superseded by the Time::Local library module.
-+;# It is implemented as a call to that module for backwards compatibility
-+;# with code written for perl4; new code should use Time::Local directly.
-+
-+;# The current implementation shares with the original the questionable
-+;# behavior of defining the timelocal() and timegm() functions in the
-+;# namespace of whatever package was current when the first instance of
-+;# C was executed in a program.
-+
-+use Time::Local;
-+
-+*timelocal::cheat = \&Time::Local::cheat;
-diff -ENwbur perl-5.16.3-orig/lib/validate.pl perl-5.16.3/lib/validate.pl
---- perl-5.16.3-orig/lib/validate.pl 1970-01-01 01:00:00.000000000 +0100
-+++ perl-5.16.3/lib/validate.pl 2016-08-18 10:07:06.696441144 +0200
-@@ -0,0 +1,102 @@
-+;# The validate routine takes a single multiline string consisting of
-+;# lines containing a filename plus a file test to try on it. (The
-+;# file test may also be a 'cd', causing subsequent relative filenames
-+;# to be interpreted relative to that directory.) After the file test
-+;# you may put '|| die' to make it a fatal error if the file test fails.
-+;# The default is '|| warn'. The file test may optionally have a ! prepended
-+;# to test for the opposite condition. If you do a cd and then list some
-+;# relative filenames, you may want to indent them slightly for readability.
-+;# If you supply your own "die" or "warn" message, you can use $file to
-+;# interpolate the filename.
-+
-+;# Filetests may be bunched: -rwx tests for all of -r, -w and -x.
-+;# Only the first failed test of the bunch will produce a warning.
-+
-+;# The routine returns the number of warnings issued.
-+
-+;# Usage:
-+;# require "validate.pl";
-+;# $warnings += do validate('
-+;# /vmunix -e || die
-+;# /boot -e || die
-+;# /bin cd
-+;# csh -ex
-+;# csh !-ug
-+;# sh -ex
-+;# sh !-ug
-+;# /usr -d || warn "What happened to $file?\n"
-+;# ');
-+
-+sub validate {
-+ local($file,$test,$warnings,$oldwarnings);
-+ foreach $check (split(/\n/,$_[0])) {
-+ next if $check =~ /^#/;
-+ next if $check =~ /^$/;
-+ ($file,$test) = split(' ',$check,2);
-+ if ($test =~ s/^(!?-)(\w{2,}\b)/$1Z/) {
-+ $testlist = $2;
-+ @testlist = split(//,$testlist);
-+ }
-+ else {
-+ @testlist = ('Z');
-+ }
-+ $oldwarnings = $warnings;
-+ foreach $one (@testlist) {
-+ $this = $test;
-+ $this =~ s/(-\w\b)/$1 \$file/g;
-+ $this =~ s/-Z/-$one/;
-+ $this .= ' || warn' unless $this =~ /\|\|/;
-+ $this =~ s/^(.*\S)\s*\|\|\s*(die|warn)$/$1 || do valmess('$2','$1')/;
-+ $this =~ s/\bcd\b/chdir (\$cwd = \$file)/g;
-+ eval $this;
-+ last if $warnings > $oldwarnings;
-+ }
-+ }
-+ $warnings;
-+}
-+
-+sub valmess {
-+ local($disposition,$this) = @_;
-+ $file = $cwd . '/' . $file unless $file =~ m|^/|;
-+ if ($this =~ /^(!?)-(\w)\s+\$file\s*$/) {
-+ $neg = $1;
-+ $tmp = $2;
-+ $tmp eq 'r' && ($mess = "$file is not readable by uid $>.");
-+ $tmp eq 'w' && ($mess = "$file is not writable by uid $>.");
-+ $tmp eq 'x' && ($mess = "$file is not executable by uid $>.");
-+ $tmp eq 'o' && ($mess = "$file is not owned by uid $>.");
-+ $tmp eq 'R' && ($mess = "$file is not readable by you.");
-+ $tmp eq 'W' && ($mess = "$file is not writable by you.");
-+ $tmp eq 'X' && ($mess = "$file is not executable by you.");
-+ $tmp eq 'O' && ($mess = "$file is not owned by you.");
-+ $tmp eq 'e' && ($mess = "$file does not exist.");
-+ $tmp eq 'z' && ($mess = "$file does not have zero size.");
-+ $tmp eq 's' && ($mess = "$file does not have non-zero size.");
-+ $tmp eq 'f' && ($mess = "$file is not a plain file.");
-+ $tmp eq 'd' && ($mess = "$file is not a directory.");
-+ $tmp eq 'l' && ($mess = "$file is not a symbolic link.");
-+ $tmp eq 'p' && ($mess = "$file is not a named pipe (FIFO).");
-+ $tmp eq 'S' && ($mess = "$file is not a socket.");
-+ $tmp eq 'b' && ($mess = "$file is not a block special file.");
-+ $tmp eq 'c' && ($mess = "$file is not a character special file.");
-+ $tmp eq 'u' && ($mess = "$file does not have the setuid bit set.");
-+ $tmp eq 'g' && ($mess = "$file does not have the setgid bit set.");
-+ $tmp eq 'k' && ($mess = "$file does not have the sticky bit set.");
-+ $tmp eq 'T' && ($mess = "$file is not a text file.");
-+ $tmp eq 'B' && ($mess = "$file is not a binary file.");
-+ if ($neg eq '!') {
-+ $mess =~ s/ is not / should not be / ||
-+ $mess =~ s/ does not / should not / ||
-+ $mess =~ s/ not / /;
-+ }
-+ print STDERR $mess,"\n";
-+ }
-+ else {
-+ $this =~ s/\$file/'$file'/g;
-+ print STDERR "Can't do $this.\n";
-+ }
-+ if ($disposition eq 'die') { exit 1; }
-+ ++$warnings;
-+}
-+
-+1;
diff --git a/SPECS/perl.spec b/SPECS/perl.spec
index ecf67b0..2967b85 100644
--- a/SPECS/perl.spec
+++ b/SPECS/perl.spec
@@ -31,7 +31,7 @@
Name: perl
Version: %{perl_version}
# release number must be even higher, because dual-lived modules will be broken otherwise
-Release: 291%{?dist}
+Release: 292%{?dist}
Epoch: %{perl_epoch}
Summary: Practical Extraction and Report Language
Group: Development/Languages
@@ -165,10 +165,6 @@ Patch36: perl-5.20.3-Don-t-leak-the-temp-utf8-copy-of-n.patch
# RT#31923, in upstream after 5.23.3
Patch37: perl-5.16.3-Properly-duplicate-PerlIO-encoding-objects.patch
-# Backported libraries historically supplied with Perl 4 from Perl 5.10.1.
-# It is used as a workaround before adding perl-Perl4-CoreLibs to RHEL 7
-Patch38: Backport-Perl4-CoreLibs.patch
-
# Update some of the bundled modules
# see http://fedoraproject.org/wiki/Perl/perl.spec for instructions
@@ -1376,61 +1372,6 @@ Parse::CPAN::Meta is a parser for META.yml files, based on the parser half of
YAML::Tiny.
%endif
-%package Perl4-CoreLibs
-Summary: Libraries historically supplied with Perl 4
-Version: 0.001
-Epoch: 0
-License: GPL+ or Artistic
-Group: Development/Libraries
-BuildArch: noarch
-Requires: %perl_compat
-Requires: perl(File::Find)
-Requires: perl(IPC::Open2)
-Requires: perl(IPC::Open3)
-Requires: perl(Socket)
-Requires: perl(Text::ParseWords) >= 3.25
-Requires: perl(Time::Local)
-Requires: perl(warnings::register)
-Provides: perl(abbrev.pl)
-Provides: perl(assert.pl)
-Provides: perl(bigfloat.pl)
-Provides: perl(bigint.pl)
-Provides: perl(bigrat.pl)
-Provides: perl(cacheout.pl)
-Provides: perl(complete.pl)
-Provides: perl(ctime.pl)
-Provides: perl(dotsh.pl)
-Provides: perl(exceptions.pl)
-Provides: perl(fastcwd.pl)
-Provides: perl(find.pl)
-Provides: perl(finddepth.pl)
-Provides: perl(flush.pl)
-Provides: perl(getcwd.pl)
-Provides: perl(getopt.pl)
-Provides: perl(getopts.pl)
-Provides: perl(hostname.pl)
-Provides: perl(importenv.pl)
-Provides: perl(look.pl)
-Provides: perl(newgetopt.pl)
-Provides: perl(open2.pl)
-Provides: perl(open3.pl)
-Provides: perl(pwd.pl)
-Provides: perl(shellwords.pl)
-Provides: perl(stat.pl)
-Provides: perl(syslog.pl)
-Provides: perl(tainted.pl)
-Provides: perl(termcap.pl)
-Provides: perl(timelocal.pl)
-Provides: perl(validate.pl)
-
-%description Perl4-CoreLibs
-This is a collection of .pl files that have historically been bundled with the
-Perl core and were removed from perl 5.16. These files should not be used by
-new code. Functionally, most have been directly superseded by modules in the
-Perl 5 style. This collection exists to support old Perl programs that
-predates satisfactory replacements.
-
-
%if %{dual_life} || %{rebuild_from_scratch}
%package Perl-OSType
Summary: Map Perl operating system names to generic types
@@ -2013,7 +1954,6 @@ tarball from perl.org.
%patch35 -p1
%patch36 -p1
%patch37 -p1
-%patch38 -p1
%if !%{defined perl_bootstrap}
# Local patch tracking
@@ -2053,7 +1993,6 @@ perl -x patchlevel.h \
'RHEL Patch35: Fix CRLF conversion in ASCII FTP upload (CPAN RT#41642)' \
'RHEL Patch36: Do not leak the temp utf8 copy of namepv (CPAN RT#123786)' \
'RHEL Patch37: Fix duplicating PerlIO::encoding when spawning threads (RT#31923)' \
- 'RHEL Patch38: Backported libraries historically supplied with Perl 4' \
%{nil}
%endif
@@ -2759,40 +2698,6 @@ sed \
%exclude %{privlib}/Params/
%exclude %{_mandir}/man3/Params::Check*
-# Perl4-CoreLibs
-%exclude %{privlib}/abbrev.pl
-%exclude %{privlib}/assert.pl
-%exclude %{privlib}/bigfloat.pl
-%exclude %{privlib}/bigint.pl
-%exclude %{privlib}/bigrat.pl
-%exclude %{privlib}/cacheout.pl
-%exclude %{privlib}/complete.pl
-%exclude %{privlib}/ctime.pl
-%exclude %{privlib}/dotsh.pl
-%exclude %{privlib}/exceptions.pl
-%exclude %{privlib}/fastcwd.pl
-%exclude %{privlib}/find.pl
-%exclude %{privlib}/finddepth.pl
-%exclude %{privlib}/flush.pl
-%exclude %{privlib}/getcwd.pl
-%exclude %{privlib}/getopt.pl
-%exclude %{privlib}/getopts.pl
-%exclude %{privlib}/hostname.pl
-%exclude %{privlib}/importenv.pl
-%exclude %{privlib}/look.pl
-%exclude %{privlib}/newgetopt.pl
-%exclude %{privlib}/open2.pl
-%exclude %{privlib}/open3.pl
-%exclude %{privlib}/pwd.pl
-%exclude %{privlib}/shellwords.pl
-%exclude %{privlib}/stat.pl
-%exclude %{privlib}/syslog.pl
-%exclude %{privlib}/tainted.pl
-%exclude %{privlib}/termcap.pl
-%exclude %{privlib}/timelocal.pl
-%exclude %{privlib}/validate.pl
-
-
# Perl-OSType
%exclude %{privlib}/Perl/OSType.pm
%exclude %{_mandir}/man3/Perl::OSType.3pm*
@@ -3528,39 +3433,6 @@ sed \
%{_mandir}/man3/Parse::CPAN::Meta.3*
%endif
-%files Perl4-CoreLibs
-%{privlib}/abbrev.pl
-%{privlib}/assert.pl
-%{privlib}/bigfloat.pl
-%{privlib}/bigint.pl
-%{privlib}/bigrat.pl
-%{privlib}/cacheout.pl
-%{privlib}/complete.pl
-%{privlib}/ctime.pl
-%{privlib}/dotsh.pl
-%{privlib}/exceptions.pl
-%{privlib}/fastcwd.pl
-%{privlib}/find.pl
-%{privlib}/finddepth.pl
-%{privlib}/flush.pl
-%{privlib}/getcwd.pl
-%{privlib}/getopt.pl
-%{privlib}/getopts.pl
-%{privlib}/hostname.pl
-%{privlib}/importenv.pl
-%{privlib}/look.pl
-%{privlib}/newgetopt.pl
-%{privlib}/open2.pl
-%{privlib}/open3.pl
-%{privlib}/pwd.pl
-%{privlib}/shellwords.pl
-%{privlib}/stat.pl
-%{privlib}/syslog.pl
-%{privlib}/tainted.pl
-%{privlib}/termcap.pl
-%{privlib}/timelocal.pl
-%{privlib}/validate.pl
-
%if %{dual_life} || %{rebuild_from_scratch}
%files parent
%{privlib}/parent.pm
@@ -3803,6 +3675,10 @@ sed \
# Old changelog entries are preserved in CVS.
%changelog
+* Mon Feb 27 2017 Jitka Plesnikova - 4:5.16.3-292
+- Removed perl-Perl4-CoreLibs because it was added as separate package to
+ RHEL (bug #1366724)
+
* Wed Aug 17 2016 Jitka Plesnikova - 4:5.16.3-291
- Backported and sub-packaged libraries historically supplied with Perl 4
into perl-Perl4-CoreLibs