From 69fd4e1c932c7975476a0143c86e45d81b60d3f9 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sun, 12 Jan 2014 17:04:33 +0200 Subject: [PATCH] Windows: Add MSVC defines for inline and restrict keywords. --- src/common/sysdefs.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 #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 //