In updating Bug#18000's patches to the current grep source, I couldn't build with just the first patch installed, so I squashed the first two patches into one. Also, I changed a few more 'int's into 'bool's and fixed a comment or two. The result is attached. Again, I'm not installing this yet, as we're expecting a new release soon.