#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__
/* Pulled from Makefile.port in mingw */
#define DLSUFFIX ".dll"
+#ifdef __BORLANDC__
+
+/* for port/dirent.c */
+#ifndef INVALID_FILE_ATTRIBUTES
+#define INVALID_FILE_ATTRIBUTES ((DWORD) -1)
+#endif
+
+/* for 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 /* ifndef O_RANDOM */
+
+#endif /* __BORLANDC__ */
+
#endif
USERDEFINES=FRONTEND;NDEBUG;WIN32;_WINDOWS
CPP=bcc32.exe
-CPP_PROJ = -I$(BCB)\include;..\..\include;..\..\include\port\win32;..\..\include\port\win32_msvc;..\..\port -n"$(INTDIR)" -WD -c -D$(USERDEFINES) -tWM \
+CPP_PROJ = -I..\..\include\port\win32_msvc;$(BCB)\include;..\..\include;..\..\include\port\win32;..\..\port -n"$(INTDIR)" -WD -c -D$(USERDEFINES) -tWM \
-a8 -X -w-use -w-par -w-pia -w-csu -w-aus -w-ccc
!IFDEF DEBUG