From e9fd37f7c5d51555f4b5e0db4e212e5c3ee815a3 Mon Sep 17 00:00:00 2001
From: Bob Dubner <rdubner@symas.com>
Date: Tue, 24 Dec 2024 10:14:06 -0500
Subject: [PATCH] Trimmed genmath.cc .h files

---
 gcc/cobol/ChangeLog  |  1 +
 gcc/cobol/genmath.cc | 26 +-------------------------
 libgcobol/valconv.cc | 15 ---------------
 3 files changed, 2 insertions(+), 40 deletions(-)

diff --git a/gcc/cobol/ChangeLog b/gcc/cobol/ChangeLog
index 443223969cf4..7264a7e0a51d 100644
--- a/gcc/cobol/ChangeLog
+++ b/gcc/cobol/ChangeLog
@@ -15,5 +15,6 @@
 	trimmed .h files in gcobolspec.cc
 	trimmed .h files in genapi.cc
 	trimmed .h files in gengen.cc
+	trimmed .h files in genmath.cc
 
 	* Eliminate vestigial unused code from the PERFORM-PROC-AS_CALL experiment
diff --git a/gcc/cobol/genmath.cc b/gcc/cobol/genmath.cc
index 0482ef4fcaf3..16c070aac96c 100644
--- a/gcc/cobol/genmath.cc
+++ b/gcc/cobol/genmath.cc
@@ -27,38 +27,14 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#include <err.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <vector>
-#include <string>
-#include <unordered_map>
-#include <unordered_set>
-#include <time.h>
-#include <math.h>
-
-#include "config.h"
-#include "system.h"
+#include "cobol-system.h"
 #include "coretypes.h"
-#include "target.h"
 #include "tree.h"
-#include "tree-iterator.h"
-#include "stringpool.h"
-#include "cgraph.h"
-#include "gimplify.h"
-#include "dfp.h"
-
 #define HOWEVER_GCC_DEFINES_TREE 1
-#include "symbols.h"
 #include "genutil.h"
-#include "genapi.h"
 #include "gengen.h"
 #include "structs.h"
 #include "libgcobol.h"
-#include "charmaps.h"
-#include "valconv.h"
 #include "show_parse.h"
 
 void
diff --git a/libgcobol/valconv.cc b/libgcobol/valconv.cc
index b32b1ed63c86..3981ef5cb017 100644
--- a/libgcobol/valconv.cc
+++ b/libgcobol/valconv.cc
@@ -68,21 +68,6 @@ char *__gg__ct_currency_signs[256];  // Compile-time currency signs
 
 std::unordered_map<size_t, alphabet_state> __gg__alphabet_states;
 
-//// DOUBLE was introduced to track down the libgcobol.a / -lgcobol problem
-//class DOUBLER
-// {
-// public:
-// DOUBLER()
-//   {
-//   fprintf(stderr, "DOUBLER()\n");
-//   }
-// ~DOUBLER()
-//   {
-//   fprintf(stderr, "~DOUBLER()\n");
-//   }
-// };
-//DOUBLER doubler;
-
 extern "C"
 void
 __gg__realloc_if_necessary(char **dest, size_t *dest_size, size_t new_size)
-- 
GitLab