forked from Mirrors/tinycc
fix for thev "#pragna once" guard
gcc 3.4.6 don't understand "#if PATHCMP==stricmp" where "#define PATHCMP stricmp"master
parent
34feee0ed6
commit
5fb57bead4
1
tcc.h
1
tcc.h
|
@ -101,6 +101,7 @@
|
||||||
# define IS_DIRSEP(c) (c == '/' || c == '\\')
|
# define IS_DIRSEP(c) (c == '/' || c == '\\')
|
||||||
# define IS_ABSPATH(p) (IS_DIRSEP(p[0]) || (p[0] && p[1] == ':' && IS_DIRSEP(p[2])))
|
# define IS_ABSPATH(p) (IS_DIRSEP(p[0]) || (p[0] && p[1] == ':' && IS_DIRSEP(p[2])))
|
||||||
# define PATHCMP stricmp
|
# define PATHCMP stricmp
|
||||||
|
# define PATH_NOCASE
|
||||||
#else
|
#else
|
||||||
# define IS_DIRSEP(c) (c == '/')
|
# define IS_DIRSEP(c) (c == '/')
|
||||||
# define IS_ABSPATH(p) IS_DIRSEP(p[0])
|
# define IS_ABSPATH(p) IS_DIRSEP(p[0])
|
||||||
|
|
2
tccpp.c
2
tccpp.c
|
@ -1480,7 +1480,7 @@ static void pragma_parse(TCCState *s1)
|
||||||
char buf1[sizeof(file->filename) + sizeof(ONCE_PREFIX)];
|
char buf1[sizeof(file->filename) + sizeof(ONCE_PREFIX)];
|
||||||
strcpy(buf1, ONCE_PREFIX);
|
strcpy(buf1, ONCE_PREFIX);
|
||||||
strcat(buf1, file->filename);
|
strcat(buf1, file->filename);
|
||||||
#if PATHCMP==stricmp
|
#ifdef PATH_NOCASE
|
||||||
strupr(buf1);
|
strupr(buf1);
|
||||||
#endif
|
#endif
|
||||||
add_cached_include(s1, file->filename, tok_alloc(buf1, strlen(buf1))->tok);
|
add_cached_include(s1, file->filename, tok_alloc(buf1, strlen(buf1))->tok);
|
||||||
|
|
Loading…
Reference in New Issue