[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MSVC patch: additional file information support + flexible sepchar d
From: |
Michael Goffioul |
Subject: |
Re: MSVC patch: additional file information support + flexible sepchar detection |
Date: |
Wed, 6 Jun 2007 09:50:54 +0200 |
On 6/6/07, John W. Eaton <address@hidden> wrote:
I'd rather avoid checking _MSC_VER here (or anywhere, really). Would
there be any harm in doing this
#if (defined (OCTAVE_HAVE_WINDOWS_FILESYSTEM)
std::string file_ops::dir_sep_chars ("/\\");
#else
std::string file_ops::dir_sep_chars (file_ops::dir_sep_str);
#endif
instead? I made this change when I checked it in.
I don't think it's a problem. MSVC, MinGW and cygwin should support both
type of slashes in pathnames.
+ #if ! defined (O_RDONLY) && defined (_O_RDONLY)
+ #define O_RDONLY _O_RDONLY
+ #define O_WRONLY _O_WRONLY
+ #define O_CREAT _O_CREAT
+ #endif
+
+ #ifndef O_BINARY
+ #ifdef _O_BINARY
+ #define O_BINARY _O_BINARY
+ #else
+ #define O_BINARY 0
+ #endif
+ #endif
Why is O_BINARY different here?
This is related to code I tried, but removed (O_BINARY is not used in the
file anyway). The reason was that O_BINARY seemed to be MSVC specific;
defining it to 0 on other systems wouldn't affect anything. You can safely
remove that part of the patch.
Michael.