what you give them. Help stamp out software-hoarding!
-------------------------------------------------------------------------*/
+#ifdef _WIN32
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
#include <signal.h>
#include "common.h"
#include <ctype.h>
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;
}
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);
/* VR 030517 - gplink needs linker options to set the linker script,*/
buildCmdLine (buffer2, port->linker.cmd, dstFileName, scratchFileName, NULL, linkOptionsSet);
- buildCmdLine2 (buffer, buffer2, sizeof(buffer));
+ buildCmdLine2 (buffer, sizeof(buffer), buffer2);
}
else
{
- buildCmdLine2 (buffer, port->linker.mcmd, sizeof(buffer));
+ buildCmdLine2 (buffer, sizeof(buffer), port->linker.mcmd);
}
/* if (options.verbose)fprintf(stderr, "linker command line: %s\n", buffer); */
options.debug ? port->assembler.debug_opts : port->assembler.plain_opts,
asmOptionsSet);
} else {
- buildCmdLine2 (buffer, port->assembler.mcmd, sizeof(buffer));
+ buildCmdLine2 (buffer, sizeof(buffer), port->assembler.mcmd);
}
if (my_system (buffer)) {
if (options.verbose)
printf ("sdcc: Calling preprocessor...\n");
- buildCmdLine2 (buffer, _preCmd, sizeof(buffer));
+ buildCmdLine2 (buffer, sizeof(buffer), _preCmd);
if (preProcOnly) {
if (my_system (buffer)) {