From 6a0b111a01327717e46e819eb0096c85ef2306f6 Mon Sep 17 00:00:00 2001 From: tyfkda Date: Fri, 1 Dec 2023 10:48:29 +0900 Subject: [PATCH] Suppress macro expansion for including system header --- src/cpp/preprocessor.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cpp/preprocessor.c b/src/cpp/preprocessor.c index 3918bdffa..e7e84fa0a 100644 --- a/src/cpp/preprocessor.c +++ b/src/cpp/preprocessor.c @@ -255,7 +255,10 @@ static FILE *search_sysinc(const char *prevdir, const char *path, char **pfn) { } static void handle_include(const char *p, Stream *stream, bool is_next) { - const char *orgp = p = preprocess_one_line(p, stream, NULL);; + const char *orgp = p = skip_whitespaces(p); + + if (*p != '<') + p = preprocess_one_line(p, stream, NULL);; char close; bool sys = false;