X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCglue.c;h=686b67bea984544f07544f47a5efa2dbc0f57873;hb=460955131ad20d79c93ca045a52280eaa0d7d476;hp=1adc235fa1d554e26505b000f9ae0870c0a9c4bf;hpb=aad59be96bf1d1211c8868e73da0245d3916ca49;p=fw%2Fsdcc diff --git a/src/SDCCglue.c b/src/SDCCglue.c index 1adc235f..686b67be 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -26,20 +26,26 @@ #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]; -/*extern char *aopLiteral (value *, int);*//* drdani Jan 30 2000 */ + void printIval (symbol *, link *, initList *, FILE *); -extern int noAlloc; set *publics = NULL; /* public variables */ set *externs = NULL; /* Varibles that are declared as extern */ /* TODO: this should be configurable (DS803C90 uses more than 6) */ int maxInterrupts = 6; int allocInfo = 1; -extern int maxRegBank ; symbol *mainf; extern char *VersionString; -extern FILE *codeOutFile; set *tmpfileSet = NULL; /* set of tmp file created by the compiler */ set *tmpfileNameSet = NULL; /* All are unlinked at close. */ @@ -225,7 +231,7 @@ static void emitRegularMap (memmap * map, bool addPublics, bool arFlag) tfprintf(map->oFile, "\t!ds\n", (unsigned int)getSize (sym->type) & 0xffff); } - /* if it has a initial value then do it only if + /* if it has an initial value then do it only if it is a global variable */ if (sym->ival && sym->level == 0) { ast *ival = NULL; @@ -233,7 +239,7 @@ static void emitRegularMap (memmap * map, bool addPublics, bool arFlag) if (IS_AGGREGATE (sym->type)) ival = initAggregates (sym, sym->ival, NULL); else - ival = newNode ('=', newAst (EX_VALUE, symbolVal (sym)), + ival = newNode ('=', newAst_VALUE(symbolVal (sym)), decorateType (resolveSymbols (list2expr (sym->ival)))); codeOutFile = statsg->oFile; allocInfo = 0;