X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCmain.c;h=bda73ad70187bff57ee89ea517fdc64ac9792a1a;hb=856b88b89030bb496aaf9e21e39d98e5b48b9869;hp=9f86359a3dd89a8420a35758c1e0150d21aa9bb0;hpb=a81ec42f1883f172d4bbc3b8f367424e5ecec5ee;p=fw%2Fsdcc diff --git a/src/SDCCmain.c b/src/SDCCmain.c index 9f86359a..bda73ad7 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -22,6 +22,12 @@ what you give them. Help stamp out software-hoarding! -------------------------------------------------------------------------*/ +#ifdef _WIN32 +#include +#else +#include +#endif + #include #include "common.h" #include @@ -1271,7 +1277,8 @@ parseCmdLine (int argc, char **argv) werror (E_FILE_OPEN_ERR, scratchFileName); } MSVC_style(options.vc_err_style); - if(options.use_stdout) SetErrorOut(stdout); + if(options.use_stdout) dup2(STDOUT_FILENO, STDERR_FILENO); + return 0; } @@ -1342,6 +1349,12 @@ linkEdit (char **envp) if ( (options.stack_loc) && (options.stack_loc<0x100) ) { WRITE_SEG_LOC ("SSEG", options.stack_loc); } + + /* If the port has any special linker area declarations, get 'em */ + if (port->extraAreas.genExtraAreaLinkOptions) + { + port->extraAreas.genExtraAreaLinkOptions(lnkfile); + } /* add the extra linker options */ fputStrSet(lnkfile, linkOptionsSet);