OLD | NEW |
1 // Copyright 2009 The RE2 Authors. All Rights Reserved. | 1 // Copyright 2009 The RE2 Authors. All Rights Reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 #include "util/util.h" | 5 #include "util/util.h" |
| 6 #ifndef _WIN32 |
6 #include "util/valgrind.h" | 7 #include "util/valgrind.h" |
| 8 #endif |
7 | 9 |
8 namespace re2 { | 10 namespace re2 { |
9 | 11 |
10 int RunningOnValgrind() { | 12 bool RunningOnValgrind() { |
11 #ifdef RUNNING_ON_VALGRIND | 13 #ifdef RUNNING_ON_VALGRIND |
12 » return RUNNING_ON_VALGRIND; | 14 return RUNNING_ON_VALGRIND != 0; |
13 #else | 15 #else |
14 » return 0; | 16 return false; |
15 #endif | 17 #endif |
16 } | 18 } |
17 | 19 |
18 } // namespace re2 | 20 } // namespace re2 |
OLD | NEW |