]> wimlib.net Git - wimlib/commitdiff
avl_tree: Remove dependency on compiler.h
authorEric Biggers <ebiggers3@gmail.com>
Sun, 30 Mar 2014 05:25:35 +0000 (00:25 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 30 Mar 2014 05:28:38 +0000 (00:28 -0500)
include/wimlib/avl_tree.h

index 00fdd3e9d2c50e92eba2d6e163defd18af7cfc33..da5bbd069d83813bad07a67c2b4d3f7106a9a7a4 100644 (file)
 
 #include <stdbool.h>
 #include <stddef.h>
 
 #include <stdbool.h>
 #include <stddef.h>
-#include <inttypes.h>          /* for uintptr_t */
-#include <wimlib/compiler.h>   /* for _always_inline_attribute. You can
-                                  instead define it below if you want.  */
+#include <inttypes.h> /* for uintptr_t */
 
 
-#define AVL_INLINE _always_inline_attribute
+#ifdef __GNUC__
+#  define AVL_INLINE inline __attribute__((always_inline))
+#else
+#  define AVL_INLINE inline
+#endif
 
 /* Node in an AVL tree.  Embed this in some other data structure.  */
 struct avl_tree_node {
 
 /* Node in an AVL tree.  Embed this in some other data structure.  */
 struct avl_tree_node {