From 1d5e386b0a78393ac6b670c209a185849ec798a1 Mon Sep 17 00:00:00 2001 From: Steffen Nurpmeso Date: Sat, 30 Sep 2017 00:13:05 +0200 Subject: Introduce VIP sysinclude paths which are always searched first --- tcc.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index c25d342..90d73eb 100644 --- a/tcc.h +++ b/tcc.h @@ -195,13 +195,18 @@ extern long double strtold (const char *__nptr, char **__endptr); /* Below: {B} is substituted by CONFIG_TCCDIR (rsp. -B option) */ /* system include paths */ -#ifndef CONFIG_TCC_SYSINCLUDEPATHS +#ifndef CONFIG_TCC_TCCINCLUDEPATHS # ifdef TCC_TARGET_PE -# define CONFIG_TCC_SYSINCLUDEPATHS "{B}/include;{B}/include/winapi" +# define CONFIG_TCC_TCCINCLUDEPATHS "{B}/include;{B}/include/winapi" # else +# define CONFIG_TCC_TCCINCLUDEPATHS "{B}/include" +# endif +#endif + +#ifndef CONFIG_TCC_SYSINCLUDEPATHS +# ifndef TCC_TARGET_PE # define CONFIG_TCC_SYSINCLUDEPATHS \ - "{B}/include" \ - ":" ALSO_TRIPLET(CONFIG_SYSROOT "/usr/local/include") \ + ALSO_TRIPLET(CONFIG_SYSROOT "/usr/local/include") \ ":" ALSO_TRIPLET(CONFIG_SYSROOT "/usr/include") # endif #endif @@ -715,7 +720,10 @@ struct TCCState { DLLReference **loaded_dlls; int nb_loaded_dlls; - /* include paths */ + /* include paths, search order */ + char **tccinclude_paths; + int nb_tccinclude_paths; + char **include_paths; int nb_include_paths; -- cgit v1.3.1