From 68ef3c39d9a68e9fd339907ca6ccd29532c56432 Mon Sep 17 00:00:00 2001
From: "Tobias S. Josefowitz" <tobij@tobij.de>
Date: Sun, 3 Nov 2013 10:55:13 +0100
Subject: [PATCH] CritBit: Be a little more friendly to MS cpp implementations.

---
 src/post_modules/CritBit/tree_source.H | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/post_modules/CritBit/tree_source.H b/src/post_modules/CritBit/tree_source.H
index b6b06bd3eb..b17faadc32 100644
--- a/src/post_modules/CritBit/tree_source.H
+++ b/src/post_modules/CritBit/tree_source.H
@@ -1,3 +1,10 @@
+#ifndef CB_GC_RECURSE_KEY
+# define CB_GC_RECURSE_KEY(X)
+#endif
+#ifndef CB_GC_CHECK_KEY
+# define CB_GC_CHECK_KEY(X)
+#endif
+
     INIT {
 	THIS->tree.root = NULL;
 	THIS->encode_fun = find_identifier
@@ -671,9 +678,7 @@ range_do_clone:
 	if (!node) return;
 	WALK_FORWARD(node, {
 	    if (CB_HAS_VALUE(_)) {
-#ifdef CB_GC_CHECK_KEY
 		CB_GC_CHECK_KEY(_->key);
-#endif
 		debug_gc_check_svalues(&_->value, 1,  " as a CritBit node value");
 	    }
 	});
@@ -684,9 +689,7 @@ range_do_clone:
 	if (!node) return;
 	WALK_FORWARD(node, {
 	    if (CB_HAS_VALUE(_)) {
-#ifdef CB_GC_RECURSE_KEY
 		CB_GC_RECURSE_KEY(_->key);
-#endif
 		gc_recurse_svalues(&_->value, 1);
 	    }
 	});
-- 
GitLab