summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2002-07-16 19:41:34 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2002-07-16 19:41:34 +0000
commit8e93eb227d6a2e75d395bc74dbcd4957180a1a72 (patch)
tree71b1b0fce85f03f9cfcbc97e6fd7f346b0e5594d
parent07160069ef57a7888de8064b883bc0f5cbd24dc2 (diff)
parentcc1c1d2cf91c7eb921f74f7e5553fd9670d0e964 (diff)
downloadperl-8e93eb227d6a2e75d395bc74dbcd4957180a1a72.tar.gz
Integrate mainline (what a lot of change during freeze!)
p4raw-id: //depot/perlio@17580
-rw-r--r--Changes326
-rw-r--r--Porting/makerel1
-rw-r--r--embed.fnc5
-rw-r--r--embed.h10
-rw-r--r--ext/PerlIO/scalar/scalar.pm8
-rw-r--r--ext/Time/HiRes/HiRes.t2
-rw-r--r--global.sym3
-rw-r--r--hints/dec_osf.sh8
-rw-r--r--iperlsys.h17
-rw-r--r--lib/ExtUtils/MM_NW5.pm2
-rw-r--r--lib/Locale/Codes/ChangeLog17
-rw-r--r--lib/Locale/Codes/README2
-rw-r--r--lib/Locale/Country.pm33
-rw-r--r--lib/Locale/Country.pod4
-rw-r--r--lib/Locale/Currency.pm6
-rw-r--r--lib/Locale/Language.pm7
-rw-r--r--lib/Locale/Script.pm6
-rw-r--r--lib/Pod/Man.pm8
-rw-r--r--lib/Pod/ParseLink.pm13
-rw-r--r--lib/Pod/Text.pm8
-rw-r--r--lib/Pod/Text/Color.pm8
-rw-r--r--lib/Pod/Text/Overstrike.pm8
-rw-r--r--lib/Pod/Text/Termcap.pm10
-rw-r--r--lib/constant.t2
-rw-r--r--makedef.pl22
-rw-r--r--patchlevel.h1
-rw-r--r--pod/perldelta.pod441
-rw-r--r--pod/perlfunc.pod174
-rw-r--r--pod/perltoc.pod92
-rw-r--r--pod/perlxstut.pod2
-rw-r--r--pod/pod2man.PL11
-rw-r--r--pod/pod2text.PL8
-rw-r--r--pp_sys.c20
-rw-r--r--proto.h5
-rw-r--r--sv.c15
-rwxr-xr-xt/op/taint.t2
-rw-r--r--util.c52
-rw-r--r--win32/perlhost.h23
-rw-r--r--win32/win32.c50
-rw-r--r--win32/win32.h3
-rw-r--r--x2p/s2p.PL1
41 files changed, 1018 insertions, 418 deletions
diff --git a/Changes b/Changes
index b9bfbdd652..207156bbb6 100644
--- a/Changes
+++ b/Changes
@@ -28,6 +28,330 @@ example from http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/
Version v5.7.X Development release working toward v5.8
--------------
____________________________________________________________________________
+[ 17573] By: jhi on 2002/07/16 13:14:34
+ Log: Mac OS X dyld problem: try more direct action first.
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17572] By: jhi on 2002/07/16 13:06:04
+ Log: More explicit solution for the Mac OS X "dyld undefined symbols"
+ problem.
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17571] By: jhi on 2002/07/16 12:25:07
+ Log: Upgrade to Locale::Codes 2.06.
+ Branch: perl
+ ! lib/Locale/Codes/ChangeLog lib/Locale/Codes/README
+ ! lib/Locale/Country.pm lib/Locale/Country.pod
+ ! lib/Locale/Currency.pm lib/Locale/Language.pm
+ ! lib/Locale/Script.pm
+____________________________________________________________________________
+[ 17570] By: gsar on 2002/07/16 02:57:47
+ Log: integrate a variant of change#17568 from maint-5.6 branch (the
+ do_exec parts elided so that change is restricted strictly to
+ windows; binary compatibility stubs not needed)
+ Branch: perl
+ ! embed.fnc embed.h global.sym iperlsys.h makedef.pl pp_sys.c
+ ! proto.h win32/perlhost.h win32/win32.c win32/win32.h
+____________________________________________________________________________
+[ 17569] By: jhi on 2002/07/16 02:26:12
+ Log: Integrate change #16844 from maint:
+
+ extension of change#16332: isolate signal diddling to the main
+ interpreter (fixes signal-related races, e.g. when multiple
+ threads run system())
+ Branch: perl
+ !> util.c
+____________________________________________________________________________
+[ 17568] By: gsar on 2002/07/16 01:26:12
+ Log: on windows, expose do_{spawn,spawn_nowait,exec,aspawn} as part of
+ perl API; as a result spawnvp() is now the only one that belongs in
+ iperlsys.h interface (stubs retained in structure for bincompat)
+ Branch: maint-5.6/perl
+ ! embed.h embed.pl global.sym globals.c iperlsys.h makedef.pl
+ ! objXSUB.h perlapi.c pp_sys.c proto.h win32/perlhost.h
+ ! win32/win32.c win32/win32.h
+____________________________________________________________________________
+[ 17567] By: gsar on 2002/07/16 00:27:12
+ Log: integrate change#17566 from maint-5.6 branch
+
+ on windows, ensure child processes that get run via backticks get
+ the right pipe handle at stdin/stdout; this is needed to make
+ subprocesses see the correct standard handles such that backticks
+ and piped open()s work when run from within GUI applications
+
+ this also makes it possible to launch wperl.exe in backticks
+ from within an application that has no std handles without a
+ new blank console window popping up
+ Branch: perl
+ ! win32/win32.c
+____________________________________________________________________________
+[ 17566] By: gsar on 2002/07/16 00:06:14
+ Log: on windows, ensure child processes that get run via backticks get
+ the right pipe handle at stdin/stdout; this is needed to make
+ subprocesses see the correct standard handles such that backticks
+ and piped open()s work when run from within GUI applications
+
+ this also makes it possible to launch wperl.exe in backticks
+ from within an application that has no std handles without a
+ new blank console window popping up
+ Branch: maint-5.6/perl
+ ! win32/win32.c
+____________________________________________________________________________
+[ 17565] By: gsar on 2002/07/15 23:58:49
+ Log: change#16528 merged the fix for my_popen() but missed my_popen_list()
+ which had the same code (and bugs) duplicated; add changes#16329,16331
+ into my_popen_list()
+ Branch: perl
+ ! util.c
+____________________________________________________________________________
+[ 17564] By: gsar on 2002/07/15 23:45:08
+ Log: add missing xref in Changes
+ Branch: perl
+ ! Changes
+____________________________________________________________________________
+[ 17563] By: jhi on 2002/07/15 22:38:31
+ Log: IRIX -O2 trick (needs verification from John P. Linderman)
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17562] By: jhi on 2002/07/15 22:30:29
+ Log: Subject: Typo? in perlxstut.pod + PATCH
+ From: "John P. Linderman" <jpl@research.att.com>
+ Date: Mon, 15 Jul 2002 14:08:47 -0400 (EDT)
+ Message-Id: <200207151808.OAA53989@raptor.research.att.com>
+ Branch: perl
+ ! pod/perlxstut.pod
+____________________________________________________________________________
+[ 17561] By: jhi on 2002/07/15 21:11:04
+ Log: Split "Known problems" into "Known problems" (generic,
+ or shared among several platforms) and "Platform Specific
+ Problems".
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17560] By: rgs on 2002/07/15 20:13:22
+ Log: Clarify the PerlIO::scalar docs (suggested by Elizabeth
+ Mattijsen.)
+ Branch: perl
+ ! ext/PerlIO/scalar/scalar.pm
+____________________________________________________________________________
+[ 17559] By: jhi on 2002/07/15 18:59:23
+ Log: Retract #17486: OS/2 didn't like it.
+ Branch: perl
+ ! makedef.pl
+____________________________________________________________________________
+[ 17558] By: jhi on 2002/07/15 18:39:11
+ Log: Add #!./perl, noticed by John Adams.
+ Branch: perl
+ ! ext/Time/HiRes/HiRes.t
+____________________________________________________________________________
+[ 17557] By: jhi on 2002/07/15 17:14:41
+ Log: Regen toc.
+ Branch: perl
+ ! pod/perltoc.pod
+____________________________________________________________________________
+[ 17556] By: jhi on 2002/07/15 17:12:28
+ Log: Add a section on ithreads; rearrange the sections a bit.
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17555] By: jhi on 2002/07/15 16:29:06
+ Log: Subject: Re: [PATCH] reinclude ODBM_File & NDBM_File in Cygwin build
+ From: sthoenna@efn.org (Yitzchak Scott-Thoennes)
+ Date: Mon, 15 Jul 2002 10:04:02 -0700
+ Message-ID: <CCwM9gzkg25T092yn@efn.org>
+
+ Document which tests will fail.
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17554] By: jhi on 2002/07/15 16:26:55
+ Log: Subject: [ID 20020715.009] perl 5.8.0 RC3 incorrectly tests gcc version on Tru64 UNIX V4.0F
+ From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+ Date: Mon, 15 Jul 2002 19:23:54 +0200 (MET DST)
+ Message-Id: <5.8.0_22255_1026753561@rimsky>
+
+ (also raise the gcc minimum to 2.95.3)
+ Branch: perl
+ ! hints/dec_osf.sh
+____________________________________________________________________________
+[ 17553] By: jhi on 2002/07/15 14:56:42
+ Log: configure.gnu wants to be executable, too.
+ Branch: perl
+ ! Porting/makerel
+____________________________________________________________________________
+[ 17552] By: jhi on 2002/07/15 14:35:31
+ Log: DJGPP broke after 5.7.3, so that's good news.
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17551] By: jhi on 2002/07/15 13:49:27
+ Log: Retract #17550: the build/test time warnings do not
+ belong to perldelta, they belong to the announcement.
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17550] By: jhi on 2002/07/15 13:46:51
+ Log: (retracted by #17551)
+ Copy the warnings about build and test times from
+ the RC announcements to perldelta.
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17549] By: jhi on 2002/07/15 13:38:53
+ Log: Try to future proof the op/taint.
+ Branch: perl
+ ! t/op/taint.t
+____________________________________________________________________________
+[ 17548] By: jhi on 2002/07/15 13:35:49
+ Log: Squash "uninitialized" warning from gcc.
+ Branch: perl
+ ! sv.c
+____________________________________________________________________________
+[ 17547] By: jhi on 2002/07/15 13:33:20
+ Log: Update Changes.
+ Branch: perl
+ ! Changes patchlevel.h
+____________________________________________________________________________
+[ 17546] By: jhi on 2002/07/15 13:04:59
+ Log: Subject: Re: Core dump in perl_clone (even with 'use threads;' first) [PATCH]
+ From: Tim Bunce <Tim.Bunce@pobox.com>
+ Date: Mon, 15 Jul 2002 12:14:54 +0100
+ Message-ID: <20020715121454.F20682@dansat.data-plan.com>
+ Branch: perl
+ ! sv.c
+____________________________________________________________________________
+[ 17545] By: jhi on 2002/07/15 13:01:48
+ Log: Subject: RC3: lib/constant.t #35
+ From: Tatsuhiko Miyagawa <miyagawa@edge.co.jp>
+ Date: Mon, 15 Jul 2002 16:29:28 +0900
+ Message-ID: <86adotwisn.wl@mail.edge.co.jp>
+
+ Assuming " " in error messages does not work in Japanese,
+ just skip the test (even the #34 is suspicious).
+ Branch: perl
+ ! lib/constant.t
+____________________________________________________________________________
+[ 17544] By: jhi on 2002/07/15 12:57:52
+ Log: Upgrade to podlators 1.23.
+ Branch: perl
+ ! lib/Pod/Man.pm lib/Pod/ParseLink.pm lib/Pod/Text.pm
+ ! lib/Pod/Text/Color.pm lib/Pod/Text/Overstrike.pm
+ ! lib/Pod/Text/Termcap.pm pod/pod2man.PL pod/pod2text.PL
+____________________________________________________________________________
+[ 17543] By: nick on 2002/07/15 06:56:42
+ Log: Integrate mainline
+ Branch: perlio
+ !> (integrate 28 files)
+____________________________________________________________________________
+[ 17542] By: jhi on 2002/07/15 04:03:51
+ Log: Say something about missing "Perl_get_sv".
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17541] By: jhi on 2002/07/15 03:31:05
+ Log: Subject: Re: Regexp causes coredump
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Date: Mon, 15 Jul 2002 02:22:35 +0100
+ Message-Id: <200207150122.g6F1MZP31385@crypt.compulink.co.uk>
+ Branch: perl
+ ! regexec.c t/op/re_tests
+____________________________________________________________________________
+[ 17540] By: jhi on 2002/07/14 21:56:52
+ Log: Upgrade to Term::ANSIColor 1.05.
+ Branch: perl
+ ! lib/Term/ANSIColor.pm
+____________________________________________________________________________
+[ 17539] By: jhi on 2002/07/14 19:57:54
+ Log: Test skip counter tweak from Craig Berry.
+ Branch: perl
+ ! t/op/taint.t
+____________________________________________________________________________
+[ 17538] By: jhi on 2002/07/14 18:17:31
+ Log: Subject: Re: [ID 20020713.008] %vd eats two arguments
+ From: Hugo van der Sanden <hv@crypt.compulink.co.uk>
+ Date: Sun, 14 Jul 2002 19:00:12 +0100
+ Message-Id: <200207141800.g6EI0CA14256@crypt.compulink.co.uk>
+ Branch: perl
+ ! sv.c t/op/sprintf.t
+____________________________________________________________________________
+[ 17537] By: jhi on 2002/07/14 16:04:35
+ Log: Unfortunately we have to downgrade the status of DJGPP.
+ Branch: perl
+ ! pod/perldelta.pod pod/perlport.pod
+____________________________________________________________________________
+[ 17536] By: jhi on 2002/07/14 15:58:12
+ Log: I would say the long double support has matured enough.
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17535] By: jhi on 2002/07/14 15:56:01
+ Log: The z/OS problems are dependent on the environment;
+ Merijn Broeren didn't hit the pat.t crash. Now we only
+ need to figure out what's different in the environments...
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17534] By: jhi on 2002/07/14 15:53:08
+ Log: perldelta didn't know of FreeBSD 4.6 readdir_r.
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17533] By: jhi on 2002/07/14 15:48:46
+ Log: perldelta shuffling.
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17532] By: jhi on 2002/07/14 15:30:38
+ Log: Document the Thread:: change.
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17531] By: jhi on 2002/07/14 15:26:51
+ Log: Add a few new diagnostics.
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17530] By: jhi on 2002/07/14 14:37:28
+ Log: Move the debugger changes from "diagnostics" to "fixes".
+ Branch: perl
+ ! pod/perldelta.pod
+____________________________________________________________________________
+[ 17529] By: pudge on 2002/07/14 12:09:00
+ Log: Integrate perl
+ Branch: macperl
+ +> ext/PerlIO/scalar/Makefile.PL ext/PerlIO/scalar/scalar.pm
+ +> ext/PerlIO/scalar/scalar.xs ext/PerlIO/via/Makefile.PL
+ +> ext/PerlIO/via/via.pm ext/PerlIO/via/via.xs
+ +> lib/PerlIO/via/QuotedPrint.pm lib/PerlIO/via/t/QuotedPrint.t
+____________________________________________________________________________
+[ 17528] By: pudge on 2002/07/14 12:07:17
+ Log: Integrate perl
+ Branch: macperl
+ +> ext/MIME/Base64/t/quoted-print.t ext/ODBM_File/hints/linux.pl
+ +> ext/Thread/Queue.pmx ext/Thread/Semaphore.pmx lib/Config.t
+ +> lib/Math/BigInt/t/bare_mif.t lib/Pod/t/text.t
+ +> lib/Thread/Queue.t lib/Thread/Semaphore.t
+ - ext/MIME/Base64/t/qp.t ext/PerlIO/Scalar/Makefile.PL
+ - ext/PerlIO/Scalar/Scalar.pm ext/PerlIO/Scalar/Scalar.xs
+ - ext/PerlIO/Via/Makefile.PL ext/PerlIO/Via/Via.pm
+ - ext/PerlIO/Via/Via.xs ext/threads/shared/queue.pm
+ - ext/threads/shared/semaphore.pm ext/threads/shared/t/queue.t
+ - ext/threads/shared/t/semaphore.t
+ !> (integrate 157 files)
+____________________________________________________________________________
+[ 17527] By: jhi on 2002/07/13 23:07:10
+ Log: This is 5.8.0 RC3.
+ Branch: perl
+ ! patchlevel.h
+____________________________________________________________________________
+[ 17526] By: jhi on 2002/07/13 23:05:53
+ Log: Update Changes.
+ Branch: perl
+ ! Changes patchlevel.h
+____________________________________________________________________________
[ 17525] By: jhi on 2002/07/13 22:31:07
Log: Small pod nits.
Branch: perl
@@ -7109,7 +7433,7 @@ ____________________________________________________________________________
! ext/threads/shared/t/cond.t
____________________________________________________________________________
[ 16528] By: nick on 2002/05/09 16:40:39
- Log: Integrate maint branch io (pipe) fixes.
+ Log: Integrate maint branch io (pipe) fixes. (changes#16329,16330,16331)
Branch: perl
!> doio.c pp_sys.c util.c
____________________________________________________________________________
diff --git a/Porting/makerel b/Porting/makerel
index a67b802517..8937b258a5 100644
--- a/Porting/makerel
+++ b/Porting/makerel
@@ -85,6 +85,7 @@ system("find t ext lib -name 'test.pl' -print | xargs chmod +x");
my @exe = qw(
Configure
configpm
+ configure.gnu
embed.pl
installperl
installman
diff --git a/embed.fnc b/embed.fnc
index 922d8d8af8..0fd8b767bb 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -172,6 +172,11 @@ p |void |do_chop |SV* asv|SV* sv
Ap |bool |do_close |GV* gv|bool not_implicit
p |bool |do_eof |GV* gv
p |bool |do_exec |char* cmd
+#if defined(WIN32)
+Ap |int |do_aspawn |SV* really|SV** mark|SV** sp
+Ap |int |do_spawn |char* cmd
+Ap |int |do_spawn_nowait|char* cmd
+#endif
#if !defined(WIN32)
p |bool |do_exec3 |char* cmd|int fd|int flag
#endif
diff --git a/embed.h b/embed.h
index 9f8605a38b..747224f630 100644
--- a/embed.h
+++ b/embed.h
@@ -133,6 +133,11 @@
#define do_close Perl_do_close
#define do_eof Perl_do_eof
#define do_exec Perl_do_exec
+#if defined(WIN32)
+#define do_aspawn Perl_do_aspawn
+#define do_spawn Perl_do_spawn
+#define do_spawn_nowait Perl_do_spawn_nowait
+#endif
#if !defined(WIN32)
#define do_exec3 Perl_do_exec3
#endif
@@ -1700,6 +1705,11 @@
#define do_close(a,b) Perl_do_close(aTHX_ a,b)
#define do_eof(a) Perl_do_eof(aTHX_ a)
#define do_exec(a) Perl_do_exec(aTHX_ a)
+#if defined(WIN32)
+#define do_aspawn(a,b,c) Perl_do_aspawn(aTHX_ a,b,c)
+#define do_spawn(a) Perl_do_spawn(aTHX_ a)
+#define do_spawn_nowait(a) Perl_do_spawn_nowait(aTHX_ a)
+#endif
#if !defined(WIN32)
#define do_exec3(a,b,c) Perl_do_exec3(aTHX_ a,b,c)
#endif
diff --git a/ext/PerlIO/scalar/scalar.pm b/ext/PerlIO/scalar/scalar.pm
index d75d3706d7..bda30c6ed5 100644
--- a/ext/PerlIO/scalar/scalar.pm
+++ b/ext/PerlIO/scalar/scalar.pm
@@ -11,7 +11,13 @@ PerlIO::scalar - support module for in-memory IO.
=head1 SYNOPSIS
- open($fh,"<...",\$scalar);
+ open($fh,"<",\$scalar);
+ open($fh,">",\$scalar);
+
+or
+
+ open($fh,"<:scalar",\$scalar);
+ open($fh,">:scalar",\$scalar);
=head1 DESCRIPTION
diff --git a/ext/Time/HiRes/HiRes.t b/ext/Time/HiRes/HiRes.t
index e246d82f62..8a50f5029c 100644
--- a/ext/Time/HiRes/HiRes.t
+++ b/ext/Time/HiRes/HiRes.t
@@ -1,3 +1,5 @@
+#!./perl -w
+
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
diff --git a/global.sym b/global.sym
index d9053e0a95..35e4dfdaab 100644
--- a/global.sym
+++ b/global.sym
@@ -96,6 +96,9 @@ Perl_die
Perl_dounwind
Perl_do_binmode
Perl_do_close
+Perl_do_aspawn
+Perl_do_spawn
+Perl_do_spawn_nowait
Perl_do_join
Perl_do_open
Perl_do_open9
diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh
index 7c3569f70c..b3872fac12 100644
--- a/hints/dec_osf.sh
+++ b/hints/dec_osf.sh
@@ -73,12 +73,12 @@ gcc) if [ "X$gccversion" = "X" ]; then
# Done too late in Configure if hinted
gccversion=`$cc --version | sed 's/.*(GCC) *//'`
fi
- set $gcc_version
- if test "$1" -lt 2 -o \( "$1" -eq 2 -a \( "$2" -lt 95 -o \( "$2" -eq 95 -a "$3" -lt 2 \) \) \); then
+ set $gccversion
+ if test "$1" -lt 2 -o \( "$1" -eq 2 -a \( "$2" -lt 95 -o \( "$2" -eq 95 -a "$3" -lt 3 \) \) \); then
cat >&4 <<EOF
-*** Your cc seems to be gcc and its version ($gcc_version) seems to be
-*** less than 2.95.2. This is not a good idea since old versions of gcc
+*** Your cc seems to be gcc and its version ($gccversion) seems to be
+*** less than 2.95.3. This is not a good idea since old versions of gcc
*** are known to produce buggy code when compiling Perl (and no doubt for
*** other programs, too).
***
diff --git a/iperlsys.h b/iperlsys.h
index 86823df02b..c82ffa70af 100644
--- a/iperlsys.h
+++ b/iperlsys.h
@@ -945,12 +945,8 @@ typedef int (*LPProcGetpid)(struct IPerlProc*);
typedef void* (*LPProcDynaLoader)(struct IPerlProc*, const char*);
typedef void (*LPProcGetOSError)(struct IPerlProc*,
SV* sv, DWORD dwErr);
-typedef void (*LPProcFreeBuf)(struct IPerlProc*, char*);
-typedef BOOL (*LPProcDoCmd)(struct IPerlProc*, char*);
-typedef int (*LPProcSpawn)(struct IPerlProc*, char*);
typedef int (*LPProcSpawnvp)(struct IPerlProc*, int, const char*,
const char*const*);
-typedef int (*LPProcASpawn)(struct IPerlProc*, void*, void**, void**);
#endif
typedef int (*LPProcLastHost)(struct IPerlProc*);
typedef int (*LPProcGetTimeOfDay)(struct IPerlProc*,
@@ -988,10 +984,7 @@ struct IPerlProc
#ifdef WIN32
LPProcDynaLoader pDynaLoader;
LPProcGetOSError pGetOSError;
- LPProcDoCmd pDoCmd;
- LPProcSpawn pSpawn;
LPProcSpawnvp pSpawnvp;
- LPProcASpawn pASpawn;
#endif
LPProcLastHost pLastHost;
LPProcPopenList pPopenList;
@@ -1068,14 +1061,8 @@ struct IPerlProcInfo
(*PL_Proc->pDynaLoader)(PL_Proc, (f))
#define PerlProc_GetOSError(s,e) \
(*PL_Proc->pGetOSError)(PL_Proc, (s), (e))
-#define PerlProc_Cmd(s) \
- (*PL_Proc->pDoCmd)(PL_Proc, (s))
-#define do_spawn(s) \
- (*PL_Proc->pSpawn)(PL_Proc, (s))
-#define do_spawnvp(m, c, a) \
+#define PerlProc_spawnvp(m, c, a) \
(*PL_Proc->pSpawnvp)(PL_Proc, (m), (c), (a))
-#define PerlProc_aspawn(m,c,a) \
- (*PL_Proc->pASpawn)(PL_Proc, (m), (c), (a))
#endif
#define PerlProc_lasthost() \
(*PL_Proc->pLastHost)(PL_Proc)
@@ -1122,6 +1109,8 @@ struct IPerlProcInfo
win32_dynaload((f))
#define PerlProc_GetOSError(s,e) \
win32_str_os_error((s), (e))
+#define PerlProc_spawnvp(m, c, a) \
+ win32_spawnvp((m), (c), (a))
#undef PerlProc_signal
#define PerlProc_signal(n, h) win32_signal((n), (h))
#endif
diff --git a/lib/ExtUtils/MM_NW5.pm b/lib/ExtUtils/MM_NW5.pm
index a91e09b595..7f13dd0ee7 100644
--- a/lib/ExtUtils/MM_NW5.pm
+++ b/lib/ExtUtils/MM_NW5.pm
@@ -279,7 +279,7 @@ END
END
$m .= <<'END' if $self->{PERL_SRC};
- $(NOECHO)echo "$(EXTRALIBS)" >> $(PERL_SRC)\ext.libs
+ $(NOECHO)echo "$(EXTRALIBS)" >> $(PERL_SRC)\ext.libs
END
diff --git a/lib/Locale/Codes/ChangeLog b/lib/Locale/Codes/ChangeLog
index 1f836f0fc7..4d8ac19e1d 100644
--- a/lib/Locale/Codes/ChangeLog
+++ b/lib/Locale/Codes/ChangeLog
@@ -1,6 +1,23 @@
ChangeLog for Locale-Codes Distribution
+2.06 2002-07-15 neilb
+
+ * The four modules which have data after __DATA__ weren't
+ closing the DATA filehandle after reading from it,
+ which they should. Bug and patch from Steve Hay.
+
+2.05 2002-07-08 neilb
+
+ * Added three letter codes for the countries that were missing
+ them. Patch from TJ Mather.
+ * Documentation bug: one of the examples used => where the
+ lvalue was a constant, which isn't allowed, unless you
+ put the () with the constant to force the right interpretation.
+ Pointed out by TJ Mather and MYT.
+ * Updated the URL for the appendix in the CIA world factbook.
+ Patch from TJ Mather.
+
2.04 2002-05-23 neilb
* updated according to changes in ISO 3166-1 described
diff --git a/lib/Locale/Codes/README b/lib/Locale/Codes/README
index 012ee4a7a9..8dbba6492b 100644
--- a/lib/Locale/Codes/README
+++ b/lib/Locale/Codes/README
@@ -1,6 +1,6 @@
Locale-Codes Distribution
- v2.03
+ v2.06
This distribution contains four Perl modules which can be used to process
ISO codes for identifying languages, countries, scripts,
diff --git a/lib/Locale/Country.pm b/lib/Locale/Country.pm
index fd7fcec9b2..07ae83325c 100644
--- a/lib/Locale/Country.pm
+++ b/lib/Locale/Country.pm
@@ -1,7 +1,7 @@
#
# Locale::Country - ISO codes for country identification (ISO 3166)
#
-# $Id: Country.pm,v 2.4 2002/05/20 05:05:18 neilb Exp $
+# $Id: Country.pm,v 2.6 2002/07/10 16:33:27 neilb Exp $
#
package Locale::Country;
@@ -17,7 +17,7 @@ use Locale::Constants;
# Public Global Variables
#-----------------------------------------------------------------------
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-$VERSION = sprintf("%d.%02d", q$Revision: 2.4 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 2.6 $ =~ /(\d+)\.(\d+)/);
@ISA = qw(Exporter);
@EXPORT = qw(code2country country2code
all_country_codes all_country_names
@@ -299,6 +299,8 @@ sub _code2codeset
}
}
+
+ close(DATA);
}
1;
@@ -313,7 +315,7 @@ al:alb:008:Albania
am:arm:051:Armenia
an:ant:530:Netherlands Antilles
ao:ago:024:Angola
-aq:::Antarctica
+aq:ata:010:Antarctica
ar:arg:032:Argentina
as:asm:016:American Samoa
at:aut:040:Austria
@@ -335,15 +337,14 @@ bo:bol:068:Bolivia
br:bra:076:Brazil
bs:bhs:044:Bahamas
bt:btn:064:Bhutan
-bv:::Bouvet Island
+bv:bvt:074:Bouvet Island
bw:bwa:072:Botswana
by:blr:112:Belarus
bz:blz:084:Belize
ca:can:124:Canada
-cc:::Cocos (Keeling) Islands
-cd:cod:180:Congo, The Democratic Republic of the:Congo, Democratic Republic of the
+cc:cck:166:Cocos (Keeling) Islands
cf:caf:140:Central African Republic
-cg:cog:178:Congo
+cg:cog:178:Congo:Congo, Republic of the
ch:che:756:Switzerland
ci:civ:384:Cote D'Ivoire
ck:cok:184:Cook Islands
@@ -354,7 +355,7 @@ co:col:170:Colombia
cr:cri:188:Costa Rica
cu:cub:192:Cuba
cv:cpv:132:Cape Verde
-cx:::Christmas Island
+cx:cxr:162:Christmas Island
cy:cyp:196:Cyprus
cz:cze:203:Czech Republic
de:deu:276:Germany
@@ -376,7 +377,7 @@ fk:flk:238:Falkland Islands (Malvinas):Falkland Islands (Islas Malvinas)
fm:fsm:583:Micronesia, Federated States of
fo:fro:234:Faroe Islands
fr:fra:250:France
-fx:::France, Metropolitan
+fx:fxx:249:France, Metropolitan
ga:gab:266:Gabon
gb:gbr:826:United Kingdom:Great Britain
gd:grd:308:Grenada
@@ -390,13 +391,13 @@ gn:gin:324:Guinea
gp:glp:312:Guadeloupe
gq:gnq:226:Equatorial Guinea
gr:grc:300:Greece
-gs:::South Georgia and the South Sandwich Islands
+gs:sgs:239:South Georgia and the South Sandwich Islands
gt:gtm:320:Guatemala
gu:gum:316:Guam
gw:gnb:624:Guinea-Bissau
gy:guy:328:Guyana
hk:hkg:344:Hong Kong
-hm:::Heard Island and McDonald Islands
+hm:hmd:334:Heard Island and McDonald Islands
hn:hnd:340:Honduras
hr:hrv:191:Croatia
ht:hti:332:Haiti
@@ -405,7 +406,7 @@ id:idn:360:Indonesia
ie:irl:372:Ireland
il:isr:376:Israel
in:ind:356:India
-io:::British Indian Ocean Territory
+io:iot:086:British Indian Ocean Territory
iq:irq:368:Iraq
ir:irn:364:Iran, Islamic Republic of:Iran
is:isl:352:Iceland
@@ -509,7 +510,7 @@ sy:syr:760:Syrian Arab Republic:Syria
sz:swz:748:Swaziland
tc:tca:796:Turks and Caicos Islands
td:tcd:148:Chad
-tf:::French Southern Territories
+tf:atf:260:French Southern Territories
tg:tgo:768:Togo
th:tha:764:Thailand
tj:tjk:762:Tajikistan
@@ -525,7 +526,7 @@ tw:twn:158:Taiwan, Province of China:Taiwan
tz:tza:834:Tanzania, United Republic of:Tanzania
ua:ukr:804:Ukraine
ug:uga:800:Uganda
-um:::United States Minor Outlying Islands
+um:umi:581:United States Minor Outlying Islands
us:usa:840:United States:USA:United States of America
uy:ury:858:Uruguay
uz:uzb:860:Uzbekistan
@@ -539,9 +540,9 @@ vu:vut:548:Vanuatu
wf:wlf:876:Wallis and Futuna
ws:wsm:882:Samoa
ye:yem:887:Yemen
-yt:::Mayotte
+yt:myt:175:Mayotte
yu:yug:891:Yugoslavia
za:zaf:710:South Africa
zm:zmb:894:Zambia
-zr:::Zaire
+zr:zar:180:Zaire:Congo, The Democratic Republic of the:Congo, Democratic Republic of the
zw:zwe:716:Zimbabwe
diff --git a/lib/Locale/Country.pod b/lib/Locale/Country.pod
index ff130aadc0..3716eacbfa 100644
--- a/lib/Locale/Country.pod
+++ b/lib/Locale/Country.pod
@@ -104,7 +104,7 @@ This function takes a country code from one code set,
and returns the corresponding code from another code set.
$alpha2 = country_code2code('fin',
- LOCALE_CODE_ALPHA_3 => LOCALE_CODE_ALPHA_2);
+ LOCALE_CODE_ALPHA_3, LOCALE_CODE_ALPHA_2);
# $alpha2 will now be 'fi'
If the code passed is not a valid country code in
@@ -281,7 +281,7 @@ Official home page for the ISO 3166 maintenance agency.
Another useful, but not official, home page.
-=item http://www.cia.gov/cia/publications/factbook/docs/app-f.html
+=item http://www.cia.gov/cia/publications/factbook/docs/app-d-1.html
An appendix in the CIA world fact book which lists country codes
as defined by ISO 3166, FIPS 10-4, and internet domain names.
diff --git a/lib/Locale/Currency.pm b/lib/Locale/Currency.pm
index f8efffbe85..34b85917dd 100644
--- a/lib/Locale/Currency.pm
+++ b/lib/Locale/Currency.pm
@@ -2,7 +2,7 @@
# Locale::Currency - ISO three letter codes for currency identification
# (ISO 4217)
#
-# $Id: Currency.pm,v 2.1 2002/02/06 04:07:10 neilb Exp $
+# $Id: Currency.pm,v 2.2 2002/07/10 16:33:27 neilb Exp $
#
package Locale::Currency;
@@ -15,7 +15,7 @@ require Exporter;
# Public Global Variables
#-----------------------------------------------------------------------
use vars qw($VERSION @ISA @EXPORT);
-$VERSION = sprintf("%d.%02d", q$Revision: 2.1 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 2.2 $ =~ /(\d+)\.(\d+)/);
@ISA = qw(Exporter);
@EXPORT = qw(&code2currency &currency2code
&all_currency_codes &all_currency_names );
@@ -117,6 +117,8 @@ sub all_currency_names
$CODES{$code} = $currency;
$CURRENCIES{"\L$currency"} = $code;
}
+
+ close(DATA);
}
1;
diff --git a/lib/Locale/Language.pm b/lib/Locale/Language.pm
index a00559f94b..f47e523fc2 100644
--- a/lib/Locale/Language.pm
+++ b/lib/Locale/Language.pm
@@ -1,7 +1,7 @@
#
# Locale::Language - ISO two letter codes for language identification (ISO 639)
#
-# $Id: Language.pm,v 2.1 2002/02/06 04:07:10 neilb Exp $
+# $Id: Language.pm,v 2.2 2002/07/10 16:33:27 neilb Exp $
#
package Locale::Language;
@@ -14,7 +14,7 @@ require Exporter;
# Public Global Variables
#-----------------------------------------------------------------------
use vars qw($VERSION @ISA @EXPORT);
-$VERSION = sprintf("%d.%02d", q$Revision: 2.1 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 2.2 $ =~ /(\d+)\.(\d+)/);
@ISA = qw(Exporter);
@EXPORT = qw(&code2language &language2code
&all_language_codes &all_language_names );
@@ -107,7 +107,6 @@ sub all_language_names
my $code;
my $language;
- use bytes;
while (<DATA>)
{
@@ -117,6 +116,8 @@ sub all_language_names
$CODES{$code} = $language;
$LANGUAGES{"\L$language"} = $code;
}
+
+ close(DATA);
}
1;
diff --git a/lib/Locale/Script.pm b/lib/Locale/Script.pm
index 6b75afbc07..d5b6751a1a 100644
--- a/lib/Locale/Script.pm
+++ b/lib/Locale/Script.pm
@@ -1,7 +1,7 @@
#
# Locale::Script - ISO codes for script identification (ISO 15924)
#
-# $Id: Script.pm,v 2.1 2002/02/06 04:07:10 neilb Exp $
+# $Id: Script.pm,v 2.2 2002/07/10 16:33:28 neilb Exp $
#
package Locale::Script;
@@ -17,7 +17,7 @@ use Locale::Constants;
# Public Global Variables
#-----------------------------------------------------------------------
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-$VERSION = sprintf("%d.%02d", q$Revision: 2.1 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 2.2 $ =~ /(\d+)\.(\d+)/);
@ISA = qw(Exporter);
@EXPORT = qw(code2script script2code
all_script_codes all_script_names
@@ -183,6 +183,8 @@ sub all_script_names
}
}
+
+ close(DATA);
}
1;
diff --git a/lib/Pod/Man.pm b/lib/Pod/Man.pm
index 341c881fcd..d2dff0454c 100644
--- a/lib/Pod/Man.pm
+++ b/lib/Pod/Man.pm
@@ -1,5 +1,5 @@
# Pod::Man -- Convert POD data to formatted *roff input.
-# $Id: Man.pm,v 1.33 2002/06/23 19:16:21 eagle Exp $
+# $Id: Man.pm,v 1.34 2002/07/15 05:46:00 eagle Exp $
#
# Copyright 1999, 2000, 2001, 2002 by Russ Allbery <rra@stanford.edu>
#
@@ -38,7 +38,7 @@ use vars qw(@ISA %ESCAPES $PREAMBLE $VERSION);
# Don't use the CVS revision as the version, since this module is also in Perl
# core and too many things could munge CVS magic revision strings. This
# number should ideally be the same as the CVS revision in podlators, however.
-$VERSION = 1.33;
+$VERSION = 1.34;
##############################################################################
@@ -1376,6 +1376,10 @@ L<man(7)> on your system. Also, please see L<pod2man(1)> for extensive
documentation on writing manual pages if you've not done it before and
aren't familiar with the conventions.
+The current version of this module is always available from its web site at
+L<http://www.eyrie.org/~eagle/software/podlators/>. It is also part of the
+Perl core distribution as of 5.6.0.
+
=head1 AUTHOR
Russ Allbery <rra@stanford.edu>, based I<very> heavily on the original
diff --git a/lib/Pod/ParseLink.pm b/lib/Pod/ParseLink.pm
index 9b35cb7e5b..7e4153da3d 100644
--- a/lib/Pod/ParseLink.pm
+++ b/lib/Pod/ParseLink.pm
@@ -1,5 +1,5 @@
# Pod::ParseLink -- Parse an L<> formatting code in POD text.
-# $Id: ParseLink.pm,v 1.5 2001/12/01 01:34:49 eagle Exp $
+# $Id: ParseLink.pm,v 1.6 2002/07/15 05:46:00 eagle Exp $
#
# Copyright 2001 by Russ Allbery <rra@stanford.edu>
#
@@ -34,7 +34,7 @@ use Exporter;
# Don't use the CVS revision as the version, since this module is also in Perl
# core and too many things could munge CVS magic revision strings. This
# number should ideally be the same as the CVS revision in podlators, however.
-$VERSION = 1.05;
+$VERSION = 1.06;
##############################################################################
@@ -111,7 +111,7 @@ __END__
=head1 NAME
-Pod::ParseLink -- Parse an LE<lt>E<gt> formatting code in POD text
+Pod::ParseLink - Parse an LE<lt>E<gt> formatting code in POD text
=head1 SYNOPSIS
@@ -163,6 +163,13 @@ the section may be necessary depending on whether the translator wants to
consider markup in sections to be significant when resolving links. See
L<perlpodspec> for more information.
+=head1 SEE ALSO
+
+L<Pod::Parser>
+
+The current version of this module is always available from its web site at
+L<http://www.eyrie.org/~eagle/software/podlators/>.
+
=head1 AUTHOR
Russ Allbery <rra@stanford.edu>.
diff --git a/lib/Pod/Text.pm b/lib/Pod/Text.pm
index 5806257b33..3325e950cc 100644
--- a/lib/Pod/Text.pm
+++ b/lib/Pod/Text.pm
@@ -1,5 +1,5 @@
# Pod::Text -- Convert POD data to formatted ASCII text.
-# $Id: Text.pm,v 2.19 2002/06/23 19:16:21 eagle Exp $
+# $Id: Text.pm,v 2.20 2002/07/15 05:46:00 eagle Exp $
#
# Copyright 1999, 2000, 2001, 2002 by Russ Allbery <rra@stanford.edu>
#
@@ -43,7 +43,7 @@ use vars qw(@ISA @EXPORT %ESCAPES $VERSION);
# Don't use the CVS revision as the version, since this module is also in Perl
# core and too many things could munge CVS magic revision strings. This
# number should ideally be the same as the CVS revision in podlators, however.
-$VERSION = 2.19;
+$VERSION = 2.20;
##############################################################################
@@ -813,6 +813,10 @@ subclass of it does. Look for L<Pod::Text::Termcap>.
L<Pod::Parser>, L<Pod::Text::Termcap>, L<pod2text(1)>
+The current version of this module is always available from its web site at
+L<http://www.eyrie.org/~eagle/software/podlators/>. It is also part of the
+Perl core distribution as of 5.6.0.
+
=head1 AUTHOR
Russ Allbery <rra@stanford.edu>, based I<very> heavily on the original
diff --git a/lib/Pod/Text/Color.pm b/lib/Pod/Text/Color.pm
index 6ec9164448..2ba31369b9 100644
--- a/lib/Pod/Text/Color.pm
+++ b/lib/Pod/Text/Color.pm
@@ -1,5 +1,5 @@
# Pod::Text::Color -- Convert POD data to formatted color ASCII text
-# $Id: Color.pm,v 1.3 2001/11/28 01:16:54 eagle Exp $
+# $Id: Color.pm,v 1.4 2002/07/15 05:46:00 eagle Exp $
#
# Copyright 1999, 2001 by Russ Allbery <rra@stanford.edu>
#
@@ -29,7 +29,7 @@ use vars qw(@ISA $VERSION);
# Don't use the CVS revision as the version, since this module is also in Perl
# core and too many things could munge CVS magic revision strings. This
# number should ideally be the same as the CVS revision in podlators, however.
-$VERSION = 1.03;
+$VERSION = 1.04;
##############################################################################
@@ -127,6 +127,10 @@ B<pod2text> should be taught about those.
L<Pod::Text>, L<Pod::Parser>
+The current version of this module is always available from its web site at
+L<http://www.eyrie.org/~eagle/software/podlators/>. It is also part of the
+Perl core distribution as of 5.6.0.
+
=head1 AUTHOR
Russ Allbery <rra@stanford.edu>.
diff --git a/lib/Pod/Text/Overstrike.pm b/lib/Pod/Text/Overstrike.pm
index 8b19fb4dfe..503f4003ad 100644
--- a/lib/Pod/Text/Overstrike.pm
+++ b/lib/Pod/Text/Overstrike.pm
@@ -1,5 +1,5 @@
# Pod::Text::Overstrike -- Convert POD data to formatted overstrike text
-# $Id: Overstrike.pm,v 1.8 2002/02/17 04:38:03 eagle Exp $
+# $Id: Overstrike.pm,v 1.9 2002/07/15 05:46:00 eagle Exp $
#
# Created by Joe Smith <Joe.Smith@inwap.com> 30-Nov-2000
# (based on Pod::Text::Color by Russ Allbery <rra@stanford.edu>)
@@ -36,7 +36,7 @@ use vars qw(@ISA $VERSION);
# Don't use the CVS revision as the version, since this module is also in Perl
# core and too many things could munge CVS magic revision strings. This
# number should ideally be the same as the CVS revision in podlators, however.
-$VERSION = 1.08;
+$VERSION = 1.09;
##############################################################################
@@ -187,6 +187,10 @@ There may be some better approach possible.
L<Pod::Text>, L<Pod::Parser>
+The current version of this module is always available from its web site at
+L<http://www.eyrie.org/~eagle/software/podlators/>. It is also part of the
+Perl core distribution as of 5.6.0.
+
=head1 AUTHOR
Joe Smith <Joe.Smith@inwap.com>, using the framework created by Russ Allbery
diff --git a/lib/Pod/Text/Termcap.pm b/lib/Pod/Text/Termcap.pm
index 97523f9f0a..f0187f24ca 100644
--- a/lib/Pod/Text/Termcap.pm
+++ b/lib/Pod/Text/Termcap.pm
@@ -1,5 +1,5 @@
# Pod::Text::Termcap -- Convert POD data to ASCII text with format escapes.
-# $Id: Termcap.pm,v 1.9 2002/01/02 07:59:09 eagle Exp $
+# $Id: Termcap.pm,v 1.10 2002/07/15 05:46:00 eagle Exp $
#
# Copyright 1999, 2001, 2002 by Russ Allbery <rra@stanford.edu>
#
@@ -30,7 +30,7 @@ use vars qw(@ISA $VERSION);
# Don't use the CVS revision as the version, since this module is also in Perl
# core and too many things could munge CVS magic revision strings. This
# number should ideally be the same as the CVS revision in podlators, however.
-$VERSION = 1.09;
+$VERSION = 1.10;
##############################################################################
@@ -128,7 +128,7 @@ __END__
=head1 NAME
-Pod::Text::Color - Convert POD data to ASCII text with format escapes
+Pod::Text::Termcap - Convert POD data to ASCII text with format escapes
=head1 SYNOPSIS
@@ -160,6 +160,10 @@ termcap information.
L<Pod::Text>, L<Pod::Parser>, L<Term::Cap>
+The current version of this module is always available from its web site at
+L<http://www.eyrie.org/~eagle/software/podlators/>. It is also part of the
+Perl core distribution as of 5.6.0.
+
=head1 AUTHOR
Russ Allbery <rra@stanford.edu>.
diff --git a/lib/constant.t b/lib/constant.t
index f932976f60..1127dcf754 100644
--- a/lib/constant.t
+++ b/lib/constant.t
@@ -125,7 +125,7 @@ test 33, E2BIG == 7;
# This is something like "Arg list too long", but the actual message
# text may vary, so we can't test much better than this.
test 34, length(E2BIG) > 6;
-test 35, index(E2BIG, " ") > 0;
+test 35, 1; # Skipped: used to assume " ", false in ja_JP.eucJP on Linux
test 36, @warnings == 0, join "\n", "unexpected warning", @warnings;
@warnings = (); # just in case
diff --git a/makedef.pl b/makedef.pl
index 4e211d617f..f22b34dc1d 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -29,16 +29,6 @@ my %PLATFORM;
defined $PLATFORM || die "PLATFORM undefined, must be one of: @PLATFORM\n";
exists $PLATFORM{$PLATFORM} || die "PLATFORM must be one of: @PLATFORM\n";
-my %exportperlmalloc =
- (
- Perl_malloc => "malloc",
- Perl_mfree => "free",
- Perl_realloc => "realloc",
- Perl_calloc => "calloc",
- );
-
-my $exportperlmalloc = $PLATFORM eq 'os2';
-
my $config_sh = "config.sh";
my $config_h = "config.h";
my $thrdvar_h = "thrdvar.h";
@@ -254,7 +244,14 @@ if ($PLATFORM eq 'win32') {
Perl_my_popen
)];
}
-elsif ($PLATFORM eq 'wince') {
+else {
+ skip_symbols [qw(
+ Perl_do_spawn
+ Perl_do_spawn_nowait
+ Perl_do_aspawn
+ )];
+}
+if ($PLATFORM eq 'wince') {
skip_symbols [qw(
PL_statusvalue_vms
PL_archpat_auto
@@ -1141,7 +1138,6 @@ elsif ($PLATFORM eq 'os2') {
@missing = grep { !exists $mapped{$_} }
keys %export;
- @missing = grep { !exists $exportperlmalloc{$_} } @missing;
delete $export{$_} foreach @missing;
}
elsif ($PLATFORM eq 'MacOS') {
@@ -1315,8 +1311,6 @@ sub emit_symbol {
sub output_symbol {
my $symbol = shift;
- $symbol = $exportperlmalloc{$symbol}
- if $exportperlmalloc and exists $exportperlmalloc{$symbol};
if ($PLATFORM =~ /^win(?:32|ce)$/) {
$symbol = "_$symbol" if $CCTYPE eq 'BORLAND';
print "\t$symbol\n";
diff --git a/patchlevel.h b/patchlevel.h
index 164ee0d83c..ffca887265 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -79,6 +79,7 @@
#if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(LOCAL_PATCH_COUNT)
static char *local_patches[] = {
NULL
+ ,"DEVEL17573"
,NULL
};
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 01b28e5eaf..89b29371a6 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -299,6 +299,42 @@ behaviour. See L<"Localising Tied Arrays and Hashes Is Broken">.
=head1 Core Enhancements
+=head2 Unicode Overhaul
+
+Unicode in general should be now much more usable than in Perl 5.6.0
+(or even in 5.6.1). Unicode can be used in hash keys, Unicode in
+regular expressions should work now, Unicode in tr/// should work now,
+Unicode in I/O should work now. See L<perluniintro> for introduction
+and L<perlunicode> for details.
+
+=over 4
+
+=item *
+
+The Unicode Character Database coming with Perl has been upgraded
+to Unicode 3.2.0. For more information, see http://www.unicode.org/ .
+[561+] (5.6.1 has UCD 3.0.1.)
+
+=item *
+
+For developers interested in enhancing Perl's Unicode capabilities:
+almost all the UCD files are included with the Perl distribution in
+the F<lib/unicore> subdirectory. The most notable omission, for space
+considerations, is the Unihan database.
+
+=item *
+
+The properties \p{Blank} and \p{SpacePerl} have been added. "Blank" is like
+C isblank(), that is, it contains only "horizontal whitespace" (the space
+character is, the newline isn't), and the "SpacePerl" is the Unicode
+equivalent of C<\s> (\p{Space} isn't, since that includes the vertical
+tabulator character, whereas C<\s> doesn't.)
+
+See "New Unicode Properties" earlier in this document for additional
+information on changes with Unicode properties.
+
+=back
+
=head2 PerlIO is Now The Default
=over 4
@@ -410,6 +446,18 @@ B<any subsequent file open>, is UTF-8.
=back
+=head2 ithreads
+
+The new interpreter threads ("ithreads" for short) implementation of
+multithreading, by Arthur Bergman, replaces the old "5.005 threads"
+implementation. In the ithreads model any data sharing between
+threads must be explicit, as opposed to the model where data sharing
+was implicit. See L<threads> and L<threads::shared>, and
+L<perlthrtut>.
+
+As a part of the ithreads implementation Perl will also use
+any necessary and detectable reentrant libc interfaces.
+
=head2 Restricted Hashes
A restricted hash is restricted to a certain set of keys, no keys
@@ -432,42 +480,6 @@ internal state since the current operation is always finished first,
but the signal may take more time to get heard. Note that breaking
out from potentially blocking operations should still work, though.
-=head2 Unicode Overhaul
-
-Unicode in general should be now much more usable than in Perl 5.6.0
-(or even in 5.6.1). Unicode can be used in hash keys, Unicode in
-regular expressions should work now, Unicode in tr/// should work now,
-Unicode in I/O should work now. See L<perluniintro> for introduction
-and L<perlunicode> for details.
-
-=over 4
-
-=item *
-
-The Unicode Character Database coming with Perl has been upgraded
-to Unicode 3.2.0. For more information, see http://www.unicode.org/ .
-[561+] (5.6.1 has UCD 3.0.1.)
-
-=item *
-
-For developers interested in enhancing Perl's Unicode capabilities:
-almost all the UCD files are included with the Perl distribution in
-the F<lib/unicore> subdirectory. The most notable omission, for space
-considerations, is the Unihan database.
-
-=item *
-
-The properties \p{Blank} and \p{SpacePerl} have been added. "Blank" is like
-C isblank(), that is, it contains only "horizontal whitespace" (the space
-character is, the newline isn't), and the "SpacePerl" is the Unicode
-equivalent of C<\s> (\p{Space} isn't, since that includes the vertical
-tabulator character, whereas C<\s> doesn't.)
-
-See "New Unicode Properties" earlier in this document for additional
-information on changes with Unicode properties.
-
-=back
-
=head2 Understanding of Numbers
In general a lot of fixing has happened in the area of Perl's
@@ -1128,9 +1140,7 @@ L<threads::shared>, and L<perlthrtut>.
=item *
C<threads::shared>, by Arthur Bergman, allows data sharing for
-interpreter threads. In the ithreads model any data sharing between
-threads must be explicit, as opposed to the old 5.005 thread model
-where data sharing was implicit. See L<threads::shared>.
+interpreter threads. See L<threads::shared>.
=item *
@@ -3122,6 +3132,164 @@ to be closer to the library/extension they are testing.)
=head1 Known Problems
+=head2 The Compiler Suite Is Still Very Experimental
+
+The compiler suite is slowly getting better but it continues to be
+highly experimental. Use in production environments is discouraged.
+
+=head2 Localising Tied Arrays and Hashes Is Broken
+
+ local %tied_array;
+
+doesn't work as one would expect: the old value is restored
+incorrectly. This will be changed in a future release, but we don't
+know yet what the new semantics will exactly be. In any case, the
+change will break existing code that relies on the current
+(ill-defined) semantics, so just avoid doing this in general.
+
+=head2 Building Extensions Can Fail Because Of Largefiles
+
+Some extensions like mod_perl are known to have issues with
+`largefiles', a change brought by Perl 5.6.0 in which file offsets
+default to 64 bits wide, where supported. Modules may fail to compile
+at all, or they may compile and work incorrectly. Currently, there
+is no good solution for the problem, but Configure now provides
+appropriate non-largefile ccflags, ldflags, libswanted, and libs
+in the %Config hash (e.g., $Config{ccflags_nolargefiles}) so the
+extensions that are having problems can try configuring themselves
+without the largefileness. This is admittedly not a clean solution,
+and the solution may not even work at all. One potential failure is
+whether one can (or, if one can, whether it's a good idea to) link
+together at all binaries with different ideas about file offsets;
+all this is platform-dependent.
+
+=head2 Modifying $_ Inside for(..)
+
+ for (1..5) { $_++ }
+
+works without complaint. It shouldn't. (You should be able to
+modify only lvalue elements inside the loops.) You can see the
+correct behaviour by replacing the 1..5 with 1, 2, 3, 4, 5.
+
+=head2 mod_perl 1.26 Doesn't Build With Threaded Perl
+
+Use mod_perl 1.27 or higher.
+
+=head2 lib/ftmp-security tests warn 'system possibly insecure'
+
+Don't panic. Read the 'make test' section of INSTALL instead.
+
+=head2 libwww-perl (LWP) fails base/date #51
+
+Use libwww-perl 5.65 or later.
+
+=head2 PDL failing some tests
+
+Use PDL 2.3.4 or later.
+
+=head2 Perl_get_sv
+
+You may get errors like 'Undefined symbol "Perl_get_sv"' or "can't
+resolve symbol 'Perl_get_sv'", or the symbol may be "Perl_sv_2pv".
+This probably means that you are trying to use an older shared Perl
+library (or extensions linked with such) with Perl 5.8.0 executable.
+Perl used to have such a subroutine, but that is no more the case.
+Check your shared library path, and any shared Perl libraries in those
+directories.
+
+Sometimes this problem may also indicate a partial Perl 5.8.0
+installation, see L</"Mac OS X dyld undefined symbols"> for an
+example and how to deal with it.
+
+=head2 Self-tying Problems
+
+Self-tying of arrays and hashes is broken in rather deep and
+hard-to-fix ways. As a stop-gap measure to avoid people from getting
+frustrated at the mysterious results (core dumps, most often), it is
+forbidden for now (you will get a fatal error even from an attempt).
+
+A change to self-tying of globs has caused them to be recursively
+referenced (see: L<perlobj/"Two-Phased Garbage Collection">). You
+will now need an explicit untie to destroy a self-tied glob. This
+behaviour may be fixed at a later date.
+
+Self-tying of scalars and IO thingies works.
+
+=head2 ext/threads/t/libc
+
+If this test fails, it indicates that your libc (C library) is not
+threadsafe. This particular test stress tests the localtime() call to
+find out whether it is threadsafe. See L<perlthrtut> for more information.
+
+=head2 Failure of Thread (5.005-style) tests
+
+B<Note that support for 5.005-style threading is deprecated,
+experimental and practically unsupported. In 5.10, it is expected
+to be removed. You should migrate your code to ithreads.>
+
+The following tests are known to fail due to fundamental problems in
+the 5.005 threading implementation. These are not new failures--Perl
+5.005_0x has the same bugs, but didn't have these tests.
+
+ ../ext/B/t/xref.t 255 65280 14 12 85.71% 3-14
+ ../ext/List/Util/t/first.t 255 65280 7 4 57.14% 2 5-7
+ ../lib/English.t 2 512 54 2 3.70% 2-3
+ ../lib/FileCache.t 5 1 20.00% 5
+ ../lib/Filter/Simple/t/data.t 6 3 50.00% 1-3
+ ../lib/Filter/Simple/t/filter_only. 9 3 33.33% 1-2 5
+ ../lib/Math/BigInt/t/bare_mbf.t 1627 4 0.25% 8 11 1626-1627
+ ../lib/Math/BigInt/t/bigfltpm.t 1629 4 0.25% 10 13 1628-
+ 1629
+ ../lib/Math/BigInt/t/sub_mbf.t 1633 4 0.24% 8 11 1632-1633
+ ../lib/Math/BigInt/t/with_sub.t 1628 4 0.25% 9 12 1627-1628
+ ../lib/Tie/File/t/31_autodefer.t 255 65280 65 32 49.23% 34-65
+ ../lib/autouse.t 10 1 10.00% 4
+ op/flip.t 15 1 6.67% 15
+
+These failures are unlikely to get fixed as 5.005-style threads
+are considered fundamentally broken. (Basically what happens is that
+competing threads can corrupt shared global state, one good example
+being regular expression engine's state.)
+
+=head2 Timing problems
+
+The following tests may fail intermittently because of timing
+problems, for example if the system is heavily loaded.
+
+ t/op/alarm.t
+ ext/Time/HiRes/HiRes.t
+ lib/Benchmark.t
+ lib/Memoize/t/expmod_t.t
+ lib/Memoize/t/speed.t
+
+In case of failure please try running them manually, for example
+
+ ./perl -Ilib ext/Time/HiRes/HiRes.t
+
+=head2 Tied/Magical Array/Hash Elements Do Not Autovivify
+
+For normal arrays C<$foo = \$bar[1]> will assign C<undef> to
+C<$bar[1]> (assuming that it didn't exist before), but for
+tied/magical arrays and hashes such autovivification does not happen
+because there is currently no way to catch the reference creation.
+The same problem affects slicing over non-existent indices/keys of
+a tied/magical array/hash.
+
+=head2 Unicode in package/class and subroutine names does not work
+
+One can have Unicode in identifier names, but not in package/class or
+subroutine names. While some limited functionality towards this does
+exist as of Perl 5.8.0, that is more accidental than designed; use of
+Unicode for the said purposes is unsupported.
+
+One reason of this unfinishedness is its (currently) inherent
+unportability: since both package names and subroutine names may
+need to be mapped to file and directory names, the Unicode capability
+of the filesystem becomes important-- and there unfortunately aren't
+portable answers.
+
+=head1 Platform Specific Problems
+
=head2 AIX
=over 4
@@ -3205,16 +3373,21 @@ detailed in here: http://sources.redhat.com/ml/cygwin/2001-12/msg00894.html
One can build but not install (or test the build of) the NDBM_File
on FAT filesystems. Installation (or build) on NTFS works fine.
+If one attempts the test on a FAT install (or build) the following
+failures are expected:
-=head2 DJGPP does not build
+ ../ext/NDBM_File/ndbm.t 13 3328 71 59 83.10% 1-2 4 16-71
+ ../ext/ODBM_File/odbm.t 255 65280 ?? ?? % ??
+ ../lib/AnyDBM_File.t 2 512 12 2 16.67% 1 4
+ ../lib/Memoize/t/errors.t 0 139 11 5 45.45% 7-11
+ ../lib/Memoize/t/tie_ndbm.t 13 3328 4 4 100.00% 1-4
+ run/fresh_perl.t 97 1 1.03% 91
-Unfortunately DJGPP build broke somewhere after 5.7.1.
+NDBM_File fails and ODBM_File just coredumps.
-=head2 ext/threads/t/libc
+=head2 DJGPP does not build
-If this test fails, it indicates that your libc (C library) is not
-threadsafe. This particular test stress tests the localtime() call to
-find out whether it is threadsafe. See L<perlthrtut> for more information.
+Unfortunately DJGPP build broke somewhere after 5.7.3.
=head2 FreeBSD built with ithreads coredumps reading large directories
@@ -3230,28 +3403,17 @@ case-insensitively. Apparently this problem has been fixed in
the latest FreeBSD releases.
( http://www.freebsd.org/cgi/query-pr.cgi?pr=34308 )
-=head2 IRIX fails ext/List/Util/t/shuffle.t
+=head2 IRIX fails ext/List/Util/t/shuffle.t or Digest::MD5
-IRIX with MIPSpro 7.3.1.3m compiler may fail the said List::Util test
-by dumping core. This seems to be a compiler error since if compiled
-with gcc no core dump ensues, and no failures on the said test on any
-other platform.
+IRIX with MIPSpro 7.3.1.2m or 7.3.1.3m compiler may fail the List::Util
+test ext/List/Util/t/shuffle.t by dumping core. This seems to be
+a compiler error since if compiled with gcc no core dump ensues, and
+no failures have been seen on the said test on any other platform.
-=head2 Modifying $_ Inside for(..)
+Similarly, building the Digest::MD5 extension has been
+known to fail with "*** Termination code 139 (bu21)".
- for (1..5) { $_++ }
-
-works without complaint. It shouldn't. (You should be able to
-modify only lvalue elements inside the loops.) You can see the
-correct behaviour by replacing the 1..5 with 1, 2, 3, 4, 5.
-
-=head2 mod_perl 1.26 Doesn't Build With Threaded Perl
-
-Use mod_perl 1.27 or higher.
-
-=head2 lib/ftmp-security tests warn 'system possibly insecure'
-
-Don't panic. Read the 'make test' section of INSTALL instead.
+The cure is to drop optimization level (Configure -Doptimize=-O2).
=head2 HP-UX lib/posix Subtest 9 Fails When LP64-Configured
@@ -3269,10 +3431,6 @@ This is a known bug in the glibc 2.2.5 with long long integers.
No known fix.
-=head2 libwww-perl (LWP) fails base/date #51
-
-Use libwww-perl 5.65 or later.
-
=head2 Mac OS X
Please remember to set your environment variable LC_ALL to "C"
@@ -3300,6 +3458,28 @@ this is not Perl's fault-- the libc of Mac OS X is not threadsafe
(in this particular test, the localtime() call is found to be
threadunsafe.)
+=head2 Mac OS X dyld undefined symbols
+
+If after installing Perl 5.8.0 you are getting warnings about missing
+symbols, for example
+
+ dyld: perl Undefined symbols
+ _perl_sv_2pv
+ _perl_get_sv
+
+you probably have an old pre-Perl-5.8.0 installation (or parts of one)
+in /Library/Perl (the undefined symbols used to exist in pre-5.8.0 Perls).
+It seems that for some reason "make install" doesn't always completely
+overwrite the files in /Library/Perl. You can remove the Perl
+shared library like this:
+
+ rm /Library/Perl/darwin/CORE/libperl.dylib
+
+and then reissue "make install". Note that the above of course is
+extremely disruptive for anything using the /usr/local/bin/perl.
+If that doesn't help, you may have to try removing all the .bundle
+files from beneath /Library/Perl, and again "make install"-ing.
+
=head2 OS/2 Test Failures
The following tests are known to fail on OS/2 (for clarity
@@ -3368,81 +3548,10 @@ is serious but as of yet unsolved. It points at some problems with the
signedness handling of the C compiler, as do the 64bitint, arith, and pow
failures. Most of the rest point at problems with SysV IPC.
-=head2 PDL failing some tests
-
-Use PDL 2.3.4 or later.
-
-=head2 Perl_get_sv
-
-You may get errors like 'Undefined symbol "Perl_get_sv"' or
-"can't resolve symbol 'Perl_get_sv'". This probably means that
-you are trying to use an older shared Perl library with Perl 5.8.0
-executable. Perl used to have such a subroutine, but that is no more
-the case. Check your shared library path, and any shared Perl
-libraries in those directories.
-
=head2 Term::ReadKey not working on Win32
Use Term::ReadKey 2.20 or later.
-=head2 Failure of Thread (5.005-style) tests
-
-B<Note that support for 5.005-style threading is deprecated,
-experimental and practically unsupported. In 5.10, it is expected
-to be removed. You should migrate your code to ithreads.>
-
-The following tests are known to fail due to fundamental problems in
-the 5.005 threading implementation. These are not new failures--Perl
-5.005_0x has the same bugs, but didn't have these tests.
-
- ../ext/B/t/xref.t 255 65280 14 12 85.71% 3-14
- ../ext/List/Util/t/first.t 255 65280 7 4 57.14% 2 5-7
- ../lib/English.t 2 512 54 2 3.70% 2-3
- ../lib/FileCache.t 5 1 20.00% 5
- ../lib/Filter/Simple/t/data.t 6 3 50.00% 1-3
- ../lib/Filter/Simple/t/filter_only. 9 3 33.33% 1-2 5
- ../lib/Math/BigInt/t/bare_mbf.t 1627 4 0.25% 8 11 1626-1627
- ../lib/Math/BigInt/t/bigfltpm.t 1629 4 0.25% 10 13 1628-
- 1629
- ../lib/Math/BigInt/t/sub_mbf.t 1633 4 0.24% 8 11 1632-1633
- ../lib/Math/BigInt/t/with_sub.t 1628 4 0.25% 9 12 1627-1628
- ../lib/Tie/File/t/31_autodefer.t 255 65280 65 32 49.23% 34-65
- ../lib/autouse.t 10 1 10.00% 4
- op/flip.t 15 1 6.67% 15
-
-These failures are unlikely to get fixed as 5.005-style threads
-are considered fundamentally broken. (Basically what happens is that
-competing threads can corrupt shared global state, one good example
-being regular expression engine's state.)
-
-=head2 Timing problems
-
-The following tests may fail intermittently because of timing
-problems, for example if the system is heavily loaded.
-
- t/op/alarm.t
- ext/Time/HiRes/HiRes.t
- lib/Benchmark.t
- lib/Memoize/t/expmod_t.t
- lib/Memoize/t/speed.t
-
-In case of failure please try running them manually, for example
-
- ./perl -Ilib ext/Time/HiRes/HiRes.t
-
-=head2 Unicode in package/class and subroutine names does not work
-
-One can have Unicode in identifier names, but not in package/class or
-subroutine names. While some limited functionality towards this does
-exist as of Perl 5.8.0, that is more accidental than designed; use of
-Unicode for the said purposes is unsupported.
-
-One reason of this unfinishedness is its (currently) inherent
-unportability: since both package names and subroutine names may
-need to be mapped to file and directory names, the Unicode capability
-of the filesystem becomes important-- and there unfortunately aren't
-portable answers.
-
=head2 UNICOS/mk
=over 4
@@ -3537,55 +3646,6 @@ that with Unicode). The Constant and Embed are probably problems in
the tests (since they test Perl's ability to build extensions, and
that seems to be working reasonably well.)
-=head2 Localising Tied Arrays and Hashes Is Broken
-
- local %tied_array;
-
-doesn't work as one would expect: the old value is restored
-incorrectly. This will be changed in a future release, but we don't
-know yet what the new semantics will exactly be. In any case, the
-change will break existing code that relies on the current
-(ill-defined) semantics, so just avoid doing this in general.
-
-=head2 Self-tying Problems
-
-Self-tying of arrays and hashes is broken in rather deep and
-hard-to-fix ways. As a stop-gap measure to avoid people from getting
-frustrated at the mysterious results (core dumps, most often), it is
-forbidden for now (you will get a fatal error even from an attempt).
-
-A change to self-tying of globs has caused them to be recursively
-referenced (see: L<perlobj/"Two-Phased Garbage Collection">). You
-will now need an explicit untie to destroy a self-tied glob. This
-behaviour may be fixed at a later date.
-
-Self-tying of scalars and IO thingies works.
-
-=head2 Tied/Magical Array/Hash Elements Do Not Autovivify
-
-For normal arrays C<$foo = \$bar[1]> will assign C<undef> to
-C<$bar[1]> (assuming that it didn't exist before), but for
-tied/magical arrays and hashes such autovivification does not happen
-because there is currently no way to catch the reference creation.
-The same problem affects slicing over non-existent indices/keys of
-a tied/magical array/hash.
-
-=head2 Building Extensions Can Fail Because Of Largefiles
-
-Some extensions like mod_perl are known to have issues with
-`largefiles', a change brought by Perl 5.6.0 in which file offsets
-default to 64 bits wide, where supported. Modules may fail to compile
-at all, or they may compile and work incorrectly. Currently, there
-is no good solution for the problem, but Configure now provides
-appropriate non-largefile ccflags, ldflags, libswanted, and libs
-in the %Config hash (e.g., $Config{ccflags_nolargefiles}) so the
-extensions that are having problems can try configuring themselves
-without the largefileness. This is admittedly not a clean solution,
-and the solution may not even work at all. One potential failure is
-whether one can (or, if one can, whether it's a good idea to) link
-together at all binaries with different ideas about file offsets;
-all this is platform-dependent.
-
=head2 Unicode Support on EBCDIC Still Spotty
Though mostly working, Unicode support still has problem spots on
@@ -3593,11 +3653,6 @@ EBCDIC platforms. One such known spot are the C<\p{}> and C<\P{}>
regular expression constructs for code points less than 256: the
C<pP> are testing for Unicode code points, not knowing about EBCDIC.
-=head2 The Compiler Suite Is Still Very Experimental
-
-The compiler suite is slowly getting better but it continues to be
-highly experimental. Use in production environments is discouraged.
-
=head2 Seen In Perl 5.7 But Gone Now
C<Time::Piece> (previously known as C<Time::Object>) was removed
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index c42257516b..d8d8978aa4 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -4886,66 +4886,146 @@ permits these unnecessary but widely-supported conversions:
%O a synonym for %lo
%F a synonym for %f
-Note that the number of exponent digits in the scientific notation by
-C<%e>, C<%E>, C<%g> and C<%G> for numbers with the modulus of the
+Note that the number of exponent digits in the scientific notation produced
+by C<%e>, C<%E>, C<%g> and C<%G> for numbers with the modulus of the
exponent less than 100 is system-dependent: it may be three or less
(zero-padded as necessary). In other words, 1.23 times ten to the
99th may be either "1.23e99" or "1.23e099".
-Perl permits the following universally-known flags between the C<%>
-and the conversion letter:
+Between the C<%> and the format letter, you may specify a number of
+additional attributes controlling the interpretation of the format.
+In order, these are:
+=over 4
+
+=item format parameter index
+
+An explicit format parameter index, such as C<2$>. By default sprintf
+will format the next unused argument in the list, but this allows you
+to take the arguments out of order. Eg:
+
+ printf '%2$d %1$d', 12, 34; # prints "34 12"
+ printf '%3$d %d %1$d', 1, 2, 3; # prints "3 1 1"
+
+=item flags
+
+one or more of:
space prefix positive number with a space
+ prefix positive number with a plus sign
- left-justify within the field
0 use zeros, not spaces, to right-justify
- # prefix non-zero octal with "0", non-zero hex with "0x"
- number minimum field width
- .number "precision": digits after decimal point for
- floating-point, max length for string, minimum length
- for integer
- l interpret integer as C type "long" or "unsigned long"
- h interpret integer as C type "short" or "unsigned short"
- If no flags, interpret integer as C type "int" or "unsigned"
-
-Perl supports parameter ordering, in other words, fetching the
-parameters in some explicitly specified "random" ordering as opposed
-to the default implicit sequential ordering. The syntax is, instead
-of the C<%> and C<*>, to use C<%>I<digits>C<$> and C<*>I<digits>C<$>,
-where the I<digits> is the wanted index, from one upwards. For example:
-
- printf "%2\$d %1\$d\n", 12, 34; # will print "34 12\n"
- printf "%*2\$d\n", 12, 3; # will print " 12\n"
-
-Note that using the reordering syntax does not interfere with the usual
-implicit sequential fetching of the parameters:
-
- printf "%2\$d %d\n", 12, 34; # will print "34 12\n"
- printf "%2\$d %d %d\n", 12, 34; # will print "34 12 34\n"
- printf "%3\$d %d %d\n", 12, 34, 56; # will print "56 12 34\n"
- printf "%2\$*3\$d %d\n", 12, 34, 3; # will print " 34 12\n"
- printf "%*3\$2\$d %d\n", 12, 34, 3; # will print " 34 12\n"
-
-There are also two Perl-specific flags:
-
- V interpret integer as Perl's standard integer type
- v interpret string as a vector of integers, output as
- numbers separated either by dots, or by an arbitrary
- string received from the argument list when the flag
- is preceded by "*"
-
-Where a number would appear in the flags, an asterisk (C<*>) may be
-used instead, in which case Perl uses the next item in the parameter
-list as the given number (that is, as the field width or precision).
+ # prefix non-zero octal with "0", non-zero hex with "0x",
+ non-zero binary with "0b"
+
+For example:
+
+ printf '<% d>', 12; # prints "< 12>"
+ printf '<%+d>', 12; # prints "<+12>"
+ printf '<%6s>', 12; # prints "< 12>"
+ printf '<%-6s>', 12; # prints "<12 >"
+ printf '<%06s>', 12; # prints "<000012>"
+ printf '<%#x>', 12; # prints "<0xc>"
+
+=item vector flag
+
+The vector flag C<v>, optionally specifying the join string to use.
+This flag tells perl to interpret the supplied string as a vector
+of integers, one for each character in the string, separated by
+a given string (a dot C<.> by default). This can be useful for
+displaying ordinal values of characters in arbitrary strings:
+
+ printf "version is v%vd\n", $^V; # Perl's version
+
+Put an asterisk C<*> before the C<v> to override the string to
+use to separate the numbers:
+
+ printf "address is %*vX\n", ":", $addr; # IPv6 address
+ printf "bits are %0*v8b\n", " ", $bits; # random bitstring
+
+You can also explicitly specify the argument number to use for
+the join string using eg C<*2$v>:
+
+ printf '%*4$vX %*4$vX %*4$vX', @addr[1..3], ":"; # 3 IPv6 addresses
+
+=item (minimum) width
+
+Arguments are usually formatted to be only as wide as required to
+display the given value. You can override the width by putting
+a number here, or get the width from the next argument (with C<*>)
+or from a specified argument (with eg C<2$>):
+
+ printf '<%s>', "a"; # prints "<a>"
+ printf '<%6s>', "a"; # prints "< a>"
+ printf '<%*s>', 6, "a"; # prints "< a>"
+ printf '<%*2$s>', "a", 6; # prints "< a>"
+ printf '<%2s>', "long"; # prints "<long>" (does not truncate)
+
If a field width obtained through C<*> is negative, it has the same
effect as the C<-> flag: left-justification.
-The C<v> flag is useful for displaying ordinal values of characters
-in arbitrary strings:
+=item precision, or maximum width
+
+You can specify a precision (for numeric converions) or a maximum
+width (for string conversions) by specifying a C<.> followed by a number.
+For floating point formats, this specifies the number of decimal places
+to show (the default being 6), eg:
+
+ # these examples are subject to system-specific variation
+ printf '<%f>', 1; # prints "<1.000000>"
+ printf '<%.1f>', 1; # prints "<1.0>"
+ printf '<%.0f>', 1; # prints "<1>"
+ printf '<%e>', 10; # prints "<1.000000e+01>"
+ printf '<%.1e>', 10; # prints "<1.0e+01>"
+
+For integer conversions, specifying a precision implies that the
+output of the number itself should be zero-padded to this width:
+
+ printf '<%.6x>', 1; # prints "<000001>"
+ printf '<%#.6x>', 1; # prints "<0x000001>"
+ printf '<%-10.6x>', 1; # prints "<000001 >"
+
+For string conversions, specifying a precision truncates the string
+to fit in the specified width:
+
+ printf '<%.5s>', "truncated"; # prints "<trunc>"
+ printf '<%10.5s>', "truncated"; # prints "< trunc>"
+
+You can also get the precision from the next argument using C<.*>:
- printf "version is v%vd\n", $^V; # Perl's version
- printf "address is %*vX\n", ":", $addr; # IPv6 address
- printf "bits are %*vb\n", " ", $bits; # random bitstring
+ printf '<%.6x>', 1; # prints "<000001>"
+ printf '<%.*x>', 6, 1; # prints "<000001>"
+
+You cannot currently get the precision from a specified number,
+but it is intended that this will be possible in the future using
+eg C<.*2$>:
+
+ printf '<%.*2$x>', 1, 6; # INVALID, but in future will print "<000001>"
+
+=item size
+
+For numeric conversions, you can specify the size to interpret the
+number as using C<l>, C<h>, C<V>, C<q>, C<L> or C<ll>. For integer
+conversions, numbers are usually assumed to be whatever the default
+integer size is on your platform (usually 32 or 64 bits), but you
+can override this to use instead one of the standard C types, as
+supported by the compiler used to build Perl:
+
+ l interpret integer as C type "long" or "unsigned long"
+ h interpret integer as C type "short" or "unsigned short"
+ q, L or ll interpret integer as C type "long long" or "unsigned long long"
+ (if your platform supports such a type, else it is an error)
+
+For floating point conversions, numbers are usually assumed to be
+the default floating point size on your platform (double or long double),
+but you can force 'long double' with C<q>, C<L> or C<ll> if your
+platform supports them.
+
+The size specifier 'V' has no effect for Perl code, but it supported
+for compatibility with XS code; it means 'use the standard size for
+a Perl integer (or floating-point number)', which is already the
+default for Perl code.
+
+=back
If C<use locale> is in effect, the character used for the decimal
point in formatted real numbers is affected by the LC_NUMERIC locale.
diff --git a/pod/perltoc.pod b/pod/perltoc.pod
index 85332e0b39..96f4f7926f 100644
--- a/pod/perltoc.pod
+++ b/pod/perltoc.pod
@@ -5283,7 +5283,7 @@ I<The Road goes ever on and on, down from the door where it began.>
=item AIX Dynaloading
-=item Attributes for C<my> variables now handled at run-time.
+=item Attributes for C<my> variables now handled at run-time
=item Socket Extension Dynamic in VMS
@@ -5295,6 +5295,8 @@ I<The Road goes ever on and on, down from the door where it began.>
=item pack/unpack D/F recycled
+=item glob() now returns filenames in alphabetical order
+
=item Deprecations
=back
@@ -5303,14 +5305,16 @@ I<The Road goes ever on and on, down from the door where it began.>
=over 4
+=item Unicode Overhaul
+
=item PerlIO is Now The Default
+=item ithreads
+
=item Restricted Hashes
=item Safe Signals
-=item Unicode Overhaul
-
=item Understanding of Numbers
=item Arrays now always interpolate into double-quoted strings [561]
@@ -5365,6 +5369,42 @@ I<The Road goes ever on and on, down from the door where it began.>
=over 4
+=item The Compiler Suite Is Still Very Experimental
+
+=item Localising Tied Arrays and Hashes Is Broken
+
+=item Building Extensions Can Fail Because Of Largefiles
+
+=item Modifying $_ Inside for(..)
+
+=item mod_perl 1.26 Doesn't Build With Threaded Perl
+
+=item lib/ftmp-security tests warn 'system possibly insecure'
+
+=item libwww-perl (LWP) fails base/date #51
+
+=item PDL failing some tests
+
+=item Perl_get_sv
+
+=item Self-tying Problems
+
+=item ext/threads/t/libc
+
+=item Failure of Thread (5.005-style) tests
+
+=item Timing problems
+
+=item Tied/Magical Array/Hash Elements Do Not Autovivify
+
+=item Unicode in package/class and subroutine names does not work
+
+=back
+
+=item Platform Specific Problems
+
+=over 4
+
=item AIX
=item Alpha systems with old gccs fail several tests
@@ -5377,19 +5417,13 @@ I<The Road goes ever on and on, down from the door where it began.>
=item Cygwin ndbm tests fail on FAT
-=item ext/threads/t/libc
+=item DJGPP does not build
=item FreeBSD built with ithreads coredumps reading large directories
=item FreeBSD Failing locale Test 117 For ISO 8859-15 Locales
-=item IRIX fails ext/List/Util/t/shuffle.t
-
-=item Modifying $_ Inside for(..)
-
-=item mod_perl 1.26 Doesn't Build With Threaded Perl
-
-=item lib/ftmp-security tests warn 'system possibly insecure'
+=item IRIX fails ext/List/Util/t/shuffle.t or Digest::MD5
=item HP-UX lib/posix Subtest 9 Fails When LP64-Configured
@@ -5397,10 +5431,10 @@ I<The Road goes ever on and on, down from the door where it began.>
=item Linux With Sfio Fails op/misc Test 48
-=item libwww-perl (LWP) fails base/date #51
-
=item Mac OS X
+=item Mac OS X dyld undefined symbols
+
=item OS/2 Test Failures
=item op/sprintf tests 91, 129, and 130
@@ -5411,16 +5445,8 @@ I<The Road goes ever on and on, down from the door where it began.>
=item SUPER-UX (NEC SX)
-=item PDL failing some tests
-
=item Term::ReadKey not working on Win32
-=item Failure of Thread (5.005-style) tests
-
-=item Timing problems
-
-=item Unicode in package/class and subroutine names does not work
-
=item UNICOS/mk
=item UTS
@@ -5435,20 +5461,8 @@ I<The Road goes ever on and on, down from the door where it began.>
=item z/OS (OS/390)
-=item Localising Tied Arrays and Hashes Is Broken
-
-=item Self-tying Problems
-
-=item Tied/Magical Array/Hash Elements Do Not Autovivify
-
-=item Building Extensions Can Fail Because Of Largefiles
-
=item Unicode Support on EBCDIC Still Spotty
-=item The Compiler Suite Is Still Very Experimental
-
-=item The Long Double Support Is Still Experimental
-
=item Seen In Perl 5.7 But Gone Now
=back
@@ -14941,7 +14955,7 @@ C<all_country_codes( [ CODESET ] )>, C<all_country_names( [ CODESET ] )>
Locale::Language, Locale::Script, Locale::Currency, Locale::SubCountry, ISO
3166-1, http://www.iso.org/iso/en/prods-services/iso3166ma/index.html,
http://www.egt.ie/standards/iso3166/iso3166-1-en.html,
-http://www.cia.gov/cia/publications/factbook/docs/app-f.html
+http://www.cia.gov/cia/publications/factbook/docs/app-d-1.html
=item AUTHOR
@@ -17142,7 +17156,7 @@ escape EE<lt>%sE<gt>, %s:%d: Unknown formatting code %s, %s:%d: Unmatched
=back
-=head2 Pod::ParseLink -- Parse an LE<lt>E<gt> formatting code in POD text
+=head2 Pod::ParseLink - Parse an LE<lt>E<gt> formatting code in POD text
=over 4
@@ -17150,6 +17164,8 @@ escape EE<lt>%sE<gt>, %s:%d: Unknown formatting code %s, %s:%d: Unmatched
=item DESCRIPTION
+=item SEE ALSO
+
=item AUTHOR
=item COPYRIGHT AND LICENSE
@@ -17692,8 +17708,8 @@ text
=back
-=head2 Pod::Text::Termcap, Pod::Text::Color - Convert POD data to ASCII
-text with format escapes
+=head2 Pod::Text::Termcap - Convert POD data to ASCII text with format
+escapes
=over 4
@@ -18165,7 +18181,7 @@ ANSI_COLORS_DISABLED
=item AUTHORS
-=item LICENSE
+=item COPYRIGHT AND LICENSE
=back
diff --git a/pod/perlxstut.pod b/pod/perlxstut.pod
index 420e989096..c2d51c7a71 100644
--- a/pod/perlxstut.pod
+++ b/pod/perlxstut.pod
@@ -520,7 +520,7 @@ And finally create a file Makefile.PL that looks like this:
WriteMakefile(
NAME => 'Mytest2::mylib',
SKIP => [qw(all static static_lib dynamic dynamic_lib)],
- clean => {'FILES' => 'libmylib$(LIBEEXT)'},
+ clean => {'FILES' => 'libmylib$(LIB_EXT)'},
);
diff --git a/pod/pod2man.PL b/pod/pod2man.PL
index 1c27bfe64d..b0c1341176 100644
--- a/pod/pod2man.PL
+++ b/pod/pod2man.PL
@@ -36,7 +36,7 @@ $Config{startperl}
print OUT <<'!NO!SUBS!';
# pod2man -- Convert POD data to formatted *roff input.
-# $Id: pod2man.PL,v 1.9 2001/11/26 08:44:58 eagle Exp $
+# $Id: pod2man.PL,v 1.10 2002/07/15 05:45:56 eagle Exp $
#
# Copyright 1999, 2000, 2001 by Russ Allbery <rra@stanford.edu>
#
@@ -448,9 +448,8 @@ Other man pages to check out, like man(1), man(7), makewhatis(8), or
catman(8). Normally a simple list of man pages separated by commas, or a
paragraph giving the name of a reference work. Man page references, if they
use the standard C<name(section)> form, don't have to be enclosed in
-LE<lt>E<gt>, but other things in this section probably should be when
-appropriate. You may need to use the C<LE<lt>...|...E<gt>> syntax to keep
-B<pod2man> and B<pod2text> from being too verbose; see perlpod(1).
+LE<lt>E<gt> (although it's recommended), but other things in this section
+probably should be when appropriate.
If the package has a mailing list, include a URL or subscription
instructions here.
@@ -526,6 +525,10 @@ L<troff(1)>, L<man(7)>
The man page documenting the an macro set may be L<man(5)> instead of
L<man(7)> on your system.
+The current version of this script is always available from its web site at
+L<http://www.eyrie.org/~eagle/software/podlators/>. It is also part of the
+Perl core distribution as of 5.6.0.
+
=head1 AUTHOR
Russ Allbery <rra@stanford.edu>, based I<very> heavily on the original
diff --git a/pod/pod2text.PL b/pod/pod2text.PL
index e038021c70..53270dd3ab 100644
--- a/pod/pod2text.PL
+++ b/pod/pod2text.PL
@@ -247,8 +247,12 @@ current terminal device.
=head1 SEE ALSO
-L<Pod::Text|Pod::Text>, L<Pod::Text::Color|Pod::Text::Color>,
-L<Pod::Text::Termcap|Pod::Text::Termcap>, L<Pod::Parser|Pod::Parser>
+L<Pod::Text>, L<Pod::Text::Color>, L<Pod::Text::Overstrike>,
+L<Pod::Text::Termcap>, L<Pod::Parser>
+
+The current version of this script is always available from its web site at
+L<http://www.eyrie.org/~eagle/software/podlators/>. It is also part of the
+Perl core distribution as of 5.6.0.
=head1 AUTHOR
diff --git a/pp_sys.c b/pp_sys.c
index 2639fe9019..06fe495155 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2178,7 +2178,9 @@ PP(pp_ioctl)
DIE(aTHX_ "ioctl is not implemented");
#endif
else
-#ifdef HAS_FCNTL
+#ifndef HAS_FCNTL
+ DIE(aTHX_ "fcntl is not implemented");
+#else
#if defined(OS2) && defined(__EMX__)
retval = fcntl(PerlIO_fileno(IoIFP(io)), func, (int)s);
#else
@@ -2201,11 +2203,8 @@ PP(pp_ioctl)
else {
PUSHp(zero_but_true, ZBTLEN);
}
- RETURN;
-
-#else
- DIE(aTHX_ "fcntl is not implemented");
#endif
+ RETURN;
}
PP(pp_flock)
@@ -4154,10 +4153,19 @@ PP(pp_system)
result = 0;
if (PL_op->op_flags & OPf_STACKED) {
SV *really = *++MARK;
+# ifdef WIN32
+ value = (I32)do_aspawn(really, MARK, SP);
+# else
value = (I32)do_aspawn(really, (void **)MARK, (void **)SP);
+# endif
}
- else if (SP - MARK != 1)
+ else if (SP - MARK != 1) {
+# ifdef WIN32
+ value = (I32)do_aspawn(Nullsv, MARK, SP);
+# else
value = (I32)do_aspawn(Nullsv, (void **)MARK, (void **)SP);
+# endif
+ }
else {
value = (I32)do_spawn(SvPVx(sv_mortalcopy(*SP), n_a));
}
diff --git a/proto.h b/proto.h
index e201596cf1..666caa1de2 100644
--- a/proto.h
+++ b/proto.h
@@ -217,6 +217,11 @@ PERL_CALLCONV void Perl_do_chop(pTHX_ SV* asv, SV* sv);
PERL_CALLCONV bool Perl_do_close(pTHX_ GV* gv, bool not_implicit);
PERL_CALLCONV bool Perl_do_eof(pTHX_ GV* gv);
PERL_CALLCONV bool Perl_do_exec(pTHX_ char* cmd);
+#if defined(WIN32)
+PERL_CALLCONV int Perl_do_aspawn(pTHX_ SV* really, SV** mark, SV** sp);
+PERL_CALLCONV int Perl_do_spawn(pTHX_ char* cmd);
+PERL_CALLCONV int Perl_do_spawn_nowait(pTHX_ char* cmd);
+#endif
#if !defined(WIN32)
PERL_CALLCONV bool Perl_do_exec3(pTHX_ char* cmd, int fd, int flag);
#endif
diff --git a/sv.c b/sv.c
index dd44025ddb..b62955883f 100644
--- a/sv.c
+++ b/sv.c
@@ -7734,7 +7734,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
/* large enough for "%#.#f" --chip */
/* what about long double NVs? --jhi */
- SV *vecsv;
+ SV *vecsv = Nullsv;
U8 *vecstr = Null(U8*);
STRLEN veclen = 0;
char c = 0;
@@ -7774,7 +7774,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
We allow format specification elements in this order:
\d+\$ explicit format parameter index
[-+ 0#]+ flags
- \*?(\d+\$)?v vector with optional (optionally specified) arg
+ v|*(\d+\$)?v vector with optional (optionally specified) arg
\d+|\*(\d+\$)? width using optional (optionally specified) arg
\.(\d*|\*(\d+\$)?) precision using optional (optionally specified) arg
[hlqLV] size
@@ -7886,7 +7886,10 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
q++;
if (*q == '*') {
q++;
- if (EXPECT_NUMBER(q, epix) && *q++ != '$') /* epix currently unused */
+ if (EXPECT_NUMBER(q, epix) && *q++ != '$')
+ goto unknown;
+ /* XXX: todo, support specified precision parameter */
+ if (epix)
goto unknown;
if (args)
i = va_arg(*args, int);
@@ -10154,6 +10157,11 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
Copy(proto_perl->Inexttype, PL_nexttype, 5, I32);
PL_nexttoke = proto_perl->Inexttoke;
+ /* XXX This is probably masking the deeper issue of why
+ * SvANY(proto_perl->Ilinestr) can be NULL at this point. For test case:
+ * http://archive.develooper.com/perl5-porters%40perl.org/msg83298.html
+ * (A little debugging with a watchpoint on it may help.)
+ */
if (SvANY(proto_perl->Ilinestr)) {
PL_linestr = sv_dup_inc(proto_perl->Ilinestr, param);
i = proto_perl->Ibufptr - SvPVX(proto_perl->Ilinestr);
@@ -10192,6 +10200,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_padix_floor = proto_perl->Ipadix_floor;
PL_pad_reset_pending = proto_perl->Ipad_reset_pending;
+ /* XXX See comment on SvANY(proto_perl->Ilinestr) above */
if (SvANY(proto_perl->Ilinestr)) {
i = proto_perl->Ilast_uni - SvPVX(proto_perl->Ilinestr);
PL_last_uni = SvPVX(PL_linestr) + (i < 0 ? 0 : i);
diff --git a/t/op/taint.t b/t/op/taint.t
index 624d0305e8..ac1cace999 100755
--- a/t/op/taint.t
+++ b/t/op/taint.t
@@ -970,4 +970,6 @@ else
test 204, $@ eq '';
eval { exec("lskdfj does not exist","with","args"); };
test 205, $@ eq '';
+
+ # If you add tests here update also the above skip block for VMS.
}
diff --git a/util.c b/util.c
index 623c44cf81..7355b96907 100644
--- a/util.c
+++ b/util.c
@@ -1962,6 +1962,7 @@ Perl_my_popen_list(pTHX_ char *mode, int n, SV **args)
while ((pid = PerlProc_fork()) < 0) {
if (errno != EAGAIN) {
PerlLIO_close(p[This]);
+ PerlLIO_close(p[that]);
if (did_pipes) {
PerlLIO_close(pp[0]);
PerlLIO_close(pp[1]);
@@ -1976,8 +1977,6 @@ Perl_my_popen_list(pTHX_ char *mode, int n, SV **args)
#undef THAT
#define THIS that
#define THAT This
- /* Close parent's end of _the_ pipe */
- PerlLIO_close(p[THAT]);
/* Close parent's end of error status pipe (if any) */
if (did_pipes) {
PerlLIO_close(pp[0]);
@@ -1990,7 +1989,11 @@ Perl_my_popen_list(pTHX_ char *mode, int n, SV **args)
if (p[THIS] != (*mode == 'r')) {
PerlLIO_dup2(p[THIS], *mode == 'r');
PerlLIO_close(p[THIS]);
+ if (p[THAT] != (*mode == 'r')) /* if dup2() didn't close it */
+ PerlLIO_close(p[THAT]); /* close parent's end of _the_ pipe */
}
+ else
+ PerlLIO_close(p[THAT]); /* close parent's end of _the_ pipe */
#if !defined(HAS_FCNTL) || !defined(F_SETFD)
/* No automatic close - do it by hand */
# ifndef NOFILE
@@ -2012,8 +2015,6 @@ Perl_my_popen_list(pTHX_ char *mode, int n, SV **args)
}
/* Parent */
do_execfree(); /* free any memory malloced by child on fork */
- /* Close child's end of pipe */
- PerlLIO_close(p[that]);
if (did_pipes)
PerlLIO_close(pp[1]);
/* Keep the lower of the two fd numbers */
@@ -2022,6 +2023,9 @@ Perl_my_popen_list(pTHX_ char *mode, int n, SV **args)
PerlLIO_close(p[This]);
p[This] = p[that];
}
+ else
+ PerlLIO_close(p[that]); /* close child's end of pipe */
+
LOCK_FDPID_MUTEX;
sv = *av_fetch(PL_fdpid,p[This],TRUE);
UNLOCK_FDPID_MUTEX;
@@ -2345,6 +2349,12 @@ Perl_rsignal(pTHX_ int signo, Sighandler_t handler)
{
struct sigaction act, oact;
+#ifdef USE_ITHREADS
+ /* only "parent" interpreter can diddle signals */
+ if (PL_curinterp != aTHX)
+ return SIG_ERR;
+#endif
+
act.sa_handler = handler;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
@@ -2379,6 +2389,12 @@ Perl_rsignal_save(pTHX_ int signo, Sighandler_t handler, Sigsave_t *save)
{
struct sigaction act;
+#ifdef USE_ITHREADS
+ /* only "parent" interpreter can diddle signals */
+ if (PL_curinterp != aTHX)
+ return -1;
+#endif
+
act.sa_handler = handler;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
@@ -2397,6 +2413,12 @@ Perl_rsignal_save(pTHX_ int signo, Sighandler_t handler, Sigsave_t *save)
int
Perl_rsignal_restore(pTHX_ int signo, Sigsave_t *save)
{
+#ifdef USE_ITHREADS
+ /* only "parent" interpreter can diddle signals */
+ if (PL_curinterp != aTHX)
+ return -1;
+#endif
+
return sigaction(signo, save, (struct sigaction *)NULL);
}
@@ -2405,6 +2427,12 @@ Perl_rsignal_restore(pTHX_ int signo, Sigsave_t *save)
Sighandler_t
Perl_rsignal(pTHX_ int signo, Sighandler_t handler)
{
+#ifdef USE_ITHREADS
+ /* only "parent" interpreter can diddle signals */
+ if (PL_curinterp != aTHX)
+ return SIG_ERR;
+#endif
+
return PerlProc_signal(signo, handler);
}
@@ -2423,6 +2451,12 @@ Perl_rsignal_state(pTHX_ int signo)
{
Sighandler_t oldsig;
+#ifdef USE_ITHREADS
+ /* only "parent" interpreter can diddle signals */
+ if (PL_curinterp != aTHX)
+ return SIG_ERR;
+#endif
+
sig_trapped = 0;
oldsig = PerlProc_signal(signo, sig_trap);
PerlProc_signal(signo, oldsig);
@@ -2434,6 +2468,11 @@ Perl_rsignal_state(pTHX_ int signo)
int
Perl_rsignal_save(pTHX_ int signo, Sighandler_t handler, Sigsave_t *save)
{
+#ifdef USE_ITHREADS
+ /* only "parent" interpreter can diddle signals */
+ if (PL_curinterp != aTHX)
+ return -1;
+#endif
*save = PerlProc_signal(signo, handler);
return (*save == SIG_ERR) ? -1 : 0;
}
@@ -2441,6 +2480,11 @@ Perl_rsignal_save(pTHX_ int signo, Sighandler_t handler, Sigsave_t *save)
int
Perl_rsignal_restore(pTHX_ int signo, Sigsave_t *save)
{
+#ifdef USE_ITHREADS
+ /* only "parent" interpreter can diddle signals */
+ if (PL_curinterp != aTHX)
+ return -1;
+#endif
return (PerlProc_signal(signo, *save) == SIG_ERR) ? -1 : 0;
}
diff --git a/win32/perlhost.h b/win32/perlhost.h
index c91d9a8b90..7926142954 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -22,7 +22,6 @@ extern char * g_win32_get_privlib(const char *pl);
extern char * g_win32_get_sitelib(const char *pl);
extern char * g_win32_get_vendorlib(const char *pl);
extern char * g_getlogin(void);
-extern int do_spawn2(char *cmd, int exectype);
END_EXTERN_C
class CPerlHost
@@ -1871,19 +1870,6 @@ PerlProcGetOSError(struct IPerlProc* piPerl, SV* sv, DWORD dwErr)
win32_str_os_error(sv, dwErr);
}
-BOOL
-PerlProcDoCmd(struct IPerlProc* piPerl, char *cmd)
-{
- do_spawn2(cmd, EXECF_EXEC);
- return FALSE;
-}
-
-int
-PerlProcSpawn(struct IPerlProc* piPerl, char* cmds)
-{
- return do_spawn2(cmds, EXECF_SPAWN);
-}
-
int
PerlProcSpawnvp(struct IPerlProc* piPerl, int mode, const char *cmdname, const char *const *argv)
{
@@ -1891,12 +1877,6 @@ PerlProcSpawnvp(struct IPerlProc* piPerl, int mode, const char *cmdname, const c
}
int
-PerlProcASpawn(struct IPerlProc* piPerl, void *vreally, void **vmark, void **vsp)
-{
- return do_aspawn(vreally, vmark, vsp);
-}
-
-int
PerlProcLastHost(struct IPerlProc* piPerl)
{
dTHX;
@@ -1935,10 +1915,7 @@ struct IPerlProc perlProc =
PerlProcGetpid,
PerlProcDynaLoader,
PerlProcGetOSError,
- PerlProcDoCmd,
- PerlProcSpawn,
PerlProcSpawnvp,
- PerlProcASpawn,
PerlProcLastHost,
PerlProcPopenList,
PerlProcGetTimeOfDay
diff --git a/win32/win32.c b/win32/win32.c
index ba2af59fd8..41788273b7 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -85,15 +85,13 @@ int _fcloseall();
# define win32_get_sitelib g_win32_get_sitelib
# undef win32_get_vendorlib
# define win32_get_vendorlib g_win32_get_vendorlib
-# undef do_spawn
-# define do_spawn g_do_spawn
# undef getlogin
# define getlogin g_getlogin
#endif
static void get_shell(void);
static long tokenize(const char *str, char **dest, char ***destv);
- int do_spawn2(char *cmd, int exectype);
+static int do_spawn2(pTHX_ char *cmd, int exectype);
static BOOL has_shell_metachars(char *ptr);
static long filetime_to_clock(PFILETIME ft);
static BOOL filetime_from_time(PFILETIME ft, time_t t);
@@ -516,12 +514,8 @@ get_shell(void)
}
int
-do_aspawn(void *vreally, void **vmark, void **vsp)
+Perl_do_aspawn(pTHX_ SV *really, SV **mark, SV **sp)
{
- dTHX;
- SV *really = (SV*)vreally;
- SV **mark = (SV**)vmark;
- SV **sp = (SV**)vsp;
char **argv;
char *str;
int status;
@@ -607,10 +601,9 @@ find_next_space(const char *s)
return (char*)s;
}
-int
-do_spawn2(char *cmd, int exectype)
+static int
+do_spawn2(pTHX_ char *cmd, int exectype)
{
- dTHX;
char **a;
char *s;
char **argv;
@@ -700,21 +693,21 @@ do_spawn2(char *cmd, int exectype)
}
int
-do_spawn(char *cmd)
+Perl_do_spawn(pTHX_ char *cmd)
{
- return do_spawn2(cmd, EXECF_SPAWN);
+ return do_spawn2(aTHX_ cmd, EXECF_SPAWN);
}
int
-do_spawn_nowait(char *cmd)
+Perl_do_spawn_nowait(pTHX_ char *cmd)
{
- return do_spawn2(cmd, EXECF_SPAWN_NOWAIT);
+ return do_spawn2(aTHX_ cmd, EXECF_SPAWN_NOWAIT);
}
bool
Perl_do_exec(pTHX_ char *cmd)
{
- do_spawn2(cmd, EXECF_EXEC);
+ do_spawn2(aTHX_ cmd, EXECF_EXEC);
return FALSE;
}
@@ -2718,17 +2711,22 @@ win32_popen(const char *command, const char *mode)
int stdfd, oldfd;
int ourmode;
int childpid;
+ DWORD nhandle;
+ HANDLE old_h;
+ int lock_held = 0;
/* establish which ends read and write */
if (strchr(mode,'w')) {
stdfd = 0; /* stdin */
parent = 1;
child = 0;
+ nhandle = STD_INPUT_HANDLE;
}
else if (strchr(mode,'r')) {
stdfd = 1; /* stdout */
parent = 0;
child = 1;
+ nhandle = STD_OUTPUT_HANDLE;
}
else
return NULL;
@@ -2744,7 +2742,7 @@ win32_popen(const char *command, const char *mode)
/* the child doesn't inherit handles */
ourmode |= O_NOINHERIT;
- if (win32_pipe( p, 512, ourmode) == -1)
+ if (win32_pipe(p, 512, ourmode) == -1)
return NULL;
/* save current stdfd */
@@ -2759,12 +2757,25 @@ win32_popen(const char *command, const char *mode)
/* close the child end in parent */
win32_close(p[child]);
+ /* save the old std handle, and set the std handle */
+ OP_REFCNT_LOCK;
+ lock_held = 1;
+ old_h = GetStdHandle(nhandle);
+ SetStdHandle(nhandle, (HANDLE)_get_osfhandle(stdfd));
+
/* start the child */
{
dTHX;
if ((childpid = do_spawn_nowait((char*)command)) == -1)
goto cleanup;
+ /* restore the old std handle */
+ if (lock_held) {
+ SetStdHandle(nhandle, old_h);
+ OP_REFCNT_UNLOCK;
+ lock_held = 0;
+ }
+
/* revert stdfd to whatever it was before */
if (win32_dup2(oldfd, stdfd) == -1)
goto cleanup;
@@ -2787,6 +2798,11 @@ cleanup:
/* we don't need to check for errors here */
win32_close(p[0]);
win32_close(p[1]);
+ if (lock_held) {
+ SetStdHandle(nhandle, old_h);
+ OP_REFCNT_UNLOCK;
+ lock_held = 0;
+ }
if (oldfd != -1) {
win32_dup2(oldfd, stdfd);
win32_close(oldfd);
diff --git a/win32/win32.h b/win32/win32.h
index f37829b174..897588544d 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -307,9 +307,6 @@ extern FILE * my_fdopen(int, char *);
#endif
extern int my_fclose(FILE *);
extern int my_fstat(int fd, Stat_t *sbufptr);
-extern int do_aspawn(void *really, void **mark, void **sp);
-extern int do_spawn(char *cmd);
-extern int do_spawn_nowait(char *cmd);
extern char * win32_get_privlib(const char *pl);
extern char * win32_get_sitelib(const char *pl);
extern char * win32_get_vendorlib(const char *pl);
diff --git a/x2p/s2p.PL b/x2p/s2p.PL
index 0e8fa8f2a6..1e2ee1a6ac 100644
--- a/x2p/s2p.PL
+++ b/x2p/s2p.PL
@@ -17,7 +17,6 @@ sub link { # This is a cut-down version of installperl:link().
: die "Couldn't link $from to $to: $!\n";
};
if ($@) {
- warn $@;
require File::Copy;
File::Copy::copy($from, $to)
? $success++