-#if (__STDC_VERSION__ != 199901L)
- /* Not a C99 compiler */
- #ifdef __GNUC__
- #define restrict __restrict__
- #else
- #define restrict /* restrict */
- #endif
+#if (__STDC_VERSION__ >= 199901L)
+#define OPJ_RESTRICT restrict
+#else
+/* Not a C99 compiler */
+#if defined(__GNUC__)
+#define OPJ_RESTRICT __restrict__
+
+/*
+ vc14 (2015) outputs wrong results.
+ Need to check OPJ_RESTRICT usage (or a bug in vc14)
+ #elif defined(_MSC_VER) && (_MSC_VER >= 1400)
+ #define OPJ_RESTRICT __restrict
+*/
+#else
+#define OPJ_RESTRICT /* restrict */
+#endif