From 05364072042ff37904a7b0b14cdd85a1ea1ca11d Mon Sep 17 00:00:00 2001 From: seyko Date: Sun, 12 Apr 2015 15:35:37 +0300 Subject: ability to specify a type of the input file with the -x switch Usage example: tcc -xc ex5.cgi From a gcc docs: You can specify the input language explicitly with the -x option: -x language Specify explicitly the language for the following input files (rather than letting the compiler choose a default based on the file name suffix). This option applies to all following input files until the next -x option. Possible values for language are: c c-header c-cpp-output c++ c++-header c++-cpp-output objective-c objective-c-header objective-c-cpp-output objective-c++ objective-c++-header objective-c++-cpp-output assembler assembler-with-cpp ada f77 f77-cpp-input f95 f95-cpp-input java -x none Turn off any specification of a language, so that subsequent files are handled according to their file name suffixes (as they are if -x has not been used at all) --- tcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index c5678a8..a0b4894 100644 --- a/tcc.h +++ b/tcc.h @@ -1115,7 +1115,7 @@ ST_FUNC void tcc_open_bf(TCCState *s1, const char *filename, int initlen); ST_FUNC int tcc_open(TCCState *s1, const char *filename); ST_FUNC void tcc_close(void); -ST_FUNC int tcc_add_file_internal(TCCState *s1, const char *filename, int flags); +ST_FUNC int tcc_add_file_internal(TCCState *s1, const char *filename, int flags, int filetype); ST_FUNC int tcc_add_crt(TCCState *s, const char *filename); ST_FUNC int tcc_add_dll(TCCState *s, const char *filename, int flags); -- cgit v1.3.1