diff options
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/assert.h | 8 | ||||
-rw-r--r-- | nuttx/include/nuttx/compiler.h | 10 |
2 files changed, 11 insertions, 7 deletions
diff --git a/nuttx/include/assert.h b/nuttx/include/assert.h index 4222aa2d8..5f69b7178 100644 --- a/nuttx/include/assert.h +++ b/nuttx/include/assert.h @@ -53,7 +53,7 @@ #undef ASSERTCODE #undef DEBUGASSERT -#ifdef __GNUC__ +#if defined(__GNUC__) || defined(SDCC) # define ASSERT(f) \ { if (!(f)) up_assert((const ubyte *)__FILE__, (int)__LINE__); } @@ -105,9 +105,9 @@ extern "C" { #define EXTERN extern #endif -#ifdef __GNUC__ -EXTERN void up_assert(FAR const ubyte *filename, int linenum); -EXTERN void up_assert_code(FAR const ubyte *filename, int linenum, +#if defined(__GNUC__) || defined(SDCC) +EXTERN void up_assert(const ubyte *filename, int linenum); +EXTERN void up_assert_code(const ubyte *filename, int linenum, int error_code); #else EXTERN void up_assert(void); diff --git a/nuttx/include/nuttx/compiler.h b/nuttx/include/nuttx/compiler.h index b0ea16f38..2b7a96788 100644 --- a/nuttx/include/nuttx/compiler.h +++ b/nuttx/include/nuttx/compiler.h @@ -84,7 +84,7 @@ # undef CONFIG_LONG_IS_NOT_INT -/* The pointers and int are the same size */ +/* Pointers and int are the same size */ # undef CONFIG_PTR_IS_NOT_INT @@ -152,9 +152,13 @@ # define CONFIG_LONG_IS_NOT_INT 1 -/* The generic point and int are not the same size */ - +/* The generic pointer and int are not the same size + * (for some SDCC architectures) + */ + +#if !defined(__z80) && defined(__gbz80) # define CONFIG_PTR_IS_NOT_INT 1 +#endif /* SDCC does not support inline functions */ |