History

fix for thev "#pragna once" guard

gcc 3.4.6 don't understand "#if PATHCMP==stricmp" where "#define PATHCMP stricmp"

seyko committed 10 years ago

Commit 5fb57be1 parent 34feee02 files · +2 −1Browse files

Unified · Split

2 files
  1. tcc.h +1 −0
  2. tccpp.c +1 −1
tcc.h+1−0
@@ -101,6 +101,7 @@ · 100 unmodified lines
101101 # define IS_DIRSEP(c) (c == '/' || c == '\\')
102102 # define IS_ABSPATH(p) (IS_DIRSEP(p[0]) || (p[0] && p[1] == ':' && IS_DIRSEP(p[2])))
103103 # define PATHCMP stricmp
104+# define PATH_NOCASE
104105 #else
105106 # define IS_DIRSEP(c) (c == '/')
106107 # define IS_ABSPATH(p) IS_DIRSEP(p[0])
tccpp.c+1−1
@@ -1480,7 +1480,7 @@ static void pragma_parse(TCCState *s1) · 1479 unmodified lines
14801480 char buf1[sizeof(file->filename) + sizeof(ONCE_PREFIX)];
14811481 strcpy(buf1, ONCE_PREFIX);
14821482 strcat(buf1, file->filename);
1483−#if PATHCMP==stricmp
1483+#ifdef PATH_NOCASE
14841484 strupr(buf1);
14851485 #endif
14861486 add_cached_include(s1, file->filename, tok_alloc(buf1, strlen(buf1))->tok);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t