From 8b40d36f8024802d5d99882bd58491130d260b38 Mon Sep 17 00:00:00 2001 From: MaartenBrock Date: Wed, 6 Dec 2006 12:30:34 +0000 Subject: [PATCH] * src/SDCCmain.c (linkEdit): fixed bug 1609279 * .version: bumped to 2.6.2 because a) it's been a while b) the linker sources have moved c) the preprocessor is upgraded git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4502 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- .version | 2 +- ChangeLog | 6 ++++++ src/SDCCmain.c | 21 ++++++++++++++------- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.version b/.version index 6a6a3d8e..097a15a2 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.6.1 +2.6.2 diff --git a/ChangeLog b/ChangeLog index 11c0a2fb..a43f5b3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-12-06 Maarten Brock + + * src/SDCCmain.c (linkEdit): fixed bug 1609279 + * .version: bumped to 2.6.2 because a) it's been a while + b) the linker sources have moved c) the preprocessor is upgraded + 2006-12-04 Frieder Ferlemann * support/regression/tests/snprintf.c: some checks diff --git a/src/SDCCmain.c b/src/SDCCmain.c index bda46576..ac938565 100644 --- a/src/SDCCmain.c +++ b/src/SDCCmain.c @@ -1532,14 +1532,14 @@ linkEdit (char **envp) /* data segment start. If zero, the linker chooses the best place for data */ - if(options.data_loc) + if (options.data_loc) { WRITE_SEG_LOC (DATA_NAME, options.data_loc); } /* xdata segment start. If zero, the linker chooses the best place for xdata */ - if(options.xdata_loc) + if (options.xdata_loc) { WRITE_SEG_LOC (XDATA_NAME, options.xdata_loc); } @@ -1832,6 +1832,13 @@ linkEdit (char **envp) /* if (options.verbose)fprintf(stderr, "linker command line: %s\n", buffer); */ system_ret = my_system (buffer); + +#ifdef _WIN32 + #define STRCMP stricmp +#else + #define STRCMP strcmp +#endif + /* TODO: most linker don't have a -o parameter */ /* -o option overrides default name? */ if (fullDstFileName) @@ -1860,7 +1867,7 @@ linkEdit (char **envp) strncatz (scratchFileName, options.out_fmt ? ".S19" : ".ihx", sizeof(scratchFileName)); - if (strcmp (fullDstFileName, scratchFileName)) + if (STRCMP (fullDstFileName, scratchFileName)) remove (fullDstFileName); rename (scratchFileName, fullDstFileName); @@ -1876,14 +1883,14 @@ linkEdit (char **envp) strncatz (scratchFileName, ".map", sizeof(scratchFileName)); *q = 0; strncatz(buffer, ".map", sizeof(buffer)); - if (strcmp (scratchFileName, buffer)) + if (STRCMP (scratchFileName, buffer)) remove (buffer); rename (scratchFileName, buffer); *p = 0; strncatz (scratchFileName, ".mem", sizeof(scratchFileName)); *q = 0; strncatz(buffer, ".mem", sizeof(buffer)); - if (strcmp (scratchFileName, buffer)) + if (STRCMP (scratchFileName, buffer)) remove (buffer); rename (scratchFileName, buffer); if (options.debug) @@ -1892,13 +1899,13 @@ linkEdit (char **envp) strncatz (scratchFileName, ".cdb", sizeof(scratchFileName)); *q = 0; strncatz(buffer, ".cdb", sizeof(buffer)); - if (strcmp (scratchFileName, buffer)) + if (STRCMP (scratchFileName, buffer)) remove (buffer); rename (scratchFileName, buffer); /* and the OMF file without extension: */ *p = 0; *q = 0; - if (strcmp (scratchFileName, buffer)) + if (STRCMP (scratchFileName, buffer)) remove (buffer); rename (scratchFileName, buffer); } -- 2.30.2