From 9e7837f63c5f1c46c772fd098c5137c57345ef64 Mon Sep 17 00:00:00 2001 From: Arun Thomas Date: Mon, 30 Mar 2009 17:07:39 +0000 Subject: [PATCH] Tweak 64-bit integer type declarations; Fixes GCC sysutil build breakage. --- include/ansi.h | 1 - include/stdint.h | 8 ++++++-- include/sys/types.h | 5 ----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/include/ansi.h b/include/ansi.h index 5c5864d71..9d3d8a135 100755 --- a/include/ansi.h +++ b/include/ansi.h @@ -56,7 +56,6 @@ #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. */ diff --git a/include/stdint.h b/include/stdint.h index 7eb0afd2e..990bc90d9 100644 --- a/include/stdint.h +++ b/include/stdint.h @@ -24,14 +24,18 @@ typedef i8_t int8_t; typedef i16_t int16_t; typedef i32_t int32_t; -#if _WORD_SIZE > 2 && __L64 +#if defined(__LONG_LONG_SUPPORTED) +typedef long long int64_t; +#elif _WORD_SIZE > 2 && __L64 typedef i64_t int64_t; #endif typedef u8_t uint8_t; typedef u16_t uint16_t; typedef u32_t uint32_t; -#if _WORD_SIZE > 2 && __L64 +#if defined(__LONG_LONG_SUPPORTED) +typedef unsigned long long uint64_t; +#elif _WORD_SIZE > 2 && __L64 typedef u64_t uint64_t; #endif diff --git a/include/sys/types.h b/include/sys/types.h index 378929f72..06b553e59 100755 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -69,12 +69,7 @@ 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 -- 2.44.0