diff options
| author | grischka <grischka> | 2007-12-16 18:24:44 +0000 |
|---|---|---|
| committer | grischka <grischka> | 2007-12-16 18:24:44 +0000 |
| commit | 6c96c41ee49c11dda436eecc23beea002eace19e (patch) | |
| tree | 76d3c00ca47a08c133372e73298a4d9ef655aa79 /tcc.c | |
| parent | f466577673ed9e61124f50fa59c351f16c27388e (diff) | |
| download | tinycc-6c96c41ee49c11dda436eecc23beea002eace19e.tar.gz tinycc-6c96c41ee49c11dda436eecc23beea002eace19e.tar.bz2 | |
Import changesets (part 4) 428,457,460,467: defines for openbsd etc.
Diffstat (limited to 'tcc.c')
| -rw-r--r-- | tcc.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -738,7 +738,8 @@ int __stdcall VirtualProtect(void*,unsigned long,unsigned long,unsigned long*); #define strtof (float)strtod #define strtoll (long long)strtol #endif -#elif defined(TCC_UCLIBC) || defined(__FreeBSD__) +#elif defined(TCC_UCLIBC) || defined(__FreeBSD__) || defined(__DragonFly__) \ + || defined(__OpenBSD__) /* currently incorrect */ long double strtold(const char *nptr, char **endptr) { @@ -10013,9 +10014,15 @@ TCCState *tcc_new(void) tcc_define_symbol(s, "arm", NULL); tcc_define_symbol(s, "__APCS_32__", NULL); #endif -#if defined(linux) +#ifdef TCC_TARGET_PE + tcc_define_symbol(s, "_WIN32", NULL); +#else + tcc_define_symbol(s, "__unix__", NULL); + tcc_define_symbol(s, "__unix", NULL); +#if defined(__linux) tcc_define_symbol(s, "__linux__", NULL); - tcc_define_symbol(s, "linux", NULL); + tcc_define_symbol(s, "__linux", NULL); +#endif #endif /* tiny C specific defines */ tcc_define_symbol(s, "__TINYC__", NULL); @@ -10025,7 +10032,6 @@ TCCState *tcc_new(void) tcc_define_symbol(s, "__PTRDIFF_TYPE__", "int"); #ifdef TCC_TARGET_PE tcc_define_symbol(s, "__WCHAR_TYPE__", "unsigned short"); - tcc_define_symbol(s, "_WIN32", NULL); #else tcc_define_symbol(s, "__WCHAR_TYPE__", "int"); #endif |
