Compile XDK code as C

It appears to be all C code (especially the non-C++ parts of the C
runtime, of course), so we'll compile it as such.
This commit is contained in:
KeybadeBlox 2026-02-17 10:27:50 -05:00
parent 149af27b9c
commit d435282a8b
9 changed files with 48 additions and 23 deletions

View file

@ -1,58 +0,0 @@
/* JSRF Decompilation: XDK/Win32.hpp
Definitions normally provided by Windows headers.
*/
#ifndef WIN32_HPP
#define WIN32_HPP
// The famous Win32 typedefs
typedef unsigned char UCHAR;
typedef char CHAR;
typedef unsigned short USHORT;
typedef short SHORT;
typedef unsigned int UINT;
typedef int INT;
typedef unsigned long ULONG;
typedef long LONG;
typedef unsigned __int64 ULONGLONG;
typedef __int64 LONGLONG;
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned long DWORD;
typedef void VOID;
typedef void * LPVOID;
typedef unsigned long SIZE_T;
typedef float FLOAT;
typedef int BOOL;
#define TRUE 1
#define FALSE 0
// 64-bit integer compatibility type
union LARGE_INTEGER {
struct {
DWORD LowPart;
LONG HighPart;
} u;
LONGLONG QuadPart;
};
// Return codes
typedef long HRESULT;
#define ERROR_SUCCESS 0L
#define E_OUTOFMEMORY 0x8007000EL
// Standard Win32 functions
VOID __stdcall Sleep(DWORD dwMilliseconds);
LPVOID __stdcall VirtualAlloc(
LPVOID lpAddress,
SIZE_T dwSize,
DWORD flAllocationType,
DWORD flProtect
);
#endif