Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2074)

Unified Diff: src/core/model/system-path.cc

Issue 342870043: Visual Studio conditional code for core module (Closed)
Patch Set: Corrections Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/model/system-path.cc
===================================================================
--- a/src/core/model/system-path.cc
+++ b/src/core/model/system-path.cc
@@ -57,8 +57,10 @@
* \def SYSTEM_PATH_SEP
* System-specific path separator used between directory names.
*/
-#if defined (__win32__)
+#if defined (_WIN32)
#define SYSTEM_PATH_SEP "\\"
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
#else
#define SYSTEM_PATH_SEP "/"
#endif
@@ -339,6 +341,13 @@
{
NS_LOG_ERROR ("failed creating directory " << tmp);
}
+#else
+#ifdef _WIN32
+ if (CreateDirectory(tmp.c_str(), NULL))
+ {
+ NS_LOG_ERROR("failed creating directory " << path);
+ }
+#endif
#endif
}
@@ -348,6 +357,13 @@
{
NS_LOG_ERROR ("failed creating directory " << path);
}
+#else
+#ifdef _WIN32
+ if (CreateDirectory(path.c_str(), NULL))
+ {
+ NS_LOG_ERROR("failed creating directory " << path);
+ }
+#endif
#endif
}

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b