Fix bash-completion support for -C option to expand tilde
Style: Fix inconsistent indentation
Merge pull request #747 from nocnokneo/master

Fix bash-completion support for -C option to expand tilde
Make manifest_parser_perftest build on Windows.
Merge pull request #750 from nico/perfwin

Make manifest_parser_perftest build on Windows.
Support completion of arguments to -f and -C options

Note: This is only available for bash_completion users.
Fix getopts barfing over the terminal when trying to complete -f and -C

Note that this is only applicable for when bash_completion is
unavailable.
Merge pull request #748 from nocnokneo/bash-completion-for-f-and-C

Support completion of arguments to -f and -C options
Accept \r\n line endings in depfiles.

Fixes #752.
Merge pull request #753 from nico/nlacc

Accept \r\n line endings in depfiles.
Use consistent indentation conventions
Get rid of unused import
Merge pull request #757 from cjdrake/master

Stylistic changes to ninja_syntax.py
Allow SIGTERM for interruption.

Default signal sent by many other programs (mainly kill(1)) to gently
terminates another one is SIGTERM.
Forward interruption signal to child processes.
Suspend sub-processes when control-z is hit.

When control-z is hit the shell sends SIGTSTP to the front process group.
Generally it suspends all the process tree started by the command. But ninja
moves its sub-process to their own group so that it can stop them all on
interruption. This is a great improvement compared to make(1). However in such
a case sub-processes are not automatically suspended by the shell when you
hit control-z. Only ninja is and the command it has started keep running.
This patch addresses this issue by catching SIGTSTP and forwarding it to its
sub-processes groups. Thus, the entire ninja's process tree is suspended as
expected.

Thanks to Peter Collingbourne <peter@pcc.me.uk> for his help.
Merge branch 'sigterm' into my

* sigterm:
  Forward interruption signal to child processes.
  Allow SIGTERM for interruption.
Merge branch 'sigtstp' into my

* sigtstp:
  Suspend sub-processes when control-z is hit.
Work around pselect()/ppoll() failing to deliver handler.

In some rare cases, specially when executing long sequence of short command,
ninja does not respond to signal because its handlers are not triggered. This
happens on my linux box version 3.13-1-amd64.

This patch introduce --unprotected-syscall configure option to enable
implementation of ppoll() and pselect() based on poll() and select().
This implementation is similar to what ppoll()/pselect() does but not in an
atomic way. So theoretically there is a race condition. However since we do
not test for the "interrupted_" flag between the calls to sigprocmask() and
select()/poll() there is no race condition in practice. Most of the time
the signal is delivered when leaving sigprocmask() or when poll()/select()
returns EINTR.

See discussions:
- https://groups.google.com/forum/#!topic/ninja-build/leEnr095PeA
- http://lkml.iu.edu//hypermail/linux/kernel/1109.1/00609.html