| ... | ... | @@ -4417,22 +4417,14 @@ Buf *get_linux_libc_include_path(void) { |
| 4417 | 4417 | } |
| 4418 | 4418 | char *prev_newline = buf_ptr(out_stderr); |
| 4419 | 4419 | ZigList<const char *> search_paths = {}; |
| 4420 | | bool found_search_paths = false; |
| 4421 | 4420 | for (;;) { |
| 4422 | 4421 | char *newline = strchr(prev_newline, '\n'); |
| 4423 | 4422 | if (newline == nullptr) { |
| 4424 | | zig_panic("unable to determine libc include path: bad output from C compiler command"); |
| 4423 | break; |
| 4425 | 4424 | } |
| 4426 | 4425 | *newline = 0; |
| 4427 | | if (found_search_paths) { |
| 4428 | | if (strcmp(prev_newline, "End of search list.") == 0) { |
| 4429 | | break; |
| 4430 | | } |
| 4426 | if (prev_newline[0] == ' ') { |
| 4431 | 4427 | search_paths.append(prev_newline); |
| 4432 | | } else { |
| 4433 | | if (strcmp(prev_newline, "#include <...> search starts here:") == 0) { |
| 4434 | | found_search_paths = true; |
| 4435 | | } |
| 4436 | 4428 | } |
| 4437 | 4429 | prev_newline = newline + 1; |
| 4438 | 4430 | } |