summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libfaad/bits.h6
-rw-r--r--src/libfaad/common.h38
2 files changed, 20 insertions, 24 deletions
diff --git a/src/libfaad/bits.h b/src/libfaad/bits.h
index a3c5f3572..05460f0cc 100644
--- a/src/libfaad/bits.h
+++ b/src/libfaad/bits.h
@@ -22,7 +22,7 @@
** Commercial non-GPL licensing of this software is possible.
** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
**
-** $Id: bits.h,v 1.10 2005/10/29 23:57:06 tmmm Exp $
+** $Id: bits.h,v 1.11 2005/10/30 01:21:53 tmmm Exp $
**/
#ifndef __BITS_H__
@@ -56,9 +56,9 @@ typedef struct _bitfile
} bitfile;
-#if defined (_WIN32) && !defined(_WIN32_WCE) && !defined(__MINGW32__)
+#if defined(_MSC_VER)
#define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax
-#elif defined(LINUX) || defined(DJGPP) || defined(__MINGW32__)
+#elif defined(LINUX) || defined(DJGPP) || defined (__MINGW32__) || defined (__CYGWIN__)
#define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) )
#else
#define BSWAP(a) \
diff --git a/src/libfaad/common.h b/src/libfaad/common.h
index 5df610654..5da3661bb 100644
--- a/src/libfaad/common.h
+++ b/src/libfaad/common.h
@@ -22,7 +22,7 @@
** Commercial non-GPL licensing of this software is possible.
** For more info contact Ahead Software through Mpeg4AAClicense@nero.com.
**
-** $Id: common.h,v 1.15 2005/10/29 23:57:06 tmmm Exp $
+** $Id: common.h,v 1.16 2005/10/30 01:21:53 tmmm Exp $
**/
#ifndef __COMMON_H__
@@ -147,23 +147,6 @@ extern "C" {
/* END COMPILE TIME DEFINITIONS */
-#if defined(_WIN32) && !defined(__MINGW32__)
-
-#include <stdlib.h>
-
-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
-
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
@@ -188,6 +171,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
@@ -195,6 +180,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;
@@ -203,6 +199,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
@@ -227,8 +224,6 @@ char *strchr(), *strrchr();
# endif
#endif
-#endif
-
#ifdef WORDS_BIGENDIAN
#define ARCH_IS_BIG_ENDIAN
#endif
@@ -289,6 +284,7 @@ char *strchr(), *strrchr();
}
+#ifndef HAVE_LRINTF
#if defined(_WIN32) && !defined(__MINGW32__)
#define HAS_LRINTF
static INLINE int lrintf(float f)
@@ -315,7 +311,7 @@ char *strchr(), *strrchr();
return i;
}
#endif
-
+#endif
#ifdef __ICL /* only Intel C compiler has fmath ??? */