summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-12-30 16:53:42 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-12-30 16:53:42 +0000
commite10bb1e95b6ccccae69758ba14c120c19396b201 (patch)
treecb967e9a2a62f06b9b6cf024f1d9b28cdaf8e0d0 /win32
parent4d70086c95dd7d504d588db11daab964a36e98ee (diff)
downloadperl-e10bb1e95b6ccccae69758ba14c120c19396b201.tar.gz
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-id: //depot/perlio@13959
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 475158fce5..463911e9db 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) */