From 91fbaf05d24a89c3c77a8cbe7a26e27615b85e88 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 1 May 2024 12:50:24 +0200 Subject: Fix bootloader include order. Signed-off-by: Amlal El Mahrouss --- Private/NewBoot/BootKit/BootKit.hxx | 4 ++-- Private/NewBoot/BootKit/Vendor/Qr.hxx | 3 +-- Private/NewBoot/BootKit/Vendor/Support.hxx | 12 ++++++------ 3 files changed, 9 insertions(+), 10 deletions(-) (limited to 'Private/NewBoot/BootKit') diff --git a/Private/NewBoot/BootKit/BootKit.hxx b/Private/NewBoot/BootKit/BootKit.hxx index 03dddcb3..c8333b86 100644 --- a/Private/NewBoot/BootKit/BootKit.hxx +++ b/Private/NewBoot/BootKit/BootKit.hxx @@ -27,12 +27,12 @@ #include #include +#include + /***********************************************************************************/ /// Framebuffer helpers. /***********************************************************************************/ -#define RGB(R, G, B) (UInt32)(0x##R##G##B) - class BTextWriter; class BFileReader; class BFileRunner; diff --git a/Private/NewBoot/BootKit/Vendor/Qr.hxx b/Private/NewBoot/BootKit/Vendor/Qr.hxx index 27db8060..982af6b5 100644 --- a/Private/NewBoot/BootKit/Vendor/Qr.hxx +++ b/Private/NewBoot/BootKit/Vendor/Qr.hxx @@ -9,9 +9,8 @@ #include #include -#include #include -#include +#include #include namespace qr { diff --git a/Private/NewBoot/BootKit/Vendor/Support.hxx b/Private/NewBoot/BootKit/Vendor/Support.hxx index fe3d35c3..88483984 100644 --- a/Private/NewBoot/BootKit/Vendor/Support.hxx +++ b/Private/NewBoot/BootKit/Vendor/Support.hxx @@ -10,8 +10,8 @@ #include -#define LONG_MAX ((long)(~0UL>>1)) -#define LONG_MIN (~LONG_MAX) +#define cLongMax ((long)(~0UL>>1)) +#define cLongMin (~cLongMax) #define SetMem(dst, c, sz) memset(dst, c, sz) #define MoveMem(dst, src, sz) memcpy(dst, src, sz) @@ -23,7 +23,7 @@ inline int isspace(int c) { return c == ' '; } inline long StringToLong(const char * nptr, char ** endptr, int base) { const char *p = nptr, *endp; bool is_neg = 0, overflow = 0; - /* Need unsigned so (-LONG_MIN) can fit in these: */ + /* Need unsigned so (-cLongMin) can fit in these: */ unsigned long n = 0UL, cutoff; int cutlim; if (base < 0 || base == 1 || base > 36) { @@ -60,8 +60,8 @@ inline long StringToLong(const char * nptr, char ** endptr, int base) { } else if (base == 0) { base = 10; } - cutoff = (is_neg) ? -(LONG_MIN / base) : LONG_MAX / base; - cutlim = (is_neg) ? -(LONG_MIN % base) : LONG_MAX % base; + cutoff = (is_neg) ? -(cLongMin / base) : cLongMax / base; + cutlim = (is_neg) ? -(cLongMin % base) : cLongMax % base; while (1) { int c; if (*p >= 'A') @@ -85,7 +85,7 @@ inline long StringToLong(const char * nptr, char ** endptr, int base) { } if (endptr) *endptr = (char *)endp; if (overflow) { - return ((is_neg) ? LONG_MIN : LONG_MAX); + return ((is_neg) ? cLongMin : cLongMax); } return (long)((is_neg) ? -n : n); } -- cgit v1.2.3