octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MSVC compiler support [patch 26]: MinGW code share


From: Michael Goffioul
Subject: MSVC compiler support [patch 26]: MinGW code share
Date: Tue, 17 Oct 2006 21:57:37 +0200
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)

Share some codes with MinGW implementation.

Index: liboctave/oct-env.cc
===================================================================
RCS file: /cvs/octave/liboctave/oct-env.cc,v
retrieving revision 1.24
diff -p -c -r1.24 oct-env.cc
*** liboctave/oct-env.cc        24 Apr 2006 19:13:07 -0000      1.24
--- liboctave/oct-env.cc        17 Oct 2006 11:07:42 -0000
*************** octave_env::do_get_home_directory (void)
*** 375,381 ****
  {
    std::string hd = do_getenv ("HOME");
  
! #if defined (__MINGW32__)
    // Maybe we are started directly from cmd.exe
    if (hd.empty ())
      {
--- 375,381 ----
  {
    std::string hd = do_getenv ("HOME");
  
! #if defined (__MINGW32__) || defined(_MSC_VER)
    // Maybe we are started directly from cmd.exe
    if (hd.empty ())
      {
Index: liboctave/syswait.h
===================================================================
RCS file: /cvs/octave/liboctave/syswait.h,v
retrieving revision 1.3
diff -p -c -r1.3 syswait.h
*** liboctave/syswait.h 17 Sep 2005 00:50:58 -0000      1.3
--- liboctave/syswait.h 17 Oct 2006 11:07:42 -0000
*************** extern "C" {
*** 75,81 ****
    (((stat_val) & 0177) != 0177 && ((stat_val) & 0177) != 0)
  #endif
  
! #if defined (__MINGW32__)
  #define HAVE_WAITPID 1
  #include <process.h>
  #define WAITPID(a, b, c) _cwait (b, a, c)
--- 75,81 ----
    (((stat_val) & 0177) != 0177 && ((stat_val) & 0177) != 0)
  #endif
  
! #if defined (__MINGW32__) || defined(_MSC_VER)
  #define HAVE_WAITPID 1
  #include <process.h>
  #define WAITPID(a, b, c) _cwait (b, a, c)
Index: src/oct-procbuf.cc
===================================================================
RCS file: /cvs/octave/src/oct-procbuf.cc,v
retrieving revision 1.30
diff -p -c -r1.30 oct-procbuf.cc
*** src/oct-procbuf.cc  8 May 2006 20:23:05 -0000       1.30
--- src/oct-procbuf.cc  17 Oct 2006 11:07:42 -0000
*************** static octave_procbuf *octave_procbuf_li
*** 54,60 ****
  #if defined (__CYGWIN__)
  #define W32POPEN popen
  #define W32PCLOSE pclose
! #elif defined (__MINGW32__)
  #define W32POPEN _popen
  #define W32PCLOSE _pclose
  #endif
--- 54,60 ----
  #if defined (__CYGWIN__)
  #define W32POPEN popen
  #define W32PCLOSE pclose
! #elif defined (__MINGW32__) || defined (_MSC_VER)
  #define W32POPEN _popen
  #define W32PCLOSE _pclose
  #endif
*************** static octave_procbuf *octave_procbuf_li
*** 62,68 ****
  octave_procbuf *
  octave_procbuf::open (const char *command, int mode)
  {
! #if defined (__CYGWIN__) || defined (__MINGW32__)
  
    if (is_open ()) 
      return 0;
--- 62,68 ----
  octave_procbuf *
  octave_procbuf::open (const char *command, int mode)
  {
! #if defined (__CYGWIN__) || defined (__MINGW32__) || defined(_MSC_VER)
  
    if (is_open ()) 
      return 0;
*************** octave_procbuf::close (void)
*** 170,176 ****
  {
  
  
! #if defined (__CYGWIN__) || defined (__MINGW32__)
  
    if (f)
      {
--- 172,178 ----
  {
  
  
! #if defined (__CYGWIN__) || defined (__MINGW32__) || defined(_MSC_VER)
  
    if (f)
      {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]