RE: failed with undefined USE_PERLIO for Win32
Vadim Konovalov [Wed, 17 Apr 2002 20:08:03 +0000 (00:08 +0400)]
From: "Konovalov, Vadim" <vkonovalov@spb.lucent.com>
Message-ID: <845FCFF2D4C0FC468B485E8777C7A00C028116@cio-test001.spb.lucent.com>

p4raw-id: //depot/perl@15982

win32/win32.c

index fd44c5f..a77ec88 100644 (file)
@@ -2541,6 +2541,9 @@ win32_tmpfile(void)
            if (fh != INVALID_HANDLE_VALUE) {
                int fd = win32_open_osfhandle((long)fh, 0);
                if (fd >= 0) {
+#if defined(__BORLANDC__)
+                   setmode(fd,O_BINARY);
+#endif
                    DEBUG_p(PerlIO_printf(Perl_debug_log,
                                          "Created tmpfile=%s\n",filename));
                    return fdopen(fd, "w+b");