diff options
author | Tristan Gingold <gingold@adacore.com> | 2009-10-14 14:56:51 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2009-10-14 14:56:51 +0000 |
commit | f7486935615d4e60fd9f476cf2dcb673c137e70f (patch) | |
tree | c7a58fe91268bed0b0b596e93ee4bcae53f4e793 | |
parent | 3c1a10b6dd7c3f71ca91bd372e6c6ac4e039100e (diff) | |
download | gdb-f7486935615d4e60fd9f476cf2dcb673c137e70f.zip gdb-f7486935615d4e60fd9f476cf2dcb673c137e70f.tar.gz gdb-f7486935615d4e60fd9f476cf2dcb673c137e70f.tar.bz2 |
2009-10-14 Andreas Schwab <schwab@linux-m68k.org>
* ldlex.l (yy_input): Remove second argument and return the value
instead.
(YY_INPUT): Adjust.
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/ldlex.l | 17 |
2 files changed, 15 insertions, 8 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index fb611c4..31c0348 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2009-10-14 Andreas Schwab <schwab@linux-m68k.org> + + * ldlex.l (yy_input): Remove second argument and return the value + instead. + (YY_INPUT): Adjust. + 2009-10-14 Ryan Mansfield <rmansfield@qnx.com> * ldlang.c (load_symbols): Set whole_archive from entry when @@ -57,7 +57,7 @@ const char *lex_string = NULL; Otherwise, stack elements 0 through `include_stack_ptr - 1' are valid. */ #undef YY_INPUT -#define YY_INPUT(buf,result,max_size) yy_input (buf, &result, max_size) +#define YY_INPUT(buf,result,max_size) result = yy_input (buf, max_size) #define YY_NO_UNPUT @@ -68,7 +68,7 @@ static unsigned int lineno_stack[MAX_INCLUDE_DEPTH]; static unsigned int include_stack_ptr = 0; static int vers_node_nesting = 0; -static void yy_input (char *, int *, int); +static int yy_input (char *, int); static void comment (void); static void lex_warn_invalid (char *where, char *what); @@ -608,22 +608,23 @@ ldlex_popstate (void) } -/* Place up to MAX_SIZE characters in BUF and return in *RESULT +/* Place up to MAX_SIZE characters in BUF and return either the number of characters read, or 0 to indicate EOF. */ -static void -yy_input (char *buf, int *result, int max_size) +static int +yy_input (char *buf, int max_size) { - *result = 0; + int result = 0; if (YY_CURRENT_BUFFER->yy_input_file) { if (yyin) { - *result = fread (buf, 1, max_size, yyin); - if (*result < max_size && ferror (yyin)) + result = fread (buf, 1, max_size, yyin); + if (result < max_size && ferror (yyin)) einfo ("%F%P: read in flex scanner failed\n"); } } + return result; } /* Eat the rest of a C-style comment. */ |