aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2013-04-27 13:45:01 +0200
committerAnthony Ramine <[email protected]>2013-04-30 10:11:16 +0200
commit3c95b1cfcc1b323d461eb3a92a1560dd0882294e (patch)
treeeb9958c6f840d0c1a12a3d8be38902581a00a32a
parent18fec52206362ca0ecb0f742b0ef36619094d08f (diff)
downloadotp-3c95b1cfcc1b323d461eb3a92a1560dd0882294e.tar.gz
otp-3c95b1cfcc1b323d461eb3a92a1560dd0882294e.tar.bz2
otp-3c95b1cfcc1b323d461eb3a92a1560dd0882294e.zip
Define matherr only on platforms where it is used
-rw-r--r--erts/emulator/sys/unix/sys_float.c4
-rw-r--r--erts/emulator/sys/win32/sys_float.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/erts/emulator/sys/unix/sys_float.c b/erts/emulator/sys/unix/sys_float.c
index 787f8d6728..689be98969 100644
--- a/erts/emulator/sys/unix/sys_float.c
+++ b/erts/emulator/sys/unix/sys_float.c
@@ -832,6 +832,8 @@ sys_chars_to_double(char* buf, double* fp)
return 0;
}
+#ifdef USE_MATHERR
+
int
matherr(struct exception *exc)
{
@@ -842,3 +844,5 @@ matherr(struct exception *exc)
#endif
return 1;
}
+
+#endif
diff --git a/erts/emulator/sys/win32/sys_float.c b/erts/emulator/sys/win32/sys_float.c
index fb1ffc3089..e2a777d182 100644
--- a/erts/emulator/sys/win32/sys_float.c
+++ b/erts/emulator/sys/win32/sys_float.c
@@ -133,6 +133,8 @@ sys_double_to_chars_ext(double fp, char *buffer, size_t buffer_size, size_t deci
return s-buffer; /* i.e strlen(buffer) */
}
+#ifdef USE_MATHERR
+
int
matherr(struct _exception *exc)
{
@@ -141,6 +143,8 @@ matherr(struct _exception *exc)
return 1;
}
+#endif
+
static void
fpe_exception(int sig)
{