diff --git a/MacOSX/codecs/include/opus/opus_defines.h b/MacOSX/codecs/include/opus/opus_defines.h index c42d301e..4785d66c 100644 --- a/MacOSX/codecs/include/opus/opus_defines.h +++ b/MacOSX/codecs/include/opus/opus_defines.h @@ -86,7 +86,11 @@ extern "C" { # endif # endif -#if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) ) +#if (defined(__GNUC__) && (__GNUC__ < 4)) +/* __restrict is broken with gcc < 4.0 + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=6392 */ +# define OPUS_RESTRICT +#elif (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) ) # if OPUS_GNUC_PREREQ(3,0) # define OPUS_RESTRICT __restrict__ # elif (defined(_MSC_VER) && _MSC_VER >= 1400) diff --git a/Windows/codecs/include/opus/opus_defines.h b/Windows/codecs/include/opus/opus_defines.h index c42d301e..f8b270bb 100644 --- a/Windows/codecs/include/opus/opus_defines.h +++ b/Windows/codecs/include/opus/opus_defines.h @@ -86,7 +86,17 @@ extern "C" { # endif # endif -#if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) ) +#if defined(__WATCOMC__) +# if (__WATCOMC__ >= 1250) +# define OPUS_RESTRICT __restrict +# else +# define OPUS_RESTRICT +# endif +#elif (defined(__GNUC__) && (__GNUC__ < 4)) +/* __restrict is broken with gcc < 4.0 + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=6392 */ +# define OPUS_RESTRICT +#elif (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) ) # if OPUS_GNUC_PREREQ(3,0) # define OPUS_RESTRICT __restrict__ # elif (defined(_MSC_VER) && _MSC_VER >= 1400)