From db8be27348eba1397fc9255bf5702205035de2c9 Mon Sep 17 00:00:00 2001 From: kvigor Date: Tue, 10 Oct 2000 04:25:36 +0000 Subject: [PATCH] Get Borland C++ build working yet again git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@453 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCglue.c | 4 ++++ src/SDCCicode.h | 2 +- src/SDCCmain.c | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/SDCCglue.c b/src/SDCCglue.c index a1ef56ae..477ad3b5 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -26,10 +26,14 @@ #include "asm.h" #include +#ifndef __BORLANDC__ // This is a bit messy because we define link ourself #define link NoLiNk #include #undef link +#else +// No unistd.h in Borland C++ +#endif symbol *interrupts[256]; diff --git a/src/SDCCicode.h b/src/SDCCicode.h index 3071d614..259cef8a 100644 --- a/src/SDCCicode.h +++ b/src/SDCCicode.h @@ -282,5 +282,5 @@ operand *newiTempFromOp( operand *); /* declaration of exported variables */ /*-----------------------------------------------------------------*/ extern char *filename; -int lineno; +extern int lineno; #endif diff --git a/src/SDCCmain.c b/src/SDCCmain.c index 819633f9..ffb05361 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -32,9 +32,15 @@ #endif // This is a bit messy because we define link ourself +#ifndef __BORLANDC__ #define link NoLiNk #include #undef link +#else +// No unistd.h in Borland C++ +extern int access(const char *, int); +#define X_OK 1 +#endif //REMOVE ME!!! extern int yyparse(); -- 2.30.2