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
3838 #define __unaligned __attribute__((packed))
3939 #define __fastcall __attribute__((fastcall))
4040
41−// #define __MINGW_IMPORT extern __declspec(dllimport)
41+#define __MINGW_IMPORT extern __declspec(dllimport)
4242 #undef _MSVCRT_
43−#undef __MINGW_IMPORT
4443 #define __MINGW_ATTRIB_NORETURN
4544 #define __MINGW_ATTRIB_CONST
4645 #define __MINGW_ATTRIB_DEPRECATED
@@ -124,10 +123,12 @@ typedef struct localeinfo_struct _locale_tstruct,*_locale_t; · 77 unmodified lines
124123 #define _ANONYMOUS_STRUCT
125124 #define DECLSPEC_NORETURN
126125 #define DECLARE_STDCALL_P(type) __stdcall type
127−#define WIN32_LEAN_AND_MEAN
128126 #define NOSERVICE 1
129127 #define NOMCX 1
130128 #define NOIME 1
129+#ifndef WIN32_LEAN_AND_MEAN
130+# define WIN32_LEAN_AND_MEAN 1
131+#endif
131132 #ifndef WINVER
132133 # define WINVER 0x0502
133134 #endif
win32/include/malloc.h+1−5
@@ -144,13 +144,9 @@ extern "C" { · 143 unmodified lines
144144 #endif /* RC_INVOKED */
145145
146146 #ifndef NO_OLDNAMES
147−#undef alloca
148147 #ifdef __GNUC__
148+#undef alloca
149149 #define alloca(x) __builtin_alloca((x))
150−#else
151−#ifndef __TINYC__ //gr
152−#define alloca _alloca
153−#endif
154150 #endif
155151 #endif
156152
win32/include/time.h+8−7
@@ -119,10 +119,10 @@ extern "C" { · 118 unmodified lines
119119
120120 #define CLOCKS_PER_SEC 1000
121121
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];
126126 _CRTIMP errno_t __cdecl _get_daylight(int *_Daylight);
127127 _CRTIMP errno_t __cdecl _get_dstbias(long *_Daylight_savings_bias);
128128 _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
242242 #if !defined(NO_OLDNAMES) || defined(_POSIX)
243243 #define CLK_TCK CLOCKS_PER_SEC
244244
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];
248249 void __cdecl tzset(void);
249250 #endif
250251

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