The MinGW.org Windows System Libraries
リビジョン | 560415ce8a972a143e63aed5ce636c4fa1398439 (tree) |
---|---|
日時 | 2012-08-28 21:58:25 |
作者 | Earnie Boyd <earnie@user...> |
コミッター | Earnie Boyd |
We are going to assume that MinGW is using GCC version greater than or equal to 3.5.4 and remove any filters related to earlier versions. We are also going to remove any possibility of using a compiler other than GCC.
@@ -1,3 +1,33 @@ | ||
1 | +2012-08-28 Earnie Boyd <earnie@users.sourceforge.net> | |
2 | + | |
3 | + We are going to assume that MinGW is using GCC version greater than or | |
4 | + equal to 3.5.4 and remove any filters related to earlier versions. We | |
5 | + are also going to remove any possibility of using a compiler other than | |
6 | + GCC. | |
7 | + | |
8 | + * include/_mingw.h: Remove filters for __GNUC__ >=3, remove the | |
9 | + possibility of using a compiler other than GCC and remove any other | |
10 | + needless filters. | |
11 | + * include/acccrtl.h: Ditto. | |
12 | + * include/aclapi.h: Ditto. | |
13 | + * include/aclui.h: Ditto. | |
14 | + * include/adsprop.h: Ditto. | |
15 | + * include/afxres.h: Ditto. | |
16 | + * include/amaudio.h: Ditto. | |
17 | + * include/amvideo.h: Ditto. | |
18 | + * include/audevcod.h: Ditto. | |
19 | + * include/aygshell.h: Ditto. | |
20 | + * include/basetsd.h: Ditto. | |
21 | + * include/wtsapi32.h: Ditto. | |
22 | + * include/wtypes.h: Ditto. | |
23 | + * include/xprtdefs.h: Ditto. | |
24 | + * include/zmouse.h: Ditto. | |
25 | + * include/aviriff.h: Ditto. | |
26 | + * src/libcrt/crt/CRT_fp10.c: Ditto. | |
27 | + * src/libcrt/crt/CRT_fp8.c: Ditto. | |
28 | + * src/libcrt/crt/dllcrt1.c: Ditto. | |
29 | + * src/libcrt/crt/pseudo-reloc.c: Ditto. | |
30 | + | |
1 | 31 | 2012-08-23 Earnie Boyd <earnie@users.sourceforge.net> |
2 | 32 | |
3 | 33 | * configure.ac: Set AC_CONFIG_AUX_DIR, AC_PREFIX_DEFAULT and call |
@@ -34,11 +34,7 @@ | ||
34 | 34 | #define __MINGW32_MINOR_VERSION 20 |
35 | 35 | #define __MINGW32_PATCHLEVEL 0 |
36 | 36 | |
37 | -#if __GNUC__ >= 3 | |
38 | -#ifndef __PCC__ | |
39 | 37 | #pragma GCC system_header |
40 | -#endif | |
41 | -#endif | |
42 | 38 | |
43 | 39 | /* These are defined by the user (or the compiler) |
44 | 40 | to specify how identifiers are imported from a DLL. |
@@ -85,114 +81,60 @@ | ||
85 | 81 | /* Try to avoid problems with outdated checks for GCC __attribute__ support. */ |
86 | 82 | #undef __attribute__ |
87 | 83 | |
88 | -#if defined (__PCC__) | |
89 | -# undef __DECLSPEC_SUPPORTED | |
84 | +#ifdef __declspec | |
90 | 85 | # ifndef __MINGW_IMPORT |
91 | -# define __MINGW_IMPORT extern | |
86 | + /* Note the extern. This is needed to work around GCC's | |
87 | + limitations in handling dllimport attribute. */ | |
88 | +# define __MINGW_IMPORT extern __attribute__ ((__dllimport__)) | |
92 | 89 | # endif |
93 | 90 | # ifndef _CRTIMP |
94 | -# define _CRTIMP | |
95 | -# endif | |
96 | -# ifndef __cdecl | |
97 | -# define __cdecl _Pragma("cdecl") | |
98 | -# endif | |
99 | -# ifndef __stdcall | |
100 | -# define __stdcall _Pragma("stdcall") | |
101 | -# endif | |
102 | -# ifndef __int64 | |
103 | -# define __int64 long long | |
104 | -# endif | |
105 | -# ifndef __int32 | |
106 | -# define __int32 long | |
107 | -# endif | |
108 | -# ifndef __int16 | |
109 | -# define __int16 short | |
110 | -# endif | |
111 | -# ifndef __int8 | |
112 | -# define __int8 char | |
113 | -# endif | |
114 | -# ifndef __small | |
115 | -# define __small char | |
116 | -# endif | |
117 | -# ifndef __hyper | |
118 | -# define __hyper long long | |
119 | -# endif | |
120 | -# ifndef __volatile__ | |
121 | -# define __volatile__ volatile | |
122 | -# endif | |
123 | -# ifndef __restrict__ | |
124 | -# define __restrict__ restrict | |
125 | -# endif | |
126 | -# define NONAMELESSUNION | |
127 | -#elif defined(__GNUC__) | |
128 | -# ifdef __declspec | |
129 | -# ifndef __MINGW_IMPORT | |
130 | - /* Note the extern. This is needed to work around GCC's | |
131 | - limitations in handling dllimport attribute. */ | |
132 | -# define __MINGW_IMPORT extern __attribute__ ((__dllimport__)) | |
133 | -# endif | |
134 | -# ifndef _CRTIMP | |
135 | -# ifdef __USE_CRTIMP | |
136 | -# define _CRTIMP __attribute__ ((dllimport)) | |
137 | -# else | |
138 | -# define _CRTIMP | |
139 | -# endif | |
140 | -# endif | |
141 | -# define __DECLSPEC_SUPPORTED | |
142 | -# else /* __declspec */ | |
143 | -# undef __DECLSPEC_SUPPORTED | |
144 | -# undef __MINGW_IMPORT | |
145 | -# ifndef _CRTIMP | |
91 | +# ifdef __USE_CRTIMP | |
92 | +# define _CRTIMP __attribute__ ((dllimport)) | |
93 | +# else | |
146 | 94 | # define _CRTIMP |
147 | 95 | # endif |
148 | -# endif /* __declspec */ | |
96 | +# endif | |
97 | +# define __DECLSPEC_SUPPORTED | |
98 | +#else /* __declspec */ | |
99 | +# undef __DECLSPEC_SUPPORTED | |
100 | +# undef __MINGW_IMPORT | |
101 | +# ifndef _CRTIMP | |
102 | +# define _CRTIMP | |
103 | +# endif | |
104 | +#endif /* __declspec */ | |
149 | 105 | /* |
150 | 106 | * The next two defines can cause problems if user code adds the |
151 | 107 | * __cdecl attribute like so: |
152 | 108 | * void __attribute__ ((__cdecl)) foo(void); |
153 | 109 | */ |
154 | -# ifndef __cdecl | |
155 | -# define __cdecl __attribute__ ((__cdecl__)) | |
156 | -# endif | |
157 | -# ifndef __stdcall | |
158 | -# define __stdcall __attribute__ ((__stdcall__)) | |
159 | -# endif | |
160 | -# ifndef __int64 | |
161 | -# define __int64 long long | |
162 | -# endif | |
163 | -# ifndef __int32 | |
164 | -# define __int32 long | |
165 | -# endif | |
166 | -# ifndef __int16 | |
167 | -# define __int16 short | |
168 | -# endif | |
169 | -# ifndef __int8 | |
170 | -# define __int8 char | |
171 | -# endif | |
172 | -# ifndef __small | |
173 | -# define __small char | |
174 | -# endif | |
175 | -# ifndef __hyper | |
176 | -# define __hyper long long | |
177 | -# endif | |
178 | -#else /* ! __GNUC__ && ! __PCC__ */ | |
179 | -# ifndef __MINGW_IMPORT | |
180 | -# define __MINGW_IMPORT __declspec(dllimport) | |
181 | -# endif | |
182 | -# ifndef _CRTIMP | |
183 | -# define _CRTIMP __declspec(dllimport) | |
184 | -# endif | |
185 | -# define __DECLSPEC_SUPPORTED | |
186 | -# define __attribute__(x) /* nothing */ | |
110 | +#ifndef __cdecl | |
111 | +# define __cdecl __attribute__ ((__cdecl__)) | |
112 | +#endif | |
113 | +#ifndef __stdcall | |
114 | +# define __stdcall __attribute__ ((__stdcall__)) | |
115 | +#endif | |
116 | +#ifndef __int64 | |
117 | +# define __int64 long long | |
118 | +#endif | |
119 | +#ifndef __int32 | |
120 | +# define __int32 long | |
121 | +#endif | |
122 | +#ifndef __int16 | |
123 | +# define __int16 short | |
124 | +#endif | |
125 | +#ifndef __int8 | |
126 | +# define __int8 char | |
127 | +#endif | |
128 | +#ifndef __small | |
129 | +# define __small char | |
130 | +#endif | |
131 | +#ifndef __hyper | |
132 | +# define __hyper long long | |
187 | 133 | #endif |
188 | 134 | |
189 | -#if defined (__GNUC__) && defined (__GNUC_MINOR__) | |
190 | 135 | #define __MINGW_GNUC_PREREQ(major, minor) \ |
191 | 136 | (__GNUC__ > (major) \ |
192 | 137 | || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))) |
193 | -#else | |
194 | -#define __MINGW_GNUC_PREREQ(major, minor) 0 | |
195 | -#endif | |
196 | 138 | |
197 | 139 | #ifdef __cplusplus |
198 | 140 | # define __CRT_INLINE inline |
@@ -204,58 +146,21 @@ | ||
204 | 146 | # endif |
205 | 147 | #endif |
206 | 148 | |
207 | -# ifdef __GNUC__ | |
208 | -# define _CRTALIAS __CRT_INLINE __attribute__ ((__always_inline__)) | |
209 | -# else | |
210 | -# define _CRTALIAS __CRT_INLINE | |
211 | -# endif | |
149 | +#define _CRTALIAS __CRT_INLINE __attribute__ ((__always_inline__)) | |
212 | 150 | |
213 | 151 | #ifdef __cplusplus |
214 | 152 | # define __UNUSED_PARAM(x) |
215 | 153 | #else |
216 | -# ifdef __GNUC__ | |
217 | -# define __UNUSED_PARAM(x) x __attribute__ ((__unused__)) | |
218 | -# else | |
219 | -# define __UNUSED_PARAM(x) x | |
220 | -# endif | |
154 | +# define __UNUSED_PARAM(x) x __attribute__ ((__unused__)) | |
221 | 155 | #endif |
222 | 156 | |
223 | -#ifdef __GNUC__ | |
224 | 157 | #define __MINGW_ATTRIB_NORETURN __attribute__ ((__noreturn__)) |
225 | 158 | #define __MINGW_ATTRIB_CONST __attribute__ ((__const__)) |
226 | -#else | |
227 | -#define __MINGW_ATTRIB_NORETURN | |
228 | -#define __MINGW_ATTRIB_CONST | |
229 | -#endif | |
230 | - | |
231 | -#if __MINGW_GNUC_PREREQ (3, 0) | |
232 | 159 | #define __MINGW_ATTRIB_MALLOC __attribute__ ((__malloc__)) |
233 | 160 | #define __MINGW_ATTRIB_PURE __attribute__ ((__pure__)) |
234 | -#else | |
235 | -#define __MINGW_ATTRIB_MALLOC | |
236 | -#define __MINGW_ATTRIB_PURE | |
237 | -#endif | |
238 | - | |
239 | -/* Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's | |
240 | - variadiac macro facility, because variadic macros cause syntax | |
241 | - errors with --traditional-cpp. */ | |
242 | -#if __MINGW_GNUC_PREREQ (3, 3) | |
243 | 161 | #define __MINGW_ATTRIB_NONNULL(arg) __attribute__ ((__nonnull__ (arg))) |
244 | -#else | |
245 | -#define __MINGW_ATTRIB_NONNULL(arg) | |
246 | -#endif /* GNUC >= 3.3 */ | |
247 | - | |
248 | -#if __MINGW_GNUC_PREREQ (3, 1) | |
249 | 162 | #define __MINGW_ATTRIB_DEPRECATED __attribute__ ((__deprecated__)) |
250 | -#else | |
251 | -#define __MINGW_ATTRIB_DEPRECATED | |
252 | -#endif /* GNUC >= 3.1 */ | |
253 | - | |
254 | -#if __MINGW_GNUC_PREREQ (3, 3) | |
255 | 163 | #define __MINGW_NOTHROW __attribute__ ((__nothrow__)) |
256 | -#else | |
257 | -#define __MINGW_NOTHROW | |
258 | -#endif /* GNUC >= 3.3 */ | |
259 | 164 | |
260 | 165 | |
261 | 166 | /* TODO: Mark (almost) all CRT functions as __MINGW_NOTHROW. This will |
@@ -1,8 +1,6 @@ | ||
1 | 1 | #ifndef _ACCCTRL_H |
2 | 2 | #define _ACCCTRL_H |
3 | -#if __GNUC__ >=3 | |
4 | 3 | #pragma GCC system_header |
5 | -#endif | |
6 | 4 | |
7 | 5 | #ifdef __cplusplus |
8 | 6 | extern "C" { |
@@ -1,8 +1,6 @@ | ||
1 | 1 | #ifndef _ACLAPI_H |
2 | 2 | #define _ACLAPI_H |
3 | -#if __GNUC__ >= 3 | |
4 | 3 | #pragma GCC system_header |
5 | -#endif | |
6 | 4 | |
7 | 5 | #include <windows.h> |
8 | 6 | #include <accctrl.h> |
@@ -1,8 +1,6 @@ | ||
1 | 1 | #ifndef _ACLUI_H |
2 | 2 | #define _ACLUI_H |
3 | -#if __GNUC__ >= 3 | |
4 | 3 | #pragma GCC system_header |
5 | -#endif | |
6 | 4 | |
7 | 5 | #ifndef _OBJC_NO_COM |
8 | 6 | #include <objbase.h> |
@@ -14,9 +14,7 @@ | ||
14 | 14 | */ |
15 | 15 | #ifndef _ADSPROP_H |
16 | 16 | #define _ADSPROP_H |
17 | -#if __GNUC__ >= 3 | |
18 | 17 | #pragma GCC system_header |
19 | -#endif | |
20 | 18 | |
21 | 19 | #ifdef __cplusplus |
22 | 20 | extern "C" { |
@@ -1,8 +1,6 @@ | ||
1 | 1 | #ifndef _AFXRES_H |
2 | 2 | #define _AFXRES_H |
3 | -#if __GNUC__ >= 3 | |
4 | 3 | #pragma GCC system_header |
5 | -#endif | |
6 | 4 | |
7 | 5 | #ifdef __cplusplus |
8 | 6 | extern "C" { |
@@ -1,8 +1,6 @@ | ||
1 | 1 | #ifndef _AMAUDIO_H |
2 | 2 | #define _AMAUDIO_H |
3 | -#if __GNUC__ >= 3 | |
4 | 3 | #pragma GCC system_header |
5 | -#endif | |
6 | 4 | |
7 | 5 | #include <dsound.h> |
8 | 6 |
@@ -1,8 +1,6 @@ | ||
1 | 1 | #ifndef _AMVIDEO_H |
2 | 2 | #define _AMVIDEO_H |
3 | -#if __GNUC__ >=3 | |
4 | 3 | #pragma GCC system_header |
5 | -#endif | |
6 | 4 | |
7 | 5 | #include <ddraw.h> |
8 | 6 | #include <strmif.h> |
@@ -1,8 +1,6 @@ | ||
1 | 1 | #ifndef _AUDEVCOD_H |
2 | 2 | #define _AUDEVCOD_H |
3 | -#if __GNUC__ >=3 | |
4 | 3 | #pragma GCC system_header |
5 | -#endif | |
6 | 4 | |
7 | 5 | #ifdef __cplusplus |
8 | 6 | extern "C" { |
@@ -1,15 +1,9 @@ | ||
1 | 1 | #ifndef _AVIRIFF_H |
2 | 2 | #define _AVIRIFF_H |
3 | -#if __GNUC__ >=3 | |
4 | 3 | #pragma GCC system_header |
5 | -#endif | |
6 | 4 | |
7 | -#ifndef _MMSYSTEM_H | |
8 | 5 | #include <mmsystem.h> |
9 | -#endif | |
10 | -#ifndef _WINGDI_H | |
11 | 6 | #include <wingdi.h> |
12 | -#endif | |
13 | 7 | |
14 | 8 | #ifdef __cplusplus |
15 | 9 | extern "C" { |
@@ -1,8 +1,6 @@ | ||
1 | 1 | #ifndef _AYGSHELL_H |
2 | 2 | #define _AYGSHELL_H |
3 | -#if __GNUC__ >=3 | |
4 | 3 | #pragma GCC system_header |
5 | -#endif | |
6 | 4 | |
7 | 5 | #if _WIN32_WCE >= 400 |
8 | 6 |
@@ -1,14 +1,10 @@ | ||
1 | 1 | #ifndef _BASETSD_H |
2 | 2 | #define _BASETSD_H |
3 | -#if __GNUC__ >=3 | |
4 | 3 | #pragma GCC system_header |
5 | -#endif | |
6 | 4 | |
7 | -#ifdef __GNUC__ | |
8 | 5 | #ifndef __int64 |
9 | 6 | #define __int64 long long |
10 | 7 | #endif |
11 | -#endif | |
12 | 8 | |
13 | 9 | #if defined(_WIN64) |
14 | 10 | #define __int3264 __int64 |
@@ -16,6 +12,8 @@ | ||
16 | 12 | #else /* !_WIN64 */ |
17 | 13 | #define __int3264 __int32 |
18 | 14 | #define ADDRESS_TAG_BIT 0x80000000UL |
15 | +#endif /* !_WIN64 */ | |
16 | + | |
19 | 17 | #define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) ) |
20 | 18 | #define HandleToLong( h ) ((LONG)(LONG_PTR) (h) ) |
21 | 19 | #define LongToHandle( h) ((HANDLE)(LONG_PTR) (h)) |
@@ -29,7 +27,6 @@ | ||
29 | 27 | #define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui)) |
30 | 28 | #define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l)) |
31 | 29 | #define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul)) |
32 | -#endif /* !_WIN64 */ | |
33 | 30 | |
34 | 31 | #define UlongToPtr(ul) ULongToPtr(ul) |
35 | 32 | #define UintToPtr(ui) UIntToPtr(ui) |
@@ -50,9 +47,7 @@ extern "C" { | ||
50 | 47 | typedef signed char INT8; |
51 | 48 | typedef signed short INT16; |
52 | 49 | typedef int LONG32, *PLONG32; |
53 | -#ifndef XFree86Server | |
54 | 50 | typedef int INT32, *PINT32; |
55 | -#endif /* ndef XFree86Server */ | |
56 | 51 | typedef unsigned char UINT8; |
57 | 52 | typedef unsigned short UINT16; |
58 | 53 | typedef unsigned int ULONG32, *PULONG32; |
@@ -1,8 +1,6 @@ | ||
1 | 1 | #ifndef _WTSAPI32_H |
2 | 2 | #define _WTSAPI32_H |
3 | -#if __GNUC__ >= 3 | |
4 | 3 | #pragma GCC system_header |
5 | -#endif | |
6 | 4 | |
7 | 5 | #ifdef __cplusplus |
8 | 6 | extern "C" { |
@@ -3,9 +3,7 @@ | ||
3 | 3 | |
4 | 4 | #ifndef _WTYPES_H |
5 | 5 | #define _WTYPES_H |
6 | -#if __GNUC__ >=3 | |
7 | 6 | #pragma GCC system_header |
8 | -#endif | |
9 | 7 | |
10 | 8 | #ifdef __cplusplus |
11 | 9 | extern "C" { |
@@ -1,8 +1,6 @@ | ||
1 | 1 | #ifndef _XPTRDEFS_H |
2 | 2 | #define _XPTRDEFS_H |
3 | -#if __GNUC__ >= 3 | |
4 | 3 | #pragma GCC system_header |
5 | -#endif | |
6 | 4 | |
7 | 5 | /*--- DirectShow Reference - DirectShow Structures - TIMECODE_SAMPLE Structure */ |
8 | 6 | #define ED_DEVCAP_ATN_READ 0x13B7 |
@@ -13,9 +13,7 @@ | ||
13 | 13 | |
14 | 14 | #ifndef _ZMOUSE_H |
15 | 15 | #define _ZMOUSE_H |
16 | -#if __GNUC__ >=3 | |
17 | 16 | #pragma GCC system_header |
18 | -#endif | |
19 | 17 | |
20 | 18 | #ifndef WM_MOUSEWHEEL |
21 | 19 | # define WM_MOUSEWHEEL (WM_MOUSELAST + 1) |
@@ -13,8 +13,4 @@ | ||
13 | 13 | void _fpreset (void) |
14 | 14 | { __asm__ ( "fninit" ) ;} |
15 | 15 | |
16 | -#if defined(__PCC__) | |
17 | -void _Pragma("alias _fpreset") fpreset(void); | |
18 | -#else | |
19 | 16 | void __attribute__ ((alias ("_fpreset"))) fpreset(void); |
20 | -#endif |
@@ -15,8 +15,4 @@ extern void (*_imp___fpreset)(void) ; | ||
15 | 15 | void _fpreset (void) |
16 | 16 | { (*_imp___fpreset)(); } |
17 | 17 | |
18 | -#if defined(__PCC__) | |
19 | -void _Pragma("alias _fpreset") fpreset(void); | |
20 | -#else | |
21 | 18 | void __attribute__ ((alias ("_fpreset"))) fpreset(void); |
22 | -#endif |
@@ -21,10 +21,8 @@ extern const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback; | ||
21 | 21 | * should have done that already. I also don't set the file handle modes, |
22 | 22 | * because that would be rude. */ |
23 | 23 | |
24 | -#ifdef __GNUC__ | |
25 | 24 | extern void __main (); |
26 | 25 | extern void __do_global_dtors (); |
27 | -#endif | |
28 | 26 | |
29 | 27 | typedef void (* p_atexit_fn )(void); |
30 | 28 | static p_atexit_fn* first_atexit; |
@@ -75,14 +73,12 @@ DllMainCRTStartup (HANDLE hDll, DWORD dwReason, LPVOID lpReserved) | ||
75 | 73 | that have non-zero offsets. */ |
76 | 74 | _pei386_runtime_relocator (); |
77 | 75 | |
78 | -#ifdef __GNUC__ | |
79 | 76 | /* From libgcc.a, __main calls global class constructors, |
80 | 77 | __do_global_ctors, which registers __do_global_dtors |
81 | 78 | as the first entry of the private atexit table we |
82 | 79 | have just initialised */ |
83 | 80 | __main (); |
84 | 81 | |
85 | -#endif | |
86 | 82 | } |
87 | 83 | |
88 | 84 | /* |
@@ -34,11 +34,7 @@ | ||
34 | 34 | # define NO_COPY |
35 | 35 | #endif |
36 | 36 | |
37 | -#ifdef __GNUC__ | |
38 | 37 | #define ATTRIBUTE_NORETURN __attribute__ ((noreturn)) |
39 | -#else | |
40 | -#define ATTRIBUTE_NORETURN | |
41 | -#endif | |
42 | 38 | |
43 | 39 | #ifndef __MINGW_LSYMBOL |
44 | 40 | #define __MINGW_LSYMBOL(sym) sym |