From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date: Wed, 20 Jan 2010 19:45:12 +0000 (+0000)
Subject: msvc: Add a definition of NORETURN compatible with msvc compiler
X-Git-Tag: v1.7.0-rc0~13
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aba7dea83bfba411dee0271491d6199d2dca61d9;p=git

msvc: Add a definition of NORETURN compatible with msvc compiler

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---

diff --git a/git-compat-util.h b/git-compat-util.h
index aff627a85a..620a7c6371 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -178,6 +178,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