mirror of https://github.com/mpv-player/mpv
libfaad2: change lrintf availability logic
Remove local HAVE_LRINTF hack; it should no longer be necessary. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32335 b3059339-0415-0410-9bf9-f77b7e298cf2 Do not compile libfaad2's lrintf() implementation if __STDC_VERSION__ is set. This should be enough to ensure that a system lrintf implementation exists. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32342 b3059339-0415-0410-9bf9-f77b7e298cf2 Check for __STDC_VERSION__ >= 199901L before declaring lrintf(). This is the correct condition according to the standard. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32385 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix condition for compiling lrintf, fixes compilation on cygwin/MinGW. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32391 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
6a5b528749
commit
1cf83abdad
|
@ -305,7 +305,7 @@ char *strchr(), *strrchr();
|
|||
}
|
||||
|
||||
|
||||
#if defined(_WIN32) && !defined(__MINGW32__) && !HAVE_LRINTF
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
#define HAS_LRINTF
|
||||
static INLINE int lrintf(float f)
|
||||
{
|
||||
|
@ -317,7 +317,7 @@ char *strchr(), *strrchr();
|
|||
}
|
||||
return i;
|
||||
}
|
||||
#elif (defined(__i386__) && defined(__GNUC__)) && !HAVE_LRINTF
|
||||
#elif (defined(__i386__) && defined(__GNUC__)) && __STDC_VERSION__ < 199901L
|
||||
#define HAS_LRINTF
|
||||
// from http://www.stereopsis.com/FPU.html
|
||||
static INLINE int lrintf(float f)
|
||||
|
@ -348,7 +348,7 @@ char *strchr(), *strrchr();
|
|||
|
||||
#include <math.h>
|
||||
|
||||
#if HAVE_LRINTF
|
||||
#ifdef HAVE_LRINTF
|
||||
# define HAS_LRINTF
|
||||
# define _ISOC9X_SOURCE 1
|
||||
# define _ISOC99_SOURCE 1
|
||||
|
|
|
@ -71,34 +71,23 @@
|
|||
#define ARCH_IS_BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
@@ -289,7 +305,7 @@
|
||||
}
|
||||
|
||||
|
||||
- #if defined(_WIN32) && !defined(__MINGW32__)
|
||||
+ #if defined(_WIN32) && !defined(__MINGW32__) && !HAVE_LRINTF
|
||||
#define HAS_LRINTF
|
||||
static INLINE int lrintf(float f)
|
||||
{
|
||||
@@ -301,7 +317,7 @@
|
||||
@@ -317,7 +317,7 @@
|
||||
}
|
||||
return i;
|
||||
}
|
||||
- #elif (defined(__i386__) && defined(__GNUC__))
|
||||
+ #elif (defined(__i386__) && defined(__GNUC__)) && !HAVE_LRINTF
|
||||
+ #elif (defined(__i386__) && defined(__GNUC__)) && __STDC_VERSION__ < 199901L
|
||||
#define HAS_LRINTF
|
||||
// from http://www.stereopsis.com/FPU.html
|
||||
static INLINE int lrintf(float f)
|
||||
@@ -330,6 +346,8 @@
|
||||
@@ -330,5 +346,7 @@
|
||||
|
||||
#else
|
||||
|
||||
+#include <math.h>
|
||||
+
|
||||
-#ifdef HAVE_LRINTF
|
||||
+#if HAVE_LRINTF
|
||||
#ifdef HAVE_LRINTF
|
||||
# define HAS_LRINTF
|
||||
# define _ISOC9X_SOURCE 1
|
||||
@@ -338,8 +356,6 @@
|
||||
# define __USE_ISOC99 1
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue