groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 16/34: [libgroff]: Drop redefinition of `INT_MIN`.


From: G. Branden Robinson
Subject: [groff] 16/34: [libgroff]: Drop redefinition of `INT_MIN`.
Date: Thu, 2 Sep 2021 02:48:34 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 153d49d940bf9632fe8039107b66625d44aa93fb
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Aug 27 12:12:18 2021 +1000

    [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.
---
 ChangeLog         | 11 +++++++++++
 PROBLEMS          |  9 ---------
 src/include/lib.h | 18 ------------------
 3 files changed, 11 insertions(+), 27 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4575971..15b9448 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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):
diff --git a/PROBLEMS b/PROBLEMS
index bc2cc34..84fe255 100644
--- a/PROBLEMS
+++ b/PROBLEMS
@@ -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 97d3041..807a53f 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 -). */
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]