Skip to content

Commit d0626b0

Browse files
committed
fix(cypher): keep cypher.c windows.h-free — use _Thread_local directly
The compat.h include added for CBM_TLS pulled windows.h into cypher.c, whose legacy 'far' macro (windef.h defines it empty) broke the existing EXISTS-pattern local of that name on every Windows leg. Use C11 _Thread_local for the depth-clamp flag instead; cypher.c stays free of windows.h. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 73a3c34 commit d0626b0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎src/cypher/cypher.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* RETURN with COUNT/ORDER BY/LIMIT/DISTINCT.
77
*/
88
#include "cypher/cypher.h"
9-
#include "foundation/compat.h"
109
#include "store/store.h"
1110
#include "foundation/platform.h"
1211
#include "foundation/limits.h"
@@ -2948,7 +2947,9 @@ static void process_edges(cbm_store_t *store, cbm_edge_t *edges, int edge_count,
29482947
/* Set when a variable-length hop range is clamped to the engine ceiling
29492948
* during the CURRENT execution; cbm_cypher_execute turns it into
29502949
* result->warning so callers can tell "clamped" from "no such path" (#797). */
2951-
static CBM_TLS int g_cypher_depth_clamped = 0;
2950+
/* C11 _Thread_local directly: cypher.c stays windows.h-free (compat.h pulls
2951+
* in windows.h, whose legacy `far` macro breaks this file's identifiers). */
2952+
static _Thread_local int g_cypher_depth_clamped = 0;
29522953

29532954
static void expand_var_length(cbm_store_t *store, cbm_rel_pattern_t *rel,
29542955
cbm_node_pattern_t *target_node, binding_t *b, cbm_node_t *src,

0 commit comments

Comments
 (0)