From 6c96c41ee49c11dda436eecc23beea002eace19e Mon Sep 17 00:00:00 2001 From: grischka Date: Sun, 16 Dec 2007 18:24:44 +0000 Subject: Import changesets (part 4) 428,457,460,467: defines for openbsd etc. --- tcc.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'tcc.c') diff --git a/tcc.c b/tcc.c index b364c2b..ce1a210 100644 --- a/tcc.c +++ b/tcc.c @@ -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 -- cgit v1.3.1