Mercurial > octave
changeset 21828:590c39b94618
Avoid duplicate naming of popen2 in octave::sys namespace (bug #47968).
* lo-sysdep.cc (win_popen2): Rename function from popen2.
* lo-sysdep.h (win_popen2): Rename function from popen2.
* syscalls.cc (popen2): Call win_popen2 if __WIN32__ and ! __CYGWIN__.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 06 Jun 2016 08:52:42 -0700 |
parents | 2781d6efa88f |
children | d9fa4558d2ed |
files | liboctave/system/lo-sysdep.cc liboctave/system/lo-sysdep.h liboctave/system/oct-syscalls.cc |
diffstat | 3 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/system/lo-sysdep.cc Mon Jun 06 07:42:55 2016 -0700 +++ b/liboctave/system/lo-sysdep.cc Mon Jun 06 08:52:42 2016 -0700 @@ -85,8 +85,8 @@ #if defined (__WIN32__) && ! defined (__CYGWIN__) pid_t - popen2 (const std::string& cmd, const string_vector& args, - bool sync_mode, int *fildes, std::string& msg) + win_popen2 (const std::string& cmd, const string_vector& args, + bool sync_mode, int *fildes, std::string& msg) { pid_t pid; PROCESS_INFORMATION pi;
--- a/liboctave/system/lo-sysdep.h Mon Jun 06 07:42:55 2016 -0700 +++ b/liboctave/system/lo-sysdep.h Mon Jun 06 08:52:42 2016 -0700 @@ -40,8 +40,8 @@ extern int chdir (const std::string&); #if defined (__WIN32__) && ! defined (__CYGWIN__) - extern pid_t popen2 (const std::string&, const string_vector&, - bool, int *, std::string&); + extern pid_t win_popen2 (const std::string&, const string_vector&, + bool, int *, std::string&); #endif } } @@ -56,7 +56,7 @@ #if defined (__WIN32__) && ! defined (__CYGWIN__) OCTAVE_DEPRECATED ("use 'octave::sys::popen2' instead") -const auto octave_popen2 = octave::sys::popen2; +const auto octave_popen2 = octave::sys::win_popen2; #endif #endif
--- a/liboctave/system/oct-syscalls.cc Mon Jun 06 07:42:55 2016 -0700 +++ b/liboctave/system/oct-syscalls.cc Mon Jun 06 08:52:42 2016 -0700 @@ -322,7 +322,7 @@ bool &interactive) { #if defined (__WIN32__) && ! defined (__CYGWIN__) - return octave::sys::popen2 (cmd, args, sync_mode, fildes, msg); + return octave::sys::win_popen2 (cmd, args, sync_mode, fildes, msg); #else pid_t pid; int child_stdin[2], child_stdout[2];