From 04680f09d0fec00fc9a14bdf276c6aa01dd474ec Mon Sep 17 00:00:00 2001 From: dmex Date: Fri, 6 Sep 2024 19:55:38 +1000 Subject: [PATCH] Update phnt_windows.h --- phnt/include/phnt_windows.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/phnt/include/phnt_windows.h b/phnt/include/phnt_windows.h index 34c0226d2..5e1f631aa 100644 --- a/phnt/include/phnt_windows.h +++ b/phnt/include/phnt_windows.h @@ -39,6 +39,17 @@ #endif #endif +#ifndef MAXLONGLONG +// The Windows SDK basetsd.h is missing the MAXLONGLONG definition. (dmex) +#define MAXLONGLONG (0x7fffffffffffffff) +#endif + +#ifndef MINLONGLONG +// The Windows SDK basetsd.h references non-existant MAXLONGLONG definition +// and breaks MINLONGLONG or in other cases results in a definition of zero. (dmex) +#define MINLONGLONG ((LONGLONG)~MAXLONGLONG) +#endif + #ifndef ENABLE_RTL_NUMBER_OF_V2 #define ENABLE_RTL_NUMBER_OF_V2 #endif