Add support for non-GCC compiler

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@12 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2007-02-20 20:36:55 +00:00
parent 469b933b63
commit 5e2c8a575a

View File

@ -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