summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-03 17:12:33 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-03 17:12:33 +0000
commit968277801164b16eb55f9f8fd3162dc3b6226110 (patch)
tree9e3909d2149d62cac469cfb6d84bdfd4353dd19f /doio.c
parent5d3fdfebb3d34f909dfbefe2c2cdf38bab171cf9 (diff)
downloadperl-968277801164b16eb55f9f8fd3162dc3b6226110.tar.gz
Remove last traces of "tokenbuf as temp buffer" and removed it
from struct thread. Added missing thr->Tfoo defines for statbuf and timesbuf and removed unused Tbuf field. p4raw-id: //depot/perl@106
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/doio.c b/doio.c
index d905af1e40..bb0ac470fb 100644
--- a/doio.c
+++ b/doio.c
@@ -283,6 +283,7 @@ PerlIO *supplied_fp;
}
if (IoTYPE(io) &&
IoTYPE(io) != '|' && IoTYPE(io) != '-') {
+ dTHR;
if (Fstat(PerlIO_fileno(fp),&statbuf) < 0) {
(void)PerlIO_close(fp);
goto say_false;
@@ -297,8 +298,9 @@ PerlIO *supplied_fp;
!statbuf.st_mode
#endif
) {
- Sock_size_t buflen = sizeof tokenbuf;
- if (getsockname(PerlIO_fileno(fp), (struct sockaddr *)tokenbuf,
+ char tmpbuf[256];
+ Sock_size_t buflen = sizeof tmpbuf;
+ if (getsockname(PerlIO_fileno(fp), (struct sockaddr *)tmpbuf,
&buflen) >= 0
|| errno != ENOTSOCK)
IoTYPE(io) = 's'; /* some OS's return 0 on fstat()ed socket */
@@ -340,6 +342,7 @@ PerlIO *supplied_fp;
#endif
IoIFP(io) = fp;
if (writing) {
+ dTHR;
if (IoTYPE(io) == 's'
|| (IoTYPE(io) == '>' && S_ISCHR(statbuf.st_mode)) ) {
if (!(IoOFP(io) = PerlIO_fdopen(PerlIO_fileno(fp),"w"))) {