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>
doc: fix createCipher description

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
configure: fix v8 overriding commands on build

V8 seems to ignore the default value for want_separate_host_toolset and
would override it at build time. Instead always explicitly set the value.

Fixes #7833
deps: cherry-pick eca441b2 from OpenSSL

Original commit message:

    bn_exp.c: fix x86_64-specific crash with one-word modulus.

    PR: #3397

Signed-off-by: Fedor Indutny <fedor@indutny.com>
doc: fix console.assert docs, message is a format

Documentation for console.assert incorrectly described message as a
single message, but it is a format.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
doc: added X.json to the LOAD_AS_FILE sudo code

Signed-off-by: Fedor Indutny <fedor@indutny.com>
lib: remove and restructure calls to isNaN()

Switch condition order to check for null before calling isNaN().
Also remove two unnecessary calls to isNaN() that are already
covered by calls to isFinite(). This commit targets v0.10, as
opposed to #7891, which targets master (suggested by
@bnoordhuis). Closes #7840.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
child_process: handle writeUtf8String error

When handling `writeUtf8String` error, return after emitting it.
Otherwise a runtime failure can occur.

fix #7923
stream2: flush extant data on read of ended stream

A ReadableStream with a base64 StringDecoder backed by only
one or two bytes would fail to output its partial data before
ending. This fix adds a check to see if the `read` was triggered
by an internal `flow`, and if so, empties any remaining data.

fixes #7914.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
lib: jslint string_decoder.js
gyp: do not let `v8dbg_` slip away on osx

Pass `-force_load` to linker when linking to `libv8_base` to preserve
`v8dbg_` symbols, which are useful for debugging.
deps: backport 4ed5fde4f from v8 upstream

Original commit message:

    Fix x64 MathMinMax for negative untagged int32 arguments.

    An untagged int32 has zeros in the upper half even if it is negative.
    Using cmpq to compare such numbers will incorrectly ignore the sign.

    BUG=164442
    R=mvstanton@chromium.org

    Review URL: https://chromiumcodereview.appspot.com/11665007

    git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@13273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

Signed-off-by: Fedor Indutny <fedor@indutny.com>
gyp: fix post-mortem in v0.11

Expose missing constants and keep symbols on OSX.
doc: console.trace takes a message format

Documentation claimed it accepted a single label argument, as time and
timeEnd do, which was incorrect.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
test: fix  test-tls-server-verify

fix #7963
test: fix test-https-foafssl
buffer: fix sign overflow in `readUIn32BE`

`|` operation takes precendence on `+`, which will result in
`new Buffer('ffffffff', 16).readUInt32BE(0)` returning `-1` instead of
`ffffffff`.
gyp: do not rm unused openssl syms on osx/linux

fix #8026

Reviewed-By: Fedor Indutny <fedor@indutny.com>