[ros-diffs] [tkreuzer] 43964: Hey Arch, next time you change 3rdparty code, either make sure, it's merged upstream or provide a diff, please. Adding back MSVC fixes.

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Thu Nov 5 00:15:07 CET 2009


Author: tkreuzer
Date: Thu Nov  5 00:15:07 2009
New Revision: 43964

URL: http://svn.reactos.org/svn/reactos?rev=43964&view=rev
Log:
Hey Arch, next time you change 3rdparty code, either make sure, it's merged upstream or provide a diff, please.
Adding back MSVC fixes.

Added:
    branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/reactos.diff   (with props)
    branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/reactos.diff   (with props)
Modified:
    branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/internal.h
    branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/oscalls.h
    branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/sect_attribs.h
    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/include/reactos/mingw-w64/internal.h
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/internal.h?rev=43964&r1=43963&r2=43964&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/internal.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/internal.h [iso-8859-1] Thu Nov  5 00:15:07 2009
@@ -32,6 +32,12 @@
 #define __IOINFO_TM_UTF8 1
 #define __IOINFO_TM_UTF16LE 2
 
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4214)
+#pragma warning(disable:4820)
+#endif
+
   typedef struct {
     intptr_t osfhnd;
     char osfile;
@@ -42,6 +48,10 @@
     char unicode : 1;
     char pipech2[2];
   } ioinfo;
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
 
 #define IOINFO_ARRAY_ELTS (1 << 5)
 

Modified: branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/oscalls.h
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/oscalls.h?rev=43964&r1=43963&r2=43964&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/oscalls.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/oscalls.h [iso-8859-1] Thu Nov  5 00:15:07 2009
@@ -30,6 +30,11 @@
 #endif
 #endif
 
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4214)
+#endif
+
 typedef struct _FTIME
 {
   unsigned short twosecs : 5;
@@ -46,6 +51,10 @@
   unsigned short year : 7;
 } FDATE;
 
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
 typedef FDATE *PFDATE;
 
 #endif

Added: branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/reactos.diff
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/reactos.diff?rev=43964&view=auto
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/reactos.diff (added)
+++ branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/reactos.diff [iso-8859-1] Thu Nov  5 00:15:07 2009
@@ -1,0 +1,83 @@
+Index: internal.h
+===================================================================
+--- internal.h	(Revision 43956)
++++ internal.h	(Arbeitskopie)
+@@ -32,6 +32,12 @@
+ #define __IOINFO_TM_UTF8 1
+ #define __IOINFO_TM_UTF16LE 2
+ 
++#ifdef _MSC_VER
++#pragma warning(push)
++#pragma warning(disable:4214)
++#pragma warning(disable:4820)
++#endif
++
+   typedef struct {
+     intptr_t osfhnd;
+     char osfile;
+@@ -43,6 +49,10 @@
+     char pipech2[2];
+   } ioinfo;
+ 
++#ifdef _MSC_VER
++#pragma warning(pop)
++#endif
++
+ #define IOINFO_ARRAY_ELTS (1 << 5)
+ 
+ #define _pioinfo(i) (__pioinfo[(i) >> 5] + ((i) & (IOINFO_ARRAY_ELTS - 1)))
+Index: oscalls.h
+===================================================================
+--- oscalls.h	(Revision 43956)
++++ oscalls.h	(Arbeitskopie)
+@@ -30,6 +30,11 @@
+ #endif
+ #endif
+ 
++#ifdef _MSC_VER
++#pragma warning(push)
++#pragma warning(disable:4214)
++#endif
++
+ typedef struct _FTIME
+ {
+   unsigned short twosecs : 5;
+@@ -46,6 +51,10 @@
+   unsigned short year : 7;
+ } FDATE;
+ 
++#ifdef _MSC_VER
++#pragma warning(pop)
++#endif
++
+ typedef FDATE *PFDATE;
+ 
+ #endif
+Index: sect_attribs.h
+===================================================================
+--- sect_attribs.h	(Revision 43956)
++++ sect_attribs.h	(Arbeitskopie)
+@@ -10,7 +10,7 @@
+ #define _ATTRIBUTES shared
+ #endif
+ 
+-#if 0
++#if defined(_MSC_VER)
+ /* Reference list of existing section for msvcrt.  */
+ #pragma section(".CRTMP$XCA",long,_ATTRIBUTES)
+ #pragma section(".CRTMP$XCZ",long,_ATTRIBUTES)
+@@ -55,6 +55,14 @@
+ #pragma section(".rtc$IZZ",long,read)
+ #pragma section(".rtc$TAA",long,read)
+ #pragma section(".rtc$TZZ",long,read)
++#pragma section(".tls",long,read,write)
++#pragma section(".tls$ZZZ",long,read,write)
+ #endif
+ 
++#if defined(_MSC_VER)
++#define _CRTALLOC(x) __declspec(allocate(x))
++#elif defined(__GNUC__)
+ #define _CRTALLOC(x) __attribute__ ((section (x) ))
++#else
++#error
++#endif

