1 #include  <x86/limits.h>
2 
3 #define __POINTER_BIT   64
4 
5 #if defined(__GNUC__)
6 #if __GNUC_PREREQ__(4,4)
7   #define __LONG_BIT      64
8 
9   /** minimum value for an object of type long int **/
10   #define __LONG_MIN    (-9223372036854775807LL - 1LL) // -(2^63 - 2)
11 
12   /** maximum value for an object of type long int **/
13   #define __LONG_MAX     (9223372036854775807LL) // 2^63 - 1
14 
15   /** maximum value for an object of type unsigned long int **/
16   #define __ULONG_MAX   0xFFFFFFFFFFFFFFFFULL // 2^64 - 1
17 #else
18   #define __LONG_BIT      32
19   /** minimum value for an object of type long int **/
20   #define __LONG_MIN    (-2147483647L - 1L) // -(2^31 - 1)
21 
22   /** maximum value for an object of type long int **/
23   #define __LONG_MAX     2147483647L // 2^31 - 1
24 
25   /** maximum value for an object of type unsigned long int **/
26   #define __ULONG_MAX   0xffffffff // 2^32 - 1
27 #endif
28 
29 
30 #else /* NOT defined(__GNUC__)  */
31 #define __LONG_BIT      32
32 /** minimum value for an object of type long int **/
33 #define __LONG_MIN    (-2147483647L - 1L) // -(2^31 - 1)
34 
35 /** maximum value for an object of type long int **/
36 #define __LONG_MAX     2147483647L // 2^31 - 1
37 
38 /** maximum value for an object of type unsigned long int **/
39 #define __ULONG_MAX   0xffffffff // 2^32 - 1
40 #endif
41