diff liboctave/system/lo-sysdep.h @ 25916:3f2282954600

Support non-ASCII characters in environment variables on Windows (bug #53922). * lo-sysdep.[cc/h] (octave::sys::getenv_wrapper, octave::sys::putenv_wrapper): Add new functions to call Unicode versions of CRT functions on Windows. * oct-env.cc (putenv, do_getenv), sysdep.cc (Funsetenv): Use these new functions. * lo-utils.[cc/h] (octave_putenv): Remove function moved to lo-sysdep.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 04 Oct 2018 19:08:42 +0200
parents 7dad5fa7e88e
children 00f796120a6d
line wrap: on
line diff
--- a/liboctave/system/lo-sysdep.h	Wed Oct 03 21:30:19 2018 +0200
+++ b/liboctave/system/lo-sysdep.h	Thu Oct 04 19:08:42 2018 +0200
@@ -46,6 +46,13 @@
 
     extern std::FILE * fopen (const std::string& name, const std::string& mode);
 
+    extern void putenv_wrapper (const std::string& name,
+                                const std::string& value);
+
+    extern std::string getenv_wrapper (const std::string&);
+
+    extern int unsetenv_wrapper (const std::string&);
+
     extern std::wstring u8_to_wstring (const std::string&);
 
     extern std::string u8_from_wstring (const std::wstring&);