Propchange: branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/reactos.diff
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/sect_attribs.h
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/sect_attribs.h?rev=43964&r1=43963&r2=43964&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/sect_attribs.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/reactos/mingw-w64/sect_attribs.h [iso-8859-1] Thu Nov  5 00:15:07 2009
@@ -10,7 +10,7 @@
 #define _ATTRIBUTES shared
 #endif
 
-#if 0
+#if defined(_MSC_VER)
 /* Reference list of existing section for msvcrt.  */
 #pragma section(".CRTMP$XCA",long,_ATTRIBUTES)
 #pragma section(".CRTMP$XCZ",long,_ATTRIBUTES)
@@ -55,6 +55,14 @@
 #pragma section(".rtc$IZZ",long,read)
 #pragma section(".rtc$TAA",long,read)
 #pragma section(".rtc$TZZ",long,read)
+#pragma section(".tls",long,read,write)
+#pragma section(".tls$ZZZ",long,read,write)
 #endif
 
+#if defined(_MSC_VER)
+#define _CRTALLOC(x) __declspec(allocate(x))
+#elif defined(__GNUC__)
 #define _CRTALLOC(x) __attribute__ ((section (x) ))
+#else
+#error
+#endif

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/3rdparty/mingw/CRT_fp10.c?rev=43964&r1=43963&r2=43964&view=diff
==============================================================================
--- 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] Thu Nov  5 00:15:07 2009
@@ -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/3rdparty/mingw/CRT_fp8.c?rev=43964&r1=43963&r2=43964&view=diff
==============================================================================
--- 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] Thu Nov  5 00:15:07 2009
@@ -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/3rdparty/mingw/crtexe.c?rev=43964&r1=43963&r2=43964&view=diff
==============================================================================
--- 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] Thu Nov  5 00:15:07 2009
@@ -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/3rdparty/mingw/gs_support.c?rev=43964&r1=43963&r2=43964&view=diff
==============================================================================
--- 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] Thu Nov  5 00:15:07 2009
@@ -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
     }
 

Added: branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/reactos.diff
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/reactos.diff?rev=43964&view=auto
==============================================================================
--- branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/reactos.diff (added)
+++ branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/reactos.diff [iso-8859-1] Thu Nov  5 00:15:07 2009
@@ -1,0 +1,87 @@
+Index: CRT_fp10.c
+===================================================================
+--- CRT_fp10.c	(Revision 43956)
++++ CRT_fp10.c	(Arbeitskopie)
+@@ -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
+Index: CRT_fp8.c
+===================================================================
+--- CRT_fp8.c	(Revision 43956)
++++ CRT_fp8.c	(Arbeitskopie)
+@@ -14,4 +14,8 @@
+   (* __MINGW_IMP_SYMBOL(_fpreset))();
+ }
+ 
++#ifdef __GNUC__
+ void __attribute__ ((alias ("_fpreset"))) fpreset(void);
++#else
++void fpreset(void) { _fpreset(); }
++#endif
+Index: crtexe.c
+===================================================================
+--- crtexe.c	(Revision 43956)
++++ crtexe.c	(Arbeitskopie)
+@@ -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 *);
+ 
+Index: gs_support.c
+===================================================================
+--- gs_support.c	(Revision 43956)
++++ gs_support.c	(Arbeitskopie)
+@@ -112,6 +112,7 @@
+   else
+ #endif
+     {
++#ifdef __GNUC__
+ #ifdef _WIN64
+       GS_ContextRecord.Rip = (ULONGLONG) __builtin_return_address (0);
+       GS_ContextRecord.Rsp = (ULONGLONG) __builtin_frame_address (0) + 8;
+@@ -119,6 +120,15 @@
+       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
+     }
+ 
+ #ifdef _WIN64

Propchange: branches/ros-amd64-bringup/reactos/lib/3rdparty/mingw/reactos.diff
------------------------------------------------------------------------------
    svn:eol-style = native




More information about the Ros-diffs mailing list