• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

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.

変更サマリ

差分

--- a/ChangeLog
+++ b/ChangeLog
@@ -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+
131 2012-08-23 Earnie Boyd <earnie@users.sourceforge.net>
232
333 * configure.ac: Set AC_CONFIG_AUX_DIR, AC_PREFIX_DEFAULT and call
--- a/include/_mingw.h
+++ b/include/_mingw.h
@@ -34,11 +34,7 @@
3434 #define __MINGW32_MINOR_VERSION 20
3535 #define __MINGW32_PATCHLEVEL 0
3636
37-#if __GNUC__ >= 3
38-#ifndef __PCC__
3937 #pragma GCC system_header
40-#endif
41-#endif
4238
4339 /* These are defined by the user (or the compiler)
4440 to specify how identifiers are imported from a DLL.
@@ -85,114 +81,60 @@
8581 /* Try to avoid problems with outdated checks for GCC __attribute__ support. */
8682 #undef __attribute__
8783
88-#if defined (__PCC__)
89-# undef __DECLSPEC_SUPPORTED
84+#ifdef __declspec
9085 # 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__))
9289 # endif
9390 # 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
14694 # define _CRTIMP
14795 # 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 */
149105 /*
150106 * The next two defines can cause problems if user code adds the
151107 * __cdecl attribute like so:
152108 * void __attribute__ ((__cdecl)) foo(void);
153109 */
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
187133 #endif
188134
189-#if defined (__GNUC__) && defined (__GNUC_MINOR__)
190135 #define __MINGW_GNUC_PREREQ(major, minor) \
191136 (__GNUC__ > (major) \
192137 || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
193-#else
194-#define __MINGW_GNUC_PREREQ(major, minor) 0
195-#endif
196138
197139 #ifdef __cplusplus
198140 # define __CRT_INLINE inline
@@ -204,58 +146,21 @@
204146 # endif
205147 #endif
206148
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__))
212150
213151 #ifdef __cplusplus
214152 # define __UNUSED_PARAM(x)
215153 #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__))
221155 #endif
222156
223-#ifdef __GNUC__
224157 #define __MINGW_ATTRIB_NORETURN __attribute__ ((__noreturn__))
225158 #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)
232159 #define __MINGW_ATTRIB_MALLOC __attribute__ ((__malloc__))
233160 #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)
243161 #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)
249162 #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)
255163 #define __MINGW_NOTHROW __attribute__ ((__nothrow__))
256-#else
257-#define __MINGW_NOTHROW
258-#endif /* GNUC >= 3.3 */
259164
260165
261166 /* TODO: Mark (almost) all CRT functions as __MINGW_NOTHROW. This will
--- a/include/accctrl.h
+++ b/include/accctrl.h
@@ -1,8 +1,6 @@
11 #ifndef _ACCCTRL_H
22 #define _ACCCTRL_H
3-#if __GNUC__ >=3
43 #pragma GCC system_header
5-#endif
64
75 #ifdef __cplusplus
86 extern "C" {
--- a/include/aclapi.h
+++ b/include/aclapi.h
@@ -1,8 +1,6 @@
11 #ifndef _ACLAPI_H
22 #define _ACLAPI_H
3-#if __GNUC__ >= 3
43 #pragma GCC system_header
5-#endif
64
75 #include <windows.h>
86 #include <accctrl.h>
--- a/include/aclui.h
+++ b/include/aclui.h
@@ -1,8 +1,6 @@
11 #ifndef _ACLUI_H
22 #define _ACLUI_H
3-#if __GNUC__ >= 3
43 #pragma GCC system_header
5-#endif
64
75 #ifndef _OBJC_NO_COM
86 #include <objbase.h>
--- a/include/adsprop.h
+++ b/include/adsprop.h
@@ -14,9 +14,7 @@
1414 */
1515 #ifndef _ADSPROP_H
1616 #define _ADSPROP_H
17-#if __GNUC__ >= 3
1817 #pragma GCC system_header
19-#endif
2018
2119 #ifdef __cplusplus
2220 extern "C" {
--- a/include/afxres.h
+++ b/include/afxres.h
@@ -1,8 +1,6 @@
11 #ifndef _AFXRES_H
22 #define _AFXRES_H
3-#if __GNUC__ >= 3
43 #pragma GCC system_header
5-#endif
64
75 #ifdef __cplusplus
86 extern "C" {
--- a/include/amaudio.h
+++ b/include/amaudio.h
@@ -1,8 +1,6 @@
11 #ifndef _AMAUDIO_H
22 #define _AMAUDIO_H
3-#if __GNUC__ >= 3
43 #pragma GCC system_header
5-#endif
64
75 #include <dsound.h>
86
--- a/include/amvideo.h
+++ b/include/amvideo.h
@@ -1,8 +1,6 @@
11 #ifndef _AMVIDEO_H
22 #define _AMVIDEO_H
3-#if __GNUC__ >=3
43 #pragma GCC system_header
5-#endif
64
75 #include <ddraw.h>
86 #include <strmif.h>
--- a/include/audevcod.h
+++ b/include/audevcod.h
@@ -1,8 +1,6 @@
11 #ifndef _AUDEVCOD_H
22 #define _AUDEVCOD_H
3-#if __GNUC__ >=3
43 #pragma GCC system_header
5-#endif
64
75 #ifdef __cplusplus
86 extern "C" {
--- a/include/aviriff.h
+++ b/include/aviriff.h
@@ -1,15 +1,9 @@
11 #ifndef _AVIRIFF_H
22 #define _AVIRIFF_H
3-#if __GNUC__ >=3
43 #pragma GCC system_header
5-#endif
64
7-#ifndef _MMSYSTEM_H
85 #include <mmsystem.h>
9-#endif
10-#ifndef _WINGDI_H
116 #include <wingdi.h>
12-#endif
137
148 #ifdef __cplusplus
159 extern "C" {
--- a/include/aygshell.h
+++ b/include/aygshell.h
@@ -1,8 +1,6 @@
11 #ifndef _AYGSHELL_H
22 #define _AYGSHELL_H
3-#if __GNUC__ >=3
43 #pragma GCC system_header
5-#endif
64
75 #if _WIN32_WCE >= 400
86
--- a/include/basetsd.h
+++ b/include/basetsd.h
@@ -1,14 +1,10 @@
11 #ifndef _BASETSD_H
22 #define _BASETSD_H
3-#if __GNUC__ >=3
43 #pragma GCC system_header
5-#endif
64
7-#ifdef __GNUC__
85 #ifndef __int64
96 #define __int64 long long
107 #endif
11-#endif
128
139 #if defined(_WIN64)
1410 #define __int3264 __int64
@@ -16,6 +12,8 @@
1612 #else /* !_WIN64 */
1713 #define __int3264 __int32
1814 #define ADDRESS_TAG_BIT 0x80000000UL
15+#endif /* !_WIN64 */
16+
1917 #define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
2018 #define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
2119 #define LongToHandle( h) ((HANDLE)(LONG_PTR) (h))
@@ -29,7 +27,6 @@
2927 #define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui))
3028 #define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l))
3129 #define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul))
32-#endif /* !_WIN64 */
3330
3431 #define UlongToPtr(ul) ULongToPtr(ul)
3532 #define UintToPtr(ui) UIntToPtr(ui)
@@ -50,9 +47,7 @@ extern "C" {
5047 typedef signed char INT8;
5148 typedef signed short INT16;
5249 typedef int LONG32, *PLONG32;
53-#ifndef XFree86Server
5450 typedef int INT32, *PINT32;
55-#endif /* ndef XFree86Server */
5651 typedef unsigned char UINT8;
5752 typedef unsigned short UINT16;
5853 typedef unsigned int ULONG32, *PULONG32;
--- a/include/wtsapi32.h
+++ b/include/wtsapi32.h
@@ -1,8 +1,6 @@
11 #ifndef _WTSAPI32_H
22 #define _WTSAPI32_H
3-#if __GNUC__ >= 3
43 #pragma GCC system_header
5-#endif
64
75 #ifdef __cplusplus
86 extern "C" {
--- a/include/wtypes.h
+++ b/include/wtypes.h
@@ -3,9 +3,7 @@
33
44 #ifndef _WTYPES_H
55 #define _WTYPES_H
6-#if __GNUC__ >=3
76 #pragma GCC system_header
8-#endif
97
108 #ifdef __cplusplus
119 extern "C" {
--- a/include/xprtdefs.h
+++ b/include/xprtdefs.h
@@ -1,8 +1,6 @@
11 #ifndef _XPTRDEFS_H
22 #define _XPTRDEFS_H
3-#if __GNUC__ >= 3
43 #pragma GCC system_header
5-#endif
64
75 /*--- DirectShow Reference - DirectShow Structures - TIMECODE_SAMPLE Structure */
86 #define ED_DEVCAP_ATN_READ 0x13B7
--- a/include/zmouse.h
+++ b/include/zmouse.h
@@ -13,9 +13,7 @@
1313
1414 #ifndef _ZMOUSE_H
1515 #define _ZMOUSE_H
16-#if __GNUC__ >=3
1716 #pragma GCC system_header
18-#endif
1917
2018 #ifndef WM_MOUSEWHEEL
2119 # define WM_MOUSEWHEEL (WM_MOUSELAST + 1)
--- a/src/libcrt/crt/CRT_fp10.c
+++ b/src/libcrt/crt/CRT_fp10.c
@@ -13,8 +13,4 @@
1313 void _fpreset (void)
1414 { __asm__ ( "fninit" ) ;}
1515
16-#if defined(__PCC__)
17-void _Pragma("alias _fpreset") fpreset(void);
18-#else
1916 void __attribute__ ((alias ("_fpreset"))) fpreset(void);
20-#endif
--- a/src/libcrt/crt/CRT_fp8.c
+++ b/src/libcrt/crt/CRT_fp8.c
@@ -15,8 +15,4 @@ extern void (*_imp___fpreset)(void) ;
1515 void _fpreset (void)
1616 { (*_imp___fpreset)(); }
1717
18-#if defined(__PCC__)
19-void _Pragma("alias _fpreset") fpreset(void);
20-#else
2118 void __attribute__ ((alias ("_fpreset"))) fpreset(void);
22-#endif
--- a/src/libcrt/crt/dllcrt1.c
+++ b/src/libcrt/crt/dllcrt1.c
@@ -21,10 +21,8 @@ extern const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback;
2121 * should have done that already. I also don't set the file handle modes,
2222 * because that would be rude. */
2323
24-#ifdef __GNUC__
2524 extern void __main ();
2625 extern void __do_global_dtors ();
27-#endif
2826
2927 typedef void (* p_atexit_fn )(void);
3028 static p_atexit_fn* first_atexit;
@@ -75,14 +73,12 @@ DllMainCRTStartup (HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
7573 that have non-zero offsets. */
7674 _pei386_runtime_relocator ();
7775
78-#ifdef __GNUC__
7976 /* From libgcc.a, __main calls global class constructors,
8077 __do_global_ctors, which registers __do_global_dtors
8178 as the first entry of the private atexit table we
8279 have just initialised */
8380 __main ();
8481
85-#endif
8682 }
8783
8884 /*
--- a/src/libcrt/crt/pseudo-reloc.c
+++ b/src/libcrt/crt/pseudo-reloc.c
@@ -34,11 +34,7 @@
3434 # define NO_COPY
3535 #endif
3636
37-#ifdef __GNUC__
3837 #define ATTRIBUTE_NORETURN __attribute__ ((noreturn))
39-#else
40-#define ATTRIBUTE_NORETURN
41-#endif
4238
4339 #ifndef __MINGW_LSYMBOL
4440 #define __MINGW_LSYMBOL(sym) sym