shithub: opusfile

Download patch

ref: 9871fbbcec122c02b6f2a1fbe48d10344b997b27
parent: 8a52a14da597a9c4f856cd0b57f13989660f51c6
author: Ralph Giles <giles@mozilla.com>
date: Wed Oct 24 09:10:58 EDT 2012

Fix mingw warnings with -U__STRICT_ANSI__.

We use some C99 features (like lrintf) despite passing
-std=c89 -pedantic. This works on normal linux and mac
builds because we define _GNU_SOURCE, which enables
them, but the mingw32 headers ignore this, generating
warnings for lrintf and _putenv, the later hacked in
by libtool.

Avoid these by undefining __STRICT_ANSI__ in mingw builds,
which allows the default extensions and fixes the warnings.

--- a/configure.ac
+++ b/configure.ac
@@ -86,6 +86,14 @@
 
 CC_CHECK_CFLAGS_APPEND([-std=c89 -pedantic -Wall -Wextra -Wno-parentheses -Wno-long-long])
 
+# Platform-specific tweaks
+case $host in
+  *-mingw*)
+    # -std=c89 causes some warnings under mingw.
+    CC_CHECK_CFLAGS_APPEND([-U__STRICT_ANSI__])
+    ;;
+esac
+
 dnl Check for doxygen
 AC_ARG_ENABLE([doc],
   AS_HELP_STRING([--disable-doc], [Do not build API documentation]),,