mirror of
git://repo.or.cz/tinycc.git
synced 2026-07-01 17:18:41 +08:00
gcc compiles .h files as .c source code, tcc now does the same and no longer complains with "unrecognized file type". It is however adviced to use "-x c" option which exists for this purpose in gcc and was supported by tcc.
This commit is contained in:
parent
b5d4b908c4
commit
39d586d7fc
4
libtcc.c
4
libtcc.c
@ -1082,7 +1082,9 @@ LIBTCCAPI int tcc_add_file(TCCState *s, const char *filename)
|
|||||||
filetype = AFF_TYPE_ASMPP;
|
filetype = AFF_TYPE_ASMPP;
|
||||||
else if (!strcmp(ext, "s"))
|
else if (!strcmp(ext, "s"))
|
||||||
filetype = AFF_TYPE_ASM;
|
filetype = AFF_TYPE_ASM;
|
||||||
else if (!PATHCMP(ext, "c") || !PATHCMP(ext, "i"))
|
else if (!PATHCMP(ext, "c")
|
||||||
|
|| !PATHCMP(ext, "h")
|
||||||
|
|| !PATHCMP(ext, "i"))
|
||||||
filetype = AFF_TYPE_C;
|
filetype = AFF_TYPE_C;
|
||||||
else
|
else
|
||||||
filetype |= AFF_TYPE_BIN;
|
filetype |= AFF_TYPE_BIN;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user