Fixes the following warning:
include/uv.h:236:30: warning: type qualifiers ignored on function
return type [-Wignored-qualifiers]
UV_EXTERN const unsigned int uv_version(void);
This is the first officially versioned release of libuv. Starting now
libuv will make releases independently of Node.js.
Changes since Node.js v0.10.0:
* test: add tap output for windows (Timothy J. Fontaine)
* unix: fix uv_tcp_simultaneous_accepts() logic (Ben Noordhuis)
* include: bump UV_VERSION_MINOR (Ben Noordhuis)
* unix: improve uv_guess_handle() implementation (Ben Noordhuis)
* stream: run try_select only for pipes and ttys (Fedor Indutny)
Changes since Node.js v0.10.1:
* build: rename OS to PLATFORM (Ben Noordhuis)
* unix: make uv_timer_init() initialize repeat (Brian Mazza)
* unix: make timers handle large timeouts (Ben Noordhuis)
* build: add OBJC makefile var (Ben Noordhuis)
* Add `uv_version()` and `uv_version_string()` APIs (Bert Belder)
This commit fixes two closely related integer overflow bugs:
* Timers with a timeout > INT_MAX cause uv__next_timeout() to return
a negative value.
* Timers with very large timeouts (close or equal to ULLONG_MAX) run on
the next tick.
In both cases, clamp the values to prevent the overflow from happening.
Fixesjoyent/node#5101.
Rename the OS make variable to PLATFORM, it conflicts with the OS env
var. That is, running `make` when the OS env var is set, may cause
spurious build breakage.
Fixes#737.
Inverts the meaning of the 'enable' argument. Before, it actually set
the UV_TCP_SINGLE_ACCEPT flag when enable=1. Now it clears it, which is
what uv-win does and what you would expect it to do.
When iocp sync bypass is in use libuv doesn't expect the system to
generate events when an i/o operation completes synchronously. However
when iocp emulation is enabled an event will always be generated because
SetFileCompletionNotificationModes() doesn't stop OVERLAPPED.hEvent from
becoming signaled.
This should fixjoyent/node#4959.
This error is raised when calling read() or write() on a directory.
A bit of googling turns up some cases where this error can be raised
that are not properly mapped to EISDIR, but are also cases that libuv
doesn't really care about, like the Password Manager API,
GetFirmwareEnvironmentVariable, or CreateTapePartition.
If libuv ever needs to handle these cases, then I suppose that the
ERROR_INVALID_FUNCTION->EISDIR mapping could be done directly in the
fs read() and write() functions, but doing so at this point seems
premature, as it makes the error code mapping a bit more messy.
Fixesjoyent/node#4951
Replace a few internal functions in uv-common.h with macros to avoid
strict aliasing warnings with older versions of gcc.
It's not smart enough to figure out that e.g. a uv_tcp_t is an instance
of uv_handle_t with similar alignment requirements and therefore no
aliasing happens. More recent versions of gcc don't suffer from this.
I'm not normally in the habit of catering to compiler defects but the
aliasing warnings drown out legitimate warnings, hence the change.
In very rare circumstances a uv_read_start() call on a uv_tty_t handle
in raw mode would return -1 but there was no actual failure. This patch
fixes that.
Fixes a busy loop when the file descriptor emits POLLHUP but not POLLIN
or POLLOUT, e.g. when polling the read end of a pipe and the write end
is closed.
Fixesjoyent/node#4923.
Older versions of GYP would set up the Visual Studio project to link
with these libraries by default, but this was changed in r1584 (see
https://codereview.chromium.org/12256017).
Closes#728
We abuse uv_write2() to send over UDP handles to child processes.
Don't call uv__stream_fd() on those handles, it's a macro that on OS X
evaluates to a function that operates on a uv_stream_t with a couple of
OS X specific fields. On other Unices it does (handle)->io_watcher.fd,
which works but only by accident.
Fixesjoyent/node#4870.
I debug tests regularly as root (because dtrace and dtruss require the
additional privileges). The 'is root?' check gets in the way more often
than it prevents me from doing something silly. Remove it.
Don't overwrite the environment. On OS X, the entries in the environ
table are not necessarily adjacent. It's arguably also safer for setuid
binaries.
Fixesjoyent/node#4847.
The default loop lives in the bss section so it's zeroed on startup
but loops created with uv_loop_new() live on the heap and contain
random garbage. Initialize the stop_flag explicitly to avoid spurious
bugs.
* Make uv_stop() work when libuv is embedded in another event loop.
* Fix a small bug where loop->stop_flag was not reset when mode ==
UV_RUN_ONCE or UV_RUN_NOWAIT. The next call to uv_run() would return
immediately without doing any work.