--- common.h.old 2004-01-10 22:45:44.000000000 +0100 +++ common.h 2004-01-10 22:46:20.000000000 +0100 @@ -290,6 +290,7 @@ } +#ifndef HAVE_LRINTF #ifdef _WIN32 #define HAS_LRINTF static INLINE int lrintf(float f) @@ -316,6 +317,7 @@ return i; } #endif +#endif #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 #endif + +/* precedence defining int-types by header files for all platforms */ #if HAVE_INTTYPES_H # include #else @@ -196,6 +182,17 @@ typedef float float32_t; # include # 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) \