diff --git a/reactos/drivers/base/kdcom/kdbg.c b/reactos/drivers/base/kdcom/kdbg.c index 6924d408879..e2a082132e0 100644 --- a/reactos/drivers/base/kdcom/kdbg.c +++ b/reactos/drivers/base/kdcom/kdbg.c @@ -12,6 +12,7 @@ /* INCLUDES *****************************************************************/ +#define NOEXTAPI #include #define NDEBUG #include diff --git a/reactos/lib/cmlib/cmlib.h b/reactos/lib/cmlib/cmlib.h index 312578648a9..4971b4b307f 100644 --- a/reactos/lib/cmlib/cmlib.h +++ b/reactos/lib/cmlib/cmlib.h @@ -8,7 +8,7 @@ #ifndef CMLIB_H #define CMLIB_H -#define WIN32_NO_STATUS +//#define WIN32_NO_STATUS #include #include "hivedata.h" #include "cmdata.h" diff --git a/reactos/lib/rossym/fromfile.c b/reactos/lib/rossym/fromfile.c index 3730440e50a..1de21055958 100644 --- a/reactos/lib/rossym/fromfile.c +++ b/reactos/lib/rossym/fromfile.c @@ -11,6 +11,9 @@ #include #include #include "rossympriv.h" +#ifdef _MSC_VER +#include "ntimage.h" +#endif #define NDEBUG #include diff --git a/reactos/lib/rossym/frommem.c b/reactos/lib/rossym/frommem.c index 3644ebff325..c0a05918b19 100644 --- a/reactos/lib/rossym/frommem.c +++ b/reactos/lib/rossym/frommem.c @@ -11,6 +11,9 @@ #include #include #include "rossympriv.h" +#ifdef _MSC_VER +#include "ntimage.h" +#endif #define NDEBUG #include diff --git a/reactos/lib/rtl/austin/avl.c b/reactos/lib/rtl/austin/avl.c index de12d9b4efd..2ac44c7c9b1 100644 --- a/reactos/lib/rtl/austin/avl.c +++ b/reactos/lib/rtl/austin/avl.c @@ -21,7 +21,7 @@ /* * Modified for use in ReactOS by arty */ - +#include "rtl.h" #include "udict.h" #include "tree.h" #include "macros.h" diff --git a/reactos/lib/rtl/austin/tree.c b/reactos/lib/rtl/austin/tree.c index 21b5055de92..80de160168b 100644 --- a/reactos/lib/rtl/austin/tree.c +++ b/reactos/lib/rtl/austin/tree.c @@ -20,7 +20,7 @@ /* * Modified for use in ReactOS by arty */ - +#include "rtl.h" #include "udict.h" #include "tree.h" #include "macros.h" diff --git a/reactos/lib/rtl/qsort.c b/reactos/lib/rtl/qsort.c index 5bdddfc1c8e..c9d7e8379fd 100644 --- a/reactos/lib/rtl/qsort.c +++ b/reactos/lib/rtl/qsort.c @@ -41,7 +41,7 @@ /* FIXME: these types should be from the default includes */ -typedef int (* _pfunccmp_t) (const void *, const void *); +typedef int (__cdecl* _pfunccmp_t) (const void *, const void *); /* * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". @@ -100,6 +100,7 @@ med3 ( /* EXPORTED */ void +__cdecl qsort ( void * a, size_t n, diff --git a/reactos/lib/rtl/rtl.h b/reactos/lib/rtl/rtl.h index 235998e5459..cdb76dfe364 100644 --- a/reactos/lib/rtl/rtl.h +++ b/reactos/lib/rtl/rtl.h @@ -16,6 +16,7 @@ #define _INC_SWPRINTF_INL_ /* C Headers */ +#include #include /* PSDK/NDK Headers */ diff --git a/reactos/lib/rtl/sprintf.c b/reactos/lib/rtl/sprintf.c index c9d4fc6f10b..5129dfb4386 100644 --- a/reactos/lib/rtl/sprintf.c +++ b/reactos/lib/rtl/sprintf.c @@ -383,7 +383,7 @@ stringw(char* buf, char* end, const wchar_t* sw, int len, int field_width, int p /* * @implemented */ -int _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args) +int __cdecl _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args) { int len; unsigned long long num; @@ -742,7 +742,7 @@ int _snprintf(char * buf, size_t cnt, const char *fmt, ...) /* * @implemented */ -int vsprintf(char *buf, const char *fmt, va_list args) +int __cdecl vsprintf(char *buf, const char *fmt, va_list args) { return _vsnprintf(buf,MAXLONG,fmt,args); } diff --git a/reactos/lib/rtl/srw.c b/reactos/lib/rtl/srw.c index c9e28ab73c2..4adaca51b2c 100644 --- a/reactos/lib/rtl/srw.c +++ b/reactos/lib/rtl/srw.c @@ -173,8 +173,7 @@ RtlpReleaseWaitBlockLockExclusive(IN OUT PRTL_SRWLOCK SRWLock, } } - (void)_InterlockedExchangePointer(&SRWLock->Ptr, - (PVOID)NewValue); + (void)_InterlockedExchange((PLONG)&SRWLock->Ptr, NewValue); if (FirstWaitBlock->Exclusive) { @@ -229,8 +228,7 @@ RtlpReleaseWaitBlockLockLastShared(IN OUT PRTL_SRWLOCK SRWLock, NewValue = RTL_SRWLOCK_OWNED; } - (void)_InterlockedExchangePointer(&SRWLock->Ptr, - (PVOID)NewValue); + (void)_InterlockedExchange((PLONG)&SRWLock->Ptr, NewValue); (void)InterlockedOr(&FirstWaitBlock->Wake, TRUE); @@ -464,9 +462,9 @@ RtlAcquireSRWLockShared(IN OUT PRTL_SRWLOCK SRWLock) NewValue = (CurrentValue >> RTL_SRWLOCK_BITS) + 1; NewValue = (NewValue << RTL_SRWLOCK_BITS) | (CurrentValue & RTL_SRWLOCK_MASK); - if (_InterlockedCompareExchangePointer(&SRWLock->Ptr, - (PVOID)NewValue, - (PVOID)CurrentValue) == (PVOID)CurrentValue) + if (_InterlockedCompareExchange((PLONG)&SRWLock->Ptr, + NewValue, + CurrentValue) == CurrentValue) { /* Successfully incremented the shared count, we acquired the lock */ break; @@ -543,9 +541,9 @@ RtlAcquireSRWLockShared(IN OUT PRTL_SRWLOCK SRWLock) ASSERT_SRW_WAITBLOCK(&StackWaitBlock); NewValue = (ULONG_PTR)&StackWaitBlock | RTL_SRWLOCK_OWNED | RTL_SRWLOCK_CONTENDED; - if (_InterlockedCompareExchangePointer(&SRWLock->Ptr, - (PVOID)NewValue, - (PVOID)CurrentValue) == (PVOID)CurrentValue) + if (_InterlockedCompareExchange((PLONG)&SRWLock->Ptr, + NewValue, + CurrentValue) == CurrentValue) { RtlpAcquireSRWLockSharedWait(SRWLock, &StackWaitBlock, @@ -565,9 +563,9 @@ RtlAcquireSRWLockShared(IN OUT PRTL_SRWLOCK SRWLock) RTL_SRWLOCK_SHARED nor the RTL_SRWLOCK_OWNED bit is set */ ASSERT(!(CurrentValue & RTL_SRWLOCK_CONTENDED)); - if (_InterlockedCompareExchangePointer(&SRWLock->Ptr, - (PVOID)NewValue, - (PVOID)CurrentValue) == (PVOID)CurrentValue) + if (_InterlockedCompareExchange((PLONG)&SRWLock->Ptr, + NewValue, + CurrentValue) == CurrentValue) { /* Successfully set the shared count, we acquired the lock */ break; @@ -624,9 +622,9 @@ RtlReleaseSRWLockShared(IN OUT PRTL_SRWLOCK SRWLock) NewValue = (NewValue << RTL_SRWLOCK_BITS) | RTL_SRWLOCK_SHARED | RTL_SRWLOCK_OWNED; } - if (_InterlockedCompareExchangePointer(&SRWLock->Ptr, - (PVOID)NewValue, - (PVOID)CurrentValue) == (PVOID)CurrentValue) + if (_InterlockedCompareExchange((PLONG)&SRWLock->Ptr, + NewValue, + CurrentValue) == CurrentValue) { /* Successfully released the lock */ break; @@ -683,9 +681,9 @@ RtlAcquireSRWLockExclusive(IN OUT PRTL_SRWLOCK SRWLock) NewValue = (ULONG_PTR)&StackWaitBlock | RTL_SRWLOCK_SHARED | RTL_SRWLOCK_CONTENDED | RTL_SRWLOCK_OWNED; - if (_InterlockedCompareExchangePointer(&SRWLock->Ptr, - (PVOID)NewValue, - (PVOID)CurrentValue) == (PVOID)CurrentValue) + if (_InterlockedCompareExchange((PLONG)&SRWLock->Ptr, + NewValue, + CurrentValue) == CurrentValue) { RtlpAcquireSRWLockExclusiveWait(SRWLock, &StackWaitBlock); @@ -741,9 +739,9 @@ AddWaitBlock: ASSERT_SRW_WAITBLOCK(&StackWaitBlock); NewValue = (ULONG_PTR)&StackWaitBlock | RTL_SRWLOCK_OWNED | RTL_SRWLOCK_CONTENDED; - if (_InterlockedCompareExchangePointer(&SRWLock->Ptr, - (PVOID)NewValue, - (PVOID)CurrentValue) == (PVOID)CurrentValue) + if (_InterlockedCompareExchange((PLONG)&SRWLock->Ptr, + NewValue, + CurrentValue) == CurrentValue) { RtlpAcquireSRWLockExclusiveWait(SRWLock, &StackWaitBlock); @@ -811,9 +809,9 @@ RtlReleaseSRWLockExclusive(IN OUT PRTL_SRWLOCK SRWLock) ASSERT(!(CurrentValue & ~RTL_SRWLOCK_OWNED)); NewValue = 0; - if (_InterlockedCompareExchangePointer(&SRWLock->Ptr, - (PVOID)NewValue, - (PVOID)CurrentValue) == (PVOID)CurrentValue) + if (_InterlockedCompareExchange((PLONG)&SRWLock->Ptr, + NewValue, + CurrentValue) == CurrentValue) { /* We released the lock */ break; diff --git a/reactos/ntoskrnl/include/internal/ke.h b/reactos/ntoskrnl/include/internal/ke.h index fcabe2459c8..3623139042f 100644 --- a/reactos/ntoskrnl/include/internal/ke.h +++ b/reactos/ntoskrnl/include/internal/ke.h @@ -140,9 +140,9 @@ extern KEVENT KiSwapEvent; extern PKPRCB KiProcessorBlock[]; extern ULONG KiMask32Array[MAXIMUM_PRIORITY]; extern ULONG KiIdleSummary; -extern VOID KiTrap8(VOID); -extern VOID KiTrap2(VOID); -extern VOID KiFastCallEntry(VOID); +extern VOID __cdecl KiTrap8(VOID); +extern VOID __cdecl KiTrap2(VOID); +extern VOID __cdecl KiFastCallEntry(VOID); extern PVOID KeUserApcDispatcher; extern PVOID KeUserCallbackDispatcher; extern PVOID KeUserExceptionDispatcher; diff --git a/reactos/ntoskrnl/ntoskrnl.rbuild b/reactos/ntoskrnl/ntoskrnl.rbuild index 12ba5d501cd..02644a95d85 100644 --- a/reactos/ntoskrnl/ntoskrnl.rbuild +++ b/reactos/ntoskrnl/ntoskrnl.rbuild @@ -299,7 +299,7 @@ debug.c job.c kill.c - notify.c + psnotify.c process.c psmgr.c query.c diff --git a/reactos/ntoskrnl/ps/notify.c b/reactos/ntoskrnl/ps/psnotify.c similarity index 100% rename from reactos/ntoskrnl/ps/notify.c rename to reactos/ntoskrnl/ps/psnotify.c