}
// It's not loaded, we have to load it
- snprintf(FullPath, sizeof(FullPath), "%s%wZ", BootPath, FilePath);
+ _snprintf(FullPath, sizeof(FullPath), "%s%wZ", BootPath, FilePath);
Status = WinLdrLoadImage(FullPath, LoaderBootDriver, &DriverBase);
if (!Status)
-- {
-- DPRINTM(DPRINT_WINDOWS, "WinLdrLoadImage() failed\n");
return FALSE;
-- }
// Allocate a DTE for it
Status = WinLdrAllocateDataTableEntry(LoaderBlock, DllName, DllName, DriverBase, DriverDTE);
<file>systimer.S</file>
</directory>
</if>
- </directory>
-- <if property="ARCH" value="amd64">
-- <directory name="amd64">
-- <file>halinit.c</file>
-- <file>irq.S</file>
-- <file>misc.c</file>
-- <file>apic.c</file>
-- <file>systimer.S</file>
-- <file>usage.c</file>
+ </directory>
-- </if>
-- </directory>
<directory name="up">
<file>halinit_up.c</file>
<file>pic.c</file>
typedef void (__cdecl *_PVFV)(void);
typedef int (__cdecl *_PIFV)(void);
typedef void (__cdecl *_PVFI)(int);
++ #endif
- #if defined (SPECIAL_CRTEXE) && defined (_DLL)
+ #if defined (SPECIAL_CRTEXE) && (defined (_DLL) || defined (__GNUC__))
extern int _commode;
#else
_CRTIMP extern int _commode;
--- /dev/null
----- internal.h (Revision 43956)
+ Index: internal.h
+ ===================================================================
--@@ -32,6 +32,12 @@
+++--- internal.h (Revision 46537)
+ +++ internal.h (Arbeitskopie)
--@@ -43,6 +49,10 @@
+++@@ -35,6 +35,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;
----- oscalls.h (Revision 43956)
+++@@ -46,6 +52,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
+ ===================================================================
----- sect_attribs.h (Revision 43956)
+++--- oscalls.h (Revision 46537)
+ +++ 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 46537)
+ +++ 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
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
-- * No warranty is given; refer to the file DISCLAIMER within this package.
++ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
+ 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
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
-- * No warranty is given; refer to the file DISCLAIMER within this package.
++ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
- extern void (*_imp___fpreset)(void) ;
+ #include <_mingw.h>
+
+ extern void (* __MINGW_IMP_SYMBOL(_fpreset))(void);
+ void _fpreset (void);
+
void _fpreset (void)
- { (*_imp___fpreset)(); }
+ {
+ (* __MINGW_IMP_SYMBOL(_fpreset))();
+ }
+#ifdef __GNUC__
void __attribute__ ((alias ("_fpreset"))) fpreset(void);
+#else
+void fpreset(void) { _fpreset(); }
+#endif
#include <tchar.h>
#include <sect_attribs.h>
#include <locale.h>
+#include <intrin.h>
#ifndef __winitenv
- extern wchar_t ***_imp____winitenv;
- #define __winitenv (*_imp____winitenv)
+ extern wchar_t *** __MINGW_IMP_SYMBOL(__winitenv);
+ #define __winitenv (* __MINGW_IMP_SYMBOL(__winitenv))
#endif
#ifndef __initenv
- extern char ***_imp____initenv;
- #define __initenv (*_imp____initenv)
+ extern char *** __MINGW_IMP_SYMBOL(__initenv);
+ #define __initenv (* __MINGW_IMP_SYMBOL(__initenv))
#endif
- #define __ImageBase _image_base__
+ /* Hack, for bug in ld. Will be removed soon. */
++ #define __ImageBase __MINGW_LSYMBOL(_image_base__)
+ /* This symbol is defined by ld. */
+ extern IMAGE_DOS_HEADER __ImageBase;
+
extern void _fpreset (void);
#define SPACECHAR _T(' ')
#define DQUOTECHAR _T('\"')
#undef _fmode
extern int _fmode;
- extern int *_imp___commode;
- #define _commode (*_imp___commode)
+ extern int * __MINGW_IMP_SYMBOL(_commode);
+ #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 *);
{
_TCHAR *lpszCommandLine = NULL;
STARTUPINFO StartupInfo;
-- BOOL inDoubleQuote = FALSE;
++ WINBOOL inDoubleQuote = FALSE;
memset (&StartupInfo, 0, sizeof (STARTUPINFO));
-
+
if (mingw_app_type)
GetStartupInfo (&StartupInfo);
{
<group>
<module name="mingw_common" type="staticlibrary" isstartuplib="true" crt="dll">
<define name="_CRTBLD" />
- <importlibrary definition="moldname-msvcrt.def" dllname="msvcrt.dll" />
+
+ <!-- This is to prevent from using data imports directly -->
+ <define name="_M_CEE_PURE" />
+
- <importlibrary definition="moldname-msvcrt.def" dllname="msvcrt.dll" />
<include base="ReactOS">include/reactos/mingw-w64</include>
-- <if property="USERMODE" value="1">
--- <library>kernel32</library>
-- </if>
+++ <library>kernel32</library>
<file>_newmode.c</file>
<file>atonexit.c</file>
+ <file>binmode.c</file>
<file>charmax.c</file>
<file>cinitexe.c</file>
<file>CRT_fp10.c</file>
<file>CRT_fp8.c</file>
+ <file>CRT_glob.c</file>
+ <file>crt_handler.c</file>
<file>dllentry.c</file>
- <file>dummy_mingwthrd.c</file>
<file>gccmain.c</file>
-- <file>getopt.c</file>
<file>gs_support.c</file>
<file>merr.c</file>
-- <!-- file>mingw_custom.c</file -->
<file>mingw_helpers.c</file>
- <file>mingwthrd_nomt.c</file>
<file>natstart.c</file>
<file>pesect.c</file>
<file>pseudo-reloc.c</file>
<file>pseudo-reloc-list.c</file>
++ <file>tlsmcrt.c</file>
<file>tlssup.c</file>
++ <file>tlsthrd.c</file>
+ <file>txtmode.c</file>
<file>wildcard.c</file>
<file>xncommod.c</file>
<file>xthdloc.c</file>
<define name="_MSVCRT_LIB_" />
<define name="_MSVCRT_" />
<define name="_MT" />
- <define name="__CRT__NO_INLINE" />
+ <define name="_CRTBLD" />
<directory name="conio">
<file>cgets.c</file>
<file>cprintf.c</file>
<define name="_NTSYSTEM_" />
<define name="_NTDLLBUILD_" />
<define name="_LIBCNT_" />
- <define name="__CRT__NO_INLINE" />
+ <define name="_CRTBLD" />
<if property="ARCH" value="i386">
<define name="__MINGW_IMPORT">"extern __attribute__ ((dllexport))"</define>
</if>