From 14b844a063e08bdffec00c7b094a34151d2dbf10 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 12 Jan 2015 22:14:05 +0000 Subject: [PATCH] types.h: cc65 can't handle 64bit ints and isn't likely to do so soon --- Library/include/sys/types.h | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/Library/include/sys/types.h b/Library/include/sys/types.h index b2fa918e..6d04f910 100644 --- a/Library/include/sys/types.h +++ b/Library/include/sys/types.h @@ -2,7 +2,22 @@ #define _SYS_TYPES_H #include + +#if defined (__STDC__) #include +#else +/* C types */ +typedef unsigned long uint32_t; +typedef signed long int32_t; +typedef unsigned short uint16_t; +typedef signed short int16_t; +typedef unsigned char uint8_t; +typedef signed char int8_t; + +/* C99 */ +typedef int16_t intptr_t; +typedef uint16_t uintptr_t; +#endif /* USER! basic data types */ /* ! uchar & uint is counterparts and must be declared simultaneously */ @@ -23,19 +38,6 @@ typedef uint16_t size_t; typedef int16_t ssize_t; #endif -#if !defined (__STDC__) -/* C types */ -typedef unsigned long uint32_t; -typedef signed long int32_t; -typedef unsigned short uint16_t; -typedef signed short int16_t; -typedef unsigned char uint8_t; -typedef signed char int8_t; - -/* C99 */ -typedef int16_t intptr_t; -typedef uint16_t uintptr_t; -#endif /* Unix historic */ typedef unsigned char uchar_t; @@ -60,6 +62,10 @@ typedef uint16_t nlink_t; typedef int16_t pid_t; typedef uint16_t ino_t; +#if defined(NO_64BIT) +typedef uint32_t time_t; +#else typedef int64_t time_t; +#endif typedef int32_t clock_t; #endif -- 2.34.1