summaryrefslogtreecommitdiff
path: root/StdLib/Include/X64/machine/limits.h
blob: 193ce366f4ef06b557dc4f9b3a8e26e96fd8a5d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include  <x86/limits.h>

#define __POINTER_BIT   64

#if defined(__GNUC__)
#if __GNUC_PREREQ__(4,4)
  #define __LONG_BIT      64

  /** minimum value for an object of type long int **/
  #define __LONG_MIN    (-9223372036854775807LL - 1LL) // -(2^63 - 2)

  /** maximum value for an object of type long int **/
  #define __LONG_MAX     (9223372036854775807LL) // 2^63 - 1

  /** maximum value for an object of type unsigned long int **/
  #define __ULONG_MAX   0xFFFFFFFFFFFFFFFFULL // 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


#else /* NOT defined(__GNUC__)  */
#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