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 | #define __unaligned __attribute__((packed)) | 38 | #define __unaligned __attribute__((packed)) |
| 39 | #define __fastcall __attribute__((fastcall)) | 39 | #define __fastcall __attribute__((fastcall)) |
| 40 | 40 | ||
| 41 | // #define __MINGW_IMPORT extern __declspec(dllimport) | 41 | #define __MINGW_IMPORT extern __declspec(dllimport) |
| 42 | #undef _MSVCRT_ | 42 | #undef _MSVCRT_ |
| 43 | #undef __MINGW_IMPORT | ||
| 44 | #define __MINGW_ATTRIB_NORETURN | 43 | #define __MINGW_ATTRIB_NORETURN |
| 45 | #define __MINGW_ATTRIB_CONST | 44 | #define __MINGW_ATTRIB_CONST |
| 46 | #define __MINGW_ATTRIB_DEPRECATED | 45 | #define __MINGW_ATTRIB_DEPRECATED |
| @@ -124,10 +123,12 @@ typedef struct localeinfo_struct _locale_tstruct,*_locale_t; · 77 unmodified lines | |||
| 124 | #define _ANONYMOUS_STRUCT | 123 | #define _ANONYMOUS_STRUCT |
| 125 | #define DECLSPEC_NORETURN | 124 | #define DECLSPEC_NORETURN |
| 126 | #define DECLARE_STDCALL_P(type) __stdcall type | 125 | #define DECLARE_STDCALL_P(type) __stdcall type |
| 127 | #define WIN32_LEAN_AND_MEAN | ||
| 128 | #define NOSERVICE 1 | 126 | #define NOSERVICE 1 |
| 129 | #define NOMCX 1 | 127 | #define NOMCX 1 |
| 130 | #define NOIME 1 | 128 | #define NOIME 1 |
| 129 | #ifndef WIN32_LEAN_AND_MEAN | ||
| 130 | # define WIN32_LEAN_AND_MEAN 1 | ||
| 131 | #endif | ||
| 131 | #ifndef WINVER | 132 | #ifndef WINVER |
| 132 | # define WINVER 0x0502 | 133 | # define WINVER 0x0502 |
| 133 | #endif | 134 | #endif |
| @@ -144,13 +144,9 @@ extern "C" { · 143 unmodified lines | |||
| 144 | #endif /* RC_INVOKED */ | 144 | #endif /* RC_INVOKED */ |
| 145 | 145 | ||
| 146 | #ifndef NO_OLDNAMES | 146 | #ifndef NO_OLDNAMES |
| 147 | #undef alloca | ||
| 148 | #ifdef __GNUC__ | 147 | #ifdef __GNUC__ |
| 148 | #undef alloca | ||
| 149 | #define alloca(x) __builtin_alloca((x)) | 149 | #define alloca(x) __builtin_alloca((x)) |
| 150 | #else | ||
| 151 | #ifndef __TINYC__ //gr | ||
| 152 | #define alloca _alloca | ||
| 153 | #endif | ||
| 154 | #endif | 150 | #endif |
| 155 | #endif | 151 | #endif |
| 156 | 152 | ||
| @@ -119,10 +119,10 @@ extern "C" { · 118 unmodified lines | |||
| 119 | 119 | ||
| 120 | #define CLOCKS_PER_SEC 1000 | 120 | #define CLOCKS_PER_SEC 1000 |
| 121 | 121 | ||
| 122 | //!__TINYC__: __MINGW_IMPORT int _daylight; | 122 | __MINGW_IMPORT int _daylight; |
| 123 | //!__TINYC__: __MINGW_IMPORT long _dstbias; | 123 | __MINGW_IMPORT long _dstbias; |
| 124 | //!__TINYC__: __MINGW_IMPORT long _timezone; | 124 | __MINGW_IMPORT long _timezone; |
| 125 | //!__TINYC__: __MINGW_IMPORT char * _tzname[2]; | 125 | __MINGW_IMPORT char * _tzname[2]; |
| 126 | _CRTIMP errno_t __cdecl _get_daylight(int *_Daylight); | 126 | _CRTIMP errno_t __cdecl _get_daylight(int *_Daylight); |
| 127 | _CRTIMP errno_t __cdecl _get_dstbias(long *_Daylight_savings_bias); | 127 | _CRTIMP errno_t __cdecl _get_dstbias(long *_Daylight_savings_bias); |
| 128 | _CRTIMP errno_t __cdecl _get_timezone(long *_Timezone); | 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 | #if !defined(NO_OLDNAMES) || defined(_POSIX) | 242 | #if !defined(NO_OLDNAMES) || defined(_POSIX) |
| 243 | #define CLK_TCK CLOCKS_PER_SEC | 243 | #define CLK_TCK CLOCKS_PER_SEC |
| 244 | 244 | ||
| 245 | _CRTIMP extern int daylight; | 245 | __MINGW_IMPORT int daylight; |
| 246 | _CRTIMP extern long timezone; | 246 | __MINGW_IMPORT long dstbias; |
| 247 | _CRTIMP extern char *tzname[2]; | 247 | __MINGW_IMPORT long timezone; |
| 248 | __MINGW_IMPORT char *tzname[2]; | ||
| 248 | void __cdecl tzset(void); | 249 | void __cdecl tzset(void); |
| 249 | #endif | 250 | #endif |
| 250 | 251 | ||