mirror of
https://github.com/frida/tinycc
synced 2025-03-20 06:32:54 +03:00
win32/include: enable _timezone etc variables.
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
This commit is contained in:
parent
436c1a734f
commit
7b573dc239
@ -38,9 +38,8 @@
|
|||||||
#define __unaligned __attribute__((packed))
|
#define __unaligned __attribute__((packed))
|
||||||
#define __fastcall __attribute__((fastcall))
|
#define __fastcall __attribute__((fastcall))
|
||||||
|
|
||||||
// #define __MINGW_IMPORT extern __declspec(dllimport)
|
#define __MINGW_IMPORT extern __declspec(dllimport)
|
||||||
#undef _MSVCRT_
|
#undef _MSVCRT_
|
||||||
#undef __MINGW_IMPORT
|
|
||||||
#define __MINGW_ATTRIB_NORETURN
|
#define __MINGW_ATTRIB_NORETURN
|
||||||
#define __MINGW_ATTRIB_CONST
|
#define __MINGW_ATTRIB_CONST
|
||||||
#define __MINGW_ATTRIB_DEPRECATED
|
#define __MINGW_ATTRIB_DEPRECATED
|
||||||
@ -124,10 +123,12 @@ typedef struct localeinfo_struct _locale_tstruct,*_locale_t;
|
|||||||
#define _ANONYMOUS_STRUCT
|
#define _ANONYMOUS_STRUCT
|
||||||
#define DECLSPEC_NORETURN
|
#define DECLSPEC_NORETURN
|
||||||
#define DECLARE_STDCALL_P(type) __stdcall type
|
#define DECLARE_STDCALL_P(type) __stdcall type
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
#define NOSERVICE 1
|
#define NOSERVICE 1
|
||||||
#define NOMCX 1
|
#define NOMCX 1
|
||||||
#define NOIME 1
|
#define NOIME 1
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN 1
|
||||||
|
#endif
|
||||||
#ifndef WINVER
|
#ifndef WINVER
|
||||||
# define WINVER 0x0502
|
# define WINVER 0x0502
|
||||||
#endif
|
#endif
|
||||||
|
@ -144,13 +144,9 @@ extern "C" {
|
|||||||
#endif /* RC_INVOKED */
|
#endif /* RC_INVOKED */
|
||||||
|
|
||||||
#ifndef NO_OLDNAMES
|
#ifndef NO_OLDNAMES
|
||||||
#undef alloca
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
#undef alloca
|
||||||
#define alloca(x) __builtin_alloca((x))
|
#define alloca(x) __builtin_alloca((x))
|
||||||
#else
|
|
||||||
#ifndef __TINYC__ //gr
|
|
||||||
#define alloca _alloca
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -119,10 +119,10 @@ extern "C" {
|
|||||||
|
|
||||||
#define CLOCKS_PER_SEC 1000
|
#define CLOCKS_PER_SEC 1000
|
||||||
|
|
||||||
//!__TINYC__: __MINGW_IMPORT int _daylight;
|
__MINGW_IMPORT int _daylight;
|
||||||
//!__TINYC__: __MINGW_IMPORT long _dstbias;
|
__MINGW_IMPORT long _dstbias;
|
||||||
//!__TINYC__: __MINGW_IMPORT long _timezone;
|
__MINGW_IMPORT long _timezone;
|
||||||
//!__TINYC__: __MINGW_IMPORT char * _tzname[2];
|
__MINGW_IMPORT char * _tzname[2];
|
||||||
_CRTIMP errno_t __cdecl _get_daylight(int *_Daylight);
|
_CRTIMP errno_t __cdecl _get_daylight(int *_Daylight);
|
||||||
_CRTIMP errno_t __cdecl _get_dstbias(long *_Daylight_savings_bias);
|
_CRTIMP errno_t __cdecl _get_dstbias(long *_Daylight_savings_bias);
|
||||||
_CRTIMP errno_t __cdecl _get_timezone(long *_Timezone);
|
_CRTIMP errno_t __cdecl _get_timezone(long *_Timezone);
|
||||||
@ -242,9 +242,10 @@ __CRT_INLINE time_t __cdecl time(time_t *_Time) { return _time64(_Time); }
|
|||||||
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
#if !defined(NO_OLDNAMES) || defined(_POSIX)
|
||||||
#define CLK_TCK CLOCKS_PER_SEC
|
#define CLK_TCK CLOCKS_PER_SEC
|
||||||
|
|
||||||
_CRTIMP extern int daylight;
|
__MINGW_IMPORT int daylight;
|
||||||
_CRTIMP extern long timezone;
|
__MINGW_IMPORT long dstbias;
|
||||||
_CRTIMP extern char *tzname[2];
|
__MINGW_IMPORT long timezone;
|
||||||
|
__MINGW_IMPORT char *tzname[2];
|
||||||
void __cdecl tzset(void);
|
void __cdecl tzset(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user