diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c
index 7ed4c141b954f4d84134f6e8472aa107c8ae5bef..40fa9d956286d663cf4ade6accb62b58242ee919 100644
--- a/src/backend/executor/nodeHashjoin.c
+++ b/src/backend/executor/nodeHashjoin.c
@@ -7,12 +7,13 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.1.1.1 1996/07/09 06:21:26 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.2 1996/10/31 05:53:35 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
 #include <sys/file.h>
 
+#include "postgres.h"
 #include "storage/bufmgr.h"	/* for BLCKSZ */
 #include "storage/fd.h"		/* for SEEK_ */
 #include "executor/executor.h"
diff --git a/src/backend/include/miscadmin.h b/src/backend/include/miscadmin.h
index 6af60d7c3cbb10cdcf287a22c55d1ccbf4b0ab46..3b9721cd7e73167b7366389ec6f18656eed3215c 100644
--- a/src/backend/include/miscadmin.h
+++ b/src/backend/include/miscadmin.h
@@ -12,7 +12,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: miscadmin.h,v 1.5 1996/10/23 07:40:32 scrappy Exp $
+ * $Id: miscadmin.h,v 1.6 1996/10/31 05:53:43 momjian Exp $
  *
  * NOTES
  *    some of the information in this file will be moved to
@@ -27,6 +27,8 @@
  *    globals.h --                                                           *
  *****************************************************************************/
 
+#include "postgres.h"
+
 /* #include "storage/sinval.h" */
 
 /*
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 3497a77ade8899d6c39cb2685173dbaf2480caff..9e88609d9238943bb6ac1f2a04cc87afd0694707 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.3 1996/07/22 23:30:50 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.4 1996/10/31 05:53:52 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -38,6 +38,8 @@
 
 #include "storage/bufmgr.h"	/* for BLCKSZ */
 
+extern int NBuffers;
+
 static int compute_attribute_width(TargetEntry *tlistentry);
 static double base_log(double x, double b);
 
diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c
index 4eba3729ac8ac963b5d0acd78031c475689d7892..5a4fb73d2f86f1796384c5445a7e17fbb05abc55 100644
--- a/src/backend/storage/ipc/shmem.c
+++ b/src/backend/storage/ipc/shmem.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.1.1.1 1996/07/09 06:21:54 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.2 1996/10/31 05:54:42 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -59,6 +59,7 @@
  */
 #include <stdio.h>
 #include <string.h>
+#include <sys/ipc.h>
 #include "postgres.h"
 #include "storage/ipc.h"
 #include "storage/shmem.h"
diff --git a/src/backend/storage/ipc/sinval.c b/src/backend/storage/ipc/sinval.c
index 9151ee77686fd437ce73edd9624c20253f5c040d..a13210205554efae8974e9da2a865468ec0bb95e 100644
--- a/src/backend/storage/ipc/sinval.c
+++ b/src/backend/storage/ipc/sinval.c
@@ -7,12 +7,14 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.1.1.1 1996/07/09 06:21:54 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.2 1996/10/31 05:54:43 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
 /* #define INVALIDDEBUG	1 */
 
+#include <sys/ipc.h>
+
 #include "postgres.h"
 
 #include "storage/sinval.h"
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index b7fc5e262016785fc408058801522b185d5bd27d..d9228fe72b314f78075ff4c25479e5d74673d236 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.1.1.1 1996/07/09 06:22:06 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.2 1996/10/31 05:55:32 momjian Exp $
  *
  * NOTES
  *    Eventually, the index information should go through here, too.
@@ -31,6 +31,7 @@
 #include "access/heapam.h"
 
 #include "catalog/pg_amop.h"
+#include "catalog/pg_operator.h"
 #include "catalog/pg_type.h"
 
 /*    		---------- AMOP CACHES ----------			 */
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
index c82103fd3ebb980aa7b0c5b01245ee9816a6809f..e327c4f1ca7b44b3a13713c8de3044cdbf7491e7 100644
--- a/src/backend/utils/init/postinit.c
+++ b/src/backend/utils/init/postinit.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.2 1996/08/27 22:21:34 scrappy Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.3 1996/10/31 05:55:44 momjian Exp $
  *
  * NOTES
  *	InitPostgres() is the function called from PostgresMain
@@ -31,6 +31,7 @@
 #include <string.h>
 #include <sys/file.h>
 #include <sys/types.h>
+#include <sys/ipc.h>
 #include <math.h>
 
 #include "postgres.h"
diff --git a/src/bin/pg_dump/Makefile b/src/bin/pg_dump/Makefile
index 441c4137ee3d6d6bb82e258c2f3c45ddcea7462f..b4847d4274283fc3dafd63ce2dfea05235d72638 100644
--- a/src/bin/pg_dump/Makefile
+++ b/src/bin/pg_dump/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.5 1996/07/31 18:59:00 scrappy Exp $
+#    $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.6 1996/10/31 05:56:01 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -17,6 +17,8 @@ MKDIR=	../../mk
 include $(MKDIR)/postgres.mk
 include ../Makefile.global
 
+CFLAGS+= -I../../backend/port/$(PORTNAME)
+
 SRCS=	pg_dump.c common.c
 
 include $(MKDIR)/postgres.prog.mk
diff --git a/src/include/access/attnum.h b/src/include/access/attnum.h
index f695db18ea2751e7ab1c65edef201a9e555b62a1..e0c1c1f20372067a5b643f513fe2d91647199936 100644
--- a/src/include/access/attnum.h
+++ b/src/include/access/attnum.h
@@ -6,13 +6,15 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: attnum.h,v 1.2 1996/08/28 01:23:59 scrappy Exp $
+ * $Id: attnum.h,v 1.3 1996/10/31 05:56:34 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
 #ifndef	ATTNUM_H
 #define ATTNUM_H
 
+#include "postgres.h"
+
 /*
  * user defined attribute numbers start at 1.	-ay 2/95
  */
diff --git a/src/include/libpq/libpq.h b/src/include/libpq/libpq.h
index d49c644e5903fc32d4c53edc482dc8bdc5420d90..b8243019f70db8c0ab4844bd7921dcd0223326ac 100644
--- a/src/include/libpq/libpq.h
+++ b/src/include/libpq/libpq.h
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: libpq.h,v 1.3 1996/10/23 07:41:41 scrappy Exp $
+ * $Id: libpq.h,v 1.4 1996/10/31 05:56:42 momjian Exp $
  *
  * NOTES
  *    This file contains definitions for structures and
@@ -19,6 +19,7 @@
 #ifndef LIBPQ_H
 #define LIBPQ_H
 
+#include <sys/types.h>
 #include <netinet/in.h>
 
 #include "libpq/pqcomm.h"
diff --git a/src/include/regex/regex.h b/src/include/regex/regex.h
index fd5484f13fb96eca5470c45ed5db416419806567..8944cf1b062f982a108d1c2e2d80e6d70cd2e12c 100644
--- a/src/include/regex/regex.h
+++ b/src/include/regex/regex.h
@@ -40,6 +40,8 @@
 #ifndef _REGEX_H_
 #define	_REGEX_H_
 
+#include <assert.h>
+
 /* #include <sys/cdefs.h> */
 /* since not all systems have cdefs.h, we'll use our own here - jolly */
 #include "cdefs.h"
diff --git a/src/include/storage/ipc.h b/src/include/storage/ipc.h
index 9ee9ef5b9a3d07cc8d525a58cda3302390482396..e5baf1c2dbe08ba75327a2f3dffb08808fab4ad5 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.4 1996/10/19 06:27:12 scrappy Exp $
+ * $Id: ipc.h,v 1.5 1996/10/31 05:57:40 momjian Exp $
  *
  * NOTES
  *    This file is very architecture-specific.  This stuff should actually
@@ -23,6 +23,8 @@
 
 #include <sys/types.h>
 
+#include "postgres.h"
+
 /*
  * Many architectures have support for user-level spinlocks (i.e., an
  * atomic test-and-set instruction).  However, we have only written
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index 36dd928d39780fa2ce30ab4f7f2dda1084d298dc..2a73757a9518c9bacf6a03bb9a132451e12ccd65 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: proc.h,v 1.1 1996/08/28 01:58:24 scrappy Exp $
+ * $Id: proc.h,v 1.2 1996/10/31 05:57:45 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -16,6 +16,7 @@
 #include "storage/ipc.h"
 #include "storage/lock.h"
 #ifndef WIN32
+#include <sys/ipc.h>
 #include <sys/sem.h>
 #else
 /* This is because WIN32 already defines PROC */
diff --git a/src/include/utils/syscache.h b/src/include/utils/syscache.h
index 2bc34bc4e4eb49355bef875319510bc586f77a34..efd223cdeb7fcfacd81faf622b9efb274a2afc3a 100644
--- a/src/include/utils/syscache.h
+++ b/src/include/utils/syscache.h
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: syscache.h,v 1.2 1996/10/19 04:16:04 scrappy Exp $
+ * $Id: syscache.h,v 1.3 1996/10/31 05:58:01 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -14,6 +14,7 @@
 #define SYSCACHE_H
 
 #include "access/attnum.h"
+#include "access/htup.h"
 
 /*#define CACHEDEBUG*/ 	/* turns DEBUG elogs on */