summaryrefslogtreecommitdiff
path: root/win32/win32io.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32io.c')
-rw-r--r--win32/win32io.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/win32/win32io.c b/win32/win32io.c
index 3cf31c5629..7997658f4e 100644
--- a/win32/win32io.c
+++ b/win32/win32io.c
@@ -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;
@@ -347,6 +347,7 @@ PerlIO_funcs PerlIO_win32 = {
PerlIOWin32_pushed,
PerlIOWin32_popped,
PerlIOWin32_open,
+ PerlIOBase_binmode,
NULL, /* getarg */
PerlIOWin32_fileno,
PerlIOWin32_dup,