Skip to content
Snippets Groups Projects
Commit 5f9b2859 authored by rswindell's avatar rswindell
Browse files

Changes necessary for bc++/Linux support.

parent 93ca37d2
No related branches found
No related tags found
No related merge requests found
......@@ -155,7 +155,7 @@ extern "C" {
#if defined(_MSC_VER) || defined(__MINGW32__)
#define CHMOD(s,m) _chmod(s,m)
#elif defined(__BORLANDC__)
#elif defined(__BORLANDC__) && !defined(__unix__)
#define CHMOD(p,a) _rtl_chmod(p,1,a) /* _chmod obsolete in 4.x */
#else
#define CHMOD(s,m) chmod(s,m)
......
......@@ -63,7 +63,7 @@ time_t DLLCALL filetime(int fd)
return(st.st_mtime);
}
#if defined(__unix__)
#if defined(__unix__) && !defined(__BORLANDC__)
/****************************************************************************/
/* Returns the length of the file in 'fd' */
......
......@@ -44,13 +44,16 @@
#include <unistd.h> /* read, write, close, ftruncate, lseek, etc. */
#endif
#if defined(_WIN32) || defined(__BORLANDC__)
#include <io.h>
#endif
/**********/
/* Macros */
/**********/
#if defined(_WIN32)
#include <io.h> /* _sopen */
#include <sys/stat.h> /* S_IREAD */
#include <fcntl.h> /* O_BINARY */
#include <windows.h> /* OF_SHARE_ */
......@@ -98,7 +101,7 @@ extern "C" {
DLLEXPORT int DLLCALL unlock(int fd, long pos, int len);
#endif
#if defined(__unix__)
#if !defined(__BORLANDC__) && defined(__unix__)
DLLEXPORT int DLLCALL sopen(char *fn, int access, int share);
DLLEXPORT long DLLCALL filelength(int fd);
#endif
......
......@@ -117,7 +117,7 @@ extern "C" {
DLLEXPORT char* DLLCALL strupr(char* str);
DLLEXPORT char* DLLCALL strlwr(char* str);
DLLEXPORT char* DLLCALL strrev(char* str);
#if !defined(__BORLANDC__) && !defined(stricmp)
#if !defined(stricmp)
#define stricmp(x,y) strcasecmp(x,y)
#define strnicmp(x,y,z) strncasecmp(x,y,z)
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment