From 1e6db87600573d423bf54f95c50dbaf40fb100cc Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Wed, 1 Jan 2020 23:36:51 +0100 Subject: [PATCH 1/3] bison 3.5 compatibility (see #101) --- Rez/Test/UnitTests.cc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Rez/Test/UnitTests.cc b/Rez/Test/UnitTests.cc index 689c8728a4..b6486c9688 100644 --- a/Rez/Test/UnitTests.cc +++ b/Rez/Test/UnitTests.cc @@ -12,17 +12,22 @@ BOOST_AUTO_TEST_SUITE(LexSuite) +int tokenToType(RezParser::token::yytokentype tok) +{ + return RezParser::by_type(tok).type_get(); +} + #define CHECKSYM(TOKEN, TYPE, VAL) \ do { \ RezSymbol t = lex.nextToken(); \ - BOOST_CHECK_EQUAL(t.token(), TOKEN); \ - if(t.token() == TOKEN) \ + BOOST_CHECK_EQUAL(t.type_get(), tokenToType(TOKEN)); \ + if(t.type_get() == tokenToType(TOKEN)) \ BOOST_CHECK_EQUAL(t.value.as(), VAL); \ } while(0) #define CHECKSYM_(TOKEN) \ do { \ RezSymbol t = lex.nextToken(); \ - BOOST_CHECK_EQUAL(t.token(), TOKEN); \ + BOOST_CHECK_EQUAL(t.type_get(), tokenToType(TOKEN)); \ } while(0) BOOST_AUTO_TEST_CASE(moveBisonSymbol) @@ -55,7 +60,7 @@ BOOST_AUTO_TEST_CASE(basicInt) CHECKSYM(RezParser::token::INTLIT, int, 123); CHECKSYM(RezParser::token::INTLIT, int, 0x456); CHECKSYM(RezParser::token::INTLIT, int, 0xabcd9); - CHECKSYM_(0); + CHECKSYM_((RezParser::token::yytokentype)0); } BOOST_AUTO_TEST_CASE(alternateHex) @@ -65,7 +70,7 @@ BOOST_AUTO_TEST_CASE(alternateHex) CHECKSYM(RezParser::token::INTLIT, int, 0x456); CHECKSYM(RezParser::token::INTLIT, int, 0xabcd9); - CHECKSYM_(0); + CHECKSYM_((RezParser::token::yytokentype)0); } BOOST_AUTO_TEST_CASE(noNewlineAtEOF) @@ -74,7 +79,7 @@ BOOST_AUTO_TEST_CASE(noNewlineAtEOF) RezLexer lex(world, "test", "123 456"); CHECKSYM(RezParser::token::INTLIT, int, 123); CHECKSYM(RezParser::token::INTLIT, int, 456); - CHECKSYM_(0); + CHECKSYM_((RezParser::token::yytokentype)0); } BOOST_AUTO_TEST_CASE(strings) @@ -94,7 +99,7 @@ BOOST_AUTO_TEST_CASE(strings) CHECKSYM(RezParser::token::STRINGLIT, std::string, "\001\002\003"); CHECKSYM(RezParser::token::STRINGLIT, std::string, "\x42\x43"); CHECKSYM(RezParser::token::STRINGLIT, std::string, "Blah \x5F"); - CHECKSYM_(0); + CHECKSYM_((RezParser::token::yytokentype)0); } BOOST_AUTO_TEST_SUITE_END() From 13470b7a75a70ecfaaaa27de8c7e5ef43c5b541e Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Sun, 12 Jan 2020 18:22:16 +0100 Subject: [PATCH 2/3] fix compile options for Console --- Console/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Console/CMakeLists.txt b/Console/CMakeLists.txt index 8121b652f7..b84a6cf097 100644 --- a/Console/CMakeLists.txt +++ b/Console/CMakeLists.txt @@ -23,7 +23,7 @@ add_library(RetroConsole retro/MacUtils.h retro/InitConsole.cc ) -set_target_properties(retrocrt +set_target_properties(RetroConsole PROPERTIES COMPILE_OPTIONS -ffunction-sections) From 83916118599fad14a8c5aba2131bc21e2528af15 Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Sun, 12 Jan 2020 18:22:39 +0100 Subject: [PATCH 3/3] add Runtime Library Exception to Console library license --- Console/CMakeLists.txt | 4 ++++ Console/retro/Console.cc | 4 ++++ Console/retro/Console.h | 4 ++++ Console/retro/ConsoleWindow.cc | 4 ++++ Console/retro/ConsoleWindow.h | 4 ++++ Console/retro/InitConsole.cc | 4 ++++ Console/retro/MacUtils.h | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/Console/CMakeLists.txt b/Console/CMakeLists.txt index b84a6cf097..e09a5838f6 100644 --- a/Console/CMakeLists.txt +++ b/Console/CMakeLists.txt @@ -12,6 +12,10 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # +# Under Section 7 of GPL version 3, you are granted additional +# permissions described in the GCC Runtime Library Exception, version +# 3.1, as published by the Free Software Foundation. +# # You should have received a copy of the GNU General Public License # along with Retro68. If not, see . diff --git a/Console/retro/Console.cc b/Console/retro/Console.cc index bc10bf582b..41db6cd57e 100644 --- a/Console/retro/Console.cc +++ b/Console/retro/Console.cc @@ -13,6 +13,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + You should have received a copy of the GNU General Public License along with Retro68. If not, see . */ diff --git a/Console/retro/Console.h b/Console/retro/Console.h index d94417c21b..6d626125a0 100644 --- a/Console/retro/Console.h +++ b/Console/retro/Console.h @@ -13,6 +13,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + You should have received a copy of the GNU General Public License along with Retro68. If not, see . */ diff --git a/Console/retro/ConsoleWindow.cc b/Console/retro/ConsoleWindow.cc index 1f4092d313..89fe514e25 100644 --- a/Console/retro/ConsoleWindow.cc +++ b/Console/retro/ConsoleWindow.cc @@ -13,6 +13,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + You should have received a copy of the GNU General Public License along with Retro68. If not, see . */ diff --git a/Console/retro/ConsoleWindow.h b/Console/retro/ConsoleWindow.h index 6d491f7b04..e0737ff0ff 100644 --- a/Console/retro/ConsoleWindow.h +++ b/Console/retro/ConsoleWindow.h @@ -13,6 +13,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + You should have received a copy of the GNU General Public License along with Retro68. If not, see . */ diff --git a/Console/retro/InitConsole.cc b/Console/retro/InitConsole.cc index b67d084f64..b50b8e30de 100644 --- a/Console/retro/InitConsole.cc +++ b/Console/retro/InitConsole.cc @@ -13,6 +13,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + You should have received a copy of the GNU General Public License along with Retro68. If not, see . */ diff --git a/Console/retro/MacUtils.h b/Console/retro/MacUtils.h index 4bff8f907c..7b4aaa0773 100644 --- a/Console/retro/MacUtils.h +++ b/Console/retro/MacUtils.h @@ -13,6 +13,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + You should have received a copy of the GNU General Public License along with Retro68. If not, see . */