﻿--- E:\pgsql\src\include\pg_config_os.h	Wed Jan 21 09:30:02 2009 UTC
+++ E:\pgsql\src\include\pg_config_os.h	Sat Apr 18 08:18:08 2009 UTC
@@ -297,7 +297,7 @@
 #define putenv(x) pgwin32_putenv(x)
 #define unsetenv(x) pgwin32_unsetenv(x)
 
-/* Things that exist in MingW headers, but need to be added to MSVC */
+/* Things that exist in MingW headers, but need to be added to MSVC & BCC*/
 #ifdef WIN32_ONLY_COMPILER
 typedef long ssize_t;
 #ifndef __BORLANDC__
@@ -335,4 +335,22 @@
 /* Pulled from Makefile.port in mingw */
 #define DLSUFFIX ".dll"
 
+#ifdef __BORLANDC__
+
+/* in /port/dirent.c */
+#if !defined (INVALID_FILE_ATTRIBUTES)
+#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
+#endif
+
+/* in /port/open.c */
+#ifndef O_RANDOM
+#define O_RANDOM                0x0010  // File access is primarily random
+#define O_SEQUENTIAL            0x0020  // File access is primarily sequential
+#define O_TEMPORARY             0x0040  // Temporary file bit
+#define O_SHORT_LIVED           0x1000  // Temporary storage file, try not to flush
+#define _O_SHORT_LIVED          O_SHORT_LIVED
+#endif
+
+#endif
+
 #endif
