From: Frantisek D. <va...@us...> - 2004-08-27 19:34:18
|
Update of /cvsroot/xine/xine-lib/src/libfaad In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13268/src/libfaad Modified Files: bits.h common.h diff_to_faad2_cvs.patch Log Message: MINGW32 port. Engine library and most of plugins compiles now. List of some changes: - replaced some _MSC_VER by more common WIN32 - define INTLDIR, remove -static flag for included intl - shared more common CFLAGS with DEBUG_CFLAGS - use WIN32_CFLAGS for all building - separate some flags into THREAD_CFLAGS_CONFIG, THREAD_CFLAGS_CONFIG and ZLIB_LIB_CONFIG for public xine-config, automatically use internal libs if necessary - don't warn about missing X for mingw and cygwin - libw32dll disabled for WIN32 (making native loader would be interesting, or porting wine code to Windows? :->) - DVB and RTP disabled for WIN32, not ported yet - fix build and fix a warning in cdda - fix build for nosefart and libfaad - implement configure option --disable-freetype - sync libxine.pc and xine-config.in - add -liberty to goom under WIN32 - move original build files from included phread and zlib into archives and replace them by autotools Index: bits.h =================================================================== RCS file: /cvsroot/xine/xine-lib/src/libfaad/bits.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- bits.h 26 Jan 2004 22:34:10 -0000 1.7 +++ bits.h 27 Aug 2004 19:33:20 -0000 1.8 @@ -56,9 +56,9 @@ } bitfile; -#if defined (_WIN32) && !defined(_WIN32_WCE) +#if defined(_MSC_VER) #define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax -#elif defined(LINUX) || defined(DJGPP) +#elif defined(LINUX) || defined(DJGPP) || defined (__MINGW32__) || defined (__CYGWIN__) #define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) ) #else #define BSWAP(a) \ Index: common.h =================================================================== RCS file: /cvsroot/xine/xine-lib/src/libfaad/common.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- common.h 27 Jan 2004 19:13:05 -0000 1.12 +++ common.h 27 Aug 2004 19:33:20 -0000 1.13 @@ -145,22 +145,6 @@ /* END COMPILE TIME DEFINITIONS */ -#if defined(_WIN32) - - -typedef unsigned __int64 uint64_t; -typedef unsigned __int32 uint32_t; -typedef unsigned __int16 uint16_t; -typedef unsigned __int8 uint8_t; -typedef __int64 int64_t; -typedef __int32 int32_t; -typedef __int16 int16_t; -typedef __int8 int8_t; -typedef float float32_t; - - -#else - #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -189,6 +173,8 @@ #if HAVE_STRINGS_H # include <strings.h> #endif + +/* precedence defining int-types by header files for all platforms */ #if HAVE_INTTYPES_H # include <inttypes.h> #else @@ -196,6 +182,17 @@ # include <stdint.h> # else /* we need these... */ +# ifdef WIN32 +typedef unsigned __int64 uint64_t; +typedef unsigned __int32 uint32_t; +typedef unsigned __int16 uint16_t; +typedef unsigned __int8 uint8_t; +typedef __int64 int64_t; +typedef __int32 int32_t; +typedef __int16 int16_t; +typedef __int8 int8_t; +# else /* WIN32 */ +typedef float float32_t; typedef unsigned long long uint64_t; typedef unsigned long uint32_t; typedef unsigned short uint16_t; @@ -204,6 +201,7 @@ typedef long int32_t; typedef short int16_t; typedef char int8_t; +# endif /* WIN32 */ # endif #endif #if HAVE_UNISTD_H @@ -228,8 +226,6 @@ # endif #endif -#endif - #ifdef WORDS_BIGENDIAN #define ARCH_IS_BIG_ENDIAN #endif Index: diff_to_faad2_cvs.patch =================================================================== RCS file: /cvsroot/xine/xine-lib/src/libfaad/diff_to_faad2_cvs.patch,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- diff_to_faad2_cvs.patch 11 Jan 2004 15:44:04 -0000 1.1 +++ diff_to_faad2_cvs.patch 27 Aug 2004 19:33:21 -0000 1.2 @@ -16,3 +16,88 @@ #ifdef __ICL /* only Intel C compiler has fmath ??? */ +diff -u -p -r1.1.1.1 common.h +--- common.h 26 Jul 2004 15:27:56 -0000 1.1.1.1 ++++ common.h 30 Jul 2004 00:08:55 -0000 +@@ -145,22 +145,6 @@ extern "C" { + + /* END COMPILE TIME DEFINITIONS */ + +-#if defined(_WIN32) +- +- +-typedef unsigned __int64 uint64_t; +-typedef unsigned __int32 uint32_t; +-typedef unsigned __int16 uint16_t; +-typedef unsigned __int8 uint8_t; +-typedef __int64 int64_t; +-typedef __int32 int32_t; +-typedef __int16 int16_t; +-typedef __int8 int8_t; +-typedef float float32_t; +- +- +-#else +- + #ifdef HAVE_CONFIG_H + # include "config.h" + #endif +@@ -189,6 +173,8 @@ typedef float float32_t; + #if HAVE_STRINGS_H + # include <strings.h> + #endif ++ ++/* precedence defining int-types by header files for all platforms */ + #if HAVE_INTTYPES_H + # include <inttypes.h> + #else +@@ -196,6 +182,17 @@ typedef float float32_t; + # include <stdint.h> + # else + /* we need these... */ ++# ifdef WIN32 ++typedef unsigned __int64 uint64_t; ++typedef unsigned __int32 uint32_t; ++typedef unsigned __int16 uint16_t; ++typedef unsigned __int8 uint8_t; ++typedef __int64 int64_t; ++typedef __int32 int32_t; ++typedef __int16 int16_t; ++typedef __int8 int8_t; ++# else /* WIN32 */ ++typedef float float32_t; + typedef unsigned long long uint64_t; + typedef unsigned long uint32_t; + typedef unsigned short uint16_t; +@@ -204,6 +201,7 @@ typedef long long int64_t; + typedef long int32_t; + typedef short int16_t; + typedef char int8_t; ++# endif /* WIN32 */ + # endif + #endif + #if HAVE_UNISTD_H +@@ -226,8 +224,6 @@ char *strchr(), *strrchr(); + # define memcpy(d, s, n) bcopy((s), (d), (n)) + # define memmove(d, s, n) bcopy((s), (d), (n)) + # endif +-#endif +- + #endif + + #ifdef WORDS_BIGENDIAN +diff -u -p -r1.1.1.1 bits.h +--- bits.h 26 Jul 2004 15:27:56 -0000 1.1.1.1 ++++ bits.h 30 Jul 2004 09:35:55 -0000 +@@ -56,9 +56,9 @@ typedef struct _bitfile + } bitfile; + + +-#if defined (_WIN32) && !defined(_WIN32_WCE) ++#if defined(_MSC_VER) + #define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax +-#elif defined(LINUX) || defined(DJGPP) ++#elif defined(LINUX) || defined(DJGPP) || defined (__MINGW32__) || defined (__CYGWIN__) + #define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) ) + #else + #define BSWAP(a) \ |