]> git.sesse.net Git - vlc/commitdiff
configure.ac: Generate pragmas that MSVC understands
authorHugo Beauzée-Luyssen <hugo@beauzee.fr>
Wed, 22 Oct 2014 13:57:49 +0000 (15:57 +0200)
committerHugo Beauzée-Luyssen <hugo@beauzee.fr>
Fri, 24 Oct 2014 15:09:48 +0000 (17:09 +0200)
Even though that pragma is standard C99, MSVC doesn't understand it.
An issue has been opened, and this commit should be reverted when/if
they fix it:
https://connect.microsoft.com/VisualStudio/feedback/details/1009089/unhandled-standard-macros

configure.ac

index 44e5bdffdc22dc87d986c085668e85c0dee5b1c2..9c3c52c2b02317ffa20d6ee853a0e61d442e89f7 100644 (file)
@@ -999,8 +999,13 @@ AS_IF([test "${enable_optimizations}" != "no"], [
   AS_IF([test "${ac_cv_c_fast_math}" = "no"], [VLC_RESTORE_FLAGS])
   AH_BOTTOM([
 #ifndef __FAST_MATH__
-# pragma STDC FENV_ACCESS OFF
-# pragma STDC FP_CONTRACT ON
+# ifndef _MSC_VER
+#  pragma STDC FENV_ACCESS OFF
+#  pragma STDC FP_CONTRACT ON
+# else
+#  pragma fenv_access(off)
+#  pragma fp_contract(on)
+# endif
 #endif
 ])