Unified · Split
| @@ -65,12 +65,11 @@ extern long double strtold (const char *__nptr, char **__endptr); · 64 unmodified lines | ||
| 65 | 65 | # ifndef __GNUC__ |
| 66 | 66 | # define strtold (long double)strtod |
| 67 | 67 | # define strtof (float)strtod |
| 68 | −# ifdef _WIN64 | |
| 68 | +# ifndef strtoll | |
| 69 | 69 | # define strtoll _strtoi64 |
| 70 | +# endif | |
| 71 | +# ifndef strtoull | |
| 70 | 72 | # define strtoull _strtoui64 |
| 71 | −# else | |
| 72 | −# define strtoll strtol | |
| 73 | −# define strtoull strtoul | |
| 74 | 73 | # endif |
| 75 | 74 | # endif |
| 76 | 75 | # ifdef LIBTCC_AS_DLL |
| @@ -536,7 +536,7 @@ extern "C" { · 535 unmodified lines | ||
| 536 | 536 | #endif |
| 537 | 537 | #endif |
| 538 | 538 | |
| 539 | −#if !defined __NO_ISOCEXT /* externs in static libmingwex.a */ | |
| 539 | +#if !defined __NO_ISOCEXT | |
| 540 | 540 | |
| 541 | 541 | typedef struct { long long quot, rem; } lldiv_t; |
| 542 | 542 | |
| @@ -544,8 +544,18 @@ extern "C" { · 1 unmodified line | ||
| 544 | 544 | |
| 545 | 545 | __CRT_INLINE long long __cdecl llabs(long long _j) { return (_j >= 0 ? _j : -_j); } |
| 546 | 546 | |
| 547 | + /* stro[u]ll do not properly map in Windows; use macros as VC++ does */ | |
| 548 | + #if !defined(strtoll) | |
| 549 | + #define strtoll _strtoi64 | |
| 550 | + #endif | |
| 551 | + #if !defined(strtoull) | |
| 552 | + #define strtoull _strtoui64 | |
| 553 | + #endif | |
| 554 | + | |
| 555 | +/* | |
| 547 | 556 | long long __cdecl strtoll(const char* __restrict__, char** __restrict, int); |
| 548 | 557 | unsigned long long __cdecl strtoull(const char* __restrict__, char** __restrict__, int); |
| 558 | +*/ | |
| 549 | 559 | |
| 550 | 560 | /* these are stubs for MS _i64 versions */ |
| 551 | 561 | long long __cdecl atoll (const char *); |