From 0eac5b0ed5f57f1567ade5685701f9f0b2d7c7dd Mon Sep 17 00:00:00 2001
From: "Marc G. Fournier" <scrappy@hub.org>
Date: Sat, 19 Oct 1996 06:27:33 +0000
Subject: [PATCH] Welp, another subdirectory cleaned out of redundant/unused
 #include files

---
 src/backend/access/gist/gist.c      | 25 ++++++++-----------------
 src/backend/access/gist/gistget.c   | 18 ++++++------------
 src/backend/access/gist/gistscan.c  | 12 +++---------
 src/backend/access/gist/giststrat.c |  9 +++------
 src/include/access/gist.h           |  5 +----
 src/include/access/relscan.h        | 11 +++--------
 src/include/executor/hashjoin.h     |  3 +--
 src/include/nodes/execnodes.h       | 20 ++++----------------
 src/include/nodes/memnodes.h        |  5 +----
 src/include/storage/bufmgr.h        |  9 ++-------
 src/include/storage/ipc.h           |  9 ++-------
 11 files changed, 34 insertions(+), 92 deletions(-)

diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index 90817742ecc..4e103de8694 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -10,30 +10,21 @@
  *
  *-------------------------------------------------------------------------
  */
-#include "postgres.h"
 
-#include "storage/bufmgr.h"
-#include "storage/bufpage.h"
+#include "postgres.h"
 
-#include "utils/elog.h"
-#include "utils/palloc.h"
 #include "utils/rel.h"
-#include "utils/excid.h"
-
-#include "access/heapam.h"
-#include "access/genam.h"
+#include "access/itup.h"
 #include "access/gist.h"
-#include "access/gistscan.h"
 #include "access/funcindex.h"
-#include "access/tupdesc.h"
-
-#include "nodes/execnodes.h"
-#include "nodes/plannodes.h"
-
-#include "executor/executor.h"
+#include "access/htup.h"
 #include "executor/tuptable.h"
+#include "access/relscan.h"
+#include "nodes/execnodes.h"
+#include "storage/bufmgr.h"
+#include "catalog/pg_index.h"
+#include "utils/syscache.h"
 
