mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-17 11:06:54 +00:00
[BUILD] make ebtree headers multiple-include compatible
ebtree did not support being included multiple times.
This commit is contained in:
parent
e6d2e4dbdf
commit
f56fd8a285
@ -12,3 +12,5 @@ Also, some optimizations are not redefined if already known: REGPRM*
|
||||
and likely/unlikely which are used in ebtree are also used and defined
|
||||
in haproxy. Thus, we just conditionally define them.
|
||||
|
||||
Last, all eb*tree*.h have been adapted to support being included multiple
|
||||
times, using #ifndef/#define/#endif.
|
||||
|
@ -17,6 +17,9 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _COMMON_EB32TREE_H
|
||||
#define _COMMON_EB32TREE_H
|
||||
|
||||
#include "ebtree.h"
|
||||
|
||||
|
||||
@ -511,3 +514,5 @@ __eb32i_insert(struct eb_root *root, struct eb32_node *new) {
|
||||
|
||||
return new;
|
||||
}
|
||||
|
||||
#endif /* _COMMON_EB32TREE_H */
|
||||
|
@ -17,6 +17,9 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _COMMON_EB64TREE_H
|
||||
#define _COMMON_EB64TREE_H
|
||||
|
||||
#include "ebtree.h"
|
||||
|
||||
|
||||
@ -532,3 +535,4 @@ __eb64i_insert(struct eb_root *root, struct eb64_node *new) {
|
||||
return new;
|
||||
}
|
||||
|
||||
#endif /* _COMMON_EB64TREE_H */
|
||||
|
@ -17,6 +17,9 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _COMMON_EBPTTREE_H
|
||||
#define _COMMON_EBPTTREE_H
|
||||
|
||||
#include "ebtree.h"
|
||||
|
||||
|
||||
@ -315,3 +318,4 @@ __ebpt_insert(struct eb_root *root, struct ebpt_node *new) {
|
||||
return new;
|
||||
}
|
||||
|
||||
#endif /* _COMMON_EBPTTREE_H */
|
||||
|
@ -246,6 +246,8 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _COMMON_EBTREE_H
|
||||
#define _COMMON_EBTREE_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@ -716,6 +718,7 @@ static inline void __eb_delete(struct eb_node *node)
|
||||
void eb_delete(struct eb_node *node);
|
||||
REGPRM1 struct eb_node *eb_insert_dup(struct eb_node *sub, struct eb_node *new);
|
||||
|
||||
#endif /* _COMMON_EBTREE_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
|
Loading…
Reference in New Issue
Block a user