which live in msvcrt.dll and need __declspec(import) which works by now. Also: - _mingw.h: conditionally define WIN32_LEAN_AND_MEAN - malloc.h: don't undef alloca
Unified · Split
| @@ -38,9 +38,8 @@ · 37 unmodified lines | ||
| 38 | 38 | #define __unaligned __attribute__((packed)) |
| 39 | 39 | #define __fastcall __attribute__((fastcall)) |
| 40 | 40 | |
| 41 | −// #define __MINGW_IMPORT extern __declspec(dllimport) | |
| 41 | +#define __MINGW_IMPORT extern __declspec(dllimport) | |
| 42 | 42 | #undef _MSVCRT_ |
| 43 | −#undef __MINGW_IMPORT | |
| 44 | 43 | #define __MINGW_ATTRIB_NORETURN |
| 45 | 44 | #define __MINGW_ATTRIB_CONST |
| 46 | 45 | #define __MINGW_ATTRIB_DEPRECATED |
| @@ -124,10 +123,12 @@ typedef struct localeinfo_struct _locale_tstruct,*_locale_t; · 77 unmodified lines | ||
| 124 | 123 | #define _ANONYMOUS_STRUCT |
| 125 | 124 | #define DECLSPEC_NORETURN |
| 126 | 125 | #define DECLARE_STDCALL_P(type) __stdcall type |
| 127 | −#define WIN32_LEAN_AND_MEAN | |
| 128 | 126 | #define NOSERVICE 1 |
| 129 | 127 | #define NOMCX 1 |
| 130 | 128 | #define NOIME 1 |
| 129 | +#ifndef WIN32_LEAN_AND_MEAN | |
| 130 | +# define WIN32_LEAN_AND_MEAN 1 | |
| 131 | +#endif | |
| 131 | 132 | #ifndef WINVER |
| 132 | 133 | # define WINVER 0x0502 |
| 133 | 134 | #endif |
| @@ -144,13 +144,9 @@ extern "C" { · 143 unmodified lines | ||
| 144 | 144 | #endif /* RC_INVOKED */ |
| 145 | 145 | |
| 146 | 146 | #ifndef NO_OLDNAMES |
| 147 | −#undef alloca | |
| 148 | 147 | #ifdef __GNUC__ |
| 148 | +#undef alloca | |
| 149 | 149 | #define alloca(x) __builtin_alloca((x)) |
| 150 | −#else | |
| 151 | −#ifndef __TINYC__ //gr | |
| 152 | −#define alloca _alloca | |
| 153 | −#endif | |
| 154 | 150 | #endif |
| 155 | 151 | #endif |
| 156 | 152 | |
| @@ -119,10 +119,10 @@ extern "C" { · 118 unmodified lines | ||
| 119 | 119 | |
| 120 | 120 | #define CLOCKS_PER_SEC 1000 |
| 121 | 121 | |
| 122 | −//!__TINYC__: __MINGW_IMPORT int _daylight; | |
| 123 | −//!__TINYC__: __MINGW_IMPORT long _dstbias; | |
| 124 | −//!__TINYC__: __MINGW_IMPORT long _timezone; | |
| 125 | −//!__TINYC__: __MINGW_IMPORT char * _tzname[2]; | |
| 122 | + __MINGW_IMPORT int _daylight; | |
| 123 | + __MINGW_IMPORT long _dstbias; | |
| 124 | + __MINGW_IMPORT long _timezone; | |
| 125 | + __MINGW_IMPORT char * _tzname[2]; | |
| 126 | 126 | _CRTIMP errno_t __cdecl _get_daylight(int *_Daylight); |
| 127 | 127 | _CRTIMP errno_t __cdecl _get_dstbias(long *_Daylight_savings_bias); |
| 128 | 128 | _CRTIMP errno_t __cdecl _get_timezone(long *_Timezone); |
| @@ -242,9 +242,10 @@ __CRT_INLINE time_t __cdecl time(time_t *_Time) { return _time64(_Time); } · 113 unmodified lines | ||
| 242 | 242 | #if !defined(NO_OLDNAMES) || defined(_POSIX) |
| 243 | 243 | #define CLK_TCK CLOCKS_PER_SEC |
| 244 | 244 | |
| 245 | − _CRTIMP extern int daylight; | |
| 246 | − _CRTIMP extern long timezone; | |
| 247 | − _CRTIMP extern char *tzname[2]; | |
| 245 | + __MINGW_IMPORT int daylight; | |
| 246 | + __MINGW_IMPORT long dstbias; | |
| 247 | + __MINGW_IMPORT long timezone; | |
| 248 | + __MINGW_IMPORT char *tzname[2]; | |
| 248 | 249 | void __cdecl tzset(void); |
| 249 | 250 | #endif |
| 250 | 251 | |