diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-07-03 14:20:26 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-07-03 14:20:26 -0400 |
| commit | 291afcf75ab458e54a8ccd78dfd1531debfd2e40 (patch) | |
| tree | af3a78a8eae78a7a33a5d938fd44f8ebe5e65cff | |
| parent | 27fc49f72c681c0643c2454fe0393abb913703f9 (diff) | |
| download | zig-291afcf75ab458e54a8ccd78dfd1531debfd2e40.tar.gz zig-291afcf75ab458e54a8ccd78dfd1531debfd2e40.zip | |
fix runtime libc detection depending on locale
closes #1165
| -rw-r--r-- | src/analyze.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 6f94deb9fd..ca582dfc4c 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -4417,22 +4417,14 @@ Buf *get_linux_libc_include_path(void) { } char *prev_newline = buf_ptr(out_stderr); ZigList<const char *> search_paths = {}; - bool found_search_paths = false; for (;;) { char *newline = strchr(prev_newline, '\n'); if (newline == nullptr) { - zig_panic("unable to determine libc include path: bad output from C compiler command"); + break; } *newline = 0; - if (found_search_paths) { - if (strcmp(prev_newline, "End of search list.") == 0) { - break; - } + if (prev_newline[0] == ' ') { search_paths.append(prev_newline); - } else { - if (strcmp(prev_newline, "#include <...> search starts here:") == 0) { - found_search_paths = true; - } } prev_newline = newline + 1; } |
