From 1764376034ce4f4c899f141c121e1be9167d1e83 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Sat, 29 Nov 2008 19:20:07 +0000 Subject: [PATCH] Use __CHECKER__ to detect when sparse is running Signed-off-by: Ramsay Jones Acked-by: Andreas Ericsson Signed-off-by: Shawn O. Pearce --- Makefile | 2 +- src/git/thread-utils.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 01ef4fad0..c1044cde1 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ apidocs: test: $(TEST_RUN) sparse: - cgcc -no-compile -DSPARSE_IS_RUNNING $(ALL_CFLAGS) $(SPARSE_FLAGS) $(SRC_C) + cgcc -no-compile $(ALL_CFLAGS) $(SPARSE_FLAGS) $(SRC_C) install-headers: $(PUBLIC_HEADERS) @mkdir -p /tmp/gitinc/git diff --git a/src/git/thread-utils.h b/src/git/thread-utils.h index 7ce66fdc1..bc4153d7a 100644 --- a/src/git/thread-utils.h +++ b/src/git/thread-utils.h @@ -23,7 +23,7 @@ #endif /* sparse doesn't grok thread-local variables */ -#ifdef SPARSE_IS_RUNNING +#if defined(__CHECKER__) # undef GIT_HAS_TLS # undef GIT_TLS # define GIT_TLS