2013.10.19, Version 0.10.18 (Stable)

Changes since version 0.10.17:

* unix: fix uv_spawn() NULL pointer deref on ENOMEM (Ben Noordhuis)

* unix: don't close inherited fds on uv_spawn() fail (Ben Noordhuis)

* unix: revert recent FSEvent changes (Ben Noordhuis)

* unix: fix non-synchronized access in signal.c (Ben Noordhuis)
Now working on v0.10.19
fsevents: increase stack size for OSX 10.9

Otherwise it fails with `EXC_BAD_ACCESS`.
windows: _snprintf expected wrong parameter type in string
windows: "else" keyword is missing
windows: incorrect check for SOCKET_ERROR
windows: add stdlib.h to satisfy reference to abort
build: fix check target for mingw
test: remove replacement snprintf for mingw

Mingw has a proper definition of snprintf.
unix: move uv_shutdown() assertion

Allows uv_shutdown() to return an error as intended if the stream has
already been closed.

Fixes #972, refs JuliaLang/julia#4229.
darwin: avoid calling GetCurrentProcess

Use some black-magic from Apple to change process name without getting
a "Not responding" tag from Activity Manager.

fix #966
Merge branch 'v0.10'

Conflicts:
	src/unix/darwin-proctitle.c
	src/version.c
2013.10.30, Version 0.11.14 (Unstable)

Changes since version 0.11.13:

* darwin: create fsevents thread on demand (Ben Noordhuis)

* fsevents: FSEvents is most likely not thread-safe (Fedor Indutny)

* fsevents: use shared FSEventStream (Fedor Indutny)

* windows: make uv_fs_chmod() report errors correctly (Bert Belder)

* windows: make uv_shutdown() for write-only pipes work (Bert Belder)

* windows/fs: wrap multi-statement macros in do..while block (Bert
  Belder)

* windows/fs: make uv_fs_open() report EINVAL correctly (Bert Belder)

* windows/fs: handle _open_osfhandle() failure correctly (Bert Belder)

* windows/fs: wrap multi-statement macros in do..while block (Bert
  Belder)

* windows/fs: make uv_fs_open() report EINVAL correctly (Bert Belder)

* windows/fs: handle _open_osfhandle() failure correctly (Bert Belder)

* build: clarify instructions for Windows (Brian Kaisner)

* build: remove GCC_WARN_ABOUT_MISSING_NEWLINE (Ben Noordhuis)

* darwin: fix 10.6 build error in fsevents.c (Ben Noordhuis)

* windows: run close callbacks after polling for i/o (Saúl Ibarra
  Corretgé)

* include: clarify uv_tcp_bind() behavior (Ben Noordhuis)

* include: clean up includes in uv.h (Ben Noordhuis)

* include: remove UV_IO_PRIVATE_FIELDS macro (Ben Noordhuis)

* include: fix typo in comment in uv.h (Ben Noordhuis)

* include: update uv_is_active() documentation (Ben Noordhuis)

* include: make uv_process_options_t.cwd const (Ben Noordhuis)

* unix: wrap long lines at 80 columns (Ben Noordhuis)

* unix, windows: make uv_is_*() always return 0 or 1 (Ben Noordhuis)

* bench: measure total/init/dispatch/cleanup times (Ben Noordhuis)

* build: use -pthread on sunos (Timothy J. Fontaine)

* windows: remove duplicate check in stream.c (Ben Noordhuis)

* unix: sanity-check fds before closing (Ben Noordhuis)

* unix: remove uv__pipe_accept() (Ben Noordhuis)

* unix: fix uv_spawn() NULL pointer deref on ENOMEM (Ben Noordhuis)

* unix: don't close inherited fds on uv_spawn() fail (Ben Noordhuis)

* unix: revert recent FSEvent changes (Ben Noordhuis)

* fsevents: fix clever rescheduling (Fedor Indutny)

* linux: ignore fractional time in uv_uptime() (Ben Noordhuis)

* unix: fix SIGCHLD waitpid() race in process.c (Ben Noordhuis)

* unix, windows: add uv_fs_event_start/stop functions (Saúl Ibarra
  Corretgé)

* unix: fix non-synchronized access in signal.c (Ben Noordhuis)

* unix: add atomic-ops.h (Ben Noordhuis)

* unix: add spinlock.h (Ben Noordhuis)

* unix: clean up uv_tty_set_mode() a little (Ben Noordhuis)

* unix: make uv_tty_reset_mode() async signal-safe (Ben Noordhuis)

* include: add E2BIG status code mapping (Ben Noordhuis)

* windows: fix duplicate case build error (Ben Noordhuis)

* windows: remove unneeded check (Saúl Ibarra Corretgé)

* include: document pipe path truncation behavior (Ben Noordhuis)

* fsevents: increase stack size for OSX 10.9 (Fedor Indutny)

* windows: _snprintf expected wrong parameter type in string (Maks
  Naumov)

* windows: "else" keyword is missing (Maks Naumov)

* windows: incorrect check for SOCKET_ERROR (Maks Naumov)

* windows: add stdlib.h to satisfy reference to abort (Sean Farrell)

* build: fix check target for mingw (Sean Farrell)

* unix: move uv_shutdown() assertion (Keno Fischer)

* darwin: avoid calling GetCurrentProcess (Fedor Indutny)
Now working on v0.11.15
fsevents: report errors to user
include: UV_FS_EVENT_RECURSIVE is a flag

It should not be the same as:

`UV_FS_EVENT_WATCH_ENTRY | UV_FS_EVENT_STAT`

Because we never meant that, and that's not how it works.
linux: use CLOCK_MONOTONIC_COARSE if available

On some systems, clock_gettime(CLOCK_MONOTONIC) is only serviced from
the vDSO when the __vdso_clock_gettime() wrapper is confident enough
that the vDSO timestamp is highly accurate.  When in doubt, it falls
back to making a traditional SYS_clock_gettime system call with all
the overhead that entails.

While a commendable approach, it's overkill for our purposes because we
don't usually need high precision time. That's why this commit switches
to CLOCK_MONOTONIC_COARSE for low-precision timekeeping, provided said
clock has at least a one millisecond resolution.

This change should eliminate the system call on almost all systems,
including virtualized ones, provided the kernel is >= 2.6.32 and glibc
is new enough to find and parse the vDSO.
build: make systemtap probes work with gyp build

The following now works though the used approach is nothing to write
home about:

  $ ./gyp_uv -Duv_use_dtrace=true
  # <output elided>
  $ make -C out BUILDTYPE=Debug
  # <output elided>
  $ cd out/Debug && stap -L 'process("./run-tests").mark("*")'
  process("./run-tests").mark("tick__start") $arg1:long $arg2:long
  process("./run-tests").mark("tick__stop") $arg1:long $arg2:long
unix: update events from pevents between polls

Watchers could be stopped between two `kevent()`/`epoll_wait()` calls
(which may happen in the same loop in `uv__io_poll()`), in such cases
`watcher->events` could be stale and won't be updated to
`watcher->pevents`.

Try to use and rely on `watcher->pevents` instead of blindly expecting
`watcher->events` to be always correct.
test: add regression test for 29fdb3471