|
@@ -39,7 +39,7 @@
|
|
//
|
|
//
|
|
// This file is only used on Windows, it's empty on other platforms.
|
|
// This file is only used on Windows, it's empty on other platforms.
|
|
|
|
|
|
-#if defined(_WIN32)
|
|
|
|
|
|
+#if defined(_MSC_VER)
|
|
|
|
|
|
// Comment this out to fall back to using the ANSI versions (open, mkdir, ...)
|
|
// Comment this out to fall back to using the ANSI versions (open, mkdir, ...)
|
|
// instead of the Unicode ones (_wopen, _wmkdir, ...). Doing so can be useful to
|
|
// instead of the Unicode ones (_wopen, _wmkdir, ...). Doing so can be useful to
|
|
@@ -105,15 +105,15 @@ bool has_longpath_prefix(const char_type* path) {
|
|
path[3] == '\\';
|
|
path[3] == '\\';
|
|
}
|
|
}
|
|
|
|
|
|
-// Returns true if the path starts with a drive specifier (e.g. "c:\").
|
|
|
|
template <typename char_type>
|
|
template <typename char_type>
|
|
-bool is_path_absolute(const char_type* path) {
|
|
|
|
- return has_drive_letter(path) && is_separator(path[2]);
|
|
|
|
|
|
+bool is_separator(char_type c) {
|
|
|
|
+ return c == '/' || c == '\\';
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// Returns true if the path starts with a drive specifier (e.g. "c:\").
|
|
template <typename char_type>
|
|
template <typename char_type>
|
|
-bool is_separator(char_type c) {
|
|
|
|
- return c == '/' || c == '\\';
|
|
|
|
|
|
+bool is_path_absolute(const char_type* path) {
|
|
|
|
+ return has_drive_letter(path) && is_separator(path[2]);
|
|
}
|
|
}
|
|
|
|
|
|
template <typename char_type>
|
|
template <typename char_type>
|
|
@@ -358,5 +358,5 @@ wstring testonly_path_to_winpath(const string& path) {
|
|
} // namespace protobuf
|
|
} // namespace protobuf
|
|
} // namespace google
|
|
} // namespace google
|
|
|
|
|
|
-#endif // defined(_WIN32)
|
|
|
|
|
|
+#endif // defined(_MSC_VER)
|
|
|
|
|