octave-maintainers
[Top][All Lists]
Advanced

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

MSVC compiler support [patch 29]: Backslash in path


From: Michael Goffioul
Subject: MSVC compiler support [patch 29]: Backslash in path
Date: Tue, 17 Oct 2006 22:08:01 +0200
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)

Converts forward slashes into backward slashes for default paths; this allows to use the configure script in the MinGW-way (--prefix=/usr/local/octave), and
to produce code that works in the Win32-way, with backslashes.
Index: src/defaults.cc
===================================================================
RCS file: /cvs/octave/src/defaults.cc,v
retrieving revision 1.61
diff -p -c -r1.61 defaults.cc
*** src/defaults.cc     27 Jul 2006 19:35:22 -0000      1.61
--- src/defaults.cc     17 Oct 2006 11:07:42 -0000
*************** Software Foundation, Inc., 51 Franklin S
*** 29,34 ****
--- 29,37 ----
  
  #include <iostream>
  #include <string>
+ #ifdef _MSC_VER
+ #include <algorithm>
+ #endif
  
  #ifdef HAVE_UNISTD_H
  #ifdef HAVE_SYS_TYPES_H
*************** subst_octave_home (const std::string& s)
*** 118,123 ****
--- 121,130 ----
        }
      }
  
+ #ifdef _MSC_VER
+   std::replace(retval.begin(), retval.end(), '/', '\\');
+ #endif
+ 
    return retval;
  }
  

reply via email to

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