Author: tkreuzer
Date: Mon Mar 29 01:34:21 2010
New Revision: 46539
URL:
http://svn.reactos.org/svn/reactos?rev=46539&view=rev
Log:
[MINGW]
Apply MSVC compilation fixes
Modified:
branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/CRT_fp10.c
branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/CRT_fp8.c
branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/crtexe.c
branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/gs_support.c
Modified: branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/CRT_fp10.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/3…
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/CRT_fp10.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/CRT_fp10.c [iso-8859-1] Mon Mar
29 01:34:21 2010
@@ -7,6 +7,16 @@
void _fpreset (void);
void _fpreset (void)
- { __asm__ ("fninit" ) ;}
+{
+#ifdef __GNUC__
+ __asm__ ("fninit" );
+#else
+ __asm fninit;
+#endif
+}
+#ifdef __GNUC__
void __attribute__ ((alias ("_fpreset"))) fpreset(void);
+#else
+void fpreset(void) { _fpreset(); }
+#endif
Modified: branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/CRT_fp8.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/3…
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/CRT_fp8.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/CRT_fp8.c [iso-8859-1] Mon Mar
29 01:34:21 2010
@@ -14,4 +14,8 @@
(* __MINGW_IMP_SYMBOL(_fpreset))();
}
+#ifdef __GNUC__
void __attribute__ ((alias ("_fpreset"))) fpreset(void);
+#else
+void fpreset(void) { _fpreset(); }
+#endif
Modified: branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/crtexe.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/3…
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/crtexe.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/crtexe.c [iso-8859-1] Mon Mar 29
01:34:21 2010
@@ -20,6 +20,7 @@
#include <tchar.h>
#include <sect_attribs.h>
#include <locale.h>
+#include <intrin.h>
#ifndef __winitenv
extern wchar_t *** __MINGW_IMP_SYMBOL(__winitenv);
@@ -51,7 +52,11 @@
#define _commode (* __MINGW_IMP_SYMBOL(_commode))
extern int _dowildcard;
+#if defined(__GNUC__)
int _MINGW_INSTALL_DEBUG_MATHERR __attribute__((weak)) = 0;
+#else
+int _MINGW_INSTALL_DEBUG_MATHERR = 0;
+#endif
extern int __defaultmatherr;
extern _CRTIMP void __cdecl _initterm(_PVFV *, _PVFV *);
Modified: branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/gs_support.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/3…
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/gs_support.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/gs_support.c [iso-8859-1] Mon
Mar 29 01:34:21 2010
@@ -112,12 +112,22 @@
else
#endif
{
+#ifdef __GNUC__
#ifdef _WIN64
GS_ContextRecord.Rip = (ULONGLONG) __builtin_return_address (0);
GS_ContextRecord.Rsp = (ULONGLONG) __builtin_frame_address (0) + 8;
#else
GS_ContextRecord.Eip = (DWORD) __builtin_return_address (0);
GS_ContextRecord.Esp = (DWORD) __builtin_frame_address (0) + 4;
+#endif
+#else
+#ifdef _WIN64
+ GS_ContextRecord.Rip = (ULONGLONG) _ReturnAddress();
+ GS_ContextRecord.Rsp = (ULONGLONG) _AddressOfReturnAddress();
+#else
+ GS_ContextRecord.Eip = (DWORD) _ReturnAddress();
+ GS_ContextRecord.Esp = (DWORD) _AddressOfReturnAddress();
+#endif
#endif
}