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

[PATCH 4/4] msvc: Add a definition of NORETURN compatible with msvc compiler

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Jan 20, 2010, 19:45 UTC
Message-ID
<4B575D48.9070508@ramsay1.demon.co.uk>
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---

I thought that Erik had already submitted this patch along with those that resulted in commits a4f3131c and 18660bc9. However, I don't seem to be able to find it anywhere! (maybe I only imagined it).

If you find Erik's patch, please apply that instead...

ATB, Ramsay Jones

 git-compat-util.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/git-compat-util.h b/git-compat-util.h
index 5c59687..6efea29 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -177,6 +177,9 @@ extern char *gitbasename(char *);
 #ifdef __GNUC__
 #define NORETURN __attribute__((__noreturn__))
 #define NORETURN_PTR __attribute__((__noreturn__))
+#elif defined(_MSC_VER)
+#define NORETURN __declspec(noreturn)
+#define NORETURN_PTR
 #else
 #define NORETURN
 #define NORETURN_PTR
-- 
1.6.6
Next: Erik Faye-Lund
Message 1 of 4 in “msvc: Add a definition of NORETURN compatible with msvc compiler”
  1. 4/4 msvc: Add a definition of NORETURN compatible with msvc compilerRamsay Jones, Jan 20, 2010
  2. Erik Faye-LundJan 20, 2010
  3. Ramsay JonesJan 22, 2010
  4. Sebastian SchuberthJan 23, 2010

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.