summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-03-02 16:22:35 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-03-02 16:22:35 +0000
commitd2aaa77e10d841339f3651b4c6cfc980b9f58b7a (patch)
tree3dedde5879a7b6a4a29337fbb5cfecb63fd6b8bc
parentd7afa7f598167b0e275229d12c9533fa50997878 (diff)
downloadperl-d2aaa77e10d841339f3651b4c6cfc980b9f58b7a.tar.gz
Integrate:
[ 18784] An already fixed bug from perl-unicode. [ 18785] Subject: Re: [PATCH] Re: format, PerlIO and utf8 From: Inaba Hiroto <inaba@st.rim.or.jp> Date: Mon, 10 Feb 2003 00:04:51 +0900 Message-ID: <3E466E12.E5349D84@st.rim.or.jp> [ 18794] Further Unicode formats patching from Inaba Hiroto. [ 18797] Patch for [perl #9402], known also as "glibc _moddi3 bug with negative quads", or also as RedHat bug #65612. [ 18798] Go with "right = -right" for greater portability, some platforms might require llabs() to get abs() of long longs. [ 18799] The -CI cannot be easily tested under UTF-8 locale with the t/test.pl (the 'stdin' data gets doubly UTF-8-ied). Also other small tweaks in the -C neighbourhood. [ 18801] Update all copyrights to 2003, from Jarkko [ 18802] Narrow down the -C test skippage. [ 18803] Subject: RE: [perl #20613] Perl_magic_setsig/clearsig problems (patch included) From: "Anders Johnson" <ajohnson@wischip.com> Date: Mon, 10 Feb 2003 14:09:46 -0800 Message-ID: <000e01c2d151$2228ca90$9800a8c0@wis.com> p4raw-link: @18803 on //depot/perl: 2d4fcd5e8be8d83efa948a259c49b56fc6c27ee5 p4raw-link: @18802 on //depot/perl: 81ff9b36babbaa3576696f80427c25a4b7bfa9dd p4raw-link: @18801 on //depot/perl: 4c79ee7a1e7564ef83d0ac25d6677fdebb3ec7aa p4raw-link: @18799 on //depot/perl: 06e66572fd5541df0d1349cac2b404c3b9e446ee p4raw-link: @18798 on //depot/perl: 97edce3fcdc8a02187aed95f7b6f4a46eb120a6e p4raw-link: @18797 on //depot/perl: 224ec32361cf57b93c61b661abceec9635d9d527 p4raw-link: @18794 on //depot/perl: 78da4d13e9515c4d820a5423a160a2c81889d633 p4raw-link: @18785 on //depot/perl: 1bd51a4ce2ce8ac9d8d3503b73fce0e0fc8f8426 p4raw-link: @18784 on //depot/perl: 351208f1b69ff774788ddf0fb62571002594640e p4raw-id: //depot/maint-5.8/perl@18804 p4raw-branched: from //depot/perl@18791 'branch in' t/uni/write.t p4raw-integrated: from //depot/perl@18791 'copy in' EXTERN.h INTERN.h form.h run.c x2p/EXTERN.h x2p/INTERN.h x2p/a2p.c x2p/a2p.y x2p/hash.h x2p/proto.h x2p/str.h x2p/util.c x2p/util.h (@14391..) cc_runtime.h fakethr.h unixish.h (@14400..) globals.c (@14802..) README (@14841..) regcomp.h (@15356..) utf8.h (@15762..) x2p/hash.c x2p/walk.c (@16076..) gv.h (@16325..) perlsdio.h (@16368..) hv.h (@16656..) utfebcdic.h (@16888..) x2p/a2p.h (@17033..) perlsfio.h (@17242..) av.h (@17727..) x2p/str.c (@17759..) numeric.c (@17874..) handy.h (@17920..) mg.h (@17947..) perlapi.c (@18113..) taint.c (@18261..) pad.h (@18311..) scope.h (@18312..) util.h (@18321..) t/op/magic.t (@18371..) reentr.c reentr.h reentr.pl (@18498..) fakesdio.h nostdio.h (@18524..) perlio.h (@18556..) XSUB.h (@18636..) locale.c (@18731..) t/op/pat.t (@18782..) t/run/switchC.t (@18799..) 'edit in' pp_ctl.c (@18794..) pp.c (@18798..) perl.c perl.h util.c (@18799..) mg.c (@18801..) 'merge in' keywords.h (@17682..) doop.c (@17984..) deb.c dosish.h miniperlmain.c pp.h (@18030..) keywords.pl (@18160..) thread.h (@18229..) perlvars.h (@18239..) perly.y (@18336..) scope.c (@18410..) opnames.h (@18413..) pp_sort.c (@18456..) hv.c (@18463..) av.c (@18554..) op.h (@18589..) pad.c (@18601..) cop.h (@18643..) doio.c (@18676..) universal.c (@18697..) gv.c (@18715..) regcomp.c regexp.h thrdvar.h (@18726..) cv.h dump.c xsutils.c (@18727..) embed.pl (@18734..) patchlevel.h (@18749..) opcode.h opcode.pl pp_pack.c (@18751..) utf8.c (@18760..) sv.h (@18764..) embedvar.h pp_sys.c (@18766..) pp_hot.c (@18774..) op.c (@18777..) MANIFEST (@18779..) perlapi.h (@18781..) proto.h regexec.c sv.c (@18782..) embed.h (@18795..) global.sym (@18796..) p4raw-integrated: from //depot/perl@18785 'edit in' toke.c (@18753..)
-rw-r--r--EXTERN.h2
-rw-r--r--INTERN.h2
-rw-r--r--MANIFEST1
-rw-r--r--README2
-rw-r--r--XSUB.h2
-rw-r--r--av.c2
-rw-r--r--av.h2
-rw-r--r--cc_runtime.h2
-rw-r--r--cop.h2
-rw-r--r--cv.h2
-rw-r--r--deb.c2
-rw-r--r--doio.c2
-rw-r--r--doop.c2
-rw-r--r--dosish.h2
-rw-r--r--dump.c2
-rw-r--r--embed.h2
-rwxr-xr-xembed.pl2
-rw-r--r--embedvar.h2
-rw-r--r--fakesdio.h2
-rw-r--r--fakethr.h2
-rw-r--r--form.h2
-rw-r--r--global.sym2
-rw-r--r--globals.c2
-rw-r--r--gv.c2
-rw-r--r--gv.h2
-rw-r--r--handy.h2
-rw-r--r--hv.c2
-rw-r--r--hv.h2
-rw-r--r--keywords.h2
-rwxr-xr-xkeywords.pl2
-rw-r--r--locale.c2
-rw-r--r--mg.c127
-rw-r--r--mg.h2
-rw-r--r--miniperlmain.c2
-rw-r--r--nostdio.h2
-rw-r--r--numeric.c2
-rw-r--r--op.c2
-rw-r--r--op.h2
-rw-r--r--opcode.h2
-rwxr-xr-xopcode.pl4
-rw-r--r--opnames.h2
-rw-r--r--pad.c2
-rw-r--r--pad.h2
-rw-r--r--patchlevel.h2
-rw-r--r--perl.c17
-rw-r--r--perl.h17
-rw-r--r--perlapi.c2
-rw-r--r--perlapi.h2
-rw-r--r--perlio.h2
-rw-r--r--perlsdio.h2
-rw-r--r--perlsfio.h2
-rw-r--r--perlvars.h2
-rw-r--r--perly.y2
-rw-r--r--pp.c81
-rw-r--r--pp.h2
-rw-r--r--pp_ctl.c79
-rw-r--r--pp_hot.c2
-rw-r--r--pp_pack.c2
-rw-r--r--pp_sort.c2
-rw-r--r--pp_sys.c2
-rw-r--r--proto.h2
-rw-r--r--reentr.c2
-rw-r--r--reentr.h2
-rw-r--r--reentr.pl4
-rw-r--r--regcomp.c2
-rw-r--r--regcomp.h2
-rw-r--r--regexec.c2
-rw-r--r--regexp.h2
-rw-r--r--run.c2
-rw-r--r--scope.c2
-rw-r--r--scope.h2
-rw-r--r--sv.c2
-rw-r--r--sv.h2
-rwxr-xr-xt/op/magic.t34
-rwxr-xr-xt/op/pat.t20
-rw-r--r--t/run/switchC.t16
-rw-r--r--t/uni/write.t96
-rw-r--r--taint.c2
-rw-r--r--thrdvar.h2
-rw-r--r--thread.h2
-rw-r--r--toke.c8
-rw-r--r--universal.c2
-rw-r--r--unixish.h2
-rw-r--r--utf8.c2
-rw-r--r--utf8.h2
-rw-r--r--utfebcdic.h2
-rw-r--r--util.c4
-rw-r--r--util.h2
-rw-r--r--x2p/EXTERN.h2
-rw-r--r--x2p/INTERN.h2
-rw-r--r--x2p/a2p.c2
-rw-r--r--x2p/a2p.h2
-rw-r--r--x2p/a2p.y2
-rw-r--r--x2p/hash.c2
-rw-r--r--x2p/hash.h2
-rw-r--r--x2p/proto.h2
-rw-r--r--x2p/str.c2
-rw-r--r--x2p/str.h2
-rw-r--r--x2p/util.c2
-rw-r--r--x2p/util.h2
-rw-r--r--x2p/walk.c2
-rw-r--r--xsutils.c2
102 files changed, 524 insertions, 160 deletions
diff --git a/EXTERN.h b/EXTERN.h
index ed541bb033..ced967310c 100644
--- a/EXTERN.h
+++ b/EXTERN.h
@@ -1,6 +1,6 @@
/* EXTERN.h
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/INTERN.h b/INTERN.h
index c9bab9a384..e62003ab5e 100644
--- a/INTERN.h
+++ b/INTERN.h
@@ -1,6 +1,6 @@
/* INTERN.h
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/MANIFEST b/MANIFEST
index 3a3a05bc8b..daffa67d8b 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2716,6 +2716,7 @@ t/uni/tr_eucjp.t See if Unicode tr/// works
t/uni/tr_sjis.t See if Unicode tr/// works
t/uni/tr_utf8.t See if Unicode tr/// works
t/uni/upper.t See if Unicode casing works
+t/uni/write.t See if Unicode formats work
t/win32/longpath.t Test if Win32::GetLongPathName() works
t/win32/system.t See if system works in Win*
t/win32/system_tests Test runner for system.t
diff --git a/README b/README
index 27baec474d..a5dd97463d 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
Perl Kit, Version 5
- Copyright 1989-2002, Larry Wall
+ Copyright 1989-2003, Larry Wall
All rights reserved.
This program is free software; you can redistribute it and/or modify
diff --git a/XSUB.h b/XSUB.h
index af19c81c76..9117f9e728 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -1,6 +1,6 @@
/* XSUB.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/av.c b/av.c
index 647c12351b..78376dc4e8 100644
--- a/av.c
+++ b/av.c
@@ -1,6 +1,6 @@
/* av.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/av.h b/av.h
index beed09d26d..94871bfbce 100644
--- a/av.h
+++ b/av.h
@@ -1,6 +1,6 @@
/* av.h
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/cc_runtime.h b/cc_runtime.h
index b1fc5b52b7..3efed14dde 100644
--- a/cc_runtime.h
+++ b/cc_runtime.h
@@ -1,6 +1,6 @@
/* cc_runtime.h
*
- * Copyright (c) 1998-2002, Larry Wall
+ * Copyright (c) 1998-2003, 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/cop.h b/cop.h
index d28cd44d89..70a26f1634 100644
--- a/cop.h
+++ b/cop.h
@@ -1,6 +1,6 @@
/* cop.h
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/cv.h b/cv.h
index 9877f6d350..1459003a4a 100644
--- a/cv.h
+++ b/cv.h
@@ -1,6 +1,6 @@
/* cv.h
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/deb.c b/deb.c
index 800427a5e6..ddb3a37950 100644
--- a/deb.c
+++ b/deb.c
@@ -1,6 +1,6 @@
/* deb.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/doio.c b/doio.c
index 74b4cf0cbf..f8681e4103 100644
--- a/doio.c
+++ b/doio.c
@@ -1,6 +1,6 @@
/* doio.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/doop.c b/doop.c
index 81936c9435..5bd3f95279 100644
--- a/doop.c
+++ b/doop.c
@@ -1,6 +1,6 @@
/* doop.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/dosish.h b/dosish.h
index 045fef5b50..34948630c6 100644
--- a/dosish.h
+++ b/dosish.h
@@ -1,6 +1,6 @@
/* dosish.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/dump.c b/dump.c
index 3a3c0c6866..c47ad1d202 100644
--- a/dump.c
+++ b/dump.c
@@ -1,6 +1,6 @@
/* dump.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/embed.h b/embed.h
index 3addcf77d9..07957532ad 100644
--- a/embed.h
+++ b/embed.h
@@ -1,7 +1,7 @@
/*
* embed.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/embed.pl b/embed.pl
index 78b896cda6..762b387b0a 100755
--- a/embed.pl
+++ b/embed.pl
@@ -22,7 +22,7 @@ sub do_not_edit ($)
$file
- Copyright (c) 1997-2002, Larry Wall
+ Copyright (c) 1997-2003, 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/embedvar.h b/embedvar.h
index a3d5353bc3..02ccff14b2 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -1,7 +1,7 @@
/*
* embedvar.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/fakesdio.h b/fakesdio.h
index 8be514f180..edec0292fe 100644
--- a/fakesdio.h
+++ b/fakesdio.h
@@ -1,6 +1,6 @@
/* fakestdio.h
*
- * Copyright (c) 2000-2002, Larry Wall
+ * Copyright (c) 2000-2003, 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/fakethr.h b/fakethr.h
index 5bbe8ac906..02232d3315 100644
--- a/fakethr.h
+++ b/fakethr.h
@@ -1,6 +1,6 @@
/* fakethr.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/form.h b/form.h
index 2da17bb76a..50b5c8497f 100644
--- a/form.h
+++ b/form.h
@@ -1,6 +1,6 @@
/* form.h
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/global.sym b/global.sym
index 37be8965a6..62048d50bd 100644
--- a/global.sym
+++ b/global.sym
@@ -1,7 +1,7 @@
#
# global.sym
#
-# Copyright (c) 1997-2002, Larry Wall
+# Copyright (c) 1997-2003, 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/globals.c b/globals.c
index b9d70cc004..b0c444d17d 100644
--- a/globals.c
+++ b/globals.c
@@ -1,6 +1,6 @@
/* globals.c
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/gv.c b/gv.c
index 12825b43b0..7b31073ceb 100644
--- a/gv.c
+++ b/gv.c
@@ -1,6 +1,6 @@
/* gv.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/gv.h b/gv.h
index 39b61feb81..cc1738fa9d 100644
--- a/gv.h
+++ b/gv.h
@@ -1,6 +1,6 @@
/* gv.h
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/handy.h b/handy.h
index c16ba471ff..416dad8824 100644
--- a/handy.h
+++ b/handy.h
@@ -1,6 +1,6 @@
/* handy.h
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/hv.c b/hv.c
index 2726be059d..864f329e93 100644
--- a/hv.c
+++ b/hv.c
@@ -1,6 +1,6 @@
/* hv.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/hv.h b/hv.h
index 16b14828e2..50faedceac 100644
--- a/hv.h
+++ b/hv.h
@@ -1,6 +1,6 @@
/* hv.h
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/keywords.h b/keywords.h
index 767f356da5..08c2ca03fd 100644
--- a/keywords.h
+++ b/keywords.h
@@ -1,7 +1,7 @@
/*
* keywords.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/keywords.pl b/keywords.pl
index 477174db23..5fd954fd8b 100755
--- a/keywords.pl
+++ b/keywords.pl
@@ -9,7 +9,7 @@ print <<EOM;
/*
* keywords.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/locale.c b/locale.c
index 9c41710b71..c7fbad8913 100644
--- a/locale.c
+++ b/locale.c
@@ -1,6 +1,6 @@
/* locale.c
*
- * Copyright (c) 2001-2002, Larry Wall
+ * Copyright (c) 2001-2003, 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/mg.c b/mg.c
index 538717dd1d..6de4214ea2 100644
--- a/mg.c
+++ b/mg.c
@@ -1,6 +1,6 @@
/* mg.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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.
@@ -1043,6 +1043,14 @@ static int sig_defaulting[SIG_SIZE];
#endif
#ifndef PERL_MICRO
+#ifdef HAS_SIGPROCMASK
+static void
+restore_sigmask(pTHX_ SV *save_sv)
+{
+ sigset_t *ossetp = (sigset_t *) SvPV_nolen( save_sv );
+ (void)sigprocmask(SIG_SETMASK, ossetp, (sigset_t *)0);
+}
+#endif
int
Perl_magic_getsig(pTHX_ SV *sv, MAGIC *mg)
{
@@ -1076,19 +1084,67 @@ Perl_magic_getsig(pTHX_ SV *sv, MAGIC *mg)
int
Perl_magic_clearsig(pTHX_ SV *sv, MAGIC *mg)
{
- I32 i;
+ /* XXX Some of this code was copied from Perl_magic_setsig. A little
+ * refactoring might be in order.
+ */
+ register char *s;
STRLEN n_a;
- /* Are we clearing a signal entry? */
- i = whichsig(MgPV(mg,n_a));
- if (i) {
- if(PL_psig_ptr[i]) {
- SvREFCNT_dec(PL_psig_ptr[i]);
- PL_psig_ptr[i]=0;
- }
- if(PL_psig_name[i]) {
- SvREFCNT_dec(PL_psig_name[i]);
- PL_psig_name[i]=0;
- }
+ SV* to_dec;
+ s = MgPV(mg,n_a);
+ if (*s == '_') {
+ SV** svp;
+ if (strEQ(s,"__DIE__"))
+ svp = &PL_diehook;
+ else if (strEQ(s,"__WARN__"))
+ svp = &PL_warnhook;
+ else
+ Perl_croak(aTHX_ "No such hook: %s", s);
+ if (*svp) {
+ to_dec = *svp;
+ *svp = 0;
+ SvREFCNT_dec(to_dec);
+ }
+ }
+ else {
+ I32 i;
+ /* Are we clearing a signal entry? */
+ i = whichsig(s);
+ if (i) {
+#ifdef HAS_SIGPROCMASK
+ sigset_t set, save;
+ SV* save_sv;
+ /* Avoid having the signal arrive at a bad time, if possible. */
+ sigemptyset(&set);
+ sigaddset(&set,i);
+ sigprocmask(SIG_BLOCK, &set, &save);
+ ENTER;
+ save_sv = newSVpv((char *)(&save), sizeof(sigset_t));
+ SAVEFREESV(save_sv);
+ SAVEDESTRUCTOR_X(restore_sigmask, save_sv);
+#endif
+ PERL_ASYNC_CHECK();
+#if defined(FAKE_PERSISTENT_SIGNAL_HANDLERS) || defined(FAKE_DEFAULT_SIGNAL_HANDLERS)
+ if (!sig_handlers_initted) Perl_csighandler_init();
+#endif
+#ifdef FAKE_DEFAULT_SIGNAL_HANDLERS
+ sig_defaulting[i] = 1;
+ (void)rsignal(i, &Perl_csighandler);
+#else
+ (void)rsignal(i, SIG_DFL);
+#endif
+ if(PL_psig_name[i]) {
+ SvREFCNT_dec(PL_psig_name[i]);
+ PL_psig_name[i]=0;
+ }
+ if(PL_psig_ptr[i]) {
+ to_dec=PL_psig_ptr[i];
+ PL_psig_ptr[i]=0;
+ LEAVE;
+ SvREFCNT_dec(to_dec);
+ }
+ else
+ LEAVE;
+ }
}
return 0;
}
@@ -1173,7 +1229,16 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg)
register char *s;
I32 i;
SV** svp = 0;
+ /* Need to be careful with SvREFCNT_dec(), because that can have side
+ * effects (due to closures). We must make sure that the new disposition
+ * is in place before it is called.
+ */
+ SV* to_dec = 0;
STRLEN len;
+#ifdef HAS_SIGPROCMASK
+ sigset_t set, save;
+ SV* save_sv;
+#endif
s = MgPV(mg,len);
if (*s == '_') {
@@ -1185,7 +1250,7 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg)
Perl_croak(aTHX_ "No such hook: %s", s);
i = 0;
if (*svp) {
- SvREFCNT_dec(*svp);
+ to_dec = *svp;
*svp = 0;
}
}
@@ -1196,6 +1261,17 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg)
Perl_warner(aTHX_ packWARN(WARN_SIGNAL), "No such signal: SIG%s", s);
return 0;
}
+#ifdef HAS_SIGPROCMASK
+ /* Avoid having the signal arrive at a bad time, if possible. */
+ sigemptyset(&set);
+ sigaddset(&set,i);
+ sigprocmask(SIG_BLOCK, &set, &save);
+ ENTER;
+ save_sv = newSVpv((char *)(&save), sizeof(sigset_t));
+ SAVEFREESV(save_sv);
+ SAVEDESTRUCTOR_X(restore_sigmask, save_sv);
+#endif
+ PERL_ASYNC_CHECK();
#if defined(FAKE_PERSISTENT_SIGNAL_HANDLERS) || defined(FAKE_DEFAULT_SIGNAL_HANDLERS)
if (!sig_handlers_initted) Perl_csighandler_init();
#endif
@@ -1203,20 +1279,26 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg)
sig_ignoring[i] = 0;
#endif
#ifdef FAKE_DEFAULT_SIGNAL_HANDLERS
- sig_defaulting[i] = 0;
+ sig_defaulting[i] = 0;
#endif
SvREFCNT_dec(PL_psig_name[i]);
- SvREFCNT_dec(PL_psig_ptr[i]);
+ to_dec = PL_psig_ptr[i];
PL_psig_ptr[i] = SvREFCNT_inc(sv);
SvTEMP_off(sv); /* Make sure it doesn't go away on us */
PL_psig_name[i] = newSVpvn(s, len);
SvREADONLY_on(PL_psig_name[i]);
}
if (SvTYPE(sv) == SVt_PVGV || SvROK(sv)) {
- if (i)
+ if (i) {
(void)rsignal(i, &Perl_csighandler);
+#ifdef HAS_SIGPROCMASK
+ LEAVE;
+#endif
+ }
else
*svp = SvREFCNT_inc(sv);
+ if(to_dec)
+ SvREFCNT_dec(to_dec);
return 0;
}
s = SvPV_force(sv,len);
@@ -1228,8 +1310,7 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg)
#else
(void)rsignal(i, SIG_IGN);
#endif
- } else
- *svp = 0;
+ }
}
else if (strEQ(s,"DEFAULT") || !*s) {
if (i)
@@ -1241,8 +1322,6 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg)
#else
(void)rsignal(i, SIG_DFL);
#endif
- else
- *svp = 0;
}
else {
/*
@@ -1257,6 +1336,12 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg)
else
*svp = SvREFCNT_inc(sv);
}
+#ifdef HAS_SIGPROCMASK
+ if(i)
+ LEAVE;
+#endif
+ if(to_dec)
+ SvREFCNT_dec(to_dec);
return 0;
}
#endif /* !PERL_MICRO */
diff --git a/mg.h b/mg.h
index bbd675b98d..346c8cb49c 100644
--- a/mg.h
+++ b/mg.h
@@ -1,6 +1,6 @@
/* mg.h
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/miniperlmain.c b/miniperlmain.c
index e2415d8a53..7b1e09b057 100644
--- a/miniperlmain.c
+++ b/miniperlmain.c
@@ -1,6 +1,6 @@
/* miniperlmain.c
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/nostdio.h b/nostdio.h
index 9726114647..09b69a9c1b 100644
--- a/nostdio.h
+++ b/nostdio.h
@@ -1,6 +1,6 @@
/* nostdio.h
*
- * Copyright (c) 1987-2002, Larry Wall
+ * Copyright (c) 1987-2003, 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/numeric.c b/numeric.c
index b472155444..1b91c5f45f 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1,6 +1,6 @@
/* numeric.c
*
- * Copyright (c) 2001-2002, Larry Wall
+ * Copyright (c) 2001-2003, 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/op.c b/op.c
index ba94fd6655..2db7177c65 100644
--- a/op.c
+++ b/op.c
@@ -1,6 +1,6 @@
/* op.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/op.h b/op.h
index 58d2f1e3a2..1bd04b7478 100644
--- a/op.h
+++ b/op.h
@@ -1,6 +1,6 @@
/* op.h
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/opcode.h b/opcode.h
index 335516040d..4403e48ce3 100644
--- a/opcode.h
+++ b/opcode.h
@@ -1,7 +1,7 @@
/*
* opcode.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/opcode.pl b/opcode.pl
index 54a79d9477..0db3dafdb6 100755
--- a/opcode.pl
+++ b/opcode.pl
@@ -38,7 +38,7 @@ print <<"END";
/*
* opcode.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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.
@@ -59,7 +59,7 @@ print ON <<"END";
/*
* opnames.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/opnames.h b/opnames.h
index 437c85d519..d8a844adb2 100644
--- a/opnames.h
+++ b/opnames.h
@@ -1,7 +1,7 @@
/*
* opnames.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/pad.c b/pad.c
index 564408a264..70265c156d 100644
--- a/pad.c
+++ b/pad.c
@@ -1,6 +1,6 @@
/* pad.c
*
- * Copyright (c) 2002, Larry Wall
+ * Copyright (c) 2003, 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/pad.h b/pad.h
index 54e8bc13cf..b059b2e811 100644
--- a/pad.h
+++ b/pad.h
@@ -1,6 +1,6 @@
/* pad.h
*
- * Copyright (c) 2002, Larry Wall
+ * Copyright (c) 2003, 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/patchlevel.h b/patchlevel.h
index 79fdde3efe..f29b3fc549 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -1,6 +1,6 @@
/* patchlevel.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/perl.c b/perl.c
index e9620e993a..d19ae96720 100644
--- a/perl.c
+++ b/perl.c
@@ -1,6 +1,6 @@
/* perl.c
*
- * Copyright (c) 1987-2002 Larry Wall
+ * Copyright (c) 1987-2003 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.
@@ -1487,14 +1487,15 @@ print \" \\@INC:\\n @INC\\n\";");
* PL_utf8locale is conditionally turned on by
* locale.c:Perl_init_i18nl10n() if the environment
* look like the user wants to use UTF-8. */
- if (PL_unicode) { /* Requires init_predump_symbols(). */
- IO* io;
- PerlIO* fp;
- SV* sv;
-
+ if (PL_unicode) {
+ /* Requires init_predump_symbols(). */
if (!(PL_unicode & PERL_UNICODE_LOCALE_FLAG) || PL_utf8locale) {
+ IO* io;
+ PerlIO* fp;
+ SV* sv;
+
/* Turn on UTF-8-ness on STDIN, STDOUT, STDERR
- * and the default open discipline. */
+ * and the default open disciplines. */
if ((PL_unicode & PERL_UNICODE_STDIN_FLAG) &&
PL_stdingv && (io = GvIO(PL_stdingv)) &&
(fp = IoIFP(io)))
@@ -2559,7 +2560,7 @@ Perl_moreswitches(pTHX_ char *s)
#endif
PerlIO_printf(PerlIO_stdout(),
- "\n\nCopyright 1987-2002, Larry Wall\n");
+ "\n\nCopyright 1987-2003, Larry Wall\n");
#ifdef MACOS_TRADITIONAL
PerlIO_printf(PerlIO_stdout(),
"\nMac OS port Copyright 1991-2002, Matthias Neeracher;\n"
diff --git a/perl.h b/perl.h
index 4c2e4eb02a..e711d36465 100644
--- a/perl.h
+++ b/perl.h
@@ -1,6 +1,6 @@
/* perl.h
*
- * Copyright (c) 1987-2002, Larry Wall
+ * Copyright (c) 1987-2003, 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.
@@ -4253,15 +4253,22 @@ extern void moncontrol(int);
#define PERL_UNICODE_STDIN_FLAG 0x0001
#define PERL_UNICODE_STDOUT_FLAG 0x0002
#define PERL_UNICODE_STDERR_FLAG 0x0004
-#define PERL_UNICODE_STD_FLAG 0x0007
#define PERL_UNICODE_IN_FLAG 0x0008
#define PERL_UNICODE_OUT_FLAG 0x0010
-#define PERL_UNICODE_INOUT_FLAG 0x0018
-#define PERL_UNICODE_ARGV_FLAG 0x0020 /* For @ARGV? */
+#define PERL_UNICODE_ARGV_FLAG 0x0020
#define PERL_UNICODE_LOCALE_FLAG 0x0040
#define PERL_UNICODE_WIDESYSCALLS_FLAG 0x0080 /* for Sarathy */
-#define PERL_UNICODE_DEFAULT_FLAGS \
+#define PERL_UNICODE_STD_FLAG \
+ (PERL_UNICODE_STDIN_FLAG | \
+ PERL_UNICODE_STDOUT_FLAG | \
+ PERL_UNICODE_STDERR_FLAG)
+
+#define PERL_UNICODE_INOUT_FLAG \
+ (PERL_UNICODE_IN_FLAG | \
+ PERL_UNICODE_OUT_FLAG)
+
+#define PERL_UNICODE_DEFAULT_FLAGS \
(PERL_UNICODE_STD_FLAG | \
PERL_UNICODE_INOUT_FLAG | \
PERL_UNICODE_LOCALE_FLAG)
diff --git a/perlapi.c b/perlapi.c
index e6d4219475..83d30a9477 100644
--- a/perlapi.c
+++ b/perlapi.c
@@ -1,7 +1,7 @@
/*
* perlapi.c
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/perlapi.h b/perlapi.h
index 6d5fed0667..c79925040a 100644
--- a/perlapi.h
+++ b/perlapi.h
@@ -1,7 +1,7 @@
/*
* perlapi.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/perlio.h b/perlio.h
index 99590196f0..b5082eadf9 100644
--- a/perlio.h
+++ b/perlio.h
@@ -1,6 +1,6 @@
/* perlio.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/perlsdio.h b/perlsdio.h
index e78076d24a..fc6bcfaa90 100644
--- a/perlsdio.h
+++ b/perlsdio.h
@@ -1,6 +1,6 @@
/* perlsdio.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/perlsfio.h b/perlsfio.h
index 0a2cf3c558..a41bc4fa0a 100644
--- a/perlsfio.h
+++ b/perlsfio.h
@@ -1,6 +1,6 @@
/* perlsfio.h
*
- * Copyright (c) 1987-2002, Larry Wall
+ * Copyright (c) 1987-2003, 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/perlvars.h b/perlvars.h
index 8cda4a9feb..71ab13e047 100644
--- a/perlvars.h
+++ b/perlvars.h
@@ -1,6 +1,6 @@
/* perlvars.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/perly.y b/perly.y
index f87f581564..45f31dfca1 100644
--- a/perly.y
+++ b/perly.y
@@ -1,6 +1,6 @@
/* perly.y
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/pp.c b/pp.c
index 7127aa13e3..13afd2ea33 100644
--- a/pp.c
+++ b/pp.c
@@ -1,6 +1,6 @@
/* pp.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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.
@@ -2458,16 +2458,79 @@ PP(pp_i_divide)
}
}
+STATIC
+PP(pp_i_modulo_0)
+{
+ /* This is the vanilla old i_modulo. */
+ dSP; dATARGET; tryAMAGICbin(modulo,opASSIGN);
+ {
+ dPOPTOPiirl;
+ if (!right)
+ DIE(aTHX_ "Illegal modulus zero");
+ SETi( left % right );
+ RETURN;
+ }
+}
+
+STATIC
+PP(pp_i_modulo_1)
+{
+#ifdef __GLIBC__
+ /* This is the i_modulo with the workaround for the _moddi3 bug
+ * in (at least) glibc 2.2.5 (the "right = -right" is the workaround).
+ * See below for pp_i_modulo. */
+ dSP; dATARGET; tryAMAGICbin(modulo,opASSIGN);
+ {
+ dPOPTOPiirl;
+ if (!right)
+ DIE(aTHX_ "Illegal modulus zero");
+ if (right < 0)
+ right = -right;
+ SETi( left % right );
+ RETURN;
+ }
+#endif
+}
+
PP(pp_i_modulo)
{
- dSP; dATARGET; tryAMAGICbin(modulo,opASSIGN);
- {
- dPOPTOPiirl;
- if (!right)
- DIE(aTHX_ "Illegal modulus zero");
- SETi( left % right );
- RETURN;
- }
+ dSP; dATARGET; tryAMAGICbin(modulo,opASSIGN);
+ {
+ dPOPTOPiirl;
+ if (!right)
+ DIE(aTHX_ "Illegal modulus zero");
+ /* The assumption is to use hereafter the old vanilla version... */
+ PL_op->op_ppaddr =
+ PL_ppaddr[OP_I_MODULO] =
+ &Perl_pp_i_modulo_0;
+ /* .. but if we have glibc, we might have a buggy _moddi3
+ * (at least glicb 2.2.5 is known to have this bug), in other
+ * words our integer modulus with negative quad as the second
+ * argument might be broken. Test for this and re-patch the
+ * opcode dispatch table if that is the case, remembering to
+ * also apply the workaround so that this first round works
+ * right, too. See [perl #9402] for more information. */
+#if defined(__GLIBC__) && IVSIZE == 8
+ {
+ IV l = 3;
+ IV r = -10;
+ /* Cannot do this check with inlined IV constants since
+ * that seems to work correctly even with the buggy glibc. */
+ if (l % r == -3) {
+ /* Yikes, we have the bug.
+ * Patch in the workaround version. */
+ PL_op->op_ppaddr =
+ PL_ppaddr[OP_I_MODULO] =
+ &Perl_pp_i_modulo_1;
+ /* Make certain we work right this time, too. */
+ if (right < 0)
+ right = -right;
+ }
+ }
+#endif
+ SETi( left % right );
+ RETURN;
+ }
}
PP(pp_i_add)
diff --git a/pp.h b/pp.h
index 9a909c8157..1e393c2baf 100644
--- a/pp.h
+++ b/pp.h
@@ -1,6 +1,6 @@
/* pp.h
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/pp_ctl.c b/pp_ctl.c
index 8ee14b5da6..714a97c172 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1,6 +1,6 @@
/* pp_ctl.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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.
@@ -328,7 +328,9 @@ PP(pp_formline)
bool gotsome = FALSE;
STRLEN len;
STRLEN fudge = SvCUR(tmpForm) * (IN_BYTES ? 1 : 3) + 1;
- bool item_is_utf = FALSE;
+ bool item_is_utf8 = FALSE;
+ bool targ_is_utf8 = FALSE;
+ SV * nsv = Nullsv;
if (!SvMAGICAL(tmpForm) || !SvCOMPILED(tmpForm)) {
if (SvREADONLY(tmpForm)) {
@@ -339,8 +341,9 @@ PP(pp_formline)
else
doparseform(tmpForm);
}
-
SvPV_force(PL_formtarget, len);
+ if (DO_UTF8(PL_formtarget))
+ targ_is_utf8 = TRUE;
t = SvGROW(PL_formtarget, len + fudge + 1); /* XXX SvCUR bad */
t += len;
f = SvPV(tmpForm, len);
@@ -387,6 +390,21 @@ PP(pp_formline)
case FF_LITERAL:
arg = *fpc++;
+ if (targ_is_utf8 && !SvUTF8(tmpForm)) {
+ SvCUR_set(PL_formtarget, t - SvPVX(PL_formtarget));
+ *t = '\0';
+ sv_catpvn_utf8_upgrade(PL_formtarget, f, arg, nsv);
+ t = SvEND(PL_formtarget);
+ break;
+ }
+ if (!targ_is_utf8 && DO_UTF8(tmpForm)) {
+ SvCUR_set(PL_formtarget, t - SvPVX(PL_formtarget));
+ *t = '\0';
+ sv_utf8_upgrade(PL_formtarget);
+ SvGROW(PL_formtarget, SvCUR(PL_formtarget) + fudge + 1);
+ t = SvEND(PL_formtarget);
+ targ_is_utf8 = TRUE;
+ }
while (arg--)
*t++ = *f++;
break;
@@ -431,13 +449,13 @@ PP(pp_formline)
break;
s++;
}
- item_is_utf = TRUE;
+ item_is_utf8 = TRUE;
itemsize = s - item;
sv_pos_b2u(sv, &itemsize);
break;
}
}
- item_is_utf = FALSE;
+ item_is_utf8 = FALSE;
if (itemsize > fieldsize)
itemsize = fieldsize;
send = chophere = s + itemsize;
@@ -492,11 +510,11 @@ PP(pp_formline)
itemsize = chophere - item;
sv_pos_b2u(sv, &itemsize);
}
- item_is_utf = TRUE;
+ item_is_utf8 = TRUE;
break;
}
}
- item_is_utf = FALSE;
+ item_is_utf8 = FALSE;
if (itemsize <= fieldsize) {
send = chophere = s + itemsize;
while (s < send) {
@@ -552,7 +570,15 @@ PP(pp_formline)
case FF_ITEM:
arg = itemsize;
s = item;
- if (item_is_utf) {
+ if (item_is_utf8) {
+ if (!targ_is_utf8) {
+ SvCUR_set(PL_formtarget, t - SvPVX(PL_formtarget));
+ *t = '\0';
+ sv_utf8_upgrade(PL_formtarget);
+ SvGROW(PL_formtarget, SvCUR(PL_formtarget) + fudge + 1);
+ t = SvEND(PL_formtarget);
+ targ_is_utf8 = TRUE;
+ }
while (arg--) {
if (UTF8_IS_CONTINUED(*s)) {
STRLEN skip = UTF8SKIP(s);
@@ -578,6 +604,21 @@ PP(pp_formline)
}
break;
}
+ if (targ_is_utf8 && !item_is_utf8) {
+ SvCUR_set(PL_formtarget, t - SvPVX(PL_formtarget));
+ *t = '\0';
+ sv_catpvn_utf8_upgrade(PL_formtarget, s, arg, nsv);
+ for (; t < SvEND(PL_formtarget); t++) {
+#ifdef EBCDIC
+ int ch = *t++ = *s++;
+ if (iscntrl(ch))
+#else
+ if (!(*t & ~31))
+#endif
+ *t = ' ';
+ }
+ break;
+ }
while (arg--) {
#ifdef EBCDIC
int ch = *t++ = *s++;
@@ -601,22 +642,32 @@ PP(pp_formline)
case FF_LINEGLOB:
item = s = SvPV(sv, len);
itemsize = len;
- item_is_utf = FALSE; /* XXX is this correct? */
+ if ((item_is_utf8 = DO_UTF8(sv)))
+ itemsize = sv_len_utf8(sv);
if (itemsize) {
+ bool chopped = FALSE;
gotsome = TRUE;
- send = s + itemsize;
+ send = s + len;
while (s < send) {
if (*s++ == '\n') {
- if (s == send)
+ if (s == send) {
itemsize--;
+ chopped = TRUE;
+ }
else
lines++;
}
}
SvCUR_set(PL_formtarget, t - SvPVX(PL_formtarget));
- sv_catpvn(PL_formtarget, item, itemsize);
+ if (targ_is_utf8)
+ SvUTF8_on(PL_formtarget);
+ sv_catsv(PL_formtarget, sv);
+ if (chopped)
+ SvCUR_set(PL_formtarget, SvCUR(PL_formtarget) - 1);
SvGROW(PL_formtarget, SvCUR(PL_formtarget) + fudge + 1);
t = SvPVX(PL_formtarget) + SvCUR(PL_formtarget);
+ if (item_is_utf8)
+ targ_is_utf8 = TRUE;
}
break;
@@ -712,6 +763,8 @@ PP(pp_formline)
if (strnEQ(linemark, linemark - arg, arg))
DIE(aTHX_ "Runaway format");
}
+ if (targ_is_utf8)
+ SvUTF8_on(PL_formtarget);
FmLINES(PL_formtarget) = lines;
SP = ORIGMARK;
RETURNOP(cLISTOP->op_first);
@@ -751,6 +804,8 @@ PP(pp_formline)
case FF_END:
*t = '\0';
SvCUR_set(PL_formtarget, t - SvPVX(PL_formtarget));
+ if (targ_is_utf8)
+ SvUTF8_on(PL_formtarget);
FmLINES(PL_formtarget) += lines;
SP = ORIGMARK;
RETPUSHYES;
diff --git a/pp_hot.c b/pp_hot.c
index 63c7d3b658..c9e1228c27 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1,6 +1,6 @@
/* pp_hot.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/pp_pack.c b/pp_pack.c
index 44764541df..dc4733dae4 100644
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -1,6 +1,6 @@
/* pp_pack.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/pp_sort.c b/pp_sort.c
index db886c20f6..3628471405 100644
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -1,6 +1,6 @@
/* pp_sort.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/pp_sys.c b/pp_sys.c
index 97a1ac28ff..3aa6907676 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1,6 +1,6 @@
/* pp_sys.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/proto.h b/proto.h
index b58528723f..b413e99d37 100644
--- a/proto.h
+++ b/proto.h
@@ -1,7 +1,7 @@
/*
* proto.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/reentr.c b/reentr.c
index 052af90336..8b655da86c 100644
--- a/reentr.c
+++ b/reentr.c
@@ -1,7 +1,7 @@
/*
* reentr.c
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/reentr.h b/reentr.h
index 4c805883da..df5a5d660c 100644
--- a/reentr.h
+++ b/reentr.h
@@ -1,7 +1,7 @@
/*
* reentr.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/reentr.pl b/reentr.pl
index 6b23aa865d..0e1cefdfb0 100644
--- a/reentr.pl
+++ b/reentr.pl
@@ -41,7 +41,7 @@ print <<EOF;
/*
* reentr.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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.
@@ -715,7 +715,7 @@ print <<EOF;
/*
* reentr.c
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/regcomp.c b/regcomp.c
index 6ecb9787a9..12e4d2292f 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -69,7 +69,7 @@
*
**** Alterations to Henry's code are...
****
- **** Copyright (c) 1991-2002, Larry Wall
+ **** Copyright (c) 1991-2003, 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/regcomp.h b/regcomp.h
index 8c027bfbb8..11c09f0581 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -1,6 +1,6 @@
/* regcomp.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/regexec.c b/regexec.c
index 6c7e9f88c4..ebaa9ea152 100644
--- a/regexec.c
+++ b/regexec.c
@@ -67,7 +67,7 @@
*
**** Alterations to Henry's code are...
****
- **** Copyright (c) 1991-2002, Larry Wall
+ **** Copyright (c) 1991-2003, 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/regexp.h b/regexp.h
index 05640548b1..7d3f2d17ae 100644
--- a/regexp.h
+++ b/regexp.h
@@ -1,6 +1,6 @@
/* regexp.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/run.c b/run.c
index b4b9b90387..41ec1c67a1 100644
--- a/run.c
+++ b/run.c
@@ -1,6 +1,6 @@
/* run.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/scope.c b/scope.c
index a6a2e21175..c7b900c17f 100644
--- a/scope.c
+++ b/scope.c
@@ -1,6 +1,6 @@
/* scope.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/scope.h b/scope.h
index 9a24ac9622..a8e13a58da 100644
--- a/scope.h
+++ b/scope.h
@@ -1,6 +1,6 @@
/* scope.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/sv.c b/sv.c
index 5a9fdf2d14..0ccd09ed76 100644
--- a/sv.c
+++ b/sv.c
@@ -1,6 +1,6 @@
/* sv.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/sv.h b/sv.h
index 56315c0d34..4f0b66ceae 100644
--- a/sv.h
+++ b/sv.h
@@ -1,6 +1,6 @@
/* sv.h
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/t/op/magic.t b/t/op/magic.t
index 0619c0dc34..8f598a1049 100755
--- a/t/op/magic.t
+++ b/t/op/magic.t
@@ -36,7 +36,7 @@ sub skip {
return 1;
}
-print "1..50\n";
+print "1..52\n";
$Is_MSWin32 = $^O eq 'MSWin32';
$Is_NetWare = $^O eq 'NetWare';
@@ -67,7 +67,7 @@ ok $!, $!;
close FOO; # just mention it, squelch used-only-once
if ($Is_MSWin32 || $Is_NetWare || $Is_Dos || $Is_MPE || $Is_MacOS) {
- skip('SIGINT not safe on this platform') for 1..2;
+ skip('SIGINT not safe on this platform') for 1..4;
}
else {
# the next tests are done in a subprocess because sh spits out a
@@ -98,7 +98,35 @@ END
close CMDPIPE;
- $test += 2;
+ open( CMDPIPE, "| $PERL");
+ print CMDPIPE <<'END';
+
+ { package X;
+ sub DESTROY {
+ kill "INT",$$;
+ }
+ }
+ sub x {
+ my $x=bless [], 'X';
+ return sub { $x };
+ }
+ $| = 1; # command buffering
+ $SIG{"INT"} = "ok5";
+ {
+ local $SIG{"INT"}=x();
+ print ""; # Needed to expose failure in 5.8.0 (why?)
+ }
+ sleep 1;
+ delete $SIG{"INT"};
+ kill "INT",$$; sleep 1;
+ sub ok5 {
+ print "ok 5\n";
+ }
+END
+ close CMDPIPE;
+ print $? & 0xFF ? "ok 6\n" : "not ok 6\n";
+
+ $test += 4;
}
# can we slice ENV?
diff --git a/t/op/pat.t b/t/op/pat.t
index 40a265882c..b3f42a8b46 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -6,7 +6,7 @@
$| = 1;
-print "1..990\n";
+print "1..993\n";
BEGIN {
chdir 't' if -d 't';
@@ -3123,5 +3123,21 @@ ok("bbbbac" =~ /$pattern/ && $1 eq 'a', "[perl #3547]");
ok ( $p == 5, "(??{ }) returns stale values");
}
-# last test 990
+{
+ # Subject: Odd regexp behavior
+ # From: Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>
+ # Date: Wed, 26 Feb 2003 16:53:12 +0000
+ # Message-Id: <E18o4nw-0008Ly-00@wisbech.cl.cam.ac.uk>
+ # To: perl-unicode@perl.org
+
+ $x = "\x{2019}\nk"; $x =~ s/(\S)\n(\S)/$1 $2/sg;
+ ok($x eq "\x{2019} k", "Markus Kuhn 2003-02-26");
+
+ $x = "b\nk"; $x =~ s/(\S)\n(\S)/$1 $2/sg;
+ ok($x eq "b k", "Markus Kuhn 2003-02-26");
+
+ ok("\x{2019}" =~ /\S/, "Markus Kuhn 2003-02-26");
+}
+
+# last test 993
diff --git a/t/run/switchC.t b/t/run/switchC.t
index 9283fa879b..c3cc4033a7 100644
--- a/t/run/switchC.t
+++ b/t/run/switchC.t
@@ -25,11 +25,17 @@ $r = runperl( switches => [ '-CO', '-w' ],
stderr => 1 );
is( $r, "\xC4\x80", '-CO: no warning on UTF-8 output' );
-$r = runperl( switches => [ '-CI', '-w' ],
- prog => 'print ord(<STDIN>)',
- stderr => 1,
- stdin => chr(256) );
-is( $r, 256, '-CI: read in UTF-8 output' );
+SKIP: {
+ if (exists $ENV{PERL_UNICODE} &&
+ ($ENV{PERL_UNICODE} eq "" || $ENV{PERL_UNICODE} =~ /[SO]/)) {
+ skip(qq[cannot test with PERL_UNICODE locale "" or /[SO]/], 1);
+ }
+ $r = runperl( switches => [ '-CI', '-w' ],
+ prog => 'print ord(<STDIN>)',
+ stderr => 1,
+ stdin => "\xC4\x80" );
+ is( $r, 256, '-CI: read in UTF-8 input' );
+}
$r = runperl( switches => [ '-CE', '-w' ],
prog => 'warn chr(256), qq(\n)',
diff --git a/t/uni/write.t b/t/uni/write.t
new file mode 100644
index 0000000000..95c3bbb36a
--- /dev/null
+++ b/t/uni/write.t
@@ -0,0 +1,96 @@
+#!./perl -w
+use strict;
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = qw(../lib .);
+ require "test.pl";
+}
+
+plan tests => 6;
+
+# Some tests for UTF8 and format/write
+
+our ($bitem1, $uitem1) = ("\x{ff}", "\x{100}");
+our ($bitem2, $uitem2) = ("\x{fe}", "\x{101}");
+our ($blite1, $ulite1) = ("\x{fd}", "\x{102}");
+our ($blite2, $ulite2) = ("\x{fc}", "\x{103}");
+our ($bmulti, $umulti) = ("\x{fb}\n\x{fa}\n\x{f9}\n",
+ "\x{104}\n\x{105}\n\x{106}\n");
+
+sub fmwrtest {
+ no strict 'refs';
+ my ($out, $format, $expect, $name) = @_;
+ eval "format $out =\n$format.\n"; die $@ if $@;
+ open $out, '>:utf8', 'Uni_write.tmp' or die "Can't create Uni_write.tmp";
+ write $out;
+ close $out or die "Could not close $out: $!";
+
+ open UIN, '<:utf8', 'Uni_write.tmp' or die "Can't open Uni_write.tmp";;
+ my $result = do { local $/; <UIN>; };
+ close UIN;
+
+ is($result, $expect, $name);
+}
+
+fmwrtest OUT1 => <<EOFORMAT, <<EOEXPECT, "non-UTF8 literal / UTF8 item (1)";
+$blite1 @<<
+\$uitem1
+$blite2 @<<
+\$bitem2
+EOFORMAT
+$blite1 $uitem1
+$blite2 $bitem2
+EOEXPECT
+
+fmwrtest OUT2 => <<EOFORMAT, <<EOEXPECT, "non-UTF8 literal / UTF8 item (2)";
+$blite1 @<<
+\$bitem1
+$blite2 @<<
+\$uitem2
+EOFORMAT
+$blite1 $bitem1
+$blite2 $uitem2
+EOEXPECT
+
+fmwrtest OUT3 => <<EOFORMAT, <<EOEXPECT, "UTF8 literal / non-UTF8 item (1)";
+$ulite1 @<<
+\$bitem1
+$blite2 @<<
+\$bitem2
+EOFORMAT
+$ulite1 $bitem1
+$blite2 $bitem2
+EOEXPECT
+
+fmwrtest OUT4 => <<EOFORMAT, <<EOEXPECT, "UTF8 literal / non-UTF8 item (2)";
+$blite1 @<<
+\$bitem1
+$ulite2 @<<
+\$bitem2
+EOFORMAT
+$blite1 $bitem1
+$ulite2 $bitem2
+EOEXPECT
+
+fmwrtest OUT5 => <<EOFORMAT, <<EOEXPECT, "non-UTF8 literal / UTF8 multiline";
+$blite1
+@*
+\$umulti
+$blite2
+EOFORMAT
+$blite1
+$umulti$blite2
+EOEXPECT
+
+fmwrtest OUT6 => <<EOFORMAT, <<EOEXPECT, "UTF8 literal / non-UTF8 multiline";
+$ulite1
+@*
+\$bmulti
+$blite2
+EOFORMAT
+$ulite1
+$bmulti$blite2
+EOEXPECT
+
+unlink 'Uni_write.tmp';
diff --git a/taint.c b/taint.c
index 4ca7ba7d9c..550789ac8d 100644
--- a/taint.c
+++ b/taint.c
@@ -1,6 +1,6 @@
/* taint.c
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/thrdvar.h b/thrdvar.h
index 611a5a4b5b..59d79f2d01 100644
--- a/thrdvar.h
+++ b/thrdvar.h
@@ -1,6 +1,6 @@
/* thdrvar.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/thread.h b/thread.h
index a137144031..ca04813e8d 100644
--- a/thread.h
+++ b/thread.h
@@ -1,6 +1,6 @@
/* thread.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/toke.c b/toke.c
index 64e70f11cf..31bd092493 100644
--- a/toke.c
+++ b/toke.c
@@ -1,6 +1,6 @@
/* toke.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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.
@@ -7595,6 +7595,12 @@ S_scan_formline(pTHX_ register char *s)
}
else
PL_lex_state = LEX_FORMLINE;
+ if (!IN_BYTES) {
+ if (UTF && is_utf8_string((U8*)SvPVX(stuff), SvCUR(stuff)))
+ SvUTF8_on(stuff);
+ else if (PL_encoding)
+ sv_recode_to_utf8(stuff, PL_encoding);
+ }
PL_nextval[PL_nexttoke].opval = (OP*)newSVOP(OP_CONST, 0, stuff);
force_next(THING);
PL_nextval[PL_nexttoke].ival = OP_FORMLINE;
diff --git a/universal.c b/universal.c
index 5602a10fa4..1f8a34ba7f 100644
--- a/universal.c
+++ b/universal.c
@@ -1,6 +1,6 @@
/* universal.c
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/unixish.h b/unixish.h
index 707092ccba..3bcce983ff 100644
--- a/unixish.h
+++ b/unixish.h
@@ -1,6 +1,6 @@
/* unixish.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, 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/utf8.c b/utf8.c
index a5d87a2b81..962697fe38 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1,6 +1,6 @@
/* utf8.c
*
- * Copyright (c) 1998-2002, Larry Wall
+ * Copyright (c) 1998-2003, 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/utf8.h b/utf8.h
index 6885859a3f..f4f90bb9c2 100644
--- a/utf8.h
+++ b/utf8.h
@@ -1,6 +1,6 @@
/* utf8.h
*
- * Copyright (c) 1998-2002, Larry Wall
+ * Copyright (c) 1998-2003, 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/utfebcdic.h b/utfebcdic.h
index 93b598c386..aa643fb3c8 100644
--- a/utfebcdic.h
+++ b/utfebcdic.h
@@ -1,6 +1,6 @@
/* utfebcdic.h
*
- * Copyright (c) 2001-2002, Larry Wall, Nick Ing-Simmons
+ * Copyright (c) 2001-2003, Larry Wall, 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.
diff --git a/util.c b/util.c
index 49796166a9..ebd3c5827c 100644
--- a/util.c
+++ b/util.c
@@ -1,6 +1,6 @@
/* util.c
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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.
@@ -4333,7 +4333,7 @@ Perl_parse_unicode_opts(pTHX_ char **popt)
opt = PERL_UNICODE_DEFAULT_FLAGS;
if (opt & ~PERL_UNICODE_ALL_FLAGS)
- Perl_croak(aTHX_ "Unknown Unicode option value 0x%"UVuf,
+ Perl_croak(aTHX_ "Unknown Unicode option value %"UVuf,
(UV) (opt & ~PERL_UNICODE_ALL_FLAGS));
*popt = p;
diff --git a/util.h b/util.h
index ad7a28aa81..2ee897e5db 100644
--- a/util.h
+++ b/util.h
@@ -1,6 +1,6 @@
/* util.h
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/x2p/EXTERN.h b/x2p/EXTERN.h
index 792dc2679f..444016b13c 100644
--- a/x2p/EXTERN.h
+++ b/x2p/EXTERN.h
@@ -1,6 +1,6 @@
/* $RCSfile: EXTERN.h,v $$Revision: 4.1 $$Date: 92/08/07 18:29:05 $
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/x2p/INTERN.h b/x2p/INTERN.h
index 424b14b83d..1d85d1aec4 100644
--- a/x2p/INTERN.h
+++ b/x2p/INTERN.h
@@ -1,6 +1,6 @@
/* $RCSfile: INTERN.h,v $$Revision: 4.1 $$Date: 92/08/07 18:29:06 $
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/x2p/a2p.c b/x2p/a2p.c
index a118b3ad8c..0744afd77d 100644
--- a/x2p/a2p.c
+++ b/x2p/a2p.c
@@ -5,7 +5,7 @@
#line 2 "a2p.y"
/* $RCSfile: a2p.y,v $$Revision: 4.1 $$Date: 92/08/07 18:29:12 $
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/x2p/a2p.h b/x2p/a2p.h
index 3457c43328..06625b0bb1 100644
--- a/x2p/a2p.h
+++ b/x2p/a2p.h
@@ -1,6 +1,6 @@
/* $RCSfile: a2p.h,v $$Revision: 4.1 $$Date: 92/08/07 18:29:09 $
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/x2p/a2p.y b/x2p/a2p.y
index b0da9df400..591c9b15f2 100644
--- a/x2p/a2p.y
+++ b/x2p/a2p.y
@@ -1,7 +1,7 @@
%{
/* $RCSfile: a2p.y,v $$Revision: 4.1 $$Date: 92/08/07 18:29:12 $
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/x2p/hash.c b/x2p/hash.c
index dbdc928424..b8d2e78e13 100644
--- a/x2p/hash.c
+++ b/x2p/hash.c
@@ -1,6 +1,6 @@
/* $RCSfile: hash.c,v $$Revision: 4.1 $$Date: 92/08/07 18:29:20 $
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/x2p/hash.h b/x2p/hash.h
index 85ce07c2f7..0c202d0af3 100644
--- a/x2p/hash.h
+++ b/x2p/hash.h
@@ -1,6 +1,6 @@
/* $RCSfile: hash.h,v $$Revision: 4.1 $$Date: 92/08/07 18:29:21 $
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/x2p/proto.h b/x2p/proto.h
index 5deeb3441a..02e0893ad3 100644
--- a/x2p/proto.h
+++ b/x2p/proto.h
@@ -1,6 +1,6 @@
/* proto.h
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/x2p/str.c b/x2p/str.c
index 0ecb6b7f10..d82091c989 100644
--- a/x2p/str.c
+++ b/x2p/str.c
@@ -1,6 +1,6 @@
/* $RCSfile: str.c,v $$Revision: 4.1 $$Date: 92/08/07 18:29:26 $
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/x2p/str.h b/x2p/str.h
index ed42876847..a2b0b21af0 100644
--- a/x2p/str.h
+++ b/x2p/str.h
@@ -1,6 +1,6 @@
/* $RCSfile: str.h,v $$Revision: 4.1 $$Date: 92/08/07 18:29:27 $
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/x2p/util.c b/x2p/util.c
index f0875577fe..8ad88990c6 100644
--- a/x2p/util.c
+++ b/x2p/util.c
@@ -1,6 +1,6 @@
/* $RCSfile: util.c,v $$Revision: 4.1 $$Date: 92/08/07 18:29:29 $
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/x2p/util.h b/x2p/util.h
index 146b0899c2..a2ff5b94be 100644
--- a/x2p/util.h
+++ b/x2p/util.h
@@ -1,6 +1,6 @@
/* $RCSfile: util.h,v $$Revision: 4.1 $$Date: 92/08/07 18:29:30 $
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/x2p/walk.c b/x2p/walk.c
index 0823289ef8..44908a232c 100644
--- a/x2p/walk.c
+++ b/x2p/walk.c
@@ -1,6 +1,6 @@
/* $RCSfile: walk.c,v $$Revision: 4.1 $$Date: 92/08/07 18:29:31 $
*
- * Copyright (c) 1991-2002, Larry Wall
+ * Copyright (c) 1991-2003, 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/xsutils.c b/xsutils.c
index b924c481c3..ecf4adad46 100644
--- a/xsutils.c
+++ b/xsutils.c
@@ -1,6 +1,6 @@
/* xsutils.c
*
- * Copyright (c) 1999-2002, Larry Wall
+ * Copyright (c) 1999-2003, 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.