From: Arun Thomas Date: Fri, 6 Mar 2009 16:56:46 +0000 (+0000) Subject: Define 64 bit integer types when compiling with GCC X-Git-Tag: v3.1.4~100 X-Git-Url: http://zhaoyanbai.com/repos/man.arpaname.html?a=commitdiff_plain;h=7ce582c783f6762b928d8919021e16b434632f73;p=minix.git Define 64 bit integer types when compiling with GCC --- diff --git a/include/ansi.h b/include/ansi.h index 17a5cd949..5c5864d71 100755 --- a/include/ansi.h +++ b/include/ansi.h @@ -54,6 +54,11 @@ #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. */ #define _RESTRICT diff --git a/include/sys/types.h b/include/sys/types.h index 06b553e59..378929f72 100755 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -69,7 +69,12 @@ typedef char i8_t; /* 8 bit signed type */ typedef short i16_t; /* 16 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; +#endif /* The following types are needed because MINIX uses K&R style function * definitions (for maximum portability). When a short, such as dev_t, is