martine/ninja — pull request #840 by sgraham (2014-10-30 22:37:21+00:00)
Title: CanonicalizePath handles \ on Windows

Have CanonicalizePath handle \ on Windows. It's slightly slower to do so, so compensate for that by improving ReadFile to not use text mode (which is a bit slower), and then fixing the lexer to accept \r (it was previously relying on reading files in text mode to remove '\r's).

Linux (\r didn't cause regression):

before:
real	0m0.675s
real	0m0.681s
real	0m0.698s
real	0m0.711s

after:
real	0m0.672s
real	0m0.680s
real	0m0.687s
real	0m0.706s

Windows (ReadFile compensates for \ regression)

before: 1254337us
before: 1254538us
before: 1222909us

after: 1228009us
after: 1226726us
after: 1219994us

Squashed version of https://github.com/sgraham/ninja/compare/canon-win

This fixes #794.