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

[PATCH] wt-status.h: declare global variables as extern

From
Johannes Sixt <johannes.sixt@telecom.at>
Date
May 9, 2008, 08:05 UTC
Message-ID
<1210320327-24403-1-git-send-email-johannes.sixt@telecom.at>

There are linkers out there that complain if a global non-static variable is defined multiple times.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
 wt-status.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/wt-status.h b/wt-status.h
index 02afaa6..7d61410 100644
--- a/wt-status.h
+++ b/wt-status.h
@@ -28,8 +28,8 @@ struct wt_status {
 };
 
 int git_status_config(const char *var, const char *value);
-int wt_status_use_color;
-int wt_status_relative_paths;
+extern int wt_status_use_color;
+extern int wt_status_relative_paths;
 void wt_status_prepare(struct wt_status *s);
 void wt_status_print(struct wt_status *s);
 
-- 
1.5.5.1.125.gb9f88
Message 1 of 1 in “wt-status.h: declare global variables as extern”
  1. wt-status.h: declare global variables as externJohannes Sixt, May 9, 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.