summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2022-04-09 04:48:11 +0200
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2022-04-14 03:12:56 +0430
commit3651da6a964412193f085061015d6da5590f80e5 (patch)
tree70f3613aebdebb50f07215a9ed530d17b7c78090 /Userland
parentd6ccee40897dc72267ebcd7be2da2c857b6c2db2 (diff)
downloadserenity-3651da6a964412193f085061015d6da5590f80e5.zip
LibC: Define correct limits for `long` on `x86_64`
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibC/limits.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/Userland/Libraries/LibC/limits.h b/Userland/Libraries/LibC/limits.h
index 58a980bde8..f7365e6e61 100644
--- a/Userland/Libraries/LibC/limits.h
+++ b/Userland/Libraries/LibC/limits.h
@@ -41,10 +41,18 @@
#define USHRT_MAX 65535
-#define LONG_MAX 2147483647L
+#ifdef __x86_64__
+# define LONG_MAX 9223372036854775807L
+#else
+# define LONG_MAX 2147483647L
+#endif
#define LONG_MIN (-LONG_MAX - 1L)
-#define ULONG_MAX 4294967295UL
+#ifdef __x86_64__
+# define ULONG_MAX 18446744073709551615UL
+#else
+# define ULONG_MAX 4294967295UL
+#endif
#define LONG_LONG_MAX 9223372036854775807LL
#define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)