diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-03-23 10:14:54 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-03-23 10:14:54 +0000 |
commit | 3bdc27670282422f0788ccddd9711ae6cfe9bcd1 (patch) | |
tree | 7323b2843c665f5f112db60e5d2d218fc8903131 | |
parent | 155776c0c7f8e2be3290142fa6f544bce470abdb (diff) | |
parent | 0a6a0d524e3a6171ed37d842c0e1375270987314 (diff) | |
download | perl-3bdc27670282422f0788ccddd9711ae6cfe9bcd1.tar.gz |
Integrate from mainperl.
p4raw-id: //depot/cfgperl@3128
-rw-r--r-- | Changes | 268 | ||||
-rw-r--r-- | EXTERN.h | 2 | ||||
-rw-r--r-- | INTERN.h | 2 | ||||
-rw-r--r-- | av.c | 2 | ||||
-rw-r--r-- | av.h | 2 | ||||
-rw-r--r-- | bytecode.pl | 2 | ||||
-rw-r--r-- | cop.h | 2 | ||||
-rw-r--r-- | cv.h | 2 | ||||
-rw-r--r-- | deb.c | 2 | ||||
-rw-r--r-- | doio.c | 2 | ||||
-rw-r--r-- | doop.c | 2 | ||||
-rw-r--r-- | dump.c | 2 | ||||
-rw-r--r-- | form.h | 2 | ||||
-rw-r--r-- | gv.c | 2 | ||||
-rw-r--r-- | gv.h | 2 | ||||
-rw-r--r-- | handy.h | 2 | ||||
-rw-r--r-- | hints/dec_osf.sh | 6 | ||||
-rw-r--r-- | hv.c | 2 | ||||
-rw-r--r-- | hv.h | 2 | ||||
-rw-r--r-- | lib/Math/BigInt.pm | 2 | ||||
-rw-r--r-- | malloc.c | 2 | ||||
-rw-r--r-- | mg.c | 2 | ||||
-rw-r--r-- | mg.h | 2 | ||||
-rw-r--r-- | op.c | 2 | ||||
-rw-r--r-- | op.h | 2 | ||||
-rw-r--r-- | perl.c | 22 | ||||
-rw-r--r-- | perlio.c | 2 | ||||
-rw-r--r-- | pp.c | 2 | ||||
-rw-r--r-- | pp.h | 2 | ||||
-rw-r--r-- | pp_ctl.c | 2 | ||||
-rw-r--r-- | pp_hot.c | 2 | ||||
-rw-r--r-- | pp_sys.c | 2 | ||||
-rw-r--r-- | regcomp.c | 2 | ||||
-rw-r--r-- | regexec.c | 2 | ||||
-rw-r--r-- | run.c | 2 | ||||
-rw-r--r-- | scope.c | 2 | ||||
-rw-r--r-- | sv.c | 10 | ||||
-rw-r--r-- | sv.h | 2 | ||||
-rwxr-xr-x | t/op/gv.t | 12 | ||||
-rw-r--r-- | toke.c | 2 | ||||
-rw-r--r-- | utf8.c | 2 | ||||
-rw-r--r-- | utf8.h | 2 | ||||
-rw-r--r-- | util.c | 2 | ||||
-rw-r--r-- | win32/win32.c | 331 | ||||
-rw-r--r-- | win32/win32.h | 37 |
45 files changed, 620 insertions, 142 deletions
@@ -79,6 +79,274 @@ Version 5.005_57 Development release working toward 5.006 ---------------- ____________________________________________________________________________ +[ 3120] By: jhi on 1999/03/17 14:52:17 + Log: Rhapsody change assumed too much. + Branch: cfgperl + ! t/op/stat.t +____________________________________________________________________________ +[ 3119] By: jhi on 1999/03/17 14:33:43 + Log: More Apollo fixes. + Branch: maint-5.005/perl + ! README.apollo hints/apollo.sh t/lib/io_udp.t +____________________________________________________________________________ +[ 3118] By: jhi on 1999/03/16 17:23:39 + Log: Nada. + Branch: maint-5.005/perl + ! README.apollo +____________________________________________________________________________ +[ 3117] By: jhi on 1999/03/16 17:18:49 + Log: Apollo DomainOS AVAILABILITY. + Branch: cfgperl + ! pod/perl.pod + Branch: maint-5.005/perl + ! pod/perl.pod +____________________________________________________________________________ +[ 3116] By: jhi on 1999/03/16 17:14:00 + Log: Apollo DomainOS patch + From: Johann Klasek <jk@auto.tuwien.ac.at> + Subject: Re: DomainPerl + Date: Tue, 16 Mar 1999 17:46:32 +0100 + Message-ID: <19990316174632.A19759@euklid.auto.tuwien.ac.at> + Branch: maint-5.005/perl + + README.apollo apollo/netinet/in.h + ! MANIFEST hints/apollo.sh +____________________________________________________________________________ +[ 3115] By: jhi on 1999/03/16 14:23:54 + Log: From: Paul Marquess <pmarquess@bfsec.bt.co.uk> + To: Gurusamy Sarathy <gsar@activestate.com>, + Graham Barr <gbarr@pobox.com> + Cc: Perl5 Porters <perl5-porters@perl.org>, + "Paul.Marquess" <Paul.Marquess@btinternet.com> + Subject: [PATCH 5.005_56 & 5.005_03_T6] Upgrade DB_File to version 1.65 + Date: Sun, 14 Mar 1999 14:43:57 -0000 + Message-Id: <199903141841.NAA17040@defender.perl.org> + Branch: maint-5.005/perl + ! ext/DB_File/Changes ext/DB_File/DB_File.pm + ! ext/DB_File/DB_File.xs ext/DB_File/typemap +____________________________________________________________________________ +[ 3114] By: jhi on 1999/03/16 12:42:20 + Log: Mention Rhapsody in 5.005_5X perldelta, + and in Rhapsody and Netware in 5.005_0X and 5.005_5X + *planned* AVAILABILITY. + Branch: cfgperl + ! pod/perl.pod pod/perldelta.pod + Branch: maint-5.005/perl + ! pod/perl.pod +____________________________________________________________________________ +[ 3113] By: jhi on 1999/03/16 10:38:53 + Log: perldelta niggling. + Branch: cfgperl + ! pod/perldelta.pod + Branch: maint-5.005/perl + ! pod/perldelta.pod +____________________________________________________________________________ +[ 3112] By: jhi on 1999/03/16 10:35:21 + Log: Integrate from mainperl. + Branch: cfgperl + !> lib/unicode/MakeEthiopicSyllables.PL pod/perldelta.pod + !> pod/perlhist.pod pod/perlmodinstall.pod pod/perltodo.pod +____________________________________________________________________________ +[ 3111] By: jhi on 1999/03/16 10:28:10 + Log: AVAILABILITY update: still mention PowerUX, + Novell Netware now has sources available. + Branch: cfgperl + ! pod/perl.pod + Branch: maint-5.005/perl + ! pod/perl.pod +____________________________________________________________________________ +[ 3110] By: gsar on 1999/03/16 04:34:23 + Log: sundry pod niggles + Branch: perl + ! lib/unicode/MakeEthiopicSyllables.PL pod/perldelta.pod + ! pod/perlhist.pod pod/perlmodinstall.pod pod/perltodo.pod +____________________________________________________________________________ +[ 3109] By: jhi on 1999/03/15 17:00:11 + Log: Integrate from mainperl. + Branch: cfgperl + +> lib/unicode/EthiopicSyllables.txt lib/unicode/In/Ethiopic.pl + +> lib/unicode/Is/Syllable.pl + +> lib/unicode/MakeEthiopicSyllables.PL + +> lib/unicode/README.Ethiopic + !> AUTHORS MAINTAIN MANIFEST lib/unicode/Block.pl + !> lib/unicode/Category.pl lib/unicode/Is/Alnum.pl + !> lib/unicode/Is/Alpha.pl lib/unicode/Is/Digit.pl + !> lib/unicode/Is/L.pl lib/unicode/Is/Lo.pl lib/unicode/Is/N.pl + !> lib/unicode/Is/Nd.pl lib/unicode/Is/No.pl lib/unicode/Is/P.pl + !> lib/unicode/Is/Po.pl lib/unicode/Is/Space.pl + !> lib/unicode/Is/Z.pl lib/unicode/Is/Zs.pl lib/unicode/Makefile + !> lib/unicode/Name.pl lib/unicode/Number.pl op.c +____________________________________________________________________________ +[ 3108] By: jhi on 1999/03/15 16:58:12 + Log: First pass of integrating the Rhapsody port, + + From: Wilfredo Sanchez <wsanchez@apple.com> + Subject: Keeping the world in sync. + Reply-To: wsanchez@apple.com + To: perlbug@perl.com + Date: Fri, 13 Nov 1998 17:11:30 -0800 + Message-Id: <199811140111.RAA41784@scv4.apple.com> + Branch: cfgperl + + ext/DynaLoader/dl_rhapsody.xs hints/rhapsody.sh + ! Configure Makefile.SH config_h.SH configure.gnu handy.h + ! installperl malloc.c perl.c perl.h pp_sys.c t/op/stat.t + ! x2p/util.c +____________________________________________________________________________ +[ 3107] By: gsar on 1999/03/15 03:22:10 + Log: applied suggested patch (mailed to perl-unicode@perl.org) with minor tweaks + From: Daniel Yacob <dmulholl@cs.indiana.edu> + Date: Tue, 23 Feb 1999 16:13:42 -0500 (EST) + Message-Id: <199902232113.QAA26135@drum.cs.indiana.edu> + Subject: ../lib/unicode/ Unicode 3.0 Extensions for Ethiopic + Branch: perl + + lib/unicode/EthiopicSyllables.txt lib/unicode/In/Ethiopic.pl + + lib/unicode/Is/Syllable.pl + + lib/unicode/MakeEthiopicSyllables.PL + + lib/unicode/README.Ethiopic + ! AUTHORS MAINTAIN MANIFEST lib/unicode/Block.pl + ! lib/unicode/Category.pl lib/unicode/Is/Alnum.pl + ! lib/unicode/Is/Alpha.pl lib/unicode/Is/Digit.pl + ! lib/unicode/Is/L.pl lib/unicode/Is/Lo.pl lib/unicode/Is/N.pl + ! lib/unicode/Is/Nd.pl lib/unicode/Is/No.pl lib/unicode/Is/P.pl + ! lib/unicode/Is/Po.pl lib/unicode/Is/Space.pl + ! lib/unicode/Is/Z.pl lib/unicode/Is/Zs.pl lib/unicode/Makefile + ! lib/unicode/Name.pl lib/unicode/Number.pl +____________________________________________________________________________ +[ 3106] By: gsar on 1999/03/12 20:35:36 + Log: change#3067 failed package.t due to needless creation of $a and $b; + fixed to do that only for C<sort BLOCK|CODE @foo>, not C<sort(@foo)> + Branch: perl + ! op.c +____________________________________________________________________________ +[ 3105] By: jhi on 1999/03/12 15:54:57 + Log: Recognize the NetBSD packages collection. + Branch: maint-5.005/perl + ! hints/netbsd.sh +____________________________________________________________________________ +[ 3104] By: jhi on 1999/03/12 09:07:04 + Log: From: pvhp@forte.com (Peter Prymmer) + To: jhi@iki.fi, perl-mvs@perl.org, perlbug@perl.com + Subject: [PATCH MT6,_56] was Re: Not OK: perl 5.00503 +MAINT_TRIAL_6 on os390 06.00 (UNINSTALLED) + Date: Thu, 11 Mar 99 14:24:54 PST + Message-Id: <9903112224.AA24346@forte.com> + Branch: maint-5.005/perl + ! README.os390 t/lib/posix.t +____________________________________________________________________________ +[ 3103] By: jhi on 1999/03/10 11:07:46 + Log: Integrate from mainperl. + Branch: cfgperl + !> Changes embed.h embed.pl embedvar.h global.sym objXSUB.h op.c + !> perl.c perl.h pod/perldelta.pod pod/pod2man.PL t/base/lex.t + !> t/pragma/warn/1global toke.c win32/makedef.pl +____________________________________________________________________________ +[ 3102] By: jhi on 1999/03/10 11:01:20 + Log: From: pvhp@forte.com (Peter Prymmer) + To: perl5-porters@perl.org + Subject: [5.005_03-MT6]Patch: time passes + Date: Tue, 9 Mar 99 18:42:17 PST + Message-Id: <9903100242.AA29057@forte.com> + Branch: maint-5.005/perl + ! perl.c +____________________________________________________________________________ +[ 3101] By: jhi on 1999/03/10 10:30:15 + Log: From: Mark-Jason Dominus <mjd@plover.com> + To: perl5-porters@perl.com + Subject: Minor fix to perlfunc.pod + Date: Mon, 08 Mar 1999 20:05:53 -0500 + Message-ID: <19990309010553.13757.qmail@plover.com> + Branch: maint-5.005/perl + ! pod/perlfunc.pod +____________________________________________________________________________ +[ 3100] By: gsar on 1999/03/09 23:04:44 + Log: change#3060 had the wrong quotes + Branch: perl + ! pod/pod2man.PL +____________________________________________________________________________ +[ 3099] By: jhi on 1999/03/09 12:52:21 + Log: d_uname was broken (probably since _53), reported by + + From: Alan Burlison <Alan.Burlison@uk.sun.com> + To: p5p <perl5-porters@perl.org>, Gurusamy Sarathy <gsar@umich.edu>, + cpan-testers@perl.org + Subject: Not OK: perl 5.00556 on sun4-solaris 2.6 + Date: Mon, 08 Mar 1999 13:22:31 +0000 + Message-ID: <36E3CF17.EA1FEDAA@uk.sun.com> + + and + + From: lvirden@cas.org (Larry W. Virden) + To: perlbug@perl.com + Subject: configure not correctly identifying uname posix compatibility + Date: Mon, 8 Mar 1999 06:36:16 -0500 (EST) + Message-Id: <199903081136.GAA23682@cas.org> + Branch: cfgperl + ! Configure config_h.SH +____________________________________________________________________________ +[ 3098] By: gsar on 1999/03/09 03:16:07 + Log: fix parsing of here documents in C<eval 's/.../<<FOO/e'> + Branch: perl + ! op.c perl.h pod/perldelta.pod t/base/lex.t toke.c +____________________________________________________________________________ +[ 3097] By: gsar on 1999/03/09 02:50:43 + Log: use yyerror() instead of croak() so that compile-time failures in + my(LIST) don't confuse globals with lexicals + Branch: perl + ! op.c toke.c +____________________________________________________________________________ +[ 3096] By: gsar on 1999/03/09 02:47:36 + Log: adjust testsuite for change#3067 + Branch: perl + ! t/pragma/warn/1global +____________________________________________________________________________ +[ 3095] By: gsar on 1999/03/08 21:04:48 + Log: remove bogus symbols from global.sym + Branch: perl + ! Changes embed.h embed.pl embedvar.h global.sym objXSUB.h + ! perl.h win32/makedef.pl +____________________________________________________________________________ +[ 3094] By: jhi on 1999/03/06 16:16:15 + Log: From: Mark Kettenis <kettenis@wins.uva.nl> + To: jhi@iki.fi + Subject: Oops + Date: Sat, 6 Mar 1999 17:15:35 +0100 (CET) + Message-Id: <199903061615.RAA00207@delius.kettenis.nl> + Branch: maint-5.005/perl + ! README.hurd +____________________________________________________________________________ +[ 3093] By: jhi on 1999/03/06 15:59:46 + Log: From: Mark Kettenis <kettenis@wins.uva.nl> + To: jhi@iki.fi + Subject: New Hurd README + Date: Sat, 6 Mar 1999 16:46:12 +0100 (CET) + Message-Id: <199903061601.RAA00185@delius.kettenis.nl> + Branch: maint-5.005/perl + ! README.hurd +____________________________________________________________________________ +[ 3092] By: jhi on 1999/03/06 12:52:06 + Log: From: Paul_Green@stratus.com + To: perl5-porters@perl.org + Cc: jhi@iki.fi, Paul_Green@stratus.com + Subject: [PATCH 5.005_03-MAINT_TRIAL_6]: platform: vos -- updates to VOS port of Perl5 + Date: Fri, 5 Mar 1999 18:08:49 -0500 + Message-ID: <1D1A4EF7AD4DD211A80D00A0C9D7DB665A035A@exna1.stratus.com> + Branch: maint-5.005/perl + ! vos/config.h vos/config_h.SH_orig +____________________________________________________________________________ +[ 3091] By: jhi on 1999/03/06 12:42:21 + Log: From: Dan Sugalski <sugalskd@osshe.edu> + To: perl5-porters@perl.org, vmsperl@perl.org + Subject: [PATCH 5.005_03-MT6]VMS build patch + Date: Fri, 05 Mar 1999 12:36:19 -0800 + Message-Id: <3.0.6.32.19990305123619.02d326a0@ous.edu> + Branch: maint-5.005/perl + ! vms/subconfigure.com +____________________________________________________________________________ +[ 3090] By: gsar on 1999/03/06 04:40:03 + Log: integrate change#3089 from mainline + + tolerate CRs after options + Branch: maint-5.005/perl + !> perl.c +____________________________________________________________________________ [ 3089] By: gsar on 1999/03/06 04:30:40 Log: tolerate CRs after options Branch: perl @@ -1,6 +1,6 @@ /* EXTERN.h * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* INTERN.h * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* av.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* av.h * - * Copyright (c) 1991-1998, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/bytecode.pl b/bytecode.pl index e2a2f6c958..126ea5ff00 100644 --- a/bytecode.pl +++ b/bytecode.pl @@ -22,7 +22,7 @@ while (($from, $tos) = each %alias_to) { my $c_header = <<'EOT'; /* - * Copyright (c) 1996-1998 Malcolm Beattie + * Copyright (c) 1996-1999 Malcolm Beattie * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* cop.h * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* cv.h * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* deb.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* doio.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* doop.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* dump.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* form.h * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* gv.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* gv.h * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* handy.h * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh index 686ae2c089..b511e31bc8 100644 --- a/hints/dec_osf.sh +++ b/hints/dec_osf.sh @@ -146,7 +146,11 @@ case "`uname -r`" in *[123].*) # old loader lddlflags="$lddlflags -O3" ;; -*) lddlflags="$lddlflags $optimize -msym" +*) if $test "X$optimize" = "X$undef"; then + lddlflags="$lddlflags -msym" + else + lddlflags="$lddlflags $optimize -msym" + fi # -msym: If using a sufficiently recent /sbin/loader, # keep the module symbols with the modules. ;; @@ -1,6 +1,6 @@ /* hv.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* hv.h * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/lib/Math/BigInt.pm b/lib/Math/BigInt.pm index b8ad6cec1f..16ebb1d5dd 100644 --- a/lib/Math/BigInt.pm +++ b/lib/Math/BigInt.pm @@ -257,8 +257,10 @@ sub bdiv { #(dividend: num_str, divisor: num_str) return num_str push(@x, 0); } @q = (); ($v2,$v1) = @y[-2,-1]; + $v2 = 0 unless $v2; while ($#x > $#y) { ($u2,$u1,$u0) = @x[-3..-1]; + $u2 = 0 unless $u2; $q = (($u0 == $v1) ? 99999 : int(($u0*1e5+$u1)/$v1)); --$q while ($v2*$q > ($u0*1e5+$u1-$q*$v1)*1e5+$u2); if ($q) { @@ -213,7 +213,7 @@ * This is designed for use in a program that uses vast quantities of memory, * but bombs when it runs out. * - * Modifications Copyright Ilya Zakharevich 1996-98. + * Modifications Copyright Ilya Zakharevich 1996-99. * * Still very quick, but much more thrifty. (Std config is 10% slower * than it was, and takes 67% of old heap size for typical usage.) @@ -1,6 +1,6 @@ /* mg.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* mg.h * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* op.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* op.h * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* perl.c * - * Copyright (c) 1987-1998 Larry Wall + * Copyright (c) 1987-1999 Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1737,41 +1737,41 @@ moreswitches(char *s) LOCAL_PATCH_COUNT, (LOCAL_PATCH_COUNT!=1) ? "es" : ""); #endif - printf("\n\nCopyright 1987-1998, Larry Wall\n"); + printf("\n\nCopyright 1987-1999, Larry Wall\n"); #ifdef MSDOS printf("\nMS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis\n"); #endif #ifdef DJGPP printf("djgpp v2 port (jpl5003c) by Hirofumi Watanabe, 1996\n"); - printf("djgpp v2 port (perl5004+) by Laszlo Molnar, 1997-1998\n"); + printf("djgpp v2 port (perl5004+) by Laszlo Molnar, 1997-1999\n"); #endif #ifdef OS2 printf("\n\nOS/2 port Copyright (c) 1990, 1991, Raymond Chen, Kai Uwe Rommel\n" - "Version 5 port Copyright (c) 1994-1998, Andreas Kaiser, Ilya Zakharevich\n"); + "Version 5 port Copyright (c) 1994-1999, Andreas Kaiser, Ilya Zakharevich\n"); #endif #ifdef atarist printf("atariST series port, ++jrb bammi@cadence.com\n"); #endif #ifdef __BEOS__ - printf("BeOS port Copyright Tom Spindler, 1997-1998\n"); + printf("BeOS port Copyright Tom Spindler, 1997-1999\n"); #endif #ifdef MPE - printf("MPE/iX port Copyright by Mark Klein and Mark Bixby, 1996-1998\n"); + printf("MPE/iX port Copyright by Mark Klein and Mark Bixby, 1996-1999\n"); #endif #ifdef OEMVS - printf("MVS (OS390) port by Mortice Kern Systems, 1997-1998\n"); + printf("MVS (OS390) port by Mortice Kern Systems, 1997-1999\n"); #endif #ifdef __VOS__ - printf("Stratus VOS port by Paul_Green@stratus.com, 1997-1998\n"); + printf("Stratus VOS port by Paul_Green@stratus.com, 1997-1999\n"); #endif #ifdef __OPEN_VM - printf("VM/ESA port by Neale Ferguson, 1998\n"); + printf("VM/ESA port by Neale Ferguson, 1998-1999\n"); #endif #ifdef POSIX_BC - printf("BS2000 (POSIX) port by Start Amadeus GmbH, 1998\n"); + printf("BS2000 (POSIX) port by Start Amadeus GmbH, 1998-1999\n"); #endif #ifdef __MINT__ - printf("MiNT port by Guido Flohr, 1997\n"); + printf("MiNT port by Guido Flohr, 1997-1999\n"); #endif #ifdef BINARY_BUILD_NOTICE BINARY_BUILD_NOTICE; @@ -1,6 +1,6 @@ /* perlio.c * - * Copyright (c) 1996, Nick Ing-Simmons + * Copyright (c) 1996-1999, Nick Ing-Simmons * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* pp.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* pp.h * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* pp_ctl.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* pp_hot.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* pp_sys.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -66,7 +66,7 @@ * **** Alterations to Henry's code are... **** - **** Copyright (c) 1991-1998, Larry Wall + **** Copyright (c) 1991-1999, Larry Wall **** **** You may distribute under the terms of either the GNU General Public **** License or the Artistic License, as specified in the README file. @@ -63,7 +63,7 @@ * **** Alterations to Henry's code are... **** - **** Copyright (c) 1991-1998, Larry Wall + **** Copyright (c) 1991-1999, Larry Wall **** **** You may distribute under the terms of either the GNU General Public **** License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* run.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* scope.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* sv.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -3176,7 +3176,13 @@ sv_gets(register SV *sv, register PerlIO *fp, I32 append) I32 i; SV_CHECK_THINKFIRST(sv); - (void)SvUPGRADE(sv, SVt_PV); + if (SvTYPE(sv) >= SVt_PV) { + if (SvFAKE(sv) && SvTYPE(sv) == SVt_PVGV) + sv_unglob(sv); + } + else + sv_upgrade(sv, SVt_PV); + SvSCREAM_off(sv); if (RsSNARF(PL_rs)) { @@ -1,6 +1,6 @@ /* sv.h * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -4,7 +4,7 @@ # various typeglob tests # -print "1..29\n"; +print "1..30\n"; # type coersion on assignment $foo = 'foo'; @@ -121,3 +121,13 @@ print {*x{FILEHANDLE}} "ok 23\n"; ++$test; &{$a}; } +# does pp_readline() handle glob-ness correctly? + +{ + my $g = *foo; + $g = <DATA>; + print $g; +} + +__END__ +ok 30 @@ -1,6 +1,6 @@ /* toke.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* utf8.c * - * Copyright (c) 1998, Larry Wall + * Copyright (c) 1998-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* utf8.h * - * Copyright (c) 1998, Larry Wall + * Copyright (c) 1998-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* util.c * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. diff --git a/win32/win32.c b/win32/win32.c index 726c7c552e..4d7721edc6 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -95,7 +95,9 @@ static BOOL has_shell_metachars(char *ptr); static long filetime_to_clock(PFILETIME ft); static BOOL filetime_from_time(PFILETIME ft, time_t t); static char * get_emd_part(char *leading, char *trailing, ...); -static void remove_dead_process(HANDLE deceased); +static void remove_dead_process(long deceased); +static long find_pid(int pid); +static char * qualified_path(const char *cmd); HANDLE w32_perldll_handle = INVALID_HANDLE_VALUE; static DWORD w32_platform = (DWORD)-1; @@ -841,42 +843,40 @@ chown(const char *path, uid_t owner, gid_t group) return 0; } -static void -remove_dead_process(HANDLE deceased) +static long +find_pid(int pid) { -#ifndef USE_RTL_WAIT - int child; + long child; for (child = 0 ; child < w32_num_children ; ++child) { - if (w32_child_pids[child] == deceased) { - Copy(&w32_child_pids[child+1], &w32_child_pids[child], - (w32_num_children-child-1), HANDLE); - w32_num_children--; - break; - } + if (w32_child_pids[child] == pid) + return child; + } + return -1; +} + +static void +remove_dead_process(long child) +{ + if (child >= 0) { + CloseHandle(w32_child_handles[child]); + Copy(&w32_child_handles[child+1], &w32_child_handles[child], + (w32_num_children-child-1), HANDLE); + Copy(&w32_child_pids[child+1], &w32_child_pids[child], + (w32_num_children-child-1), DWORD); + w32_num_children--; } -#endif } DllExport int win32_kill(int pid, int sig) { -#ifdef USE_RTL_WAIT - HANDLE hProcess= OpenProcess(PROCESS_ALL_ACCESS, TRUE, pid); -#else - HANDLE hProcess = (HANDLE) pid; -#endif - - if (hProcess == NULL) { - croak("kill process failed!\n"); - } - else { - if (!TerminateProcess(hProcess, sig)) - croak("kill process failed!\n"); + HANDLE hProcess; + hProcess = OpenProcess(PROCESS_ALL_ACCESS, TRUE, pid); + if (hProcess && TerminateProcess(hProcess, sig)) CloseHandle(hProcess); - - /* WaitForMultipleObjects() on a pid that was killed returns error - * so if we know the pid is gone we remove it from process list */ - remove_dead_process(hProcess); + else { + errno = EINVAL; + return -1; } return 0; } @@ -1135,27 +1135,40 @@ win32_utime(const char *filename, struct utimbuf *times) DllExport int win32_waitpid(int pid, int *status, int flags) { - int rc; + int retval = -1; if (pid == -1) - return win32_wait(status); + return win32_wait(status); else { - rc = cwait(status, pid, WAIT_CHILD); - /* cwait() returns "correctly" on Borland */ + long child = find_pid(pid); + if (child >= 0) { + HANDLE hProcess = w32_child_handles[child]; + DWORD waitcode = WaitForSingleObject(hProcess, INFINITE); + if (waitcode != WAIT_FAILED) { + if (GetExitCodeProcess(hProcess, &waitcode)) { + *status = (int)((waitcode & 0xff) << 8); + retval = (int)w32_child_pids[child]; + remove_dead_process(child); + return retval; + } + } + else + errno = ECHILD; + } + else { + retval = cwait(status, pid, WAIT_CHILD); + /* cwait() returns "correctly" on Borland */ #ifndef __BORLANDC__ - if (status) - *status *= 256; + if (status) + *status *= 256; #endif - remove_dead_process((HANDLE)pid); + } } - return rc >= 0 ? pid : rc; + return retval >= 0 ? pid : retval; } DllExport int win32_wait(int *status) { -#ifdef USE_RTL_WAIT - return wait(status); -#else /* XXX this wait emulation only knows about processes * spawned via win32_spawnvp(P_NOWAIT, ...). */ @@ -1169,7 +1182,7 @@ win32_wait(int *status) /* if a child exists, wait for it to die */ waitcode = WaitForMultipleObjects(w32_num_children, - w32_child_pids, + w32_child_handles, FALSE, INFINITE); if (waitcode != WAIT_FAILED) { @@ -1178,13 +1191,10 @@ win32_wait(int *status) i = waitcode - WAIT_ABANDONED_0; else i = waitcode - WAIT_OBJECT_0; - if (GetExitCodeProcess(w32_child_pids[i], &exitcode) ) { - CloseHandle(w32_child_pids[i]); + if (GetExitCodeProcess(w32_child_handles[i], &exitcode) ) { *status = (int)((exitcode & 0xff) << 8); retval = (int)w32_child_pids[i]; - Copy(&w32_child_pids[i+1], &w32_child_pids[i], - (w32_num_children-i-1), HANDLE); - w32_num_children--; + remove_dead_process(i); return retval; } } @@ -1192,8 +1202,6 @@ win32_wait(int *status) FAILED: errno = GetLastError(); return -1; - -#endif } static UINT timerid = 0; @@ -1791,16 +1799,10 @@ win32_pclose(FILE *pf) win32_fclose(pf); SvIVX(sv) = 0; - remove_dead_process((HANDLE)childpid); + if (win32_waitpid(childpid, &status, 0) == -1) + return -1; - /* wait for the child */ - if (cwait(&status, childpid, WAIT_CHILD) == -1) - return (-1); - /* cwait() returns "correctly" on Borland */ -#ifndef __BORLANDC__ - status *= 256; -#endif - return (status); + return status; #endif /* USE_RTL_POPEN */ } @@ -1993,26 +1995,212 @@ win32_chdir(const char *dir) return chdir(dir); } +static char * +create_command_line(const char* command, const char * const *args) +{ + int index; + char *cmd, *ptr, *arg; + STRLEN len = strlen(command) + 1; + + for (index = 0; (ptr = (char*)args[index]) != NULL; ++index) + len += strlen(ptr) + 1; + + New(1310, cmd, len, char); + ptr = cmd; + strcpy(ptr, command); + ptr += strlen(ptr); + *ptr++ = ' '; + + for (index = 0; (arg = (char*)args[index]) != NULL; ++index) { + strcpy(ptr, arg); + ptr += strlen(ptr); + if ((char*)args[index+1] != NULL) + *ptr++ = ' '; + } + + return cmd; +} + +static char * +qualified_path(const char *cmd) +{ + char *pathstr; + char *fullcmd, *curfullcmd; + STRLEN cmdlen = 0; + int has_slash = 0; + + if (!cmd) + return Nullch; + fullcmd = (char*)cmd; + while (*fullcmd) { + if (*fullcmd == '/' || *fullcmd == '\\') + has_slash++; + fullcmd++; + cmdlen++; + } + + /* look in PATH */ + pathstr = win32_getenv("PATH"); + New(0, fullcmd, MAX_PATH+1, char); + curfullcmd = fullcmd; + + while (1) { + DWORD res; + + /* start by appending the name to the current prefix */ + strcpy(curfullcmd, cmd); + curfullcmd += cmdlen; + + /* if it doesn't end with '.', or has no extension, try adding + * a trailing .exe first */ + if (cmd[cmdlen-1] != '.' + && (cmdlen < 4 || cmd[cmdlen-4] != '.')) + { + strcpy(curfullcmd, ".exe"); + res = GetFileAttributes(fullcmd); + if (res != 0xFFFFFFFF && !(res & FILE_ATTRIBUTE_DIRECTORY)) + return fullcmd; + *curfullcmd = '\0'; + } + + /* that failed, try the bare name */ + res = GetFileAttributes(fullcmd); + if (res != 0xFFFFFFFF && !(res & FILE_ATTRIBUTE_DIRECTORY)) + return fullcmd; + + /* quit if no other path exists, or if cmd already has path */ + if (!pathstr || !*pathstr || has_slash) + break; + + /* skip leading semis */ + while (*pathstr == ';') + pathstr++; + + /* build a new prefix from scratch */ + curfullcmd = fullcmd; + while (*pathstr && *pathstr != ';') { + if (*pathstr == '"') { /* foo;"baz;etc";bar */ + pathstr++; /* skip initial '"' */ + while (*pathstr && *pathstr != '"') { + if (curfullcmd-fullcmd < MAX_PATH-cmdlen-5) + *curfullcmd++ = *pathstr; + pathstr++; + } + if (*pathstr) + pathstr++; /* skip trailing '"' */ + } + else { + if (curfullcmd-fullcmd < MAX_PATH-cmdlen-5) + *curfullcmd++ = *pathstr; + pathstr++; + } + } + if (*pathstr) + pathstr++; /* skip trailing semi */ + if (curfullcmd > fullcmd /* append a dir separator */ + && curfullcmd[-1] != '/' && curfullcmd[-1] != '\\') + { + *curfullcmd++ = '\\'; + } + } +GIVE_UP: + Safefree(fullcmd); + return Nullch; +} + +/* XXX this needs to be made more compatible with the spawnvp() + * provided by the various RTLs. In particular, searching for + * *.{com,bat,cmd} files (as done by the RTLs) is unimplemented. + * This doesn't significantly affect perl itself, because we + * always invoke things using PERL5SHELL if a direct attempt to + * spawn the executable fails. + * + * XXX splitting and rejoining the commandline between do_aspawn() + * and win32_spawnvp() could also be avoided. + */ + DllExport int win32_spawnvp(int mode, const char *cmdname, const char *const *argv) { - int status; +#ifdef USE_RTL_SPAWNVP + return spawnvp(mode, cmdname, (char * const *)argv); +#else + DWORD ret; + STARTUPINFO StartupInfo; + PROCESS_INFORMATION ProcessInformation; + DWORD create = 0; + + char *cmd = create_command_line(cmdname, strcmp(cmdname, argv[0]) == 0 + ? &argv[1] : argv); + char *fullcmd = Nullch; + + switch(mode) { + case P_NOWAIT: /* asynch + remember result */ + if (w32_num_children >= MAXIMUM_WAIT_OBJECTS) { + errno = EAGAIN; + ret = -1; + goto RETVAL; + } + /* FALL THROUGH */ + case P_WAIT: /* synchronous execution */ + break; + default: /* invalid mode */ + errno = EINVAL; + ret = -1; + goto RETVAL; + } + memset(&StartupInfo,0,sizeof(StartupInfo)); + StartupInfo.cb = sizeof(StartupInfo); + StartupInfo.wShowWindow = SW_SHOWDEFAULT; + +RETRY: + if (!CreateProcess(cmdname, /* search PATH to find executable */ + cmd, /* executable, and its arguments */ + NULL, /* process attributes */ + NULL, /* thread attributes */ + TRUE, /* inherit handles */ + create, /* creation flags */ + NULL, /* inherit environment */ + NULL, /* inherit cwd */ + &StartupInfo, + &ProcessInformation)) + { + /* initial NULL argument to CreateProcess() does a PATH + * search, but it always first looks in the directory + * where the current process was started, which behavior + * is undesirable for backward compatibility. So we + * jump through our own hoops by picking out the path + * we really want it to use. */ + if (!fullcmd) { + fullcmd = qualified_path(cmdname); + if (fullcmd) { + cmdname = fullcmd; + goto RETRY; + } + } + errno = ENOENT; + ret = -1; + goto RETVAL; + } -#ifndef USE_RTL_WAIT - if (mode == P_NOWAIT && w32_num_children >= MAXIMUM_WAIT_OBJECTS) - return -1; -#endif + if (mode == P_NOWAIT) { + /* asynchronous spawn -- store handle, return PID */ + w32_child_handles[w32_num_children] = ProcessInformation.hProcess; + ret = w32_child_pids[w32_num_children] = ProcessInformation.dwProcessId; + ++w32_num_children; + } + else { + WaitForSingleObject(ProcessInformation.hProcess, INFINITE); + GetExitCodeProcess(ProcessInformation.hProcess, &ret); + CloseHandle(ProcessInformation.hProcess); + } - status = spawnvp(mode, cmdname, (char * const *) argv); -#ifndef USE_RTL_WAIT - /* XXX For the P_NOWAIT case, Borland RTL returns pinfo.dwProcessId - * while VC RTL returns pinfo.hProcess. For purposes of the custom - * implementation of win32_wait(), we assume the latter. - */ - if (mode == P_NOWAIT && status >= 0) - w32_child_pids[w32_num_children++] = (HANDLE)status; + CloseHandle(ProcessInformation.hThread); +RETVAL: + Safefree(cmd); + Safefree(fullcmd); + return (int)ret; #endif - return status; } DllExport int @@ -2567,9 +2755,8 @@ Perl_init_os_extras() w32_perlshell_tokens = Nullch; w32_perlshell_items = -1; w32_fdpid = newAV(); /* XXX needs to be in Perl_win32_init()? */ -#ifndef USE_RTL_WAIT + New(1313, w32_children, 1, child_tab); w32_num_children = 0; -#endif /* these names are Activeware compatible */ newXS("Win32::GetCwd", w32_GetCwd, file); diff --git a/win32/win32.h b/win32/win32.h index fef3cbc484..0b8b710616 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -161,8 +161,6 @@ struct tms { #pragma warn -pro /* "call to function with no prototype" */ #pragma warn -stu /* "undefined structure 'foo'" */ -#define USE_RTL_WAIT /* Borland has a working wait() */ - /* Borland is picky about a bare member function name used as its ptr */ #ifdef PERL_OBJECT #define FUNC_NAME_TO_PTR(name) &(name) @@ -329,26 +327,29 @@ EXT void win32_strip_return(struct sv *sv); #endif #define HAVE_INTERP_INTERN +typedef struct { + long num; + DWORD pids[MAXIMUM_WAIT_OBJECTS]; +} child_tab; + struct interp_intern { - char * w32_perlshell_tokens; - char ** w32_perlshell_vec; - long w32_perlshell_items; - struct av * w32_fdpid; -#ifndef USE_RTL_WAIT - long w32_num_children; - HANDLE w32_child_pids[MAXIMUM_WAIT_OBJECTS]; -#endif + char * perlshell_tokens; + char ** perlshell_vec; + long perlshell_items; + struct av * fdpid; + child_tab * children; + HANDLE child_handles[MAXIMUM_WAIT_OBJECTS]; }; -#define w32_perlshell_tokens (PL_sys_intern.w32_perlshell_tokens) -#define w32_perlshell_vec (PL_sys_intern.w32_perlshell_vec) -#define w32_perlshell_items (PL_sys_intern.w32_perlshell_items) -#define w32_fdpid (PL_sys_intern.w32_fdpid) -#ifndef USE_RTL_WAIT -# define w32_num_children (PL_sys_intern.w32_num_children) -# define w32_child_pids (PL_sys_intern.w32_child_pids) -#endif +#define w32_perlshell_tokens (PL_sys_intern.perlshell_tokens) +#define w32_perlshell_vec (PL_sys_intern.perlshell_vec) +#define w32_perlshell_items (PL_sys_intern.perlshell_items) +#define w32_fdpid (PL_sys_intern.fdpid) +#define w32_children (PL_sys_intern.children) +#define w32_num_children (w32_children->num) +#define w32_child_pids (w32_children->pids) +#define w32_child_handles (PL_sys_intern.child_handles) /* * Now Win32 specific per-thread data stuff |