summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-10-13 15:01:23 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-10-13 15:01:23 +0200
commit887dd41c5d67c30bd1e9631920d8fc1c3dd1a3f0 (patch)
treee5962fa5ef14b85b49c3d92752829e4645547efb /compat
parent13f01510132abd3cf08e5a913721d0702c20664f (diff)
compat/macros: fix "restrict" name clash
Diffstat (limited to 'compat')
-rw-r--r--compat/macros.hpp12
1 files changed, 7 insertions, 5 deletions
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