Set stdout to binary mode in -t msvc.

Fixes issue #575.
structs not classes.

For some reason that I do not, ninja prefers:

struct Foo {
  Foo();

 private:
  void Blah();
};

Rather than

class Foo {
 public:
  Foo();

 private:
  void Blah();
};

This catches the last two usages of "class" in the code base.

Signed-off-by: Thiago Farina <tfarina@chromium.org>
Merge pull request #577 from tfarina/structs

structs not classes.
Merge pull request #576 from nico/newlines

Set stdout to binary mode in -t msvc.
do not unconditionally use PATH_MAX with getcwd

Instead, grow a buffer until getcwd either succeeds or fails with an errno different than ERANGE
(meaning the passed buffer was too short to represent the actual path).
Reset errno before calling getcwd to check it eventually did not fail.
Fix typo in HACKING.md
Add error check for -j flag.
remind myself to update the website when I make a release
Browse tool uses real hostname not localhost, to allow -t browse when using ssh

Change-Id: Ic4be6527151a7ff68afab62e61951071ad5694b7
Added bootstrap/configure option to force pselect

All modern Linux kernels have ppoll() but sometimes
you might want to compile on something ancient.

This patch adds the possibility to force the use
of pselect() instead by passing --force-pselect
to bootstrap/configure.

The use of ppoll() is still default for Linux
and OpenBSD
Merge pull request #579 from rui314/master

Minor fixes
Merge pull request #583 from tru/add_force_pselect

Added bootstrap/configure option to force pselect
Merge pull request #578 from pinotree/remove-path-max

do not unconditionally use PATH_MAX with getcwd
Merge pull request #470 from rgeary1/remotebrowser

Ninja -t browse opens localhost in browser, which doesn't work when using ssh
Don't use va_start() with reference parameters, it's undefined behavior.

Should fix issue #584.
Merge pull request #585 from nico/fixcrash

Don't use va_start() with reference parameters, it's undefined behavior.
factor out flag parsing from enormous NinjaMain()
simplify some ifdefs
refactor ninja main() into a struct with methods

This removes the ugly Globals struct, and the ResetState() hack.
This also eliminates the only goto!
Fixed the build on Debian/kfreebsd