X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=win32%2Fwin32io.c;h=f0f71e7860c9ca58e2cd4141817284f2dba669c3;hb=0d53b15fa4cfc19af1f1f60c6ad17eac8f14cce3;hp=3cf31c5629583048c6dbfae05a9f54e4f9541cfd;hpb=755e775944b8eceb91d29ebca620c9e5cf122f30;p=p5sagit%2Fp5-mst-13.2.git diff --git a/win32/win32io.c b/win32/win32io.c index 3cf31c5..f0f71e7 100644 --- a/win32/win32io.c +++ b/win32/win32io.c @@ -52,9 +52,9 @@ PerlIOWin32_fileno(pTHX_ PerlIO *f) } IV -PerlIOWin32_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg) +PerlIOWin32_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab) { - IV code = PerlIOBase_pushed(aTHX_ f,mode,arg); + IV code = PerlIOBase_pushed(aTHX_ f,mode,arg,tab); if (*PerlIONext(f)) { PerlIOWin32 *s = PerlIOSelf(f,PerlIOWin32); @@ -288,9 +288,9 @@ PerlIOWin32_close(pTHX_ PerlIO *f) PerlIOWin32 *s = PerlIOSelf(f,PerlIOWin32); if (s->refcnt == 1) { - IV code = 0; + IV code = 0; #if 0 - /* This does not do pipes etc. correctly */ + /* This does not do pipes etc. correctly */ if (!CloseHandle(s->h)) { s->h = INVALID_HANDLE_VALUE; @@ -309,15 +309,15 @@ PerlIOWin32_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *params, int flags) { PerlIOWin32 *os = PerlIOSelf(f,PerlIOWin32); HANDLE proc = GetCurrentProcess(); - HANDLE new; + HANDLE new; if (DuplicateHandle(proc, os->h, proc, &new, 0, FALSE, DUPLICATE_SAME_ACCESS)) { char mode[8]; int fd = win32_open_osfhandle((intptr_t) new, PerlIOUnix_oflags(PerlIO_modestr(o,mode))); - if (fd >= 0) + if (fd >= 0) { f = PerlIOBase_dup(aTHX_ f, o, params, flags); - if (f) + if (f) { PerlIOWin32 *fs = PerlIOSelf(f,PerlIOWin32); fs->h = new; @@ -341,12 +341,14 @@ PerlIOWin32_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *params, int flags) } PerlIO_funcs PerlIO_win32 = { + sizeof(PerlIO_funcs), "win32", sizeof(PerlIOWin32), PERLIO_K_RAW, PerlIOWin32_pushed, PerlIOWin32_popped, PerlIOWin32_open, + PerlIOBase_binmode, NULL, /* getarg */ PerlIOWin32_fileno, PerlIOWin32_dup,