changeset 26642:c942659a57e6 stable

Support opening handles to files with non-ASCII characters on Windows. * file-io.cc (do_stream_open): Use wrapper for fopen.
author Markus Mützel <markus.muetzel@gmx.de>
date Tue, 29 Jan 2019 21:09:07 +0100
parents b6e65db78f0c
children 5d1f413ff746
files libinterp/corefcn/file-io.cc
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/file-io.cc	Wed Jan 23 23:13:03 2019 -0800
+++ b/libinterp/corefcn/file-io.cc	Tue Jan 29 21:09:07 2019 +0100
@@ -53,6 +53,7 @@
 #include "file-ops.h"
 #include "file-stat.h"
 #include "lo-ieee.h"
+#include "lo-sysdep.h"
 #include "mkostemp-wrapper.h"
 #include "oct-env.h"
 #include "oct-locbuf.h"
@@ -431,7 +432,7 @@
 #if defined (HAVE_ZLIB)
       if (use_zlib)
         {
-          FILE *fptr = std::fopen (fname.c_str (), mode.c_str ());
+          FILE *fptr = octave::sys::fopen (fname.c_str (), mode.c_str ());
 
           if (fptr)
             {
@@ -448,7 +449,7 @@
       else
 #endif
         {
-          FILE *fptr = std::fopen (fname.c_str (), mode.c_str ());
+          FILE *fptr = octave::sys::fopen (fname.c_str (), mode.c_str ());
 
           retval = octave_stdiostream::create (fname, fptr, md,
                                                flt_fmt);