summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2001-10-22 14:53:21 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2001-10-22 14:53:21 (GMT)
commit61c9e381a90f696277a6c94e46b76ae808c7c80b (patch)
treeedc9c0ff1d53bd85b96c8bd6b4fd7a2709e7f282
parent1f5fff05c1aae9c31acba8c3896f9adf733da1a1 (diff)
downloadtcl-61c9e381a90f696277a6c94e46b76ae808c7c80b.zip
tcl-61c9e381a90f696277a6c94e46b76ae808c7c80b.tar.gz
tcl-61c9e381a90f696277a6c94e46b76ae808c7c80b.tar.bz2
* win/tclWinMtherr.c (_matherr): Better handling of selected
Borland C++ math errors, from hgiese@ratiosoft.com
-rw-r--r--ChangeLog3
-rw-r--r--win/tclWinMtherr.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d86729c..c69a8c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2001-10-22 Donal K. Fellows <fellowsd@cs.man.ac.uk>
+ * win/tclWinMtherr.c (_matherr): Better handling of selected
+ Borland C++ math errors, from hgiese@ratiosoft.com
+
* generic/tclIndexObj.c (STRING_AT): Fixed so that it builds with
SunPro CC on Solaris, which refuses to perform address arithmetic
on void*, despite the fact that that is necessary to get the
diff --git a/win/tclWinMtherr.c b/win/tclWinMtherr.c
index 7be9b97..6c56f2f 100644
--- a/win/tclWinMtherr.c
+++ b/win/tclWinMtherr.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinMtherr.c,v 1.3 1999/04/16 00:48:09 stanton Exp $
+ * RCS: @(#) $Id: tclWinMtherr.c,v 1.3.26.1 2001/10/22 14:53:22 dkf Exp $
*/
#include "tclWinInt.h"
@@ -43,7 +43,11 @@ _matherr(xPtr)
if (!TclMathInProgress()) {
return 0;
}
- if ((xPtr->type == DOMAIN) || (xPtr->type == SING)) {
+ if ((xPtr->type == DOMAIN)
+#ifdef __BORLANDC__
+ || (xPtr->type == TLOSS)
+#endif
+ || (xPtr->type == SING)) {
errno = EDOM;
} else {
errno = ERANGE;