There is no need for fs.readFile() to be using pread rather than read.
The default semantics of read() are such that subsequent reads are where
we want them anyway.
On Windows, full pathnames are stored in the Error object when
a file i/o error happens. This is not the case on Unix. Before
this fix the test would break because of these full paths.
This reverts commit f80513974e.
The reverted commit made DESTDIR behave more like we want it to but it was
pointed out in #3489 that it makes life a lot harder for distro package
maintainers.
Those guys and gals already have a hard enough time as it is, let's not make
their jobs even more hellish.
No one has complained about it so far but I'm sure MSVC doesn't like things
like __attribute__((unused)). Include the libev and libeio shims only on
non-Windows platforms.
Fix building with a shared zlib: ensure link with '-lz'.
Configuring for a shared zlib:
LDFLAGS="-L/opt/local/lib -R/opt/local/lib" \
./configure --shared-zlib \
--shared-zlib-includes=/opt/local/include \
--shared-zlib-libpath=/opt/local/lib
and building would fail on SmartOS because the link would not include '-lz'.
This doesn't fail on Mac (at least in my setup) because you get lucky with the
openssl libs reported from the Homebrew pkg-config:
$ pkg-config --libs openssl
-lssl -lcrypto -lz
On SmartOS, the pkgsrc libs for openssl are:
$ pkg-config --libs openssl
-Wl,-R/opt/local/lib -L/opt/local/lib -lssl -lcrypto -lsocket -lnsl -ldl
The patch has no adverse effect on the Mac build (by control case).
Drop vestigial `process.installPrefix`, `node --vars`, NODE_CFLAGS and
NODE_PREFIX.
Also removed unused node_config.h.in (replaced with config.gypi a while back).
Make CLIENT_RENEG_LIMIT inclusive instead of exclusive, i.e. a limit of 2
means the peer can renegotiate twice, not just once.
Update pummel/test-tls-ci-reneg-attack accordingly and make it less timing
sensitive (and run faster) while we're at it.
DH_size returns number of bytes in a prime number, DH_compute_key returns number
of bytes in a remainder of exponent, which may have less bytes than a prime
number. Therefore add 0-padding to the allocated buffer.
Fixes#3372
Fix#3455.
The remoteAddress and remotePort properties are
dynamically retrieved from _getpeername().
While _getpeername() checks if the _handle is
null, it is also possible for the tcp_wrapped
_handle.getpeername() to return null on error.
Such a condition happens when the remote closes
and one of these properties is accessed before
_handle is set to null.