From 725584881a86937824b6e5664a10a7f68cf6b447 Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Fri, 11 Aug 2023 15:16:32 +0200 Subject: [PATCH] LibC: Set `(U)LONG_WIDTH` correctly for 64-bit All supported targets use an LP64 ABI, where both `long` and `long long` are 64 bits wide. We set `LONG_WIDTH` to 32, which caused an error when compiling gnulib's `vasnprintf` routine. We might consider using built-in macros to avoid such issues in the future. --- Userland/Libraries/LibC/limits.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibC/limits.h b/Userland/Libraries/LibC/limits.h index b1d990ba3b..b873b4cf3e 100644 --- a/Userland/Libraries/LibC/limits.h +++ b/Userland/Libraries/LibC/limits.h @@ -56,8 +56,8 @@ #define INT_WIDTH 32 #define UINT_WIDTH 32 -#define LONG_WIDTH 32 -#define ULONG_WIDTH 32 +#define LONG_WIDTH 64 +#define ULONG_WIDTH 64 #define LLONG_WIDTH 64 #define ULLONG_WIDTH 64