Do we want to restrict this to filenames that are absolute paths?
Imagine the filename was codesourcery/bar/bar.h and the rewrite was
s/codesourcery/adacore/, do we want to attempt the rewrite then?
I suppose we should wait to see a real example of such a situation
before trying to support it...
Are such rules supported? I couldn't work out from the manual
what FROM and TO had to be.
Yes, the documentation is not completely clear on this. After re-reading
it, I think it seems to suggest that rewriting is done on the full path,
not partial path names. Thinking about supporting it or not, I couldn't
really come up with an answer. It seems that it could be surprising
either way - which is why waiting for real-case scenarios would probably
make sense here (and apply the patch as you and Doug suggested).