Change 12531 by jhi@alpha on 2001/10/20 14:05:47
Integrate perlio: PerlIO win32 fixes.
Affected files ...
... //depot/perl/embed.h#295 integrate
... //depot/perl/embed.pl#283 integrate
... //depot/perl/embedvar.h#126 integrate
... //depot/perl/ext/threads/threads.xs#17 integrate
... //depot/perl/global.sym#179 integrate
... //depot/perl/perl.h#403 integrate
... //depot/perl/perlapi.c#125 integrate
... //depot/perl/perlapi.h#48 integrate
... //depot/perl/perlio.c#126 integrate
... //depot/perl/perlsdio.h#23 integrate
... //depot/perl/pod/perlapi.pod#98 integrate
... //depot/perl/proto.h#338 integrate
... //depot/perl/sv.h#101 integrate
... //depot/perl/win32/win32io.c#10 integrate
Differences ...
==== //depot/perl/embed.h#295 (text+w) ====
Index: perl/embed.h
--- perl/embed.h.~1~ Sat Oct 20 08:15:05 2001
+++ perl/embed.h Sat Oct 20 08:15:05 2001
@@ -637,7 +637,6 @@
#define sv_2iv Perl_sv_2iv
#define sv_2mortal Perl_sv_2mortal
#define sv_2nv Perl_sv_2nv
-#define sv_2pv Perl_sv_2pv
#define sv_2pvutf8 Perl_sv_2pvutf8
#define sv_2pvbyte Perl_sv_2pvbyte
#define sv_pvn_nomg Perl_sv_pvn_nomg
@@ -655,8 +654,6 @@
#define sv_catpvf Perl_sv_catpvf
#define sv_vcatpvf Perl_sv_vcatpvf
#define sv_catpv Perl_sv_catpv
-#define sv_catpvn Perl_sv_catpvn
-#define sv_catsv Perl_sv_catsv
#define sv_chop Perl_sv_chop
#define sv_clean_all Perl_sv_clean_all
#define sv_clean_objs Perl_sv_clean_objs
@@ -689,7 +686,6 @@
#define sv_peek Perl_sv_peek
#define sv_pos_u2b Perl_sv_pos_u2b
#define sv_pos_b2u Perl_sv_pos_b2u
-#define sv_pvn_force Perl_sv_pvn_force
#define sv_pvutf8n_force Perl_sv_pvutf8n_force
#define sv_pvbyten_force Perl_sv_pvbyten_force
#define sv_reftype Perl_sv_reftype
@@ -709,7 +705,6 @@
#define sv_setref_pvn Perl_sv_setref_pvn
#define sv_setpv Perl_sv_setpv
#define sv_setpvn Perl_sv_setpvn
-#define sv_setsv Perl_sv_setsv
#define sv_taint Perl_sv_taint
#define sv_tainted Perl_sv_tainted
#define sv_unmagic Perl_sv_unmagic
@@ -830,7 +825,6 @@
#define sv_pv Perl_sv_pv
#define sv_pvutf8 Perl_sv_pvutf8
#define sv_pvbyte Perl_sv_pvbyte
-#define sv_utf8_upgrade Perl_sv_utf8_upgrade
#define sv_utf8_downgrade Perl_sv_utf8_downgrade
#define sv_utf8_encode Perl_sv_utf8_encode
#define sv_utf8_decode Perl_sv_utf8_decode
@@ -1203,6 +1197,7 @@
#define ck_concat Perl_ck_concat
#define ck_defined Perl_ck_defined
#define ck_delete Perl_ck_delete
+#define ck_die Perl_ck_die
#define ck_eof Perl_ck_eof
#define ck_eval Perl_ck_eval
#define ck_exec Perl_ck_exec
@@ -2154,7 +2149,6 @@
#define sv_2iv(a) Perl_sv_2iv(aTHX_ a)
#define sv_2mortal(a) Perl_sv_2mortal(aTHX_ a)
#define sv_2nv(a) Perl_sv_2nv(aTHX_ a)
-#define sv_2pv(a,b) Perl_sv_2pv(aTHX_ a,b)
#define sv_2pvutf8(a,b) Perl_sv_2pvutf8(aTHX_ a,b)
#define sv_2pvbyte(a,b) Perl_sv_2pvbyte(aTHX_ a,b)
#define sv_pvn_nomg(a,b) Perl_sv_pvn_nomg(aTHX_ a,b)
@@ -2171,8 +2165,6 @@
#define sv_bless(a,b) Perl_sv_bless(aTHX_ a,b)
#define sv_vcatpvf(a,b,c) Perl_sv_vcatpvf(aTHX_ a,b,c)
#define sv_catpv(a,b) Perl_sv_catpv(aTHX_ a,b)
-#define sv_catpvn(a,b,c) Perl_sv_catpvn(aTHX_ a,b,c)
-#define sv_catsv(a,b) Perl_sv_catsv(aTHX_ a,b)
#define sv_chop(a,b) Perl_sv_chop(aTHX_ a,b)
#define sv_clean_all() Perl_sv_clean_all(aTHX)
#define sv_clean_objs() Perl_sv_clean_objs(aTHX)
@@ -2205,7 +2197,6 @@
#define sv_peek(a) Perl_sv_peek(aTHX_ a)
#define sv_pos_u2b(a,b,c) Perl_sv_pos_u2b(aTHX_ a,b,c)
#define sv_pos_b2u(a,b) Perl_sv_pos_b2u(aTHX_ a,b)
-#define sv_pvn_force(a,b) Perl_sv_pvn_force(aTHX_ a,b)
#define sv_pvutf8n_force(a,b) Perl_sv_pvutf8n_force(aTHX_ a,b)
#define sv_pvbyten_force(a,b) Perl_sv_pvbyten_force(aTHX_ a,b)
#define sv_reftype(a,b) Perl_sv_reftype(aTHX_ a,b)
@@ -2224,7 +2215,6 @@
#define sv_setref_pvn(a,b,c,d) Perl_sv_setref_pvn(aTHX_ a,b,c,d)
#define sv_setpv(a,b) Perl_sv_setpv(aTHX_ a,b)
#define sv_setpvn(a,b,c) Perl_sv_setpvn(aTHX_ a,b,c)
-#define sv_setsv(a,b) Perl_sv_setsv(aTHX_ a,b)
#define sv_taint(a) Perl_sv_taint(aTHX_ a)
#define sv_tainted(a) Perl_sv_tainted(aTHX_ a)
#define sv_unmagic(a,b) Perl_sv_unmagic(aTHX_ a,b)
@@ -2339,7 +2329,6 @@
#define sv_pv(a) Perl_sv_pv(aTHX_ a)
#define sv_pvutf8(a) Perl_sv_pvutf8(aTHX_ a)
#define sv_pvbyte(a) Perl_sv_pvbyte(aTHX_ a)
-#define sv_utf8_upgrade(a) Perl_sv_utf8_upgrade(aTHX_ a)
#define sv_utf8_downgrade(a,b) Perl_sv_utf8_downgrade(aTHX_ a,b)
#define sv_utf8_encode(a) Perl_sv_utf8_encode(aTHX_ a)
#define sv_utf8_decode(a) Perl_sv_utf8_decode(aTHX_ a)
@@ -2711,6 +2700,7 @@
#define ck_concat(a) Perl_ck_concat(aTHX_ a)
#define ck_defined(a) Perl_ck_defined(aTHX_ a)
#define ck_delete(a) Perl_ck_delete(aTHX_ a)
+#define ck_die(a) Perl_ck_die(aTHX_ a)
#define ck_eof(a) Perl_ck_eof(aTHX_ a)
#define ck_eval(a) Perl_ck_eval(aTHX_ a)
#define ck_exec(a) Perl_ck_exec(aTHX_ a)
==== //depot/perl/embed.pl#283 (xtext) ====
Index: perl/embed.pl
--- perl/embed.pl.~1~ Sat Oct 20 08:15:05 2001
+++ perl/embed.pl Sat Oct 20 08:15:05 2001
@@ -114,6 +114,7 @@
}
else {
my ($flags,$retval,$func,@args) = @_;
+ $ret .= '/* ' if $flags =~ /m/;
if ($flags =~ /s/) {
$retval = "STATIC $retval";
$func = "S_$func";
@@ -145,7 +146,9 @@
$prefix, $args - 1, $prefix, $args;
$ret .= "\n#endif\n";
}
- $ret .= ";\n";
+ $ret .= ";";
+ $ret .= ' */' if $flags =~ /m/;
+ $ret .= "\n";
}
$ret;
}
@@ -155,7 +158,7 @@
my $ret = "";
if (@_ > 1) {
my ($flags,$retval,$func,@args) = @_;
- if ($flags =~ /A/ && $flags !~ /x/) { # public API, so export
+ if ($flags =~ /A/ && $flags !~ /[xm]/) { # public API, so export
$func = "Perl_$func" if $flags =~ /p/;
$ret = "$func\n";
}
@@ -343,7 +346,7 @@
}
else {
my ($flags,$retval,$func,@args) = @_;
- unless ($flags =~ /o/) {
+ unless ($flags =~ /[om]/) {
if ($flags =~ /s/) {
$ret .= hide($func,"S_$func");
}
@@ -376,7 +379,7 @@
}
else {
my ($flags,$retval,$func,@args) = @_;
- unless ($flags =~ /o/) {
+ unless ($flags =~ /[om]/) {
my $args = scalar @args;
if ($args and $args[$args-1] =~ /\.\.\./) {
# we're out of luck for varargs functions under CPP
@@ -1052,6 +1055,7 @@
:
: flags are single letters with following meanings:
: A member of public API
+: m Implemented as a macro - no export, no proto, no #define
: d function has documentation with its source
: s static function, should have an S_ prefix in source
: file
@@ -1718,7 +1722,7 @@
Apd |IV |sv_2iv |SV* sv
Apd |SV* |sv_2mortal |SV* sv
Apd |NV |sv_2nv |SV* sv
-Ap |char* |sv_2pv |SV* sv|STRLEN* lp
+Am |char* |sv_2pv |SV* sv|STRLEN* lp
Apd |char* |sv_2pvutf8 |SV* sv|STRLEN* lp
Apd |char* |sv_2pvbyte |SV* sv|STRLEN* lp
Ap |char* |sv_pvn_nomg |SV* sv|STRLEN* lp
@@ -1736,8 +1740,8 @@
Afpd |void |sv_catpvf |SV* sv|const char* pat|...
Ap |void |sv_vcatpvf |SV* sv|const char* pat|va_list* args
Apd |void |sv_catpv |SV* sv|const char* ptr
-Apd |void |sv_catpvn |SV* sv|const char* ptr|STRLEN len
-Apd |void |sv_catsv |SV* dsv|SV* ssv
+Amd |void |sv_catpvn |SV* sv|const char* ptr|STRLEN len
+Amd |void |sv_catsv |SV* dsv|SV* ssv
Apd |void |sv_chop |SV* sv|char* ptr
pd |I32 |sv_clean_all
pd |void |sv_clean_objs
@@ -1772,7 +1776,7 @@
Ap |char* |sv_peek |SV* sv
Apd |void |sv_pos_u2b |SV* sv|I32* offsetp|I32* lenp
Apd |void |sv_pos_b2u |SV* sv|I32* offsetp
-Apd |char* |sv_pvn_force |SV* sv|STRLEN* lp
+Amd |char* |sv_pvn_force |SV* sv|STRLEN* lp
Apd |char* |sv_pvutf8n_force|SV* sv|STRLEN* lp
Apd |char* |sv_pvbyten_force|SV* sv|STRLEN* lp
Apd |char* |sv_reftype |SV* sv|int ob
@@ -1793,7 +1797,7 @@
|STRLEN n
Apd |void |sv_setpv |SV* sv|const char* ptr
Apd |void |sv_setpvn |SV* sv|const char* ptr|STRLEN len
-Apd |void |sv_setsv |SV* dsv|SV* ssv
+Amd |void |sv_setsv |SV* dsv|SV* ssv
Apd |void |sv_taint |SV* sv
Apd |bool |sv_tainted |SV* sv
Apd |int |sv_unmagic |SV* sv|int type
@@ -1925,7 +1929,7 @@
Apd |char* |sv_pv |SV *sv
Apd |char* |sv_pvutf8 |SV *sv
Apd |char* |sv_pvbyte |SV *sv
-Apd |STRLEN |sv_utf8_upgrade|SV *sv
+Amd |STRLEN |sv_utf8_upgrade|SV *sv
ApdM |bool |sv_utf8_downgrade|SV *sv|bool fail_ok
Apd |void |sv_utf8_encode |SV *sv
ApdM |bool |sv_utf8_decode |SV *sv
==== //depot/perl/embedvar.h#126 (text+w) ====
Index: perl/embedvar.h
--- perl/embedvar.h.~1~ Sat Oct 20 08:15:05 2001
+++ perl/embedvar.h Sat Oct 20 08:15:05 2001
@@ -1321,7 +1321,6 @@
#define PL_do_undump (PL_Vars.Gdo_undump)
#define PL_hexdigit (PL_Vars.Ghexdigit)
#define PL_malloc_mutex (PL_Vars.Gmalloc_mutex)
-#define PL_my_inv_rand_max (PL_Vars.Gmy_inv_rand_max)
#define PL_op_mutex (PL_Vars.Gop_mutex)
#define PL_patleave (PL_Vars.Gpatleave)
#define PL_sharedsv_space (PL_Vars.Gsharedsv_space)
@@ -1336,7 +1335,6 @@
#define PL_Gdo_undump PL_do_undump
#define PL_Ghexdigit PL_hexdigit
#define PL_Gmalloc_mutex PL_malloc_mutex
-#define PL_Gmy_inv_rand_max PL_my_inv_rand_max
#define PL_Gop_mutex PL_op_mutex
#define PL_Gpatleave PL_patleave
#define PL_Gsharedsv_space PL_sharedsv_space
==== //depot/perl/ext/threads/threads.xs#17 (xtext) ====
Index: perl/ext/threads/threads.xs
--- perl/ext/threads/threads.xs.~1~ Sat Oct 20 08:15:05 2001
+++ perl/ext/threads/threads.xs Sat Oct 20 08:15:05 2001
@@ -102,13 +102,13 @@
temp_store = Perl_get_sv(current_perl, "threads::paramtempstore",
TRUE | GV_ADDMULTI);
- Perl_sv_setsv(current_perl, temp_store,params);
+ Perl_sv_setsv_flags(current_perl, temp_store,params, SV_GMAGIC);
params = NULL;
temp_store = NULL;
temp_store = Perl_get_sv(current_perl, "threads::calltempstore",
TRUE | GV_ADDMULTI);
- Perl_sv_setsv(current_perl,temp_store, init_function);
+ Perl_sv_setsv_flags(current_perl,temp_store, init_function, SV_GMAGIC);
init_function = NULL;
temp_store = NULL;
@@ -129,18 +129,18 @@
* inteprreter */
temp_store = Perl_get_sv(thread->interp, "threads::paramtempstore",FALSE);
- Perl_sv_setsv(thread->interp,temp_store, &PL_sv_undef);
+ Perl_sv_setsv_flags(thread->interp,temp_store, &PL_sv_undef, SV_GMAGIC);
temp_store = Perl_get_sv(thread->interp,"threads::calltempstore",FALSE);
- Perl_sv_setsv(thread->interp,temp_store, &PL_sv_undef);
+ Perl_sv_setsv_flags(thread->interp,temp_store, &PL_sv_undef, SV_GMAGIC);
PERL_SET_CONTEXT(current_perl);
temp_store = Perl_get_sv(current_perl,"threads::paramtempstore",FALSE);
- Perl_sv_setsv(current_perl, temp_store, &PL_sv_undef);
+ Perl_sv_setsv_flags(current_perl, temp_store, &PL_sv_undef, SV_GMAGIC);
temp_store = Perl_get_sv(current_perl,"threads::calltempstore",FALSE);
- Perl_sv_setsv(current_perl, temp_store, &PL_sv_undef);
+ Perl_sv_setsv_flags(current_perl, temp_store, &PL_sv_undef, SV_GMAGIC);
/* let's init the thread */
==== //depot/perl/global.sym#179 (text+w) ====
Index: perl/global.sym
--- perl/global.sym.~1~ Sat Oct 20 08:15:05 2001
+++ perl/global.sym Sat Oct 20 08:15:05 2001
@@ -393,7 +393,6 @@
Perl_sv_2iv
Perl_sv_2mortal
Perl_sv_2nv
-Perl_sv_2pv
Perl_sv_2pvutf8
Perl_sv_2pvbyte
Perl_sv_pvn_nomg
@@ -410,8 +409,6 @@
Perl_sv_catpvf
Perl_sv_vcatpvf
Perl_sv_catpv
-Perl_sv_catpvn
-Perl_sv_catsv
Perl_sv_chop
Perl_sv_clear
Perl_sv_cmp
@@ -439,7 +436,6 @@
Perl_sv_peek
Perl_sv_pos_u2b
Perl_sv_pos_b2u
-Perl_sv_pvn_force
Perl_sv_pvutf8n_force
Perl_sv_pvbyten_force
Perl_sv_reftype
@@ -459,7 +455,6 @@
Perl_sv_setref_pvn
Perl_sv_setpv
Perl_sv_setpvn
-Perl_sv_setsv
Perl_sv_taint
Perl_sv_tainted
Perl_sv_unmagic
@@ -549,7 +544,6 @@
Perl_sv_pv
Perl_sv_pvutf8
Perl_sv_pvbyte
-Perl_sv_utf8_upgrade
Perl_sv_utf8_downgrade
Perl_sv_utf8_encode
Perl_sv_utf8_decode
==== //depot/perl/perl.h#403 (text) ====
Index: perl/perl.h
--- perl/perl.h.~1~ Sat Oct 20 08:15:05 2001
+++ perl/perl.h Sat Oct 20 08:15:05 2001
@@ -425,6 +425,9 @@
# define MYSWAP
#endif
+/* Cannot include embed.h here on Win32 as win32.h has not
+ yet been included and defines some config variables e.g. HAVE_INTERP_INTERN
+ */
#if !defined(PERL_FOR_X2P) && !(defined(WIN32)||defined(VMS))
# include "embed.h"
#endif
@@ -1891,7 +1894,7 @@
#endif /* NETWARE */
#endif /* USE_5005THREADS || USE_ITHREADS */
-#ifdef WIN32
+#if defined(WIN32)
# include "win32.h"
#endif
@@ -3229,6 +3232,7 @@
#endif
#if defined(WIN32)
+/* Now all the config stuff is setup we can include embed.h */
# include "embed.h"
#endif
==== //depot/perl/perlapi.c#125 (text+w) ====
==== //depot/perl/perlapi.h#48 (text+w) ====
Index: perl/perlapi.h
--- perl/perlapi.h.~1~ Sat Oct 20 08:15:05 2001
+++ perl/perlapi.h Sat Oct 20 08:15:05 2001
@@ -923,8 +923,6 @@
#define PL_hexdigit (*Perl_Ghexdigit_ptr(NULL))
#undef PL_malloc_mutex
#define PL_malloc_mutex (*Perl_Gmalloc_mutex_ptr(NULL))
-#undef PL_my_inv_rand_max
-#define PL_my_inv_rand_max (*Perl_Gmy_inv_rand_max_ptr(NULL))
#undef PL_op_mutex
#define PL_op_mutex (*Perl_Gop_mutex_ptr(NULL))
#undef PL_patleave
==== //depot/perl/perlio.c#126 (text) ====
Index: perl/perlio.c
--- perl/perlio.c.~1~ Sat Oct 20 08:15:05 2001
+++ perl/perlio.c Sat Oct 20 08:15:05 2001
@@ -128,6 +128,24 @@
#endif
}
+PerlIO *
+PerlIO_fdupopen(pTHX_ PerlIO *f, CLONE_PARAMS *param)
+{
+ if (f) {
+ int fd = PerlLIO_dup(PerlIO_fileno(f));
+ if (fd >= 0) {
+ /* the r+ is a hack */
+ return PerlIO_fdopen(fd, "r+");
+ }
+ return NULL;
+ }
+ else {
+ SETERRNO(EBADF, SS$_IVCHAN);
+ }
+ return NULL;
+}
+
+
/*
* De-mux PerlIO_openn() into fdopen, freopen and fopen type entries
*/
==== //depot/perl/perlsdio.h#23 (text) ====
Index: perl/perlsdio.h
--- perl/perlsdio.h.~1~ Sat Oct 20 08:15:05 2001
+++ perl/perlsdio.h Sat Oct 20 08:15:05 2001
@@ -13,7 +13,6 @@
#define PerlIO_stdout() stdout
#define PerlIO_stdin() stdin
-#define PerlIO_fdupopen(f) (f)
#define PerlIO_isutf8(f) 0
#define PerlIO_printf fprintf
==== //depot/perl/pod/perlapi.pod#98 (text+w) ====
Index: perl/pod/perlapi.pod
--- perl/pod/perlapi.pod.~1~ Sat Oct 20 08:15:05 2001
+++ perl/pod/perlapi.pod Sat Oct 20 08:15:05 2001
@@ -329,7 +329,7 @@
SV* cv_const_sv(CV* cv)
=for hackers
-Found in file op.c
+Found in file opmini.c
=item dAX
@@ -1234,7 +1234,7 @@
void load_module(U32 flags, SV* name, SV* ver, ...)
=for hackers
-Found in file op.c
+Found in file opmini.c
=item looks_like_number
@@ -1373,7 +1373,7 @@
CV* newCONSTSUB(HV* stash, char* name, SV* sv)
=for hackers
-Found in file op.c
+Found in file opmini.c
=item newHV
@@ -1533,7 +1533,7 @@
Used by C<xsubpp> to hook up XSUBs as Perl subs.
=for hackers
-Found in file op.c
+Found in file opmini.c
=item newXSproto
@@ -2397,22 +2397,22 @@
=for hackers
Found in file sv.h
-=item SvNVX
+=item SvNVx
-Returns the raw value in the SV's NV slot, without checks or conversions.
-Only use when you are sure SvNOK is true. See also C<SvNV()>.
+Coerces the given SV to a double and returns it. Guarantees to evaluate
+sv only once. Use the more efficent C<SvNV> otherwise.
- NV SvNVX(SV* sv)
+ NV SvNVx(SV* sv)
=for hackers
Found in file sv.h
-=item SvNVx
+=item SvNVX
-Coerces the given SV to a double and returns it. Guarantees to evaluate
-sv only once. Use the more efficent C<SvNV> otherwise.
+Returns the raw value in the SV's NV slot, without checks or conversions.
+Only use when you are sure SvNOK is true. See also C<SvNV()>.
- NV SvNVx(SV* sv)
+ NV SvNVX(SV* sv)
=for hackers
Found in file sv.h
@@ -2606,21 +2606,21 @@
=for hackers
Found in file sv.h
-=item SvPVx
+=item SvPVX
-A version of C<SvPV> which guarantees to evaluate sv only once.
+Returns a pointer to the physical string in the SV. The SV must contain a
+string.
- char* SvPVx(SV* sv, STRLEN len)
+ char* SvPVX(SV* sv)
=for hackers
Found in file sv.h
-=item SvPVX
+=item SvPVx
-Returns a pointer to the physical string in the SV. The SV must contain a
-string.
+A version of C<SvPV> which guarantees to evaluate sv only once.
- char* SvPVX(SV* sv)
+ char* SvPVx(SV* sv, STRLEN len)
=for hackers
Found in file sv.h
@@ -2827,19 +2827,19 @@
=for hackers
Found in file sv.h
-=item SvTYPE
+=item svtype
-Returns the type of the SV. See C<svtype>.
+An enum of flags for Perl types. These are found in the file B<sv.h>
+in the C<svtype> enum. Test these flags with the C<SvTYPE> macro.
- svtype SvTYPE(SV* sv)
-
=for hackers
Found in file sv.h
-=item svtype
+=item SvTYPE
+
+Returns the type of the SV. See C<svtype>.
-An enum of flags for Perl types. These are found in the file B<sv.h>
-in the C<svtype> enum. Test these flags with the C<SvTYPE> macro.
+ svtype SvTYPE(SV* sv)
=for hackers
Found in file sv.h
==== //depot/perl/proto.h#338 (text+w) ====
Index: perl/proto.h
--- perl/proto.h.~1~ Sat Oct 20 08:15:05 2001
+++ perl/proto.h Sat Oct 20 08:15:05 2001
@@ -701,7 +701,7 @@
PERL_CALLCONV IV Perl_sv_2iv(pTHX_ SV* sv);
PERL_CALLCONV SV* Perl_sv_2mortal(pTHX_ SV* sv);
PERL_CALLCONV NV Perl_sv_2nv(pTHX_ SV* sv);
-PERL_CALLCONV char* Perl_sv_2pv(pTHX_ SV* sv, STRLEN* lp);
+/* PERL_CALLCONV char* sv_2pv(pTHX_ SV* sv, STRLEN* lp); */
PERL_CALLCONV char* Perl_sv_2pvutf8(pTHX_ SV* sv, STRLEN* lp);
PERL_CALLCONV char* Perl_sv_2pvbyte(pTHX_ SV* sv, STRLEN* lp);
PERL_CALLCONV char* Perl_sv_pvn_nomg(pTHX_ SV* sv, STRLEN* lp);
@@ -723,8 +723,8 @@
;
PERL_CALLCONV void Perl_sv_vcatpvf(pTHX_ SV* sv, const char* pat, va_list* args);
PERL_CALLCONV void Perl_sv_catpv(pTHX_ SV* sv, const char* ptr);
-PERL_CALLCONV void Perl_sv_catpvn(pTHX_ SV* sv, const char* ptr, STRLEN len);
-PERL_CALLCONV void Perl_sv_catsv(pTHX_ SV* dsv, SV* ssv);
+/* PERL_CALLCONV void sv_catpvn(pTHX_ SV* sv, const char* ptr, STRLEN len); */
+/* PERL_CALLCONV void sv_catsv(pTHX_ SV* dsv, SV* ssv); */
PERL_CALLCONV void Perl_sv_chop(pTHX_ SV* sv, char* ptr);
PERL_CALLCONV I32 Perl_sv_clean_all(pTHX);
PERL_CALLCONV void Perl_sv_clean_objs(pTHX);
@@ -757,7 +757,7 @@
PERL_CALLCONV char* Perl_sv_peek(pTHX_ SV* sv);
PERL_CALLCONV void Perl_sv_pos_u2b(pTHX_ SV* sv, I32* offsetp, I32* lenp);
PERL_CALLCONV void Perl_sv_pos_b2u(pTHX_ SV* sv, I32* offsetp);
-PERL_CALLCONV char* Perl_sv_pvn_force(pTHX_ SV* sv, STRLEN* lp);
+/* PERL_CALLCONV char* sv_pvn_force(pTHX_ SV* sv, STRLEN* lp); */
PERL_CALLCONV char* Perl_sv_pvutf8n_force(pTHX_ SV* sv, STRLEN* lp);
PERL_CALLCONV char* Perl_sv_pvbyten_force(pTHX_ SV* sv, STRLEN* lp);
PERL_CALLCONV char* Perl_sv_reftype(pTHX_ SV* sv, int ob);
@@ -781,7 +781,7 @@
PERL_CALLCONV SV* Perl_sv_setref_pvn(pTHX_ SV* rv, const char* classname, char*
pv, STRLEN n);
PERL_CALLCONV void Perl_sv_setpv(pTHX_ SV* sv, const char* ptr);
PERL_CALLCONV void Perl_sv_setpvn(pTHX_ SV* sv, const char* ptr, STRLEN len);
-PERL_CALLCONV void Perl_sv_setsv(pTHX_ SV* dsv, SV* ssv);
+/* PERL_CALLCONV void sv_setsv(pTHX_ SV* dsv, SV* ssv); */
PERL_CALLCONV void Perl_sv_taint(pTHX_ SV* sv);
PERL_CALLCONV bool Perl_sv_tainted(pTHX_ SV* sv);
PERL_CALLCONV int Perl_sv_unmagic(pTHX_ SV* sv, int type);
@@ -922,7 +922,7 @@
PERL_CALLCONV char* Perl_sv_pv(pTHX_ SV *sv);
PERL_CALLCONV char* Perl_sv_pvutf8(pTHX_ SV *sv);
PERL_CALLCONV char* Perl_sv_pvbyte(pTHX_ SV *sv);
-PERL_CALLCONV STRLEN Perl_sv_utf8_upgrade(pTHX_ SV *sv);
+/* PERL_CALLCONV STRLEN sv_utf8_upgrade(pTHX_ SV *sv); */
PERL_CALLCONV bool Perl_sv_utf8_downgrade(pTHX_ SV *sv, bool fail_ok);
PERL_CALLCONV void Perl_sv_utf8_encode(pTHX_ SV *sv);
PERL_CALLCONV bool Perl_sv_utf8_decode(pTHX_ SV *sv);
==== //depot/perl/sv.h#101 (text) ====
Index: perl/sv.h
--- perl/sv.h.~1~ Sat Oct 20 08:15:05 2001
+++ perl/sv.h Sat Oct 20 08:15:05 2001
@@ -972,29 +972,15 @@
#undef SvNV
#define SvNV(sv) (SvNOK(sv) ? SvNVX(sv) : sv_2nv(sv))
-#define sv_setsv_macro(dsv, ssv) sv_setsv_flags(dsv, ssv, SV_GMAGIC)
+#define sv_setsv(dsv, ssv) sv_setsv_flags(dsv, ssv, SV_GMAGIC)
#define sv_setsv_nomg(dsv, ssv) sv_setsv_flags(dsv, ssv, 0)
-#define sv_catsv_macro(dsv, ssv) sv_catsv_flags(dsv, ssv, SV_GMAGIC)
+#define sv_catsv(dsv, ssv) sv_catsv_flags(dsv, ssv, SV_GMAGIC)
#define sv_catsv_nomg(dsv, ssv) sv_catsv_flags(dsv, ssv, 0)
-#define sv_catpvn_macro(dsv, sstr, slen) sv_catpvn_flags(dsv, sstr, slen, SV_GMAGIC)
-#define sv_2pv_macro(sv, lp) sv_2pv_flags(sv, lp, SV_GMAGIC)
+#define sv_catpvn(dsv, sstr, slen) sv_catpvn_flags(dsv, sstr, slen, SV_GMAGIC)
+#define sv_2pv(sv, lp) sv_2pv_flags(sv, lp, SV_GMAGIC)
#define sv_2pv_nomg(sv, lp) sv_2pv_flags(sv, lp, 0)
-#define sv_pvn_force_macro(sv, lp) sv_pvn_force_flags(sv, lp, SV_GMAGIC)
-#define sv_utf8_upgrade_macro(sv) sv_utf8_upgrade_flags(sv, SV_GMAGIC)
-
-/* function style also available for sourcecompat */
-#undef sv_setsv
-#define sv_setsv(dsv, ssv) sv_setsv_macro(dsv, ssv)
-#undef sv_catsv
-#define sv_catsv(dsv, ssv) sv_catsv_macro(dsv, ssv)
-#undef sv_catpvn
-#define sv_catpvn(dsv, sstr, slen) sv_catpvn_macro(dsv, sstr, slen)
-#undef sv_2pv
-#define sv_2pv(sv, lp) sv_2pv_macro(sv, lp)
-#undef sv_pvn_force
-#define sv_pvn_force(sv, lp) sv_pvn_force_macro(sv, lp)
-#undef sv_utf8_upgrade
-#define sv_utf8_upgrade(sv) sv_utf8_upgrade_macro(sv)
+#define sv_pvn_force(sv, lp) sv_pvn_force_flags(sv, lp, SV_GMAGIC)
+#define sv_utf8_upgrade(sv) sv_utf8_upgrade_flags(sv, SV_GMAGIC)
#undef SvPV
#define SvPV(sv, lp) SvPV_flags(sv, lp, SV_GMAGIC)
==== //depot/perl/win32/win32io.c#10 (text) ====
Index: perl/win32/win32io.c
--- perl/win32/win32io.c.~1~ Sat Oct 20 08:15:05 2001
+++ perl/win32/win32io.c Sat Oct 20 08:15:05 2001
@@ -297,8 +297,37 @@
PerlIO *
PerlIOWin32_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *params)
{
- /* Almost certainly needs more work */
- return PerlIOBase_dup(aTHX_ f, o, params);
+ PerlIOWin32 *os = PerlIOSelf(f,PerlIOWin32);
+ HANDLE proc = GetCurrentProcess();
+ HANDLE new;
+ if (DuplicateHandle(proc, os->h, proc, &new, 0, FALSE, DUPLICATE_SAME_ACCESS))
+ {
+ char mode[8];
+ int fd = win32_open_osfhandle((long) new,
+PerlIOUnix_oflags(PerlIO_modestr(o,mode)));
+ if (fd >= 0)
+ {
+ f = PerlIOBase_dup(aTHX_ f, o, params);
+ if (f)
+ {
+ PerlIOWin32 *fs = PerlIOSelf(f,PerlIOWin32);
+ fs->h = new;
+ fs->fd = fd;
+ fs->refcnt = 1;
+ fdtable[fd] = fs;
+ if (fd > max_open_fd)
+ max_open_fd = fd;
+ }
+ else
+ {
+ win32_close(fd);
+ }
+ }
+ else
+ {
+ CloseHandle(new);
+ }
+ }
+ return f;
}
PerlIO_funcs PerlIO_win32 = {
End of Patch.