From 83d870e58457a1d335a1d9b9966a6a1887cc297b Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 24 Nov 2025 03:02:43 +0100 Subject: feat! breaking changes on kernel sources. Signed-off-by: Amlal El Mahrouss --- src/libDDK/DriverKit/macros.h | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/libDDK/DriverKit/macros.h (limited to 'src/libDDK/DriverKit/macros.h') diff --git a/src/libDDK/DriverKit/macros.h b/src/libDDK/DriverKit/macros.h new file mode 100644 index 00000000..7fd1403b --- /dev/null +++ b/src/libDDK/DriverKit/macros.h @@ -0,0 +1,48 @@ +/* ======================================== + + Copyright 2025 Amlal El Mahrouss. + + FILE: ddk.h + PURPOSE: DDK Driver model base header. + +======================================== */ + +#pragma once + +#include +#include + +#if defined(__cplusplus) +#define BOOL bool +#define YES true +#define NO false +#define DDK_EXTERN extern "C" +#define nil nullptr +#undef NULL +#define NULL 0 +#define DDK_FINAL final +#else +#define BOOL char +#define YES 1 +#define NO 0 +#define DDK_EXTERN extern +#define nil ((void*) 0) +#undef NULL +#define NULL ((void*) 0) +#define DDK_FINAL +#endif // defined(__cplusplus) + +#ifndef __DDK__ +#undef DDK_EXTERN +#if defined(__cplusplus) +#define DDK_EXTERN extern "C" +#else +#define DDK_EXTERN +#endif +#endif + +#define ATTRIBUTE(X) __attribute__((X)) + +#ifndef __NEOSKRNL__ +#error !!! Do not include header in EL0/Ring 3 mode !!! +#endif // __NEOSKRNL__ \ No newline at end of file -- cgit v1.2.3