mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Fix Uniata for msvc:
- Add missing msvc intrinsics to winddk.h - Don't assume compiler means a specific header set, and don't rely on the default calling convention being stdcall. - Disable a warning spotted by MSVC -- requesting anyone with understanding of the code to have a look. svn path=/trunk/; revision=42531
This commit is contained in:
parent
b7cb2a38aa
commit
fa657e7e29
4 changed files with 33 additions and 39 deletions
|
@ -86,47 +86,21 @@
|
|||
/* Compiler dependencies */
|
||||
/***************************************************/
|
||||
|
||||
/* ReactOS-specific defines */
|
||||
#ifdef DDKAPI
|
||||
#define USE_REACTOS_DDK
|
||||
#endif //DDKAPI
|
||||
#define DDKAPI __stdcall
|
||||
#define DDKFASTAPI __fastcall
|
||||
#define DDKCDECLAPI __cdecl
|
||||
|
||||
/* Are we under GNU C (mingw) ??? */
|
||||
#if __GNUC__ >=3
|
||||
#ifdef __GNUC__
|
||||
|
||||
#define DEF_U64(x) (x##ULL)
|
||||
#define DEF_I64(x) (x##LL)
|
||||
|
||||
/* ReactOS-specific defines */
|
||||
#ifdef USE_REACTOS_DDK
|
||||
#define DDKFASTAPI __attribute__((fastcall))
|
||||
#else //USE_REACTOS_DDK
|
||||
|
||||
#define DDKAPI __attribute__((stdcall))
|
||||
#define DDKFASTAPI __attribute__((fastcall))
|
||||
#define DDKCDECLAPI __attribute__((cdecl))
|
||||
|
||||
#endif //DDKAPI
|
||||
|
||||
#define DECLSPEC_NAKED __attribute__((naked))
|
||||
|
||||
#else // !__GNUC__ => MSVC/Intel
|
||||
|
||||
#define DEF_U64(x) (x##UI64)
|
||||
#define DEF_I64(x) (x##I64)
|
||||
|
||||
/* ReactOS-specific defines */
|
||||
#ifdef USE_REACTOS_DDK
|
||||
#else //USE_REACTOS_DDK
|
||||
|
||||
#define DDKAPI __stdcall
|
||||
#define DDKFASTAPI __fastcall
|
||||
#define DDKCDECLAPI _cdecl
|
||||
|
||||
#endif //DDKAPI
|
||||
|
||||
#define DECLSPEC_NAKED __declspec(naked)
|
||||
|
||||
#endif //__GNUC__
|
||||
|
||||
|
||||
|
|
|
@ -425,7 +425,15 @@ UniataAhciSetupFIS(
|
|||
deviceExtension->lun[ldev].IdentifyData.FeaturesSupport.Address48) {
|
||||
i++;
|
||||
} else {
|
||||
#ifdef _MSC_VER
|
||||
#pragma message ("HACK HACK HACK Disabling warning HACK HACK HACK")
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4333)
|
||||
#endif
|
||||
fis[7] |= (plba[3] >> 24) & 0x0f;
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
fis[8] = plba[3];
|
||||
|
|
|
@ -629,12 +629,14 @@ typedef struct _IMAGE_EXPORT_DIRECTORY {
|
|||
|
||||
NTHALAPI
|
||||
VOID
|
||||
NTAPI
|
||||
HalDisplayString (
|
||||
PUCHAR String
|
||||
);
|
||||
|
||||
NTHALAPI
|
||||
VOID
|
||||
NTAPI
|
||||
HalQueryDisplayParameters (
|
||||
OUT PULONG WidthInCharacters,
|
||||
OUT PULONG HeightInLines,
|
||||
|
@ -644,6 +646,7 @@ HalQueryDisplayParameters (
|
|||
|
||||
NTHALAPI
|
||||
VOID
|
||||
NTAPI
|
||||
HalSetDisplayParameters (
|
||||
IN ULONG CursorColumn,
|
||||
IN ULONG CursorRow
|
||||
|
|
|
@ -35,6 +35,24 @@ extern "C" {
|
|||
#include "intrin.h"
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
//
|
||||
// FIXME: MSVC Intrinsics
|
||||
//
|
||||
unsigned char __readfsbyte(const unsigned long Offset);
|
||||
#pragma intrinsic(__readfsbyte)
|
||||
long _InterlockedExchange(volatile long * const Target, const long Value);
|
||||
#pragma intrinsic(_InterlockedExchange)
|
||||
long _InterlockedExchangeAdd(volatile long * const Addend, const long Value);
|
||||
#pragma intrinsic(_InterlockedExchangeAdd)
|
||||
long _InterlockedCompareExchange(volatile long * const Destination, const long Exchange, const long Comperand);
|
||||
#pragma intrinsic(_InterlockedCompareExchange)
|
||||
long _InterlockedDecrement(volatile long * const lpAddend);
|
||||
#pragma intrinsic(_InterlockedDecrement)
|
||||
long _InterlockedIncrement(volatile long * const lpAddend);
|
||||
#pragma intrinsic(_InterlockedIncrement)
|
||||
#endif
|
||||
|
||||
#if !defined(_NTHAL_)
|
||||
#define NTHALAPI DECLSPEC_IMPORT
|
||||
#else
|
||||
|
@ -5116,15 +5134,6 @@ typedef struct _KFLOATING_SAVE {
|
|||
ULONG Spare1;
|
||||
} KFLOATING_SAVE, *PKFLOATING_SAVE;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
//
|
||||
// FIXME: Intrinsics
|
||||
//
|
||||
unsigned char __readfsbyte(const unsigned long Offset);
|
||||
#pragma intrinsic(__readfsbyte)
|
||||
#endif
|
||||
|
||||
|
||||
FORCEINLINE
|
||||
ULONG
|
||||
KeGetCurrentProcessorNumber(VOID)
|
||||
|
|
Loading…
Reference in a new issue