aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2014-01-12 17:04:33 +0200
committerLasse Collin <lasse.collin@tukaani.org>2014-01-12 17:04:33 +0200
commit69fd4e1c932c7975476a0143c86e45d81b60d3f9 (patch)
treea40c38b5cfe8f0d8658f080c25fc5924693c9906
parentliblzma: Avoid C99 compound literal arrays. (diff)
downloadxz-69fd4e1c932c7975476a0143c86e45d81b60d3f9.tar.xz
Windows: Add MSVC defines for inline and restrict keywords.
Diffstat (limited to '')
-rw-r--r--src/common/sysdefs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/sysdefs.h b/src/common/sysdefs.h
index 5ea6bdae..e056ca4a 100644
--- a/src/common/sysdefs.h
+++ b/src/common/sysdefs.h
@@ -165,6 +165,16 @@ typedef unsigned char _Bool;
# include <memory.h>
#endif
+// As of MSVC 2013, inline and restrict are supported with
+// non-standard keywords.
+#if defined(_WIN32) && defined(_MSC_VER)
+# ifndef inline
+# define inline __inline
+# endif
+# ifndef restrict
+# define restrict __restrict
+# endif
+#endif
////////////
// Macros //