aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Holzmann <grholzi@users.sourceforge.net>2007-01-17 18:34:49 +0000
committerGeorg Holzmann <grholzi@users.sourceforge.net>2007-01-17 18:34:49 +0000
commit838a5aa4cb095257fbf749d6014d00a15ce02f12 (patch)
tree71e767938c3e61f3fee8929244dbf3528dad72f2
parent9ee794d32ae2d367d6a98df650fd0797ea5b8575 (diff)
osx fix for iemlib.h
svn path=/trunk/externals/iemlib/; revision=7362
-rw-r--r--iem_mp3/src/iemlib.h7
-rw-r--r--iem_t3_lib/src/iemlib.h9
-rw-r--r--iemlib2/src/iemlib.h2
3 files changed, 14 insertions, 4 deletions
diff --git a/iem_mp3/src/iemlib.h b/iem_mp3/src/iemlib.h
index 36d47ca..ba62f68 100644
--- a/iem_mp3/src/iemlib.h
+++ b/iem_mp3/src/iemlib.h
@@ -80,8 +80,13 @@ should have been by CPU type and not by operating system! */
#else
#ifdef __APPLE__
+#ifdef __BIG_ENDIAN__
#define HIOFFSET 0 /* word offset to find MSB */
#define LOWOFFSET 1 /* word offset to find LSB */
+#else
+#define HIOFFSET 1 /* word offset to find MSB */
+#define LOWOFFSET 0 /* word offset to find LSB */
+#endif
#define int32 int /* a data type that has 32 bits */
#endif /* __APPLE__ */
@@ -95,7 +100,7 @@ union tabfudge
int32 tf_i[2];
};
-#ifdef __i386__
+#if defined __i386__ || defined __x86_64__
#define IEM_DENORMAL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \
(((*(unsigned int*)&(f))&0x60000000)==0x60000000))
/* more stringent test: anything not between 1e-19 and 1e19 in absolute val */
diff --git a/iem_t3_lib/src/iemlib.h b/iem_t3_lib/src/iemlib.h
index 6be2de0..ba62f68 100644
--- a/iem_t3_lib/src/iemlib.h
+++ b/iem_t3_lib/src/iemlib.h
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */
+iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
#ifndef __IEMLIB_H__
#define __IEMLIB_H__
@@ -80,8 +80,13 @@ should have been by CPU type and not by operating system! */
#else
#ifdef __APPLE__
+#ifdef __BIG_ENDIAN__
#define HIOFFSET 0 /* word offset to find MSB */
#define LOWOFFSET 1 /* word offset to find LSB */
+#else
+#define HIOFFSET 1 /* word offset to find MSB */
+#define LOWOFFSET 0 /* word offset to find LSB */
+#endif
#define int32 int /* a data type that has 32 bits */
#endif /* __APPLE__ */
@@ -95,7 +100,7 @@ union tabfudge
int32 tf_i[2];
};
-#ifdef __i386__
+#if defined __i386__ || defined __x86_64__
#define IEM_DENORMAL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \
(((*(unsigned int*)&(f))&0x60000000)==0x60000000))
/* more stringent test: anything not between 1e-19 and 1e19 in absolute val */
diff --git a/iemlib2/src/iemlib.h b/iemlib2/src/iemlib.h
index 46bc8d7..ba62f68 100644
--- a/iemlib2/src/iemlib.h
+++ b/iemlib2/src/iemlib.h
@@ -100,7 +100,7 @@ union tabfudge
int32 tf_i[2];
};
-#ifdef __i386__
+#if defined __i386__ || defined __x86_64__
#define IEM_DENORMAL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \
(((*(unsigned int*)&(f))&0x60000000)==0x60000000))
/* more stringent test: anything not between 1e-19 and 1e19 in absolute val */