]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Better Clang compatibility
authorPavel Tvrdik <pawel.tvrdik@gmail.cz>
Fri, 5 Dec 2014 08:25:38 +0000 (09:25 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Sat, 21 Feb 2015 19:07:17 +0000 (20:07 +0100)
lib/lists.h
tools/mergedirs

index 37c56efbc43839a2593e00759d60c93a478ba96f..80a4dc93731e3b0835fbe6bea9e3c53726dd81f0 100644 (file)
@@ -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
index 883e6f17af6dbdbfade40b505934557104e8de96..fb48c6c79efdb353fea3dcd1fe6e994206422e1d 100755 (executable)
@@ -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