Mercurial > cpython-lru_cache-weakref
diff Objects/floatobject.c @ 2327:43f9e7549c70 legacy-trunk
NeXT/Sparc 3.3 fix
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 13 Feb 1995 16:38:41 +0000 |
| parents | 14b126d0b5be |
| children | 6cbd2830b5a2 |
line wrap: on
line diff
--- a/Objects/floatobject.c Mon Feb 13 16:19:04 1995 +0000 +++ b/Objects/floatobject.c Mon Feb 13 16:38:41 1995 +0000 @@ -59,6 +59,18 @@ #define LONG_MIN (-LONG_MAX-1) #endif +#ifdef __NeXT__ +#ifdef __sparc__ +/* + * This works around a bug in the NS/Sparc 3.3 pre-release + * limits.h header file. + * 10-Feb-1995 bwarsaw@cnri.reston.va.us + */ +#undef LONG_MIN +#define LONG_MIN (-LONG_MAX-1) +#endif +#endif + #ifndef __STDC__ extern double fmod PROTO((double, double)); extern double pow PROTO((double, double)); @@ -406,7 +418,7 @@ double x = getfloatvalue(v); if (x < 0 ? (x = ceil(x)) < (double)LONG_MIN : (x = floor(x)) > (double)LONG_MAX) { - err_setstr(OverflowError, "float to large to convert"); + err_setstr(OverflowError, "float too large to convert"); return NULL; } return newintobject((long)x);
