Mercurial > hg > octave-lyh
changeset 6096:40212bfaed1d
[project @ 2006-10-26 01:57:49 by jwe]
author | jwe |
---|---|
date | Thu, 26 Oct 2006 01:57:50 +0000 |
parents | a8aa7a014c22 |
children | d65b53711bb8 |
files | liboctave/ChangeLog liboctave/oct-env.cc liboctave/randpoisson.c liboctave/syswait.h src/ChangeLog src/oct-procbuf.cc |
diffstat | 6 files changed, 19 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -17,6 +17,13 @@ * Makefile.in (XTRA_CDEFS, XTRA_CXXDEFS): Substitute here. + * oct-env.cc (octave_env::do_get_home_directory) [_MSC_VER]: Use + same code as __MINGW32__. + * syswait.h [_MSC_VER]: Define HAVE_WAITPID, WAITPID, and WNOHANG + the same as for __MINGW32__. + + * randpoisson.c: Undefine INFINITE before redefining. + 2006-10-24 David Bateman <dbateman@free.fr> * Sparse.cc (assign (Sparse<LT>&, const Sparse<RT>&)): Resize the
--- a/liboctave/oct-env.cc +++ b/liboctave/oct-env.cc @@ -375,8 +375,8 @@ { std::string hd = do_getenv ("HOME"); -#if defined (__MINGW32__) - // Maybe we are started directly from cmd.exe +#if defined (__MINGW32__) || defined (_MSC_VER) + // Maybe we are started directly from cmd.exe. if (hd.empty ()) { std::string drv = do_getenv ("HOMEDRIVE");
--- a/liboctave/randpoisson.c +++ b/liboctave/randpoisson.c @@ -23,6 +23,7 @@ #undef NAN #define NAN octave_NaN +#undef INFINITE #define INFINITE lo_ieee_isinf #define RUNI oct_randu() #define RNOR oct_randn()
--- a/liboctave/syswait.h +++ b/liboctave/syswait.h @@ -75,7 +75,7 @@ (((stat_val) & 0177) != 0177 && ((stat_val) & 0177) != 0) #endif -#if defined (__MINGW32__) +#if defined (__MINGW32__) || defined (_MSC_VER) #define HAVE_WAITPID 1 #include <process.h> #define WAITPID(a, b, c) _cwait (b, a, c)
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,6 +7,11 @@ * Makefile.in (XTRA_CDEFS, XTRA_CXXDEFS): Substitute here. + * oct-procbuf.cc [_MSC_VER]: Define W32POPEN and W32PCLOSE the + same as for __MINGW32__. + (octave_procbuf::open, octave_procbuf::close) [_MSC_VER]: + Use the same code as for __MINGW32__ and __CYGWIN__. + 2006-10-25 John W. Eaton <jwe@octave.org> * sysdep.cc (w32_set_octave_home): Correctly initialize bin_dir.
--- a/src/oct-procbuf.cc +++ b/src/oct-procbuf.cc @@ -54,7 +54,7 @@ #if defined (__CYGWIN__) #define W32POPEN popen #define W32PCLOSE pclose -#elif defined (__MINGW32__) +#elif defined (__MINGW32__) || defined (_MSC_VER) #define W32POPEN _popen #define W32PCLOSE _pclose #endif @@ -66,7 +66,7 @@ octave_procbuf * octave_procbuf::open (const char *command, int mode) { -#if defined (__CYGWIN__) || defined (__MINGW32__) +#if defined (__CYGWIN__) || defined (__MINGW32__) || defined (_MSC_VER) if (is_open ()) return 0; @@ -172,9 +172,7 @@ octave_procbuf * octave_procbuf::close (void) { - - -#if defined (__CYGWIN__) || defined (__MINGW32__) +#if defined (__CYGWIN__) || defined (__MINGW32__) || defined (_MSC_VER) if (f) {