diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | PROBLEMS | 9 | ||||
-rw-r--r-- | src/include/lib.h | 18 |
3 files changed, 11 insertions, 27 deletions
@@ -1,5 +1,16 @@ 2021-08-27 G. Branden Robinson <g.branden.robinson@gmail.com> + [libgroff]: Drop redefinition of `INT_MIN`. + + * src/include/lib.h: Drop redefinition of `INT_MIN`. It was + motivated by a bug in the AT&T C++ compiler (cfront), version + 2.0, released in June 1989. Implementations have had 30 years + to get this right; assume that they have. + + * PROBLEMS: Drop corresponding item. + +2021-08-27 G. Branden Robinson <g.branden.robinson@gmail.com> + [libgroff]: Drop long-dead `COOKIE_BUG` logic. * src/libs/libgroff/new.cpp (operator new, operator delete): @@ -910,15 +910,6 @@ only debuggable with gdb but not with Sun's debuggers). ---------------------------------------------------------------------- -* I get lots of `numeric overflow' error messages whenever I run - groff; I compiled groff with AT&T C++ 2.0 with an ANSI C compiler. - -Make sure -DCFRONT_ANSI_BUG is included in DEFINES in the top-level -Makefile. If that doesn't solve the problem, define INT_MIN as --INT_MAX in libgroff/lib.h. - ----------------------------------------------------------------------- - * In MacOS X, I want to completely replace the groff that came with the system. diff --git a/src/include/lib.h b/src/include/lib.h index 97d3041e1..807a53f92 100644 --- a/src/include/lib.h +++ b/src/include/lib.h @@ -121,24 +121,6 @@ extern "C" { int strncasecmp(const char *, const char *, size_t); } #define INT_MAX 2147483647 #endif /* !HAVE_CC_LIMITS_H */ -/* It's not safe to rely on people getting INT_MIN right (ie signed). */ - -#ifdef INT_MIN -#undef INT_MIN -#endif - -#ifdef CFRONT_ANSI_BUG - -/* This works around a bug in cfront 2.0 used with ANSI C compilers. */ - -#define INT_MIN ((long)(-INT_MAX-1)) - -#else /* !CFRONT_ANSI_BUG */ - -#define INT_MIN (-INT_MAX-1) - -#endif /* !CFRONT_ANSI_BUG */ - /* Maximum number of digits in the decimal representation of an int (not including the -). */ |