From 87f7818f4b7573d82a663736afbc2094a4006355 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 26 Apr 2019 12:51:43 +0200 Subject: [PATCH] makefiles: Don't allow using system headers with msvcrt. Signed-off-by: Alexandre Julliard --- tools/makedep.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/makedep.c b/tools/makedep.c index a051281c204..05c574d7ca2 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -1526,6 +1526,15 @@ static struct file *open_include_file( const struct makefile *make, struct incl_ return file; } } + + if (pFile->type == INCL_SYSTEM && make->use_msvcrt) + { + if (!strcmp( pFile->name, "stdarg.h" )) return NULL; + fprintf( stderr, "%s:%d: error: system header %s cannot be used with msvcrt\n", + pFile->included_by->file->name, pFile->included_line, pFile->name ); + exit(1); + } + if (pFile->type == INCL_SYSTEM) return NULL; /* ignore system files we cannot find */ /* try in src file directory */