From 3ddbfe1a82bb1a7c24d0c4ddd68d8cad1b2b2a20 Mon Sep 17 00:00:00 2001 From: grischka Date: Sat, 1 Oct 2016 20:03:48 +0200 Subject: tccpp: #pragma once: make it work after several "fixes" and "improvements" b3782c3cf5e66f74207303c381a305daabccdb12 5fb57bead41cd3a84f0aa3f98d00b5fe5de25a08 feature did not work at all - Use 'once' flag, not 'ifndef_macro' - Ignore filename letter case on _WIN32 - Increment global pp_once for each compilation --- tcc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index f14c884..cfff7cf 100644 --- a/tcc.h +++ b/tcc.h @@ -101,7 +101,6 @@ # define IS_DIRSEP(c) (c == '/' || c == '\\') # define IS_ABSPATH(p) (IS_DIRSEP(p[0]) || (p[0] && p[1] == ':' && IS_DIRSEP(p[2]))) # define PATHCMP stricmp -# define PATH_NOCASE #else # define IS_DIRSEP(c) (c == '/') # define IS_ABSPATH(p) IS_DIRSEP(p[0]) @@ -602,11 +601,12 @@ typedef struct InlineFunc { inclusion if the include file is protected by #ifndef ... #endif */ typedef struct CachedInclude { int ifndef_macro; + int once; int hash_next; /* -1 if none */ char filename[1]; /* path specified in #include */ } CachedInclude; -#define CACHED_INCLUDES_HASH_SIZE 512 +#define CACHED_INCLUDES_HASH_SIZE 32 #ifdef CONFIG_TCC_ASM typedef struct ExprValue { -- cgit v1.3.1