diff options
author | Gregory Maxwell <greg@xiph.org> | 2011-09-19 15:49:43 -0400 |
---|---|---|
committer | Gregory Maxwell <greg@xiph.org> | 2011-09-19 15:56:48 -0400 |
commit | f7bf43b3e9c8586d86fbaa1c16498e6401fdc815 (patch) | |
tree | 0faf4d2e14d8ddcbb49810800bd3e611e677c7b6 /celt/float_cast.h | |
parent | bd628ab6336db02c0b9d34b52a8ca5a741e461ce (diff) | |
download | opus-f7bf43b3e9c8586d86fbaa1c16498e6401fdc815.tar.gz |
Some fixes for C89 builds.
Diffstat (limited to 'celt/float_cast.h')
-rw-r--r-- | celt/float_cast.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/celt/float_cast.h b/celt/float_cast.h index b3670f0b..1b3f1991 100644 --- a/celt/float_cast.h +++ b/celt/float_cast.h @@ -115,10 +115,11 @@ #else -#ifdef __GNUC__ /* supported by gcc, but not by all other compilers*/ +#if (defined(__GNUC__) && defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) + /* supported by gcc in C99 mode, but not by all other compilers */ #warning "Don't have the functions lrint() and lrintf ()." #warning "Replacing these functions with a standard C cast." -#endif /* __GNUC__ */ +#endif /* __STDC_VERSION__ >= 199901L */ #include <math.h> #define float2int(flt) ((int)(floor(.5+flt))) #endif |