From c38407e6bed5ed20bf9dbecd60f15f1bc0402919 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Thu, 22 Oct 2009 11:20:44 +0000 Subject: =?UTF-8?q?2009-10-22=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libcsupport/include/rtems/error.h: Use ordinal constants for RTEMS_ERROR_ERRNO, RTEMS_ERROR_PANIC, RTEMS_ERROR_ABORT to avoid implicit constant conversion overflows on 16bit-int targets. --- cpukit/libcsupport/include/rtems/error.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cpukit/libcsupport') diff --git a/cpukit/libcsupport/include/rtems/error.h b/cpukit/libcsupport/include/rtems/error.h index e79cd9d1d2..ec5dec99d9 100644 --- a/cpukit/libcsupport/include/rtems/error.h +++ b/cpukit/libcsupport/include/rtems/error.h @@ -23,9 +23,16 @@ typedef Internal_errors_t rtems_error_code_t; * rtems_error() and rtems_panic() support */ +#if 0 +/* not 16bit-int host clean */ #define RTEMS_ERROR_ERRNO (1<<((sizeof(rtems_error_code_t) * CHAR_BIT) - 2)) /* hi bit; use 'errno' */ #define RTEMS_ERROR_PANIC (RTEMS_ERROR_ERRNO / 2) /* err fatal; no return */ #define RTEMS_ERROR_ABORT (RTEMS_ERROR_ERRNO / 4) /* err is fatal; panic */ +#else +#define RTEMS_ERROR_ERRNO (0x40000000) /* hi bit; use 'errno' */ +#define RTEMS_ERROR_PANIC (0x20000000) /* err fatal; no return */ +#define RTEMS_ERROR_ABORT (0x10000000) /* err is fatal; panic */ +#endif #define RTEMS_ERROR_MASK (RTEMS_ERROR_ERRNO | RTEMS_ERROR_ABORT | \ RTEMS_ERROR_PANIC) /* all */ -- cgit v1.2.3