History

#define __TINYC__ = version-number

grischka committed 17 years ago

Commit dd70d191 parent 5dadff31 file · +5 −1Browse files

Unified · Split

libtcc.c+5−1
@@ -1834,6 +1834,8 @@ static void tcc_cleanup(void) · 1833 unmodified lines
18341834 TCCState *tcc_new(void)
18351835 {
18361836 TCCState *s;
1837+ char buffer[100];
1838+ int a,b,c;
18371839
18381840 tcc_cleanup();
18391841
@@ -1889,7 +1891,9 @@ TCCState *tcc_new(void) · 49 unmodified lines
18891891 #endif
18901892 #endif
18911893 /* tiny C specific defines */
1892− tcc_define_symbol(s, "__TINYC__", NULL);
1894+ sscanf(TCC_VERSION, "%d.%d.%d", &a, &b, &c);
1895+ sprintf(buffer, "%d", a*10000 + b*100 + c);
1896+ tcc_define_symbol(s, "__TINYC__", buffer);
18931897
18941898 /* tiny C & gcc defines */
18951899 tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned long");

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