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
101# define IS_DIRSEP(c) (c == '/' || c == '\\')101# define IS_DIRSEP(c) (c == '/' || c == '\\')
102# define IS_ABSPATH(p) (IS_DIRSEP(p[0]) || (p[0] && p[1] == ':' && IS_DIRSEP(p[2])))102# define IS_ABSPATH(p) (IS_DIRSEP(p[0]) || (p[0] && p[1] == ':' && IS_DIRSEP(p[2])))
103# define PATHCMP stricmp103# define PATHCMP stricmp
104# define PATH_NOCASE
104#else105#else
105# define IS_DIRSEP(c) (c == '/')106# define IS_DIRSEP(c) (c == '/')
106# define IS_ABSPATH(p) IS_DIRSEP(p[0])107# 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
1480 char buf1[sizeof(file->filename) + sizeof(ONCE_PREFIX)];1480 char buf1[sizeof(file->filename) + sizeof(ONCE_PREFIX)];
1481 strcpy(buf1, ONCE_PREFIX);1481 strcpy(buf1, ONCE_PREFIX);
1482 strcat(buf1, file->filename);1482 strcat(buf1, file->filename);
1483#if PATHCMP==stricmp1483#ifdef PATH_NOCASE
1484 strupr(buf1);1484 strupr(buf1);
1485#endif1485#endif
1486 add_cached_include(s1, file->filename, tok_alloc(buf1, strlen(buf1))->tok);1486 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