From 887dd41c5d67c30bd1e9631920d8fc1c3dd1a3f0 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 13 Oct 2017 15:01:23 +0200 Subject: compat/macros: fix "restrict" name clash --- compat/macros.hpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'compat') diff --git a/compat/macros.hpp b/compat/macros.hpp index 84d6bd03..fcb4fea3 100644 --- a/compat/macros.hpp +++ b/compat/macros.hpp @@ -8,16 +8,18 @@ # define never_inline #endif -#if defined _MSC_VER || defined __GNUG__ -# define restrict __restrict +#if defined __GNUG__ +# define restrict_ptr __restrict +#elif defined _MSC_VER +# define restrict_ptr __restrict #else -# define restrict +# define restrict_ptr #endif #if defined _MSC_VER -# define restrict_ref restrict +# define restrict_ref restrict_ptr #elif defined __GNUG__ -# define restrict_ref restrict +# define restrict_ref restrict_ptr #else # define restrict_ref #endif -- cgit v1.2.3