git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/1] hdr-check: make it work on Windows

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Aug 24, 2019, 22:36 UTC
Message-ID
<c13d9985284d4b452db0d95b6949e02c533db634.1566686214.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.129.git.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>

On Windows, we define a specific set of pre-processor macros, among other reasons: to avoid including syslog.h (which is not available on Windows).

The hdr-check target did not use those definitions, resulting in a failure to include said syslog.h.

To fix that, let's let the hdr-check target make use of ALL_CFLAGS, which does include the pre-processor macros that would e.g. skip the conditional block including syslog.h.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index c5240942f2..b9f00f0ea0 100644
--- a/Makefile
+++ b/Makefile
@@ -2741,7 +2741,7 @@ CHK_HDRS = $(filter-out $(EXCEPT_HDRS),$(patsubst ./%,%,$(LIB_H)))
 HCO = $(patsubst %.h,%.hco,$(CHK_HDRS))
 
 $(HCO): %.hco: %.h FORCE
-	$(QUIET_HDR)$(CC) -include git-compat-util.h -I. -o /dev/null -c -xc $<
+	$(QUIET_HDR)$(CC) $(ALL_CFLAGS) -include git-compat-util.h -I. -o /dev/null -c -xc $<
 
 .PHONY: hdr-check $(HCO)
 hdr-check: $(HCO)
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Junio C Hamano
Message 2 of 3 in “Do use ALL_CFLAGS in hdr-check”
  1. 0/1 Do use ALL_CFLAGS in hdr-checkJohannes Schindelin via GitGitGadget, Aug 24, 2019
  2. 1/1 hdr-check: make it work on WindowsJohannes Schindelin via GitGitGadget, Aug 24, 2019
  3. Junio C HamanoAug 26, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.