Mercurial > octave
diff src/oct-prcstrm.cc @ 6726:6b7ba4a31876
[project @ 2007-06-14 20:16:44 by jwe]
author | jwe |
---|---|
date | Thu, 14 Jun 2007 20:16:45 +0000 |
parents | 70158d7ab8ef |
children | 93c65f2a5668 |
line wrap: on
line diff
--- a/src/oct-prcstrm.cc Thu Jun 14 18:23:02 2007 +0000 +++ b/src/oct-prcstrm.cc Thu Jun 14 20:16:45 2007 +0000 @@ -28,20 +28,7 @@ #include <cstdio> #include "oct-prcstrm.h" - -// FIXME -- perhaps this should be handled more globally. See also -// oct-procbuf.cc. - -#if defined (_MSC_VER) -#define popen _popen -#define pclose _pclose -#endif - -static int -cxx_pclose (FILE *f) -{ - return ::pclose (f); -} +#include "sysdep.h" octave_stream octave_iprocstream::create (const std::string& n, std::ios::openmode arg_md, @@ -53,8 +40,8 @@ octave_iprocstream::octave_iprocstream (const std::string& n, std::ios::openmode arg_md, oct_mach_info::float_format ff) - : octave_stdiostream (n, ::popen (n.c_str (), "r"), - arg_md, ff, cxx_pclose) + : octave_stdiostream (n, octave_popen (n.c_str (), "r"), + arg_md, ff, octave_pclose) { } @@ -73,8 +60,8 @@ octave_oprocstream::octave_oprocstream (const std::string& n, std::ios::openmode arg_md, oct_mach_info::float_format ff) - : octave_stdiostream (n, ::popen (n.c_str (), "w"), - arg_md, ff, cxx_pclose) + : octave_stdiostream (n, octave_popen (n.c_str (), "w"), + arg_md, ff, octave_pclose) { }