[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MSVC compiler support [patch 29]: Backslash in path
From: |
John W. Eaton |
Subject: |
MSVC compiler support [patch 29]: Backslash in path |
Date: |
Fri, 27 Oct 2006 09:57:52 -0400 |
On 17-Oct-2006, Michael Goffioul wrote:
| 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;
| }
|
OK, but instead of making this specific to _MSC_VER, I did it this
way:
if (file_ops::dir_sep_char != '/')
std::replace (retval.begin (), retval.end (), '/', file_ops::dir_sep_char);
Thanks,
jwe
- MSVC compiler support [patch 26]: MinGW code share, (continued)
- MSVC compiler support [patch 27]: OCTAVE_HOME, Michael Goffioul, 2006/10/17
- Re: MSVC compiler support [patch 27]: OCTAVE_HOME, David Bateman, 2006/10/17
- Re: MSVC compiler support [patch 27]: OCTAVE_HOME, Michael Goffioul, 2006/10/17
- Re: MSVC compiler support [patch 27]: OCTAVE_HOME, Michael Goffioul, 2006/10/18
- Re: MSVC compiler support [patch 27]: OCTAVE_HOME, John W. Eaton, 2006/10/24
- MSVC compiler support [patch 28]: setvbuf crash, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 28]: setvbuf crash, John W. Eaton, 2006/10/25
- MSVC compiler support [patch 29]: Backslash in path, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 29]: Backslash in path,
John W. Eaton <=
- MSVC compiler support [patch 30]: Help MSVC with templates, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 30]: Help MSVC with templates, John W. Eaton, 2006/10/26
- MSVC compiler support [patch 31]: CHAR_BIT, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 31]: CHAR_BIT, John W. Eaton, 2006/10/17
- MSVC compiler support [patch 32]: ls, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 32]: ls, John W. Eaton, 2006/10/27
- Re: MSVC compiler support [patch 32]: ls, Michael Goffioul, 2006/10/27
- Re: MSVC compiler support [patch 32]: ls, John W. Eaton, 2006/10/27
- MSVC compiler support [patch 33]: Help, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 33]: Help, John W. Eaton, 2006/10/25