Define 64 bit integer types when compiling with GCC
This commit is contained in:
parent
8af5f877bc
commit
7ce582c783
2 changed files with 10 additions and 0 deletions
|
@ -54,6 +54,11 @@
|
||||||
|
|
||||||
#endif /* _ANSI */
|
#endif /* _ANSI */
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901
|
||||||
|
#define __LONG_LONG_SUPPORTED 1
|
||||||
|
#define __L64 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* This should be defined as restrict when a C99 compiler is used. */
|
/* This should be defined as restrict when a C99 compiler is used. */
|
||||||
#define _RESTRICT
|
#define _RESTRICT
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,12 @@ typedef char i8_t; /* 8 bit signed type */
|
||||||
typedef short i16_t; /* 16 bit signed type */
|
typedef short i16_t; /* 16 bit signed type */
|
||||||
typedef long i32_t; /* 32 bit signed type */
|
typedef long i32_t; /* 32 bit signed type */
|
||||||
|
|
||||||
|
#ifdef __LONG_LONG_SUPPORTED
|
||||||
|
typedef unsigned long long u64_t; /* 64 bit type */
|
||||||
|
typedef long long i64_t; /* 64 bit signed type */
|
||||||
|
#else
|
||||||
typedef struct { u32_t _[2]; } u64_t;
|
typedef struct { u32_t _[2]; } u64_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The following types are needed because MINIX uses K&R style function
|
/* The following types are needed because MINIX uses K&R style function
|
||||||
* definitions (for maximum portability). When a short, such as dev_t, is
|
* definitions (for maximum portability). When a short, such as dev_t, is
|
||||||
|
|
Loading…
Reference in a new issue