openbsd-ports/net/ushare/patches/patch-src_redblack_h

104 lines
3.9 KiB
Plaintext

$OpenBSD: patch-src_redblack_h,v 1.1 2012/11/07 14:53:59 dcoppa Exp $
redblack.h:45:1: warning: "RB_ENTRY" redefined
/usr/include/sys/tree.h:305:1: warning: this is the location of the previous definition
--- src/redblack.h.orig Sun Dec 9 14:03:36 2007
+++ src/redblack.h Wed Nov 7 15:36:42 2012
@@ -42,7 +42,7 @@
#define rbdata_t void
#define RB_CMP(s, t, e) (*rbinfo->rb_cmp)(s, t, e)
#undef RB_INLINE
-#define RB_ENTRY(name) rb##name
+#define USHARE_RB_ENTRY(name) rb##name
#endif /* RB_CUSTOMIZE */
#ifndef RB_STATIC
@@ -71,14 +71,14 @@ typedef enum
}
VISIT;
-struct RB_ENTRY(lists) {
-const struct RB_ENTRY(node) *rootp;
-const struct RB_ENTRY(node) *nextp;
+struct USHARE_RB_ENTRY(lists) {
+const struct USHARE_RB_ENTRY(node) *rootp;
+const struct USHARE_RB_ENTRY(node) *nextp;
};
-#define RBLIST struct RB_ENTRY(lists)
+#define RBLIST struct USHARE_RB_ENTRY(lists)
-struct RB_ENTRY(tree) {
+struct USHARE_RB_ENTRY(tree) {
#ifndef RB_CUSTOMIZE
/* comparison routine */
int (*rb_cmp)(const void *, const void *, const void *);
@@ -86,51 +86,51 @@ int (*rb_cmp)(const void *, const void *, const void *
const void *rb_config;
/* root of tree */
#endif /* RB_CUSTOMIZE */
-struct RB_ENTRY(node) *rb_root;
+struct USHARE_RB_ENTRY(node) *rb_root;
};
#ifndef RB_CUSTOMIZE
-RB_STATIC struct RB_ENTRY(tree) *rbinit(int (*)(const void *, const void *, const void *),
+RB_STATIC struct USHARE_RB_ENTRY(tree) *rbinit(int (*)(const void *, const void *, const void *),
const void *);
#else
-RB_STATIC struct RB_ENTRY(tree) *RB_ENTRY(init)(void);
+RB_STATIC struct USHARE_RB_ENTRY(tree) *USHARE_RB_ENTRY(init)(void);
#endif /* RB_CUSTOMIZE */
#ifndef no_delete
-RB_STATIC const RB_ENTRY(data_t) *RB_ENTRY(delete)(const RB_ENTRY(data_t) *, struct RB_ENTRY(tree) *);
+RB_STATIC const USHARE_RB_ENTRY(data_t) *USHARE_RB_ENTRY(delete)(const USHARE_RB_ENTRY(data_t) *, struct USHARE_RB_ENTRY(tree) *);
#endif
#ifndef no_find
-RB_STATIC const RB_ENTRY(data_t) *RB_ENTRY(find)(const RB_ENTRY(data_t) *, struct RB_ENTRY(tree) *);
+RB_STATIC const USHARE_RB_ENTRY(data_t) *USHARE_RB_ENTRY(find)(const USHARE_RB_ENTRY(data_t) *, struct USHARE_RB_ENTRY(tree) *);
#endif
#ifndef no_lookup
-RB_STATIC const RB_ENTRY(data_t) *RB_ENTRY(lookup)(int, const RB_ENTRY(data_t) *, struct RB_ENTRY(tree) *);
+RB_STATIC const USHARE_RB_ENTRY(data_t) *USHARE_RB_ENTRY(lookup)(int, const USHARE_RB_ENTRY(data_t) *, struct USHARE_RB_ENTRY(tree) *);
#endif
#ifndef no_search
-RB_STATIC const RB_ENTRY(data_t) *RB_ENTRY(search)(const RB_ENTRY(data_t) *, struct RB_ENTRY(tree) *);
+RB_STATIC const USHARE_RB_ENTRY(data_t) *USHARE_RB_ENTRY(search)(const USHARE_RB_ENTRY(data_t) *, struct USHARE_RB_ENTRY(tree) *);
#endif
#ifndef no_destroy
-RB_STATIC void RB_ENTRY(destroy)(struct RB_ENTRY(tree) *);
+RB_STATIC void USHARE_RB_ENTRY(destroy)(struct USHARE_RB_ENTRY(tree) *);
#endif
#ifndef no_walk
-RB_STATIC void RB_ENTRY(walk)(const struct RB_ENTRY(tree) *,
- void (*)(const RB_ENTRY(data_t) *, const VISIT, const int, void *),
+RB_STATIC void USHARE_RB_ENTRY(walk)(const struct USHARE_RB_ENTRY(tree) *,
+ void (*)(const USHARE_RB_ENTRY(data_t) *, const VISIT, const int, void *),
void *);
#endif
#ifndef no_readlist
-RB_STATIC RBLIST *RB_ENTRY(openlist)(const struct RB_ENTRY(tree) *);
-RB_STATIC const RB_ENTRY(data_t) *RB_ENTRY(readlist)(RBLIST *);
-RB_STATIC void RB_ENTRY(closelist)(RBLIST *);
+RB_STATIC RBLIST *USHARE_RB_ENTRY(openlist)(const struct USHARE_RB_ENTRY(tree) *);
+RB_STATIC const USHARE_RB_ENTRY(data_t) *USHARE_RB_ENTRY(readlist)(RBLIST *);
+RB_STATIC void USHARE_RB_ENTRY(closelist)(RBLIST *);
#endif
/* Some useful macros */
-#define rbmin(rbinfo) RB_ENTRY(lookup)(RB_LUFIRST, NULL, (rbinfo))
-#define rbmax(rbinfo) RB_ENTRY(lookup)(RB_LULAST, NULL, (rbinfo))
+#define rbmin(rbinfo) USHARE_RB_ENTRY(lookup)(RB_LUFIRST, NULL, (rbinfo))
+#define rbmax(rbinfo) USHARE_RB_ENTRY(lookup)(RB_LULAST, NULL, (rbinfo))
#define _REDBLACK_H
#endif /* _REDBLACK_H */