> On 9 Apr 2018, at 20:36, Frank Heckenbach <f.heckenb...@fh-soft.de> wrote: > > 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.)
Rename, if possible, all these patched files to location-c++17.cc, stack-c++17.hh, etc, as they are not in the original distribution. Otherwise, it works now with using the patched location.cc and stack.hh.