diff --git a/src/bin/Makefile.global b/src/bin/Makefile.global
index dbbd8384dd3aab0dc39ff6785d05f6aa4ae9a729..6f4316bfb5e663c2e676c776f3c76a90827d3565 100644
--- a/src/bin/Makefile.global
+++ b/src/bin/Makefile.global
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/Attic/Makefile.global,v 1.11 1996/11/14 09:24:39 bryanh Exp $
+#    $Header: /cvsroot/pgsql/src/bin/Attic/Makefile.global,v 1.12 1996/11/26 07:37:54 bryanh Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -27,8 +27,7 @@ endif
 
 INCLUDE_OPT := \
                -I$(LIBPQDIR) \
-               -I$(SRCDIR)/include \
-               -I$(SRCDIR)/src/backend/port/$(PORTNAME)
+               -I$(SRCDIR)/include 
 
 CFLAGS += $(INCLUDE_OPT) 
 
diff --git a/src/bin/pg_dump/Makefile b/src/bin/pg_dump/Makefile
index 8faf2235c78dacb019a2b3c9fc2c5a2e1164bd25..7f70aabcadf70f0d90283a1fa870b393c45b087d 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.9 1996/11/26 03:19:36 bryanh Exp $
+#    $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.10 1996/11/26 07:38:16 bryanh Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -15,15 +15,20 @@ SRCDIR= ../..
 include ../Makefile.global
 include ../../Makefile.global
 
-CFLAGS+= -I../../backend/port/${PORTNAME}
-
 OBJS= pg_dump.o common.o
 
+ifeq ($(PORTNAME), ultrix4)
+OBJS+= ../../utils/strdup.o
+endif
+
 all: submake pg_dump
 
 pg_dump: $(OBJS) $(LIBPQDIR)/libpq.a
 	$(CC) $(LDFLAGS) -o pg_dump -L$(LIBPQDIR) $(OBJS) -lpq $(LD_ADD)
 
+../../utils/strdup.o:
+	$(MAKE) -C ../../utils/strdup.o
+
 .PHONY: submake
 submake:
 	$(MAKE) -C $(LIBPQDIR) libpq.a
diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c
index c5c750f0d7bcb3b5570f81de21ba3f5d43c543a3..47272f6f113ad04bc549fe162b99c3526c4ce783 100644
--- a/src/bin/pg_dump/common.c
+++ b/src/bin/pg_dump/common.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.8 1996/11/26 03:19:40 bryanh Exp $
+ *    $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.9 1996/11/26 07:38:18 bryanh Exp $
  *
  * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
  *
@@ -29,7 +29,9 @@
 
 #include "postgres.h"
 #include "libpq-fe.h"
-#include <port-protos.h> /* for strdup() */
+#ifdef NEED_STRDUP
+#include "strdup.h"
+#endif
 
 #include "pg_dump.h"
 
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 28eba5358099bbbdebd333681ef2338a8d576cbf..6f961dcb58202c167c438126f95045b52c481f7f 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -20,7 +20,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.17 1996/11/26 03:19:45 bryanh Exp $
+ *    $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.18 1996/11/26 07:38:19 bryanh Exp $
  *
  * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
  *
@@ -54,7 +54,9 @@
 #include "postgres.h"
 #include "access/htup.h"
 #include "libpq-fe.h"
-#include <port-protos.h> /* for strdup() */
+#ifdef NEED_STRDUP
+#include "strdup.h"
+#endif
 
 #include "pg_dump.h"
 
diff --git a/src/bin/psql/Makefile b/src/bin/psql/Makefile
index 30c3b229bc8bae82c57d9cd3e4eab79fb01006eb..d67aade69ba89a69b88d819124ba80894878584b 100644
--- a/src/bin/psql/Makefile
+++ b/src/bin/psql/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.14 1996/11/26 03:19:54 bryanh Exp $
+#    $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.15 1996/11/26 07:38:24 bryanh Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -16,8 +16,7 @@ include ../../Makefile.global
 
 INCLUDE_OPT:= \
                -I$(LIBPQDIR) \
-               -I../../include \
-               -I../../backend/port/$(PORTNAME)
+               -I../../include 
 
 CFLAGS+= $(INCLUDE_OPT)
 #
@@ -63,11 +62,18 @@ ifneq ($(USE_READLINE), true)
 OBJS+= rlstubs.o
 endif
 
+ifeq ($(PORTNAME), ultrix4)
+OBJS+= ../../utils/strdup.o
+endif
+
 all: submake psql
 
 psql: $(OBJS) $(LIBPQDIR)/libpq.a
 	$(CC) $(LDFLAGS) -o psql -L$(LIBPQDIR) $(OBJS) -lpq $(LD_ADD)
 
