From 3847448496d1e346365da14b56a25f9eecdbff63 Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Wed, 2 Jul 2008 08:35:29 +0000 Subject: [PATCH] Added configuration option to circumvent C compilers that have problems with const function pointers (i.e., sdcc) --- core/sys/cc.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/sys/cc.h b/core/sys/cc.h index 1d1c8bdde..7250f6a87 100644 --- a/core/sys/cc.h +++ b/core/sys/cc.h @@ -39,7 +39,7 @@ * * This file is part of the Contiki desktop OS * - * $Id: cc.h,v 1.5 2008/01/14 09:22:22 adamdunkels Exp $ + * $Id: cc.h,v 1.6 2008/07/02 08:35:29 adamdunkels Exp $ * */ #ifndef __CC_H__ @@ -77,6 +77,15 @@ #define CC_FASTCALL #endif /* CC_CONF_FASTCALL */ +/** + * Configure if the C compiler have problems with const function pointers + */ +#ifdef CC_CONF_CONST_FUNCTION_BUG +#define CC_CONST_FUNCTION +#else /* CC_CONF_FASTCALL */ +#define CC_CONST_FUNCTION const +#endif /* CC_CONF_FASTCALL */ + /** * Configure work-around for unsigned char bugs with sdcc. */