From a16ffee73bcf017638849abd7be6f0269bc37964 Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Mon, 24 Apr 2006 04:03:25 +0000
Subject: [PATCH] Fixes for BCC 5.5 compile of libpq.  Backpatch to 8.1.X.

Mark Morgan Lloyd
---
 src/include/port.h             | 4 +---
 src/interfaces/libpq/bcc32.mak | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/include/port.h b/src/include/port.h
index 556471f6de..a17ad800f0 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -6,7 +6,7 @@
  * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/port.h,v 1.90 2006/03/05 15:58:53 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/port.h,v 1.91 2006/04/24 04:03:24 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -255,10 +255,8 @@ extern int	win32_open(const char *, int,...);
 #define		open(a,b,...)	win32_open(a,b,##__VA_ARGS__)
 #endif
 
-#ifndef __BORLANDC__
 #define popen(a,b) _popen(a,b)
 #define pclose(a) _pclose(a)
-#endif
 
 /* Missing rand functions */
 extern long lrand48(void);
diff --git a/src/interfaces/libpq/bcc32.mak b/src/interfaces/libpq/bcc32.mak
index f70f157395..2eee11460f 100644
--- a/src/interfaces/libpq/bcc32.mak
+++ b/src/interfaces/libpq/bcc32.mak
@@ -141,7 +141,7 @@ config: ..\..\include\pg_config.h pg_config_paths.h
 
 # Have to use \# so # isn't treated as a comment, but MSVC doesn't like this
 pg_config_paths.h: bcc32.mak
-	echo \#define SYSCONFDIR "" > pg_config_paths.h
+	echo \#define SYSCONFDIR \"\" > pg_config_paths.h
 
 "$(OUTDIR)" :
 	@if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"