-#include "catalog/index.h"
 
 /* non-export function prototypes */
 static InsertIndexResult gistdoinsert(Relation r, IndexTuple itup,
diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c
index d60b0a1194e..290638eea13 100644
--- a/src/backend/access/gist/gistget.c
+++ b/src/backend/access/gist/gistget.c
@@ -10,22 +10,16 @@
  *
  *-------------------------------------------------------------------------
  */
-#include "postgres.h"
 
-#include "storage/bufmgr.h"
-#include "storage/bufpage.h"
+#include "postgres.h"
 
-#include "utils/elog.h"
-#include "utils/palloc.h"
 #include "utils/rel.h"
-
-#include "access/heapam.h"
-#include "access/genam.h"
-#include "access/iqual.h"
-#include "access/gist.h"
+#include "access/htup.h"
+#include "access/relscan.h"
+#include "storage/bufpage.h"
 #include "access/sdir.h"
-
-#include "executor/execdebug.h"
+#include "access/itup.h"
+#include "access/gist.h"
 
 static OffsetNumber gistfindnext(IndexScanDesc s, Page p, OffsetNumber n, 
 				 ScanDirection dir);
diff --git a/src/backend/access/gist/gistscan.c b/src/backend/access/gist/gistscan.c
index fd9f8e1a5fc..2889369bd4e 100644
--- a/src/backend/access/gist/gistscan.c
+++ b/src/backend/access/gist/gistscan.c
@@ -9,19 +9,13 @@
  *
  *-------------------------------------------------------------------------
  */
-#include "postgres.h"
 
-#include "storage/bufmgr.h"
-#include "storage/bufpage.h"
+#include "postgres.h"
 
-#include "utils/elog.h"
-#include "utils/palloc.h"
 #include "utils/rel.h"
-
-#include "access/heapam.h"
-#include "access/genam.h"
+#include "access/htup.h"
+#include "access/relscan.h"
 #include "access/gist.h"
-#include "access/giststrat.h"
 
 /* routines defined and used here */
 static void gistregscan(IndexScanDesc s);
diff --git a/src/backend/access/gist/giststrat.c b/src/backend/access/gist/giststrat.c
index 1dea1946d9b..440fdc2ef19 100644
--- a/src/backend/access/gist/giststrat.c
+++ b/src/backend/access/gist/giststrat.c
@@ -11,14 +11,11 @@
  *
  *-------------------------------------------------------------------------
  */
-#include "c.h"
 
+#include "postgres.h"
 #include "utils/rel.h"
-
-#include "storage/bufmgr.h"
-#include "storage/bufpage.h"
-
-#include "access/istrat.h"
+#include "storage/off.h"
+#include "storage/block.h"
 #include "access/gist.h"
 
 /*
diff --git a/src/include/access/gist.h b/src/include/access/gist.h
index e2d59c2f9fb..e77918a21aa 100644
--- a/src/include/access/gist.h
+++ b/src/include/access/gist.h
@@ -12,11 +12,8 @@
 #ifndef GIST_H
 #define GIST_H
 
-#include "utils/rel.h"
-#include "storage/off.h"
-#include "storage/block.h"
 #include "storage/bufpage.h"
-#include "access/skey.h"
+
 
 /* 
 ** You can have as many strategies as you please in GiSTs, as
diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h
index 561fc3298bd..43ee60acbc1 100644
--- a/src/include/access/relscan.h
+++ b/src/include/access/relscan.h
@@ -6,22 +6,17 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: relscan.h,v 1.1 1996/08/27 21:50:20 scrappy Exp $
+ * $Id: relscan.h,v 1.2 1996/10/19 06:27:08 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
 #ifndef	RELSCAN_H
 #define RELSCAN_H
 
-#include "c.h"
-
-#include "access/skey.h"
+#include "utils/tqual.h"
 #include "storage/buf.h"
-#include "access/htup.h"
-#include "storage/itemptr.h"
 
-#include "utils/tqual.h"
-#include "utils/rel.h"
+
 
 
 typedef ItemPointerData	MarkData;
diff --git a/src/include/executor/hashjoin.h b/src/include/executor/hashjoin.h
index 4e3dcc81c0a..42096fda8e2 100644
--- a/src/include/executor/hashjoin.h
+++ b/src/include/executor/hashjoin.h
@@ -6,14 +6,13 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: hashjoin.h,v 1.1 1996/08/28 07:22:13 scrappy Exp $
+ * $Id: hashjoin.h,v 1.2 1996/10/19 06:27:33 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
 #ifndef	HASHJOIN_H
 #define HASHJOIN_H
 
-#include "access/htup.h"
 #include "storage/ipc.h"
 
 /* -----------------
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 60ee4b4a9fc..db6c1a792e8 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -6,30 +6,18 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: execnodes.h,v 1.1 1996/08/28 01:57:30 scrappy Exp $
+ * $Id: execnodes.h,v 1.2 1996/10/19 06:27:25 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
 #ifndef EXECNODES_H
 #define EXECNODES_H
 
-#include "postgres.h"
-
-#include "nodes/nodes.h"
-#include "nodes/primnodes.h"
-#include "nodes/pg_list.h"
-
-#include "nodes/memnodes.h"
-
-#include "storage/item.h"
+#include "nodes/params.h"
 #include "access/sdir.h"
-#include "access/htup.h"
-#include "access/tupdesc.h"
-#include "access/funcindex.h"
-#include "utils/rel.h"
-#include "access/relscan.h"
 #include "executor/hashjoin.h"
-#include "executor/tuptable.h"
+#include "nodes/primnodes.h"
+#include "nodes/memnodes.h"
 
 /* ----------------
  *    IndexInfo information
diff --git a/src/include/nodes/memnodes.h b/src/include/nodes/memnodes.h
index 2fe3b85d6ae..d508e9ef455 100644
--- a/src/include/nodes/memnodes.h
+++ b/src/include/nodes/memnodes.h
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: memnodes.h,v 1.1 1996/08/28 01:57:34 scrappy Exp $
+ * $Id: memnodes.h,v 1.2 1996/10/19 06:27:27 scrappy Exp $
  *
  * XXX the typedefs in this file are different from the other ???nodes.h;
  *    they are pointers to structures instead of the structures themselves.
@@ -18,12 +18,9 @@
 #ifndef	MEMNODES_H
 #define MEMNODES_H
 
-#include "c.h"
-
 #include "utils/memutils.h"
 #include "lib/fstack.h"
 
-#include "nodes/nodes.h"
 
 /*
  * MemoryContext --
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h
index 274f59d9862..8350076ad62 100644
--- a/src/include/storage/bufmgr.h
+++ b/src/include/storage/bufmgr.h
@@ -6,19 +6,14 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: bufmgr.h,v 1.1 1996/08/28 01:58:01 scrappy Exp $
+ * $Id: bufmgr.h,v 1.2 1996/10/19 06:27:14 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
 #ifndef	BUFMGR_H
 #define BUFMGR_H
 
-#include "c.h"
-
-#include "machine.h"		/* for BLCKSZ */
-#include "utils/rel.h"
-
-#include "storage/buf_internals.h"	/* UGLY! -- ay */
+#include <stdio.h>
 
 /*
  * the maximum size of a disk block for any possible installation.
diff --git a/src/include/storage/ipc.h b/src/include/storage/ipc.h
index 9d0ec8fd8eb..9ee9ef5b9a3 100644
--- a/src/include/storage/ipc.h
+++ b/src/include/storage/ipc.h
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: ipc.h,v 1.3 1996/10/11 03:56:27 scrappy Exp $
+ * $Id: ipc.h,v 1.4 1996/10/19 06:27:12 scrappy Exp $
  *
  * NOTES
  *    This file is very architecture-specific.  This stuff should actually
@@ -17,13 +17,11 @@
 #ifndef	IPC_H
 #define IPC_H
 
-#include <sys/types.h>
 #ifndef	_IPC_
 #define _IPC_
-#include <sys/ipc.h>
 #endif
 
-#include "c.h"
+#include <sys/types.h>
 
 /*
  * Many architectures have support for user-level spinlocks (i.e., an
@@ -63,7 +61,6 @@ typedef unsigned int	slock_t;
 #else /* aix */
 
 #if defined(PORTNAME_alpha)
-#include <sys/mman.h>
 typedef msemaphore	slock_t;
 #else /* alpha */
 
@@ -76,7 +73,6 @@ typedef struct { int sem[4]; } slock_t;
 #else /* hpux */
 
 #if defined(PORTNAME_irix5)
-#include <abi_mutex.h>
 typedef abilock_t	slock_t;
 #else /* irix5 */
 
@@ -86,7 +82,6 @@ typedef abilock_t	slock_t;
  * spinlocks.
  */
 #undef NEVER	/* definition in cthreads.h conflicts with parse.h */
-#include <mach/cthreads.h>
 typedef struct mutex	slock_t;
 #else /* next */
 
-- 
GitLab