https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a27b8009e0652aab9aef29f9963e21cb53d2a124
commit a27b8009e0652aab9aef29f9963e21cb53d2a124 Author: Timo Kreuzer <timo.kreu...@reactos.org> AuthorDate: Sat Oct 7 10:22:34 2023 +0300 Commit: Timo Kreuzer <timo.kreu...@reactos.org> CommitDate: Tue Oct 17 09:41:18 2023 +0300 [SDK] Do not include windef.h into stubs.h This prevents pulling in function declarations that are incompatible with the generated stubs. --- dll/win32/msvcrt/stubs.c | 1 + dll/win32/msvcrt20/stubs.c | 3 ++- dll/win32/msvcrt40/stubs.c | 1 + sdk/include/reactos/stubs.h | 39 ++++++++++++++++++++++++++++++--------- 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/dll/win32/msvcrt/stubs.c b/dll/win32/msvcrt/stubs.c index 389bc11f3ed..6c0bcfee5dc 100644 --- a/dll/win32/msvcrt/stubs.c +++ b/dll/win32/msvcrt/stubs.c @@ -1,4 +1,5 @@ +#include <windef.h> #include <stubs.h> #undef UNIMPLEMENTED diff --git a/dll/win32/msvcrt20/stubs.c b/dll/win32/msvcrt20/stubs.c index 489e122ef4f..469228006a4 100644 --- a/dll/win32/msvcrt20/stubs.c +++ b/dll/win32/msvcrt20/stubs.c @@ -1,3 +1,4 @@ +#include <windef.h> #include <stubs.h> #undef UNIMPLEMENTED @@ -24,4 +25,4 @@ size_t _heapused( size_t *pUsed, size_t *pCommit ) return( 0 ); } -int _fileinfo = 0; \ No newline at end of file +int _fileinfo = 0; diff --git a/dll/win32/msvcrt40/stubs.c b/dll/win32/msvcrt40/stubs.c index dc730333044..013083d4214 100644 --- a/dll/win32/msvcrt40/stubs.c +++ b/dll/win32/msvcrt40/stubs.c @@ -1,3 +1,4 @@ +#include <windef.h> #include <stubs.h> #undef UNIMPLEMENTED diff --git a/sdk/include/reactos/stubs.h b/sdk/include/reactos/stubs.h index 6b5cd36372c..5b872fbe47c 100644 --- a/sdk/include/reactos/stubs.h +++ b/sdk/include/reactos/stubs.h @@ -1,6 +1,28 @@ -#define WIN32_NO_STATUS -#define _NTSYSTEM_ -#include <windef.h> + +#ifndef _WINDEF_ +typedef unsigned short wchar_t; +typedef unsigned long DWORD, ULONG; +typedef void* PVOID; +#define __int64 long long +#ifdef _WIN64 +typedef unsigned long long ULONG_PTR; +#else +typedef unsigned long ULONG_PTR; +#endif + +#define EXCEPTION_MAXIMUM_PARAMETERS 15 +typedef struct _EXCEPTION_RECORD { + DWORD ExceptionCode; + DWORD ExceptionFlags; + struct _EXCEPTION_RECORD* ExceptionRecord; + PVOID ExceptionAddress; + DWORD NumberParameters; + ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; +} EXCEPTION_RECORD, * PEXCEPTION_RECORD; + +#define EXCEPTION_NONCONTINUABLE 0x01 + +#endif #ifndef PRIx64 #define PRIx64 "I64x" @@ -9,24 +31,23 @@ #define EXCEPTION_WINE_STUB 0x80000100 #define EH_NONCONTINUABLE 0x01 -NTSYSAPI -VOID -NTAPI +void +__stdcall RtlRaiseException( - _In_ PEXCEPTION_RECORD ExceptionRecord + PEXCEPTION_RECORD ExceptionRecord ); ULONG __cdecl DbgPrint( - _In_z_ _Printf_format_string_ PCSTR Format, + const char* Format, ... ); #define __wine_spec_unimplemented_stub(module, function) \ { \ EXCEPTION_RECORD ExceptionRecord = {0}; \ - ExceptionRecord.ExceptionRecord = NULL; \ + ExceptionRecord.ExceptionRecord = 0; \ ExceptionRecord.ExceptionCode = EXCEPTION_WINE_STUB; \ ExceptionRecord.ExceptionFlags = EXCEPTION_NONCONTINUABLE; \ ExceptionRecord.ExceptionInformation[0] = (ULONG_PTR)module; \