From a1ec1b95513f7af5da434e457ca348dde734077a Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 24 Jan 2005 15:02:00 +0000 Subject: 2005-01-24 Ralf Corsepius * libcsupport/include/stdint.h: Use __PTRDIFF_TYPE for intptr_t. --- cpukit/libcsupport/include/stdint.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cpukit/libcsupport') diff --git a/cpukit/libcsupport/include/stdint.h b/cpukit/libcsupport/include/stdint.h index ec282655c9..16ec546e95 100644 --- a/cpukit/libcsupport/include/stdint.h +++ b/cpukit/libcsupport/include/stdint.h @@ -159,8 +159,18 @@ typedef signed long intmax_t; typedef unsigned long uintmax_t; #endif +/* + * GCC doesn't provide an propriate macro for [u]intptr_t + * For now, use __PTRDIFF_TYPE__ + */ +#if defined(__PTRDIFF_TYPE__) +typedef signed __PTRDIFF_TYPE__ intptr_t; +typedef unsigned __PTRDIFF_TYPE__ uintptr_t; +#else +/* Fallback to hardcoded values, valid on cpu's with 32bit int/32bit void* */ typedef signed long intptr_t; typedef unsigned long uintptr_t; +#endif /* Limits of Specified-Width Integer Types */ -- cgit v1.2.3