History

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

grischka committed 15 years ago

Commit 7b573dc1 parent 436c1a73 files · +13 −15Browse files

Unified · Split

3 files
  1. win32/include/_mingw.h +4 −3
  2. win32/include/malloc.h +1 −5
  3. win32/include/time.h +8 −7
win32/include/_mingw.h+4−3
@@ -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_NORETURN43#define __MINGW_ATTRIB_NORETURN
45#define __MINGW_ATTRIB_CONST44#define __MINGW_ATTRIB_CONST
46#define __MINGW_ATTRIB_DEPRECATED45#define __MINGW_ATTRIB_DEPRECATED
@@ -124,10 +123,12 @@ typedef struct localeinfo_struct _locale_tstruct,*_locale_t; · 77 unmodified lines
124#define _ANONYMOUS_STRUCT123#define _ANONYMOUS_STRUCT
125#define DECLSPEC_NORETURN124#define DECLSPEC_NORETURN
126#define DECLARE_STDCALL_P(type) __stdcall type125#define DECLARE_STDCALL_P(type) __stdcall type
127#define WIN32_LEAN_AND_MEAN
128#define NOSERVICE 1126#define NOSERVICE 1
129#define NOMCX 1127#define NOMCX 1
130#define NOIME 1128#define NOIME 1
129#ifndef WIN32_LEAN_AND_MEAN
130# define WIN32_LEAN_AND_MEAN 1
131#endif
131#ifndef WINVER132#ifndef WINVER
132# define WINVER 0x0502133# define WINVER 0x0502
133#endif134#endif
win32/include/malloc.h+1−5
@@ -144,13 +144,9 @@ extern "C" { · 143 unmodified lines
144#endif /* RC_INVOKED */144#endif /* RC_INVOKED */
145 145
146#ifndef NO_OLDNAMES146#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#endif150#endif
155#endif151#endif
156 152
win32/include/time.h+8−7
@@ -119,10 +119,10 @@ extern "C" { · 118 unmodified lines
119 119
120#define CLOCKS_PER_SEC 1000120#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_SEC243#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#endif250#endif
250 251

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t