more missing eCos types
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 2 Jun 2009 10:07:47 +0000 (10:07 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 2 Jun 2009 10:07:47 +0000 (10:07 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@2001 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/helper/types.h

index 7a43c3f5f2a7d1b77b294db680e44a7b756c5fee..f993ba21dc848ad20773fe71e5614e03f34daf72 100644 (file)
@@ -139,6 +139,20 @@ static inline void h_u16_to_be(u8* buf, int val)
 #ifdef __ECOS
 /* eCos plain lacks this definition... */
 typedef CYG_ADDRWORD intptr_t;
+typedef int64_t intmax_t;
+typedef uint64_t uintmax_t;
+#define INT8_MAX 0x7f
+#define INT8_MIN (-INT8_MAX - 1)
+#define UINT8_MAX (__CONCAT(INT8_MAX, U) * 2U + 1U)
+#define INT16_MAX 0x7fff
+#define INT16_MIN (-INT16_MAX - 1)
+#define UINT16_MAX (__CONCAT(INT16_MAX, U) * 2U + 1U)
+#define INT32_MAX 0x7fffffffL
+#define INT32_MIN (-INT32_MAX - 1L)
+#define UINT32_MAX (__CONCAT(INT32_MAX, U) * 2UL + 1UL)
+#define INT64_MAX 0x7fffffffffffffffLL
+#define INT64_MIN (-INT64_MAX - 1LL)
+#define UINT64_MAX (__CONCAT(INT64_MAX, U) * 2ULL + 1ULL)
 #endif
 
 #endif /* TYPES_H */