From bfd21c20d60834ddc72f2f0cf4fd13c713078009 Mon Sep 17 00:00:00 2001
From: Bob Dubner <rdubner@symas.com>
Date: Tue, 21 Jan 2025 00:38:42 -0500
Subject: [PATCH] Remove local #include from scan_ante.h

---
 gcc/cobol/copybook.h  | 4 ++++
 gcc/cobol/scan.l      | 3 +++
 gcc/cobol/scan_ante.h | 4 ----
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/gcc/cobol/copybook.h b/gcc/cobol/copybook.h
index 22269ff5c466..a0eeef21a493 100644
--- a/gcc/cobol/copybook.h
+++ b/gcc/cobol/copybook.h
@@ -28,6 +28,9 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _COPYBOOK_H
+#define _COPYBOOK_H
+
 #include "util.h"
 
 FILE * copy_mode_start();
@@ -198,3 +201,4 @@ class copybook_t {
 
 extern copybook_t copybook;
 
+#endif
diff --git a/gcc/cobol/scan.l b/gcc/cobol/scan.l
index 104e15ad36ea..56f80de12eca 100644
--- a/gcc/cobol/scan.l
+++ b/gcc/cobol/scan.l
@@ -37,6 +37,9 @@
 #include "util.h"
 #include "cbldiag.h"
 #include "symbols.h"
+#include "parse.h"
+#include "cdf.h"
+#include "copybook.h"
 #include "scan_ante.h"
 #include "ec.h"
 #include "lexio.h"
diff --git a/gcc/cobol/scan_ante.h b/gcc/cobol/scan_ante.h
index 54ad47bba093..d35f18710a02 100644
--- a/gcc/cobol/scan_ante.h
+++ b/gcc/cobol/scan_ante.h
@@ -28,10 +28,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "parse.h"
-#include "cdf.h"
-#include "copybook.h"
-
 /*
  * Flex override
  */
-- 
GitLab