mirror of
https://github.com/reactos/reactos.git
synced 2024-10-20 16:06:27 +00:00
- _mingw.h: Don't define __attribute__ to nothing -- this is only good for creating bugs.
- sect_attribs.h: Define _CRTALLOC for msvc. Enable #pragma section and add missing .tls and .tls$ZZZ. - mingw runtime: Only use __attribute__((weak)) for gcc. - freeldr: Use #pragma pack instead of __attribute__((packed)). - kernel32: Only alias __cxa_pure_virtual to _purecall for gcc. svn path=/trunk/; revision=43073
This commit is contained in:
parent
36e9913408
commit
baf7d1b796
|
@ -23,6 +23,8 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
#include <pshpack1.h>
|
||||||
|
|
||||||
typedef struct _ROUTING_SLOT
|
typedef struct _ROUTING_SLOT
|
||||||
{
|
{
|
||||||
UCHAR BusNumber;
|
UCHAR BusNumber;
|
||||||
|
@ -37,7 +39,7 @@ typedef struct _ROUTING_SLOT
|
||||||
USHORT BitmapD;
|
USHORT BitmapD;
|
||||||
UCHAR SlotNumber;
|
UCHAR SlotNumber;
|
||||||
UCHAR Reserved;
|
UCHAR Reserved;
|
||||||
} __attribute__((packed)) ROUTING_SLOT, *PROUTING_SLOT;
|
} ROUTING_SLOT, *PROUTING_SLOT;
|
||||||
|
|
||||||
typedef struct _PCI_IRQ_ROUTING_TABLE
|
typedef struct _PCI_IRQ_ROUTING_TABLE
|
||||||
{
|
{
|
||||||
|
@ -52,7 +54,9 @@ typedef struct _PCI_IRQ_ROUTING_TABLE
|
||||||
UCHAR Reserved[11];
|
UCHAR Reserved[11];
|
||||||
UCHAR Checksum;
|
UCHAR Checksum;
|
||||||
ROUTING_SLOT Slot[1];
|
ROUTING_SLOT Slot[1];
|
||||||
} __attribute__((packed)) PCI_IRQ_ROUTING_TABLE, *PPCI_IRQ_ROUTING_TABLE;
|
} PCI_IRQ_ROUTING_TABLE, *PPCI_IRQ_ROUTING_TABLE;
|
||||||
|
|
||||||
|
#include <poppack.h>
|
||||||
|
|
||||||
typedef struct _PCI_REGISTRY_INFO
|
typedef struct _PCI_REGISTRY_INFO
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,7 +65,9 @@ int __cdecl _purecall()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
__attribute__((alias("_purecall"))) void __cxa_pure_virtual(void);
|
__attribute__((alias("_purecall"))) void __cxa_pure_virtual(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
void _assert()
|
void _assert()
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,8 +29,6 @@
|
||||||
# if !defined(__MINGW32__) && !defined(__MINGW64__) && !defined(__CYGWIN32__)
|
# if !defined(__MINGW32__) && !defined(__MINGW64__) && !defined(__CYGWIN32__)
|
||||||
# define __declspec(x) __attribute__((x))
|
# define __declspec(x) __attribute__((x))
|
||||||
# endif
|
# endif
|
||||||
#else
|
|
||||||
# define __attribute__(x) /* nothing */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#define _ATTRIBUTES shared
|
#define _ATTRIBUTES shared
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if defined(_MSC_VER)
|
||||||
/* Reference list of existing section for msvcrt. */
|
/* Reference list of existing section for msvcrt. */
|
||||||
#pragma section(".CRTMP$XCA",long,_ATTRIBUTES)
|
#pragma section(".CRTMP$XCA",long,_ATTRIBUTES)
|
||||||
#pragma section(".CRTMP$XCZ",long,_ATTRIBUTES)
|
#pragma section(".CRTMP$XCZ",long,_ATTRIBUTES)
|
||||||
|
@ -55,6 +55,14 @@
|
||||||
#pragma section(".rtc$IZZ",long,read)
|
#pragma section(".rtc$IZZ",long,read)
|
||||||
#pragma section(".rtc$TAA",long,read)
|
#pragma section(".rtc$TAA",long,read)
|
||||||
#pragma section(".rtc$TZZ",long,read)
|
#pragma section(".rtc$TZZ",long,read)
|
||||||
|
#pragma section(".tls",long,read,write)
|
||||||
|
#pragma section(".tls$ZZZ",long,read,write)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#define _CRTALLOC(x) __declspec(allocate(x))
|
||||||
|
#elif defined(__GNUC__)
|
||||||
#define _CRTALLOC(x) __attribute__ ((section (x) ))
|
#define _CRTALLOC(x) __attribute__ ((section (x) ))
|
||||||
|
#else
|
||||||
|
#error
|
||||||
|
#endif
|
||||||
|
|
4
reactos/lib/3rdparty/mingw/crtexe.c
vendored
4
reactos/lib/3rdparty/mingw/crtexe.c
vendored
|
@ -52,7 +52,11 @@ extern int *_imp___commode;
|
||||||
#define _commode (*_imp___commode)
|
#define _commode (*_imp___commode)
|
||||||
extern int _dowildcard;
|
extern int _dowildcard;
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
int _MINGW_INSTALL_DEBUG_MATHERR __attribute__((weak)) = 0;
|
int _MINGW_INSTALL_DEBUG_MATHERR __attribute__((weak)) = 0;
|
||||||
|
#else
|
||||||
|
int _MINGW_INSTALL_DEBUG_MATHERR = 0;
|
||||||
|
#endif
|
||||||
extern int __defaultmatherr;
|
extern int __defaultmatherr;
|
||||||
extern _CRTIMP void __cdecl _initterm(_PVFV *, _PVFV *);
|
extern _CRTIMP void __cdecl _initterm(_PVFV *, _PVFV *);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue