[PSDK][XDK]

- Add few missing #ifdef __GNUC__ before including msvctarget.h.
- The contents of intrin.h is included only if RC_INVOKED is not defined. Compatible with MinGW and WinSDK.
- Ignore PROBE_ALIGNMENT definition if no platform is defined, in case RC_INVOKED is defined. Compatible with MinGW and latest WinSDK.
The two last fixes are also necessary to not make the Visual Studio resource compiler complain when a resource file is opened in it.

svn path=/trunk/; revision=70984
This commit is contained in:
Hermès Bélusca-Maïto 2016-03-09 16:54:43 +00:00
parent 7e46a7f7f4
commit fd4e6f9c26
4 changed files with 9 additions and 3 deletions

View file

@ -2,6 +2,8 @@
#pragma once
#define __INTRIN_H_
#ifndef RC_INVOKED
#include <crtdefs.h>
#include <setjmp.h>
#include <stddef.h>
@ -1009,7 +1011,6 @@ long _InterlockedIncrement(_Interlocked_operand_ long volatile * _Addend);
}
#endif /* __cplusplus */
#ifndef RC_INVOKED
#if defined(__GNUC__) && defined(_WIN32) // We can't use __MINGW32__ here
# include "mingw32/intrin.h"
#elif defined(_MSC_VER)
@ -1017,4 +1018,5 @@ long _InterlockedIncrement(_Interlocked_operand_ long volatile * _Addend);
#else
# error Please implement intrinsics for your target compiler
#endif
#endif

View file

@ -2,7 +2,9 @@
#define _BASETSD_H_
#pragma once
#ifdef __GNUC__
#include <msvctarget.h>
#endif
#ifndef _M_AMD64
#if !defined(__ROS_LONG64__)

View file

@ -121,8 +121,8 @@
#define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT($ULONG)
#elif defined(_IA64_) || defined(_ARM_)
#define PROBE_ALIGNMENT(_s) max((TYPE_ALIGNMENT(_s), TYPE_ALIGNMENT($ULONG))
#else
#error "unknown architecture"
#elif !defined(RC_INVOKED)
#error "Unknown architecture"
#endif
#if defined(_WIN64)

View file

@ -37,7 +37,9 @@
#include <ctype.h>
//#include <winapifamily.h>
#ifdef __GNUC__
#include <msvctarget.h>
#endif
#include <specstrings.h>
#include <kernelspecs.h>