aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@st.com>2011-10-17 15:54:52 +0200
committerChristophe Lyon <christophe.lyon@st.com>2011-10-17 15:54:52 +0200
commit164a9595ceb80f17dba688b0dd4ca3ba3c6ee960 (patch)
tree35c6e1bce0ce4dfea80c16e35d617991fa2bc7ab
parent269df92488695ef609d3759a28fa725a677161e2 (diff)
downloadplatform_external_arm-neon-tests-164a9595ceb80f17dba688b0dd4ca3ba3c6ee960.tar.gz
platform_external_arm-neon-tests-164a9595ceb80f17dba688b0dd4ca3ba3c6ee960.tar.bz2
platform_external_arm-neon-tests-164a9595ceb80f17dba688b0dd4ca3ba3c6ee960.zip
Fix definition of NAN, INF under Win32.
Fix build with GCC/ARM.
-rw-r--r--stm-arm-neon-ref.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/stm-arm-neon-ref.h b/stm-arm-neon-ref.h
index 3a54283..e4d17d3 100644
--- a/stm-arm-neon-ref.h
+++ b/stm-arm-neon-ref.h
@@ -35,8 +35,11 @@ THE SOFTWARE.
#if defined(_MSC_VER)
#include "msinttypes.h"
#include <float.h> /* for isnan() ... */
-#define NAN 0x7fc00000L
-#define HUGE_VALF 0x7f800000L
+static int32_t _ptrNan[]={0x7fc00000L};
+#define NAN (*(float*)_ptrNan)
+static int32_t _ptrInf[]={0x7f800000L};
+#define INFINITY (*(float*)_ptrInf)
+#define HUGE_VALF INFINITY
#else
#include <inttypes.h>
#endif
@@ -265,8 +268,8 @@ register _ARM_FPSCR _afpscr_for_qc __asm("fpscr");
#define Neon_Overflow _afpscr_for_qc.b.QC
#else
/* Fake declaration because GCC/ARM does not know this register */
-extern int errno;
-#define Neon_Overflow errno
+ int myerrno;
+#define Neon_Overflow myerrno
#endif
#endif /* STM_ARM_NEON_MODELS */