+../../utils/strdup.o:
+	$(MAKE) -C ../../utils strdup.o
+
 .PHONY: submake
 submake:
 	$(MAKE) -C $(LIBPQDIR) libpq.a
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c
index 8202d6db7b43546c24a23d6e5e712a77955eaa92..2902d66fdbcf16ab6e5fcee3d136ba48cee5049c 100644
--- a/src/bin/psql/psql.c
+++ b/src/bin/psql/psql.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.34 1996/11/26 03:19:58 bryanh Exp $
+ *    $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.35 1996/11/26 07:38:28 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -24,7 +24,9 @@
 #include "libpq-fe.h"
 #include "stringutils.h"
 #include "psqlHelp.h"
-#include <port-protos.h> /* for strdup() */
+#ifdef NEED_STRDUP
+#include "strdup.h"
+#endif
 
 #ifdef NOREADLINE
 #include "rlstubs.h"
diff --git a/src/bin/psql/stringutils.c b/src/bin/psql/stringutils.c
index 5d209ec859a4d9f504d86fb2c7e575286a03d956..6ea00dd50bab4a83d316d182cc85185f26bd9e63 100644
--- a/src/bin/psql/stringutils.c
+++ b/src/bin/psql/stringutils.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.6 1996/11/26 03:20:06 bryanh Exp $
+ *    $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.7 1996/11/26 07:38:36 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -16,7 +16,9 @@
 #include <ctype.h>
 #include <stdlib.h>
 
-#include <port-protos.h> /* for strdup() */
+#ifdef NEED_STRDUP
+#include "strdup.h"
+#endif
 
 #include "stringutils.h"
 
diff --git a/src/include/config.h b/src/include/config.h
index 1bf9c09ba6e072696e358eb31be711d2fad0236c..ba3e7a953afee85513cd828abd9911c82bfec33d 100644
--- a/src/include/config.h
+++ b/src/include/config.h
@@ -41,6 +41,7 @@
 #  define NEED_ISINF 
 #  define USE_POSIX_TIME
 #  define NEED_UNION_SEMUN 
+#  define NEED_STRDUP
 #endif
 
 #if defined(linux)
diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile
index 3095153de2971ced24a71cba3e29c5606ab0b579..d9bab3f3196c9b22f692bbca665540d673dcffad 100644
--- a/src/interfaces/libpq/Makefile
+++ b/src/interfaces/libpq/Makefile
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.20 1996/11/26 06:33:18 bryanh Exp $
+#    $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.21 1996/11/26 07:38:46 bryanh Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -15,7 +15,7 @@ SRCDIR= ..
 include ../Makefile.global
 
 # We need the backend directory here for its fmgr.h
-INCLUDE_OPT= -I../include -I../backend -I../backend/port/$(PORTNAME)
+INCLUDE_OPT= -I../include -I../backend
 
 CFLAGS+= $(INCLUDE_OPT) 
 
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 696065a3ff921998430a059427aad070b06dbf13..bccb8fe6f14c000abcdb43ad3967592140975c22 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.20 1996/11/26 03:20:35 bryanh Exp $
+ *    $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.21 1996/11/26 07:38:55 bryanh Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -30,7 +30,9 @@
 #include "fe-auth.h"
 #include "libpq-fe.h"
 
-#include <port-protos.h>  /* for strdup() */
+#ifdef NEED_STRDUP
+#include "strdup.h"
+#endif
 
 #if defined(ultrix4) || defined(next)
   /* ultrix is lame and doesn't have strdup in libc for some reason */
diff --git a/src/utils/Makefile b/src/utils/Makefile
index 4602c294f62f80282e1aeb7e91837973a4f5b909..16957f2b4b31992ec4db8eca29acd1487f0cf795 100644
--- a/src/utils/Makefile
+++ b/src/utils/Makefile
@@ -4,7 +4,14 @@
 #    Makefile for utils
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/utils/Attic/Makefile,v 1.2 1996/11/11 16:30:07 scrappy Exp $
+#    $Header: /cvsroot/pgsql/src/utils/Attic/Makefile,v 1.3 1996/11/26 07:39:11 bryanh Exp $
+#
+# About strdup:  Some systems have strdup in their standard library, others
+# don't.  Ones that don't will use this make file to compile the strdup.c
+# in this directory.  (You don't see strdup mentioned because the implicit
+# rule does the job).  We don't make strdup.o unless asked to explicitly
+# because the strdup.c in this directory may conflict with the strdup()
+# prototype from the system library and cause a compile error.
 #
 #-------------------------------------------------------------------------