Hans Åberg wrote: > >> So, try this: > >> > >> cd /usr/share/bison > >> sudo patch < /path/to/extra-header-prefix.diff > >> cd /your/source/dir > >> rm -f stack.hh position.hh location.hh > >> make clean > >> make > > > > I wouldn't do that for two reasons: screwing up the installation, and > > security reasons - one should do the changes while not root, and copy them > > to the installation location. > > One can though do: > $ cp -R /usr/local/share/bison/ data > $ cd data > $ patch < ../patch-c++.txt > patching file stack.hh > Hunk #1 succeeded at 129 (offset -1 lines). > Hunk #2 succeeded at 145 (offset -1 lines). > patching file location.cc > Hunk #1 succeeded at 290 (offset -4 lines). > Hunk #2 succeeded at 309 (offset -4 lines). > patching file lalr1.cc > > Followed by (as root) > # cp c++17.m4 lalr1-c++17.cc stack-c++11.hh variant-c++17.hh > /usr/local/share/bison/
Don't forget to copy location.cc back to /usr/local/share/bison/. As I said, this file is the same between the old (C++03) and new (C++17) skeletons and therefore not included in my new skeleton. (You can also copy back stack.hh and lalr1.cc, if you want full support for extra_header_prefix with the old skeleton, but that's not required for the C++17 as those two files are overriden by "-c++1[17]" versions.) Regards, Frank