From 24bdea23f746984480bd59dd13dd4d631a210320 Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 14 Dec 2009 15:46:55 +0000 Subject: Changing NuttX fixed size type names to C99 standard names -- things will be broken for awhile git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2335 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/hc/include/hc12/types.h | 37 +++++++++++++++++++++--------------- nuttx/arch/hc/include/hcs12/types.h | 38 ++++++++++++++++++++++--------------- 2 files changed, 45 insertions(+), 30 deletions(-) (limited to 'nuttx/arch/hc') diff --git a/nuttx/arch/hc/include/hc12/types.h b/nuttx/arch/hc/include/hc12/types.h index 4eb006c3c..f29be6394 100755 --- a/nuttx/arch/hc/include/hc12/types.h +++ b/nuttx/arch/hc/include/hc12/types.h @@ -54,14 +54,19 @@ #ifndef __ASSEMBLY__ -/* These are the sizes of the standard GNU types */ +/* These are the sizes of the standard integer types. NOTE that these type + * names have a leading underscore character. This file will be included + * (indirectly) by include/stdint.h and typedef'ed to the final name without + * the underscore character. This roundabout way of doings things allows + * the stdint.h to be removed from the include/ directory in the event that + * the user prefers to use the definitions provided by their toolchain header + * files + */ -typedef char sbyte; -typedef unsigned char ubyte; -typedef unsigned char uint8; -typedef unsigned char boolean; -typedef short sint16; -typedef unsigned short uint16; +typedef char _int8_t; +typedef unsigned char _uint8_t; +typedef short _int16_t; +typedef unsigned short _uint16_t; /* Normally, mc68hc1x code is compiled with the -mshort option * which results in a 16-bit integer. If -mnoshort is defined @@ -69,23 +74,25 @@ typedef unsigned short uint16; */ # if __INT__ == 16 -typedef long sint32; -typedef unsigned long uint32; +typedef long _int32_t; +typedef unsigned long _uint32_t; #else -typedef int sint32; -typedef unsigned int uint32; +typedef int _int32_t; +typedef unsigned int _uint32_t; #endif -typedef long long sint64; -typedef unsigned long long uint64; +typedef long long _int64_t; +typedef unsigned long long _uint64_t; +#define __INT64_DEFINED /* A pointer is two bytes */ -typedef unsigned short uintptr; +typedef short _intptr_t; +typedef unsigned short _uintptr_t; /* This is the size of the interrupt state save returned by irqsave()*/ -typedef unsigned int irqstate_t; +typedef unsigned int irqstate_t; #endif /* __ASSEMBLY__ */ diff --git a/nuttx/arch/hc/include/hcs12/types.h b/nuttx/arch/hc/include/hcs12/types.h index 1341377e4..33008793a 100755 --- a/nuttx/arch/hc/include/hcs12/types.h +++ b/nuttx/arch/hc/include/hcs12/types.h @@ -54,14 +54,20 @@ #ifndef __ASSEMBLY__ -/* These are the sizes of the standard GNU types */ +/* These are the sizes of the standard integer types. NOTE that these type + * names have a leading underscore character. This file will be included + * (indirectly) by include/stdint.h and typedef'ed to the final name without + * the underscore character. This roundabout way of doings things allows + * the stdint.h to be removed from the include/ directory in the event that + * the user prefers to use the definitions provided by their toolchain header + * files + */ + +typedef char _int8_t; +typedef unsigned char _uint8_t; -typedef char sbyte; -typedef unsigned char ubyte; -typedef unsigned char uint8; -typedef unsigned char boolean; -typedef short sint16; -typedef unsigned short uint16; +typedef short _int16_t; +typedef unsigned short _uint16_t; /* Normally, mc68hc1x code is compiled with the -mshort option * which results in a 16-bit integer. If -mnoshort is defined @@ -69,23 +75,25 @@ typedef unsigned short uint16; */ # if __INT__ == 16 -typedef long sint32; -typedef unsigned long uint32; +typedef long _int32_t; +typedef unsigned long _uint32_t; #else -typedef int sint32; -typedef unsigned int uint32; +typedef int _int32_t; +typedef unsigned int _uint32_t; #endif -typedef long long sint64; -typedef unsigned long long uint64; +typedef long long _int64_t; +typedef unsigned long long _uint64_t; +#define __INT64_DEFINED /* A pointer is two bytes */ -typedef unsigned short uintptr; +typedef short _intptr_t; +typedef unsigned short _uintptr_t; /* This is the size of the interrupt state save returned by irqsave()*/ -typedef unsigned int irqstate_t; +typedef unsigned int irqstate_t; #endif /* __ASSEMBLY__ */ -- cgit v1.2.3