diff options
author | Nick Clifton <nickc@redhat.com> | 2011-10-11 15:56:29 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2011-10-11 15:56:29 +0000 |
commit | bfb6c1ab1ed502faa7c3764722a1f1661f6d44e8 (patch) | |
tree | 1d8de29dde516f5b030ce2a485fa33e458477bd5 /binutils/rcparse.y | |
parent | 941b2081b1fd085fff7d323448672cedf18258db (diff) | |
download | gdb-bfb6c1ab1ed502faa7c3764722a1f1661f6d44e8.zip gdb-bfb6c1ab1ed502faa7c3764722a1f1661f6d44e8.tar.gz gdb-bfb6c1ab1ed502faa7c3764722a1f1661f6d44e8.tar.bz2 |
PR binutils/13051
Fix a syntax error bug when compiling rc files with the VERSIONINFO resource
containing more than one language block inside a single StringFileInfo block.
* windint.h (rc_ver_stringtable): New structure definition.
(rc_ver_info): Use it.
* rcparse.y (verstringtable): New variable.
(verstringtables): New type.
(verstringtables:): New rule declaration.
(verblocks:): Use it.
* resrc.c (append_ver_stringtable): New function.
(append_ver_stringfileinfo): Update to use stringtables.
* windres.h (append_ver_stringfileinfo): Update declaration.
(append_ver_stringtable): New declaration.
* resrc.c (write_rc_versioninfo): Update to support multiple blocks.
* resbin.c (bin_to_res_version): Likewise.
(res_to_bin_versioninfo): Likewise.
* binutils-all\windres\version.rsd: Regenerate.
* binutils-all\windres\version_cat.rsd: Regenerate.
* binutils-all\windres\version_mlang.rc: Add new test.
* binutils-all\windres\version_mlang.rsd: Likewise.
Diffstat (limited to 'binutils/rcparse.y')
-rw-r--r-- | binutils/rcparse.y | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/binutils/rcparse.y b/binutils/rcparse.y index 8caa3ef..e260792 100644 --- a/binutils/rcparse.y +++ b/binutils/rcparse.y @@ -1,6 +1,6 @@ %{ /* rcparse.y -- parser for Windows rc files - Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2008 - Free Software Foundation, Inc. + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2008, + 2011 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. Extended by Kai Tietz, Onevision. @@ -79,6 +79,7 @@ static const rc_res_id res_null_text = { 1, {{0, &null_unichar}}}; rc_rcdata_item *rcdata_item; rc_fixed_versioninfo *fixver; rc_ver_info *verinfo; + rc_ver_stringtable *verstringtable; rc_ver_stringinfo *verstring; rc_ver_varinfo *vervar; rc_toolbar_item *toobar_item; @@ -150,6 +151,7 @@ static const rc_res_id res_null_text = { 1, {{0, &null_unichar}}}; %type <rcdata_item> opt_control_data %type <fixver> fixedverinfo %type <verinfo> verblocks +%type <verstringtable> verstringtables %type <verstring> vervals %type <vervar> vertrans %type <toobar_item> toolbar_data @@ -1471,9 +1473,9 @@ verblocks: { $$ = NULL; } - | verblocks BLOCKSTRINGFILEINFO BEG BLOCK BEG vervals END END + | verblocks BLOCKSTRINGFILEINFO BEG verstringtables END { - $$ = append_ver_stringfileinfo ($1, $4, $6); + $$ = append_ver_stringfileinfo ($1, $4); } | verblocks BLOCKVARFILEINFO BEG VALUE res_unicode_string_concat vertrans END { @@ -1481,6 +1483,17 @@ verblocks: } ; +verstringtables: + /* empty */ + { + $$ = NULL; + } + | verstringtables BLOCK BEG vervals END + { + $$ = append_ver_stringtable ($1, $2, $4); + } + ; + vervals: /* empty */ { |