Sync tools to 45592
[reactos.git] / reactos / lib / 3rdparty / mingw / reactos.diff
1 Index: CRT_fp10.c
2 ===================================================================
3 --- CRT_fp10.c (Revision 43956)
4 +++ CRT_fp10.c (Arbeitskopie)
5 @@ -7,6 +7,16 @@
6 void _fpreset (void);
7
8 void _fpreset (void)
9 - { __asm__ ("fninit" ) ;}
10 +{
11 +#ifdef __GNUC__
12 + __asm__ ("fninit" );
13 +#else
14 + __asm fninit;
15 +#endif
16 +}
17
18 +#ifdef __GNUC__
19 void __attribute__ ((alias ("_fpreset"))) fpreset(void);
20 +#else
21 +void fpreset(void) { _fpreset(); }
22 +#endif
23 Index: CRT_fp8.c
24 ===================================================================
25 --- CRT_fp8.c (Revision 43956)
26 +++ CRT_fp8.c (Arbeitskopie)
27 @@ -14,4 +14,8 @@
28 (* __MINGW_IMP_SYMBOL(_fpreset))();
29 }
30
31 +#ifdef __GNUC__
32 void __attribute__ ((alias ("_fpreset"))) fpreset(void);
33 +#else
34 +void fpreset(void) { _fpreset(); }
35 +#endif
36 Index: crtexe.c
37 ===================================================================
38 --- crtexe.c (Revision 43956)
39 +++ crtexe.c (Arbeitskopie)
40 @@ -20,6 +20,7 @@
41 #include <tchar.h>
42 #include <sect_attribs.h>
43 #include <locale.h>
44 +#include <intrin.h>
45
46 #ifndef __winitenv
47 extern wchar_t *** __MINGW_IMP_SYMBOL(__winitenv);
48 @@ -51,7 +52,11 @@
49 #define _commode (* __MINGW_IMP_SYMBOL(_commode))
50 extern int _dowildcard;
51
52 +#if defined(__GNUC__)
53 int _MINGW_INSTALL_DEBUG_MATHERR __attribute__((weak)) = 0;
54 +#else
55 +int _MINGW_INSTALL_DEBUG_MATHERR = 0;
56 +#endif
57 extern int __defaultmatherr;
58 extern _CRTIMP void __cdecl _initterm(_PVFV *, _PVFV *);
59
60 Index: gs_support.c
61 ===================================================================
62 --- gs_support.c (Revision 43956)
63 +++ gs_support.c (Arbeitskopie)
64 @@ -112,6 +112,7 @@
65 else
66 #endif
67 {
68 +#ifdef __GNUC__
69 #ifdef _WIN64
70 GS_ContextRecord.Rip = (ULONGLONG) __builtin_return_address (0);
71 GS_ContextRecord.Rsp = (ULONGLONG) __builtin_frame_address (0) + 8;
72 @@ -119,6 +120,15 @@
73 GS_ContextRecord.Eip = (DWORD) __builtin_return_address (0);
74 GS_ContextRecord.Esp = (DWORD) __builtin_frame_address (0) + 4;
75 #endif
76 +#else
77 +#ifdef _WIN64
78 + GS_ContextRecord.Rip = (ULONGLONG) _ReturnAddress();
79 + GS_ContextRecord.Rsp = (ULONGLONG) _AddressOfReturnAddress();
80 +#else
81 + GS_ContextRecord.Eip = (DWORD) _ReturnAddress();
82 + GS_ContextRecord.Esp = (DWORD) _AddressOfReturnAddress();
83 +#endif
84 +#endif
85 }
86
87 #ifdef _WIN64