From 5e2c8a575a6877218e0173ffb8826bd5452187fb Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 20 Feb 2007 20:36:55 +0000 Subject: [PATCH] Add support for non-GCC compiler git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@12 42af7a65-404d-4744-a932-0658087f49c3 --- include/nuttx/compiler.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h index 6204faa7b7..5ada38075e 100644 --- a/include/nuttx/compiler.h +++ b/include/nuttx/compiler.h @@ -44,10 +44,18 @@ * Definitions ************************************************************/ -#define weak_alias(name, aliasname) \ - extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); -#define weak_function __attribute__ ((weak)) -#define weak_const_function __attribute__ ((weak, __const__)) +#ifdef __GNUC__ +# define weak_alias(name, aliasname) \ + extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); +# define weak_function __attribute__ ((weak)) +# define weak_const_function __attribute__ ((weak, __const__)) +# define noreturn_function +#else +# define weak_alias(name, aliasname) +# define weak_function +# define weak_const_function +# define noreturn_function +#endif /************************************************************ * Global Function Prototypes