mingw32 doesn't have the JOB_OBJECT_XXX defines. Provide them ourselves
when they are not already defined.
This is possibly only an issue with older versions of mingw32 because
mingw-w64 2.0 _does_ export the defines.
Change the uv_fs_write() prototype so the 'buf' argument is now
`const void*` rather than `void*`.
The argument is stored in a non-const field in the uv_fs_t but that's
inconsequential because the memory it points to is not touched.
Squelches (justified) warnings with automake 1.14.
Object files are built in subdirectories now so fix up the dtrace
postprocessing step to scan for *.lo files in said subdirectories.
Fixes#866.
* add a very simple Makefile.mingw that builds libuv.a
* apply a couple of fixes to src/win so it actually builds with mingw
(mostly missing includes)
Fixes#847.
Make it possible for the libuv user to handle out of memory conditions
gracefully. When alloc_cb() returns a buffer with len==0, call the read
or recv callback with nread=UV_ENOBUFS. It's up to the user to stop or
close the handle.
Fixes#752.
Before this commit, uv_fs_chown() and uv_fs_fchown() took the uid and
gid as signed integers which is wrong because uid_t and gid_t are
unsigned on most all platforms and IDs that don't fit in a signed
integer do exist.
This is not an ABI change because the size of the uid and gid arguments
do not change, only their sign.
On Windows, uv_uid_t and uv_gid_t are typedef'd as unsigned char for
reasons that are unclear. It doesn't matter: they get cast to ints when
used as function arguments. The arguments themselves are unused.
Partial fix for joyent/node#5890.
This commit changes the libuv API to return error codes directly rather
than storing them in a loop-global field.
A code snippet like this one:
if (uv_foo(loop) < 0) {
uv_err_t err = uv_last_error(loop);
fprintf(stderr, "%s\n", uv_strerror(err));
}
Should be rewritten like this:
int err = uv_foo(loop);
if (err < 0)
fprintf(stderr, "%s\n", uv_strerror(err));
The rationale for this change is that it should make creating bindings
for other languages a lot easier: dealing with struct return values is
painful with most FFIs and often downright buggy.
Don't try to set a bogus UID or GID and expect to get a meaningful
error. The test expected EPERM but SunOS returns EINVAL because the
id is outside of the range of valid user/group ids.
Try to switch to UID/GID 0. Give up privileges first if we're root,
else the setuid/setgid system call will succeed when it's expected
to fail.
The tests are no longer compiled with -D_XOPEN_SOURCE=500 when building
with autotools. Tell the test explicitly that SunOS systems are
expected to have nanosecond fstat(2) granularity.
Switch to the build tool everyone loves to hate. The Makefile has
served us well over the years but it's been acquiring more and more
features that autotools gives us for free, like easy static+shared
library building, sane install targets, and so on.
This commit drops MinGW support. If there is demand for it, we'll
re-add it.
Before this commit, there was no way to install libuv other than
manually copying required files to the path. This commit introduces
an install target which installs the libuv.a, libuv.so and header files
to the install prefix.
``
make
make install
``
The above will use the default prefix `/usr/local`
``
make
make install PREFIX=/usr
``
The above will install to `/usr`
Changes since version 0.11.4:
* build: remove CSTDFLAG, use only CFLAGS (Ben Noordhuis)
* unix: support for android builds (Linus Mårtensson)
* unix: avoid extra read, short-circuit on POLLHUP (Ben Noordhuis)
* uv: support android libuv standalone build (Linus Mårtensson)
* src: make queue.h c++ compatible (Ben Noordhuis)
* unix: s/ngx-queue.h/queue.h/ in checksparse.sh (Ben Noordhuis)
* unix: unconditionally stop handle on close (Ben Noordhuis)
* freebsd: don't enable dtrace if it's not available (Brian White)
* build: make HAVE_DTRACE=0 should disable dtrace (Timothy J. Fontaine)
* unix: remove overzealous assert (Ben Noordhuis)
* unix: remove unused function uv_fatal_error() (Ben Noordhuis)
* unix, windows: clean up uv_thread_create() (Ben Noordhuis)
* queue: fix pointer truncation on LLP64 platforms (Bert Belder)
* build: set OS=="android" for android builds (Linus Mårtensson)
* windows: don't use uppercase in include filename (Ben Noordhuis)
* stream: add an API to make streams do blocking writes (Henry Rawas)
* windows: use WSAGetLastError(), not errno (Ben Noordhuis)
Check that a timer that is started from a check handle gets picked up
correctly, i.e. that it influences the timeout used in the next tick
of the event loop.
gcc 4.2.1 as shipped with Xcode complains incessantly about aliasing
warnings, which, while technically true, disregards the fact that the
aliased types have the same layout in memory. Squelch the warnings.
This patch adds the `uv_stream_set_blocking` API which makes all
uv_write calls to that stream blocking. It currently only works for
pipes, on windows.
This fixes an issue where uv_spawn would not try to run a reparse point,
and continue to scan the PATH instead. Effectively, it was impossible to
spawn a symlinked binary. This commit fixes that.
Also see #748
Work around the build name issues by instead manually adding the build
target for android builds using '-DOS=android'
This additionally resolves problems caused by the OS variable being
rewritten from "android" to "linux" in gyp. This causes errors, as
real-time support (-lrt) and pthread support (-lpthread) is not
available in the android NDK toolchain as libraries.
The functions present in these libraries are included automatically
during the build instead during the android compilation process.
QUEUE_DATA used to cast a pointer to long and back to pointer. This can
corrupt pointers on systems where the long type isn't large enough to
store pointer, like Windows x64. This commit fixes that.
Fixes#835