aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-06-05 12:58:12 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-06-05 12:58:12 +0200
commit6b034a40b4c98e754ec4843da783a8194a8ec474 (patch)
treefa68058da091e94ac9c6701b10a75aff2339836b
parent38e9914b44586494a95f2389ca3761521d4f48c2 (diff)
Fix localization issue in GCC system header search path extraction
-rw-r--r--build2/cc/gcc.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/build2/cc/gcc.cxx b/build2/cc/gcc.cxx
index 4374740..a3361da 100644
--- a/build2/cc/gcc.cxx
+++ b/build2/cc/gcc.cxx
@@ -82,9 +82,9 @@ namespace build2
// End of search list.
//
// The exact text depends on the current locale. What we can rely on
- // is the unique "#include <" prefix of the "opening" line and the
- // fact that the paths are indented with a single space character,
- // unlike the "closing" line.
+ // is the presence of the "#include <...>" substring in the
+ // "opening" line and the fact that the paths are indented with a
+ // single space character, unlike the "closing" line.
//
// Note that on Mac OS we will also see some framework paths among
// system header paths, followed with a comment. For example:
@@ -93,13 +93,13 @@ namespace build2
//
// For now we ignore framework paths and to filter them out we will
// only consider valid paths to existing directories, skipping those
- // which we fail to stat or normalize.
+ // which we fail to normalize or stat.
//
string s;
for (bool found (false); getline (is, s); )
{
if (!found)
- found = s.compare (0, 10, "#include <") == 0;
+ found = s.find ("#include <...>") != string::npos;
else
{
if (s[0] != ' ')