diff options
Diffstat (limited to 'StdLib/Include/X64/machine/limits.h')
-rw-r--r-- | StdLib/Include/X64/machine/limits.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/StdLib/Include/X64/machine/limits.h b/StdLib/Include/X64/machine/limits.h index 663b2e3290..d046c64dab 100644 --- a/StdLib/Include/X64/machine/limits.h +++ b/StdLib/Include/X64/machine/limits.h @@ -1,3 +1,25 @@ #include <x86/limits.h>
#define __POINTER_BIT 64
+
+#if defined(__GNUC__)
+#define __LONG_BIT 64
+/** minimum value for an object of type long int **/
+#define __LONG_MIN (-9223372036854775807L - 1L) // -(2^63 - 1)
+
+/** maximum value for an object of type long int **/
+#define __LONG_MAX +9223372036854775807L // 2^63 - 1
+
+/** maximum value for an object of type unsigned long int **/
+#define __ULONG_MAX 0xFFFFFFFFFFFFFFFFUL // 2^64 - 1
+#else
+#define __LONG_BIT 32
+/** minimum value for an object of type long int **/
+#define __LONG_MIN (-2147483647L - 1L) // -(2^31 - 1)
+
+/** maximum value for an object of type long int **/
+#define __LONG_MAX +2147483647L // 2^31 - 1
+
+/** maximum value for an object of type unsigned long int **/
+#define __ULONG_MAX 0xffffffff // 2^32 - 1
+#endif
|