summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-12-30 17:35:45 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-30 17:35:45 +0000
commitd2ee51b61413d0946f6558ae280350393bbe9b35 (patch)
tree3f941e8c55e495e0b4dd95247bdcd45f1d49e921 /win32
parentbfb9b5ce46a84b0059421fdf21f7b01d78085790 (diff)
parente10bb1e95b6ccccae69758ba14c120c19396b201 (diff)
downloadperl-d2ee51b61413d0946f6558ae280350393bbe9b35.tar.gz
Integrate perlio:
[ 13959] Win32 stuff: A. Use Perl_my_socketpair() B. Use PerlSock_xxxx() rather than raw xxxx() so we get to load winsock. C. (In passing) work round fact that $$ is now SvREADONLY so we need to take special measures to set it during pseudo-fork. p4raw-link: @13959 on //depot/perlio: e10bb1e95b6ccccae69758ba14c120c19396b201 p4raw-id: //depot/perl@13961
Diffstat (limited to 'win32')
-rw-r--r--win32/perlhost.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h
index 9493a73187..3be76ed817 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -1436,9 +1436,7 @@ PerlSockSocket(struct IPerlSock* piPerl, int af, int type, int protocol)
int
PerlSockSocketpair(struct IPerlSock* piPerl, int domain, int type, int protocol, int* fds)
{
- dTHX;
- Perl_croak(aTHX_ "socketpair not implemented!\n");
- return 0;
+ return Perl_my_socketpair(domain, type, protocol, fds);
}
int
@@ -1695,8 +1693,12 @@ win32_start_child(LPVOID arg)
w32_pseudo_id = -pid;
}
#endif
- if (tmpgv = gv_fetchpv("$", TRUE, SVt_PV))
- sv_setiv(GvSV(tmpgv), -(IV)w32_pseudo_id);
+ if (tmpgv = gv_fetchpv("$", TRUE, SVt_PV)) {
+ SV *sv = GvSV(tmpgv);
+ SvREADONLY_off(sv);
+ sv_setiv(sv, -(IV)w32_pseudo_id);
+ SvREADONLY_on(sv);
+ }
hv_clear(PL_pidstatus);
/* push a zero on the stack (we are the child) */