diff options
author | Pavel Tvrdik <pawel.tvrdik@gmail.cz> | 2014-12-05 09:25:38 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2015-02-21 20:07:17 +0100 |
commit | 85a3639d99a39a79b65c2dbc2a136baee6ba2a2b (patch) | |
tree | 583f78ac6144bc3c97e7a38bc7a6bbaed0683d21 | |
parent | 7d37bf79de190c89f704bfbf0a753f328d995d5a (diff) |
Better Clang compatibility
-rw-r--r-- | lib/lists.h | 15 | ||||
-rwxr-xr-x | tools/mergedirs | 2 |
2 files changed, 9 insertions, 8 deletions
diff --git a/lib/lists.h b/lib/lists.h index 37c56efb..80a4dc93 100644 --- a/lib/lists.h +++ b/lib/lists.h @@ -50,6 +50,14 @@ typedef struct list { /* In fact two overlayed nodes */ #define EMPTY_LIST(list) (!(list).head->next) + +#ifndef _BIRD_LISTS_C_ +#define LIST_INLINE static inline +#include "lib/lists.c" +#undef LIST_INLINE + +#else /* _BIRD_LISTS_C_ */ +#define LIST_INLINE void add_tail(list *, node *); void add_head(list *, node *); void rem_node(node *); @@ -57,13 +65,6 @@ void rem2_node(node *); void add_tail_list(list *, list *); void init_list(list *); void insert_node(node *, node *); - -#ifndef _BIRD_LISTS_C_ -#define LIST_INLINE extern inline -#include "lib/lists.c" -#undef LIST_INLINE -#else -#define LIST_INLINE #endif #endif diff --git a/tools/mergedirs b/tools/mergedirs index 883e6f17..fb48c6c7 100755 --- a/tools/mergedirs +++ b/tools/mergedirs @@ -4,7 +4,7 @@ if [ -z "$4" ] ; then echo "Usage: mergedirs <src-dir> <src-dir-rel> <obj-dir> <list-of-dirs>" exit 1 fi -cpp=${CPP:-gcc -E} +cpp=${CPP:-cc -E} SRCDIR=$1 shift SRCREL=$1 |