[MPlayer-dev-eng] Re: libfaad2 updates

adland adland123 at yahoo.com
Tue May 11 17:04:30 CEST 2004


>

This is another lrintf issue.
This time it is complaining about the inline assembly for this function.

I dont think the compiler likes the syntax of this inline assembly code
although it is the same functionally as the assembly in other code block
used before for cygwin & linux.

another test patch (included below):

I dont even have MinGW installed yet myself.
I did install cygwin a few days back
Will work on doing this soon but no time now.

> Isn't portability fun? 

It is interesting the issues which come up.
 
> We should probably try to send our portability fixes upstream.

Okay will do so once completed/tested as a single patch.

Patch update

--- 20/libfaad2/common.h        2004-05-11 01:14:37.000000000 -0400
+++ updated/libfaad2/common.h   2004-05-11 10:54:13.000000000 -0400
@@ -32,6 +32,11 @@
 extern "C" {
 #endif

+/* Allow build on cygwin*/
+#if defined(__CYGWIN__)
+#define __STRICT_ANSI__
+#endif
+
 #define INLINE __inline
 #if defined(_WIN32) && !defined(_WIN32_WCE)
 #define ALIGN __declspec(align(16))
@@ -315,7 +320,8 @@
   }


-  #ifdef _WIN32
+
+  #if defined(_WIN32) && !defined(__MINGW__)
     #define HAS_LRINTF
     static INLINE int lrintf(float f)
     {
@@ -327,7 +333,7 @@
         }
         return i;
     }
-  #elif (defined(__i386__) && defined(__GNUC__))
+  #elif (defined(__i386__) && defined(__GNUC__)) || defined(__MINGW__)
     #define HAS_LRINTF
     // from http://www.stereopsis.com/FPU.html
     static INLINE int lrintf(float f)
@@ -364,7 +370,7 @@
 #  define __USE_ISOC99   1
 #endif

-    //#include <math.h>
+    #include <math.h>

 #ifdef HAVE_SINF
 #  define sin sinf






More information about the MPlayer-dev-eng mailing list