diff options
author | 2017-01-11 13:45:21 +0000 | |
---|---|---|
committer | 2017-01-11 16:02:58 +0000 | |
commit | 8e0f29c7e0440935c780cbb752b673cc0a191833 (patch) | |
tree | 885a8797dc37861cd3a80c9efd60c819680b4540 /src/main/cpp/util/strings.h | |
parent | 45bddab11593ca1536e4d3402fbb631e335e9f3a (diff) |
Bazel client, Windows: support /dev/null
Support passing /dev/null and NUL as flag values
for flags like --bazelrc.
In particular, special-case these paths in
methods like blaze_util::ReadFile,
blaze_util::IsDirectory, etc.
Fixes https://github.com/bazelbuild/bazel/issues/2354
RELNOTES[NEW]: Windows: "/dev/null" is now a supported path, e.g. --bazelrc=/dev/null now works
--
PiperOrigin-RevId: 144195994
MOS_MIGRATED_REVID=144195994
Diffstat (limited to 'src/main/cpp/util/strings.h')
-rw-r--r-- | src/main/cpp/util/strings.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/cpp/util/strings.h b/src/main/cpp/util/strings.h index 66502266bf..61187b73cb 100644 --- a/src/main/cpp/util/strings.h +++ b/src/main/cpp/util/strings.h @@ -106,6 +106,8 @@ void StringPrintf(std::string *str, const char *format, ...); // Convert str to lower case. No locale handling, this is just for ASCII. void ToLower(std::string *str); +std::string AsLower(const std::string &str); + // Convert a wchar_t string to a char string. Useful when consuming results of // widechar Windows API functions. std::unique_ptr<char[]> WstringToCstring(const wchar_t *input); |