summaryrefslogtreecommitdiff
path: root/nuttx/include/nuttx/compiler.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-20 20:36:55 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-02-20 20:36:55 +0000
commitfc7487b02be45d2da3ce5999751f61131a2a62cc (patch)
tree45b63e4eab4923623af375ef7f5661c815cf8246 /nuttx/include/nuttx/compiler.h
parentc7ea5224fe5318b2d6ef68b463ac4b72817904ba (diff)
downloadnuttx-fc7487b02be45d2da3ce5999751f61131a2a62cc.tar.gz
nuttx-fc7487b02be45d2da3ce5999751f61131a2a62cc.tar.bz2
nuttx-fc7487b02be45d2da3ce5999751f61131a2a62cc.zip
Add support for non-GCC compiler
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@12 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/nuttx/compiler.h')
-rw-r--r--nuttx/include/nuttx/compiler.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/nuttx/include/nuttx/compiler.h b/nuttx/include/nuttx/compiler.h
index 6204faa7b..5ada38075 100644
--- a/nuttx/include/nuttx/compiler.h
+++ b/nuttx/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