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
commitc234ece0a90103013734b32193dbf558615bede9 (patch)
treee40bdcd78d3f54efcc320ced0cba8a35a763213f
parent1f786fa0d804745d76102e793a62eb151fc2f5e2 (diff)
osx fix for iemlib.h
svn path=/trunk/; revision=7362
-rw-r--r--externals/iem/iem_atan2/src/iemlib.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/externals/iem/iem_atan2/src/iemlib.h b/externals/iem/iem_atan2/src/iemlib.h
index c2bf7731..ba62f685 100644
--- a/externals/iem/iem_atan2/src/iemlib.h
+++ b/externals/iem/iem_atan2/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.
-iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
+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,8 +100,14 @@ union tabfudge
int32 tf_i[2];
};
+#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 */
+#else
+
+#define IEM_DENORMAL(f) 0
+
+#endif
#endif