doc: buffer: clarify typed array construction

It's possible to construct a typed array from a buffer but the buffer
is treated as an array, not a byte array as one might expect.

Fixes #7786.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
buffer: improve {read,write}{U}Int* methods

Increase the performance and simplify the logic of Buffer#write{U}Int*
and Buffer#read{U}Int* methods by placing the byte manipulation code
directly inline.

Also improve the speed of buffer-write benchmarks by creating a new
call directly to each method by using Function() instead of calling by
buff[fn].

Signed-off-by: Trevor Norris <trev.norris@gmail.com>

Conflicts:
	lib/buffer.js
dns: introduce lookupService function

Uses getnameinfo to resolve an address an port into a hostname and
service.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
deps: update libuv to v0.11.26
buffer: construct new buffer from buffer toJSON() output

Creating a new buffer from the toJSON() output of another
buffer does not currently work. This commit adds that
support. Closes #7849.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
util.h: interface compatibility

Signed-off-by: Fedor Indutny <fedor@indutny.com>
node: fix #7841 by overlooking the spare sourceline

Signed-off-by: Fedor Indutny <fedor@indutny.com>
http: remove unused code block

fix #7769

Signed-off-by: Fedor Indutny <fedor@indutny.com>
zlib: do not crash on write after close

fix #7767

Signed-off-by: Fedor Indutny <fedor@indutny.com>
stream: only end reading on null, not undefined

The [Stream documentation for .push](http://nodejs.org/api/stream.html#stream_readable_push_chunk_encoding)
explicitly states multiple times that null is a special cased value
that indicates the end of a stream. It is confusing and undocumented
that undefined *also* ends the stream, even though in object mode
there is a distinct and important difference.

The docs for Object-Mode also explicitly mention null as the *only*
special cased value, making no mention of undefined.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
repl: fix multi-line input

The refactor in 3ae0b17c broke the multiline input's visual appearence.
While actually switching to this mode, the `...` prefix is not
displayed.

Additionally, account only SyntaxErrors that are happening at the parse
time, everything else should not be switching repl to the multiline
mode.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
Revert "stream: start old-mode read in a next tick"

This reverts commit 2efe4ab7616669448f873b0417e9aa81221324e2.
events: Output the event that is leaking

Signed-off-by: Fedor Indutny <fedor@indutny.com>
configure: better detect windows 'bitness' (WOW64)

Signed-off-by: Fedor Indutny <fedor@indutny.com>
docs: highlight shell-codes in CONTRIBUTING.md

Signed-off-by: Fedor Indutny <fedor@indutny.com>
test: fix multiple_line problem in match

Signed-off-by: Fedor Indutny <fedor@indutny.com>
net: don't emit listening if handle is closed

Fixes #7834

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Revert "src: fix _XOPEN_SOURCE redefinition warning"

This reverts commit 885142a5edc2c803fa8b9d92b5d0771379237764.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Revert "constants: export O_NONBLOCK"

This reverts commit 00890e43fb935c8bc5dc150f0f2c96bc465d8a4d.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
constants: add O_NONBLOCK constant

It appears that it is defined unconditionally on all supported unixes.

fix #7867 #7855

Signed-off-by: Trevor Norris <trev.norris@gmail.com>