- Fix various ntoskrnl/wdk compilation issues in rossym, cmlib, kdcom, rtl.

- Rename one more duplicated file in the kernel which wasn't caught previously.
- pseh, rossym, cmlib, kdcom, bootvid, rtl compile & link, and ntoskrnl is now down to only 23 linker errors.

svn path=/trunk/; revision=25956
This commit is contained in:
Alex Ionescu 2007-03-02 19:52:29 +00:00
parent 7815967299
commit ae80dd6422
13 changed files with 42 additions and 35 deletions

View file

@ -12,6 +12,7 @@
/* INCLUDES *****************************************************************/
#define NOEXTAPI
#include <ntddk.h>
#define NDEBUG
#include <halfuncs.h>

View file

@ -8,7 +8,7 @@
#ifndef CMLIB_H
#define CMLIB_H
#define WIN32_NO_STATUS
//#define WIN32_NO_STATUS
#include <ntddk.h>
#include "hivedata.h"
#include "cmdata.h"

View file

@ -11,6 +11,9 @@
#include <ntddk.h>
#include <reactos/rossym.h>
#include "rossympriv.h"
#ifdef _MSC_VER
#include "ntimage.h"
#endif
#define NDEBUG
#include <debug.h>

View file

@ -11,6 +11,9 @@
#include <ntddk.h>
#include <reactos/rossym.h>
#include "rossympriv.h"
#ifdef _MSC_VER
#include "ntimage.h"
#endif
#define NDEBUG
#include <debug.h>

View file

@ -21,7 +21,7 @@
/*
* Modified for use in ReactOS by arty
*/
#include "rtl.h"
#include "udict.h"
#include "tree.h"
#include "macros.h"

View file

@ -20,7 +20,7 @@
/*
* Modified for use in ReactOS by arty
*/
#include "rtl.h"
#include "udict.h"
#include "tree.h"
#include "macros.h"

View file

@ -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,

View file

@ -16,6 +16,7 @@
#define _INC_SWPRINTF_INL_
/* C Headers */
#include <stdlib.h>
#include <stdio.h>
/* PSDK/NDK Headers */

View file

@ -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);
}

View file

@ -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;

View file

@ -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;

View file

@ -299,7 +299,7 @@
<file>debug.c</file>
<file>job.c</file>
<file>kill.c</file>
<file>notify.c</file>
<file>psnotify.c</file>
<file>process.c</file>
<file>psmgr.c</file>
<file>query.c</file>