From 7c135b8ccb5dba0f3ad3e2767fe4d3592345f23f Mon Sep 17 00:00:00 2001 From: Seth Jackson Date: Tue, 25 Aug 2015 18:55:07 -0400 Subject: MSVC: Define `inline` and `restrict`. #3237 MSVC 2015 defines __func__ (C++11). https://msdn.microsoft.com/en-us/library/dn919276.aspx MSVC only allows inline in C++ and requires __inline in C instead. https://msdn.microsoft.com/en-us/library/bw1hbe6y.aspx --- src/nvim/os/win_defs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/nvim/os/win_defs.h b/src/nvim/os/win_defs.h index 025833060a..c169dbfe83 100644 --- a/src/nvim/os/win_defs.h +++ b/src/nvim/os/win_defs.h @@ -21,6 +21,15 @@ // - SYS_VIMRC_FILE // - SPECIAL_WILDCHAR +#ifdef _MSC_VER +# ifndef inline +# define inline __inline +# endif +# ifndef restrict +# define restrict __restrict +# endif +#endif + typedef SSIZE_T ssize_t; #ifndef SSIZE_MAX -- cgit