diff options
author | Eric Biederman <ebiederman@lnxi.com> | 2006-12-02 16:48:48 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2006-12-02 16:48:48 +0000 |
commit | 5718338edb0714e7eb737dd34e6a13e969cc4070 (patch) | |
tree | 7f9228276f7af4f677bcdc4046895a5d6cbd038d | |
parent | 2a44fbf2a014f48aceb3e601a391c7377d346caf (diff) |
fix romcc preprocessor bug
Signed-off-by: Eric Biederman <ebiederman@lnxi.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2515 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r-- | util/romcc/romcc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c index e72ce90c66..37c93e8ae7 100644 --- a/util/romcc/romcc.c +++ b/util/romcc/romcc.c @@ -3,8 +3,8 @@ #undef RELEASE_DATE #undef VERSION #define VERSION_MAJOR "0" -#define VERSION_MINOR "68" -#define RELEASE_DATE "15 November 2004" +#define VERSION_MINOR "69" +#define RELEASE_DATE "02 December 2006" #define VERSION VERSION_MAJOR "." VERSION_MINOR #include <stdarg.h> @@ -4028,10 +4028,15 @@ static void raw_next_token(struct compile_state *state, tok = TOK_SPACE; tokp = next_char(file, tokp, 1); while((c = get_char(file, tokp)) != -1) { - tokp = next_char(file, tokp, 1); + /* Advance to the next character only after we verify + * the current character is not a newline. + * EOL is special to the preprocessor so we don't + * want to loose any. + */ if (c == '\n') { break; } + tokp = next_char(file, tokp, 1); } } /* Comments */ |