summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2010-01-20 19:45:12 +0000
committerJunio C Hamano <gitster@pobox.com>2010-01-22 16:35:42 -0800
commitaba7dea83bfba411dee0271491d6199d2dca61d9 (patch)
tree659e9fa71a3a427c70ea9f9abcc2868f8ccd50cd /git-compat-util.h
parentc2c2be137ac491c17c4fe1fdd27b6a8ac5c1e6c6 (diff)
downloadgit-aba7dea83bfba411dee0271491d6199d2dca61d9.tar.gz
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>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h3
1 files changed, 3 insertions, 0 deletions
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