This is mainly to fix a build-failure on openbsd 5.1 reported by Nelson Beebe, but I have also made changes to ensure grep and all its dependencies (i.e., gnulib) build with warnings enabled when using the development (built-from-git) GCC 7.