Get Borland C++ build working yet again
authorkvigor <kvigor@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 10 Oct 2000 04:25:36 +0000 (04:25 +0000)
committerkvigor <kvigor@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 10 Oct 2000 04:25:36 +0000 (04:25 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@453 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCCglue.c
src/SDCCicode.h
src/SDCCmain.c

index a1ef56ae7b115330a1d99844403fe168861923af..477ad3b51ce3b2316a5d7ad13bbffc0fa3580435 100644 (file)
 #include "asm.h"
 #include <time.h>
 
+#ifndef __BORLANDC__
 // This is a bit messy because we define link ourself
 #define link NoLiNk
 #include <unistd.h>
 #undef link
+#else
+// No unistd.h in Borland C++
+#endif
 
 symbol *interrupts[256];
 
index 3071d614fe415c975a97584d46af32bacc12b0ca..259cef8a17c5dcc24f390936100dea7792879ae9 100644 (file)
@@ -282,5 +282,5 @@ operand *newiTempFromOp( operand *);
 /* declaration of exported variables                               */
 /*-----------------------------------------------------------------*/
 extern char *filename;
-int lineno;
+extern int lineno;
 #endif
index 819633f99482aee6c9046190aefd20ee836ef4e3..ffb05361ba28aef9b10a3943e9ee79eb5b153cf6 100644 (file)
 #endif
 
 // This is a bit messy because we define link ourself
+#ifndef __BORLANDC__
 #define link NoLiNk
 #include <unistd.h>
 #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();