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

[PATCH] revision.h: make show_early_output an extern which is defined in revision.c

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Aug 21, 2008, 00:34 UTC
Message-ID
<tafnhasVGgid37Mhftl4QXLlge-grjM8UOkw0dHIRb0@cipher.nrlssc.navy.mil>

The variable show_early_output is defined in revision.c and should be declared extern in revision.h so that the linker does not complain about multiply defined variables.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
 revision.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/revision.h b/revision.h
index f64e8ce..1b04566 100644
--- a/revision.h
+++ b/revision.h
@@ -119,7 +119,7 @@ struct rev_info {
 void read_revisions_from_stdin(struct rev_info *revs);
 
 typedef void (*show_early_output_fn_t)(struct rev_info *, struct commit_list *);
-volatile show_early_output_fn_t show_early_output;
+extern volatile show_early_output_fn_t show_early_output;
 
 extern void init_revisions(struct rev_info *revs, const char *prefix);
 extern int setup_revisions(int argc, const char **argv, struct rev_info *revs, const char *def);
-- 
1.6.0.13.ge1c8
Message 1 of 1 in “revision.h: make show_early_output an extern which is defined in revision.c”
  1. revision.h: make show_early_output an extern which is defined in revision.cBrandon Casey, Aug 21, 2008

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.