summaryrefslogtreecommitdiff
path: root/celt/float_cast.h
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2011-09-19 15:49:43 -0400
committerGregory Maxwell <greg@xiph.org>2011-09-19 15:56:48 -0400
commitf7bf43b3e9c8586d86fbaa1c16498e6401fdc815 (patch)
tree0faf4d2e14d8ddcbb49810800bd3e611e677c7b6 /celt/float_cast.h
parentbd628ab6336db02c0b9d34b52a8ca5a741e461ce (diff)
downloadopus-f7bf43b3e9c8586d86fbaa1c16498e6401fdc815.tar.gz
Some fixes for C89 builds.
Diffstat (limited to 'celt/float_cast.h')
-rw-r--r--celt/float_cast.h5
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