#define __TINYC__ = version-number
This commit is contained in:
parent
5dadff3de5
commit
dd70d19267
1 changed files with 5 additions and 1 deletions
6
libtcc.c
6
libtcc.c
|
@ -1834,6 +1834,8 @@ static void tcc_cleanup(void)
|
||||||
TCCState *tcc_new(void)
|
TCCState *tcc_new(void)
|
||||||
{
|
{
|
||||||
TCCState *s;
|
TCCState *s;
|
||||||
|
char buffer[100];
|
||||||
|
int a,b,c;
|
||||||
|
|
||||||
tcc_cleanup();
|
tcc_cleanup();
|
||||||
|
|
||||||
|
@ -1889,7 +1891,9 @@ TCCState *tcc_new(void)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
/* tiny C specific defines */
|
/* tiny C specific defines */
|
||||||
tcc_define_symbol(s, "__TINYC__", NULL);
|
sscanf(TCC_VERSION, "%d.%d.%d", &a, &b, &c);
|
||||||
|
sprintf(buffer, "%d", a*10000 + b*100 + c);
|
||||||
|
tcc_define_symbol(s, "__TINYC__", buffer);
|
||||||
|
|
||||||
/* tiny C & gcc defines */
|
/* tiny C & gcc defines */
|
||||||
tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned long");
|
tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned long");
|
||||||
|
|
Loading…
Reference in a new issue