diff options
| author | grischka <grischka> | 2016-10-01 20:03:48 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2016-10-01 20:03:48 +0200 |
| commit | 3ddbfe1a82bb1a7c24d0c4ddd68d8cad1b2b2a20 (patch) | |
| tree | e54bbe981393be4769edd89187c028fc2d60eea8 /tcc.h | |
| parent | 07e47b3dd68d264a6223c1b74aa64d61a14ac240 (diff) | |
| download | tinycc-3ddbfe1a82bb1a7c24d0c4ddd68d8cad1b2b2a20.tar.gz tinycc-3ddbfe1a82bb1a7c24d0c4ddd68d8cad1b2b2a20.tar.bz2 | |
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
Diffstat (limited to 'tcc.h')
| -rw-r--r-- | tcc.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 { |
