summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-06-26 18:27:19 (GMT)
committerGuido van Rossum <guido@python.org>1996-06-26 18:27:19 (GMT)
commit9d81b5594ebc2b54e05244517bfd82e9f7106e74 (patch)
treeff935639f24305ba7442f3ae13c18e99103ceb37 /Objects/floatobject.c
parent845547d54b640e7e43bb893062a61a3e649732bc (diff)
downloadcpython-9d81b5594ebc2b54e05244517bfd82e9f7106e74.zip
cpython-9d81b5594ebc2b54e05244517bfd82e9f7106e74.tar.gz
cpython-9d81b5594ebc2b54e05244517bfd82e9f7106e74.tar.bz2
Different logic for defining CHECK(); 16-bit MSC specific define.
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index f37a9bd..0a6aa48 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -39,11 +39,17 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#undef HUGE_VAL
#endif
-#ifdef HUGE_VAL
+#if defined(_MSC_VER) && _MSC_VER < 850
+#define CHECK(x) /* errno is always set VC++ Ver 1.5*/
+#endif
+
+#if defined(HUGE_VAL) && !defined(CHECK)
#define CHECK(x) if (errno != 0) ; \
else if (-HUGE_VAL <= (x) && (x) <= HUGE_VAL) ; \
else errno = ERANGE
-#else
+#endif
+
+#ifndef CHECK
#define CHECK(x) /* Don't know how to check */
#endif