summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1996-08-19 10:12:38 +0000
committerJason Downs <downsj@cvs.openbsd.org>1996-08-19 10:12:38 +0000
commite9064113567132dd0b5736b52c54d76f1822e8af (patch)
treeef0cc54320f4b7e09f014e6438df9004dc550055
parent08bafcfa0ae24851ac757cede35ce2bb9f23e932 (diff)
Import of Perl 5.003 into the tree. Makefile.bsd-wrapper and
config.sh.OpenBSD are the only local changes.
-rw-r--r--gnu/usr.bin/perl/ext/Socket/Makefile.PL74
-rw-r--r--gnu/usr.bin/perl/lib/assert.pl6
-rw-r--r--gnu/usr.bin/perl/lib/bigrat.pl12
-rw-r--r--gnu/usr.bin/perl/lib/exceptions.pl10
-rw-r--r--gnu/usr.bin/perl/lib/fastcwd.pl10
-rw-r--r--gnu/usr.bin/perl/lib/flush.pl11
-rw-r--r--gnu/usr.bin/perl/lib/hostname.pl10
-rw-r--r--gnu/usr.bin/perl/lib/shellwords.pl47
-rw-r--r--gnu/usr.bin/perl/lib/tainted.pl3
9 files changed, 45 insertions, 138 deletions
diff --git a/gnu/usr.bin/perl/ext/Socket/Makefile.PL b/gnu/usr.bin/perl/ext/Socket/Makefile.PL
index d95d916b72b..7b9469a728e 100644
--- a/gnu/usr.bin/perl/ext/Socket/Makefile.PL
+++ b/gnu/usr.bin/perl/ext/Socket/Makefile.PL
@@ -1,75 +1,7 @@
use ExtUtils::MakeMaker;
-use ExtUtils::Constant 0.11 'WriteConstants';
-use Config;
WriteMakefile(
- NAME => 'Socket',
+ NAME => 'Socket',
VERSION_FROM => 'Socket.pm',
- ($Config{libs} =~ /(-lsocks\S*)/ ? (LIBS => [ "$1" ] ) : ()),
- XSPROTOARG => '-noprototypes', # XXX remove later?
- realclean => {FILES=> 'const-c.inc const-xs.inc'},
-);
-my @names = (qw(AF_802 AF_AAL AF_APPLETALK AF_CCITT AF_CHAOS AF_CTF
- AF_DATAKIT AF_DECnet AF_DLI AF_ECMA AF_GOSIP AF_HYLINK
- AF_IMPLINK AF_INET AF_INET6 AF_ISO AF_KEY
- AF_LAST AF_LAT AF_LINK AF_MAX AF_NBS AF_NIT AF_NS
- AF_OSI AF_OSINET AF_PUP AF_ROUTE AF_SNA
- AF_UNIX AF_UNSPEC AF_USER AF_WAN AF_X25
- IOV_MAX IP_OPTIONS IP_HDRINCL IP_TOS IP_TTL IP_RECVOPTS
- IP_RECVRETOPTS IP_RETOPTS
- MSG_BCAST MSG_BTAG MSG_CTLFLAGS MSG_CTLIGNORE MSG_DONTWAIT
- MSG_EOF MSG_EOR MSG_ERRQUEUE MSG_ETAG MSG_FIN
- MSG_MAXIOVLEN MSG_MCAST MSG_NOSIGNAL MSG_RST MSG_SYN
- MSG_TRUNC MSG_URG MSG_WAITALL MSG_WIRE
- PF_802 PF_AAL PF_APPLETALK PF_CCITT PF_CHAOS PF_CTF
- PF_DATAKIT PF_DECnet PF_DLI PF_ECMA PF_GOSIP PF_HYLINK
- PF_IMPLINK PF_INET PF_INET6 PF_ISO PF_KEY
- PF_LAST PF_LAT PF_LINK PF_MAX PF_NBS PF_NIT PF_NS
- PF_OSI PF_OSINET PF_PUP PF_ROUTE PF_SNA
- PF_UNIX PF_UNSPEC PF_USER PF_WAN PF_X25
- SCM_CONNECT SCM_CREDENTIALS SCM_CREDS SCM_TIMESTAMP
- SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM
- SOL_SOCKET SOMAXCONN
- SO_ACCEPTCONN SO_ATTACH_FILTER SO_BACKLOG SO_BROADCAST
- SO_CHAMELEON SO_DEBUG SO_DETACH_FILTER SO_DGRAM_ERRIND
- SO_DONTLINGER SO_DONTROUTE SO_ERROR SO_FAMILY
- SO_KEEPALIVE SO_LINGER SO_OOBINLINE
- SO_PASSCRED SO_PASSIFNAME SO_PEERCRED
- SO_PROTOCOL SO_PROTOTYPE
- SO_RCVBUF SO_RCVLOWAT SO_RCVTIMEO
- SO_REUSEADDR SO_REUSEPORT
- SO_SECURITY_AUTHENTICATION
- SO_SECURITY_ENCRYPTION_NETWORK
- SO_SECURITY_ENCRYPTION_TRANSPORT
- SO_SNDBUF SO_SNDLOWAT SO_SNDTIMEO
- SO_STATE SO_TYPE SO_USELOOPBACK SO_XOPEN SO_XSE
- TCP_KEEPALIVE TCP_MAXRT TCP_MAXSEG TCP_NODELAY TCP_STDURG
- UIO_MAXIOV
- ),
- {name=>"IPPROTO_IP", type=>"IV", default=>["IV", 0]},
- {name=>"IPPROTO_IPV6", type=>"IV", default=>["IV", 41]},
- {name=>"IPPROTO_RAW", type=>"IV", default=>["IV", 255]},
- {name=>"IPPROTO_ICMP", type=>"IV", default=>["IV", 1]},
- {name=>"IPPROTO_TCP", type=>"IV", default=>["IV", 6]},
- {name=>"IPPROTO_UDP", type=>"IV", default=>["IV", 17]},
- {name=>"SHUT_RD", type=>"IV", default=>["IV", "0"]},
- {name=>"SHUT_WR", type=>"IV", default=>["IV", "1"]},
- {name=>"SHUT_RDWR", type=>"IV", default=>["IV", "2"]},
-);
-
-push @names,
- {name=>$_, type=>"IV",
- macro=>["#if defined($_) || defined(HAS_$_) /* might be an enum */\n",
- "#endif\n"]}
-foreach qw (MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS);
-
-push @names,
-{name => $_, type => "SV",
- pre=>"struct in_addr ip_address; ip_address.s_addr = htonl($_);",
- value => "newSVpvn_flags((char *)&ip_address,sizeof(ip_address), SVs_TEMP)",}
- foreach qw(INADDR_ANY INADDR_LOOPBACK INADDR_NONE INADDR_BROADCAST);
-
-WriteConstants(
- ($] > 5.009002 ? (PROXYSUBS => 1) : ()),
- NAME => 'Socket',
- NAMES => \@names,
+ MAN3PODS => ' ', # Pods will be built by installman.
+ XSPROTOARG => '-noprototypes', # XXX remove later?
);
diff --git a/gnu/usr.bin/perl/lib/assert.pl b/gnu/usr.bin/perl/lib/assert.pl
index 2c2073c7eaa..4c9ebf20a0d 100644
--- a/gnu/usr.bin/perl/lib/assert.pl
+++ b/gnu/usr.bin/perl/lib/assert.pl
@@ -1,9 +1,3 @@
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
# assert.pl
# tchrist@convex.com (Tom Christiansen)
#
diff --git a/gnu/usr.bin/perl/lib/bigrat.pl b/gnu/usr.bin/perl/lib/bigrat.pl
index f3b599591e7..fb436ce5708 100644
--- a/gnu/usr.bin/perl/lib/bigrat.pl
+++ b/gnu/usr.bin/perl/lib/bigrat.pl
@@ -1,16 +1,8 @@
package bigrat;
require "bigint.pl";
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Arbitrary size rational math package
+# Arbitrary size rational math package
+#
# by Mark Biggar
#
# Input values to these routines consist of strings of the form
diff --git a/gnu/usr.bin/perl/lib/exceptions.pl b/gnu/usr.bin/perl/lib/exceptions.pl
index 09a4d3e7ae1..02c4498d321 100644
--- a/gnu/usr.bin/perl/lib/exceptions.pl
+++ b/gnu/usr.bin/perl/lib/exceptions.pl
@@ -1,14 +1,6 @@
# 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.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# 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
diff --git a/gnu/usr.bin/perl/lib/fastcwd.pl b/gnu/usr.bin/perl/lib/fastcwd.pl
index 34b60f71a08..6b452e8d788 100644
--- a/gnu/usr.bin/perl/lib/fastcwd.pl
+++ b/gnu/usr.bin/perl/lib/fastcwd.pl
@@ -1,15 +1,5 @@
# By John Bazik
#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# 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
diff --git a/gnu/usr.bin/perl/lib/flush.pl b/gnu/usr.bin/perl/lib/flush.pl
index e621ff063c7..55002b9919c 100644
--- a/gnu/usr.bin/perl/lib/flush.pl
+++ b/gnu/usr.bin/perl/lib/flush.pl
@@ -1,14 +1,3 @@
-#
-# This library is no longer being maintained, and is included for backward
-# compatibility with Perl 4 programs which may require it.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# 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
diff --git a/gnu/usr.bin/perl/lib/hostname.pl b/gnu/usr.bin/perl/lib/hostname.pl
index 33907c6cb74..5394c6ec693 100644
--- a/gnu/usr.bin/perl/lib/hostname.pl
+++ b/gnu/usr.bin/perl/lib/hostname.pl
@@ -1,14 +1,4 @@
# 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.
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
-#
-# In particular, this should not be used as an example of modern Perl
-# programming techniques.
-#
-# Suggested alternative: Sys::Hostname
sub hostname
{
diff --git a/gnu/usr.bin/perl/lib/shellwords.pl b/gnu/usr.bin/perl/lib/shellwords.pl
index b24ce963ad9..1c45a5a0903 100644
--- a/gnu/usr.bin/perl/lib/shellwords.pl
+++ b/gnu/usr.bin/perl/lib/shellwords.pl
@@ -1,17 +1,48 @@
-;# This legacy library is deprecated and will be removed in a future
-;# release of perl.
-;#
;# shellwords.pl
;#
;# Usage:
;# require 'shellwords.pl';
-;# @words = shellwords($line);
+;# @words = &shellwords($line);
;# or
-;# @words = shellwords(@lines);
+;# @words = &shellwords(@lines);
;# or
-;# @words = shellwords(); # defaults to $_ (and clobbers it)
+;# @words = &shellwords; # defaults to $_ (and clobbers it)
-require Text::ParseWords;
-*shellwords = \&Text::ParseWords::old_shellwords;
+sub shellwords {
+ package shellwords;
+ local($_) = join('', @_) if @_;
+ local(@words,$snippet,$field);
+ s/^\s+//;
+ while ($_ ne '') {
+ $field = '';
+ for (;;) {
+ if (s/^"(([^"\\]|\\.)*)"//) {
+ ($snippet = $1) =~ s#\\(.)#$1#g;
+ }
+ elsif (/^"/) {
+ die "Unmatched double quote: $_\n";
+ }
+ elsif (s/^'(([^'\\]|\\.)*)'//) {
+ ($snippet = $1) =~ s#\\(.)#$1#g;
+ }
+ elsif (/^'/) {
+ die "Unmatched single quote: $_\n";
+ }
+ elsif (s/^\\(.)//) {
+ $snippet = $1;
+ }
+ elsif (s/^([^\s\\'"]+)//) {
+ $snippet = $1;
+ }
+ else {
+ s/^\s+//;
+ last;
+ }
+ $field .= $snippet;
+ }
+ push(@words, $field);
+ }
+ @words;
+}
1;
diff --git a/gnu/usr.bin/perl/lib/tainted.pl b/gnu/usr.bin/perl/lib/tainted.pl
index a3a560ffecc..6e24867a83d 100644
--- a/gnu/usr.bin/perl/lib/tainted.pl
+++ b/gnu/usr.bin/perl/lib/tainted.pl
@@ -1,7 +1,4 @@
-# This legacy library is deprecated and will be removed in a future
-# release of perl.
# This subroutine returns true if its argument is tainted, false otherwise.
-#
sub tainted {
local($@);