Commit Graph

736 Commits

Author SHA1 Message Date
cjihrig
531f06ecfe Now working on version 1.10.1 2016-10-24 10:24:20 -04:00
cjihrig
c8a373c729 2016.10.25, Version 1.10.0 (Stable)
Changes since version 1.9.1:

* Now working on version 1.9.2 (Saúl Ibarra Corretgé)

* doc: add cjihrig GPG ID (cjihrig)

* win,build: fix compilation on old Windows / MSVC (Saúl Ibarra
  Corretgé)

* darwin: fix setting fd to non-blocking in select(() trick (Saúl Ibarra
  Corretgé)

* unix: allow nesting of kqueue fds in uv_poll_start (Ben Noordhuis)

* doc: fix generation the first time livehtml runs (Saúl Ibarra
  Corretgé)

* test: fix test_close_accept flakiness on Centos5 (Santiago Gimeno)

* license: libuv is no longer a Node project (Saúl Ibarra Corretgé)

* license: add license text we've been using for a while (Saúl Ibarra
  Corretgé)

* doc: add licensing information to README (Saúl Ibarra Corretgé)

* win,pipe: fixed formatting, DWORD is long unsigned (Miodrag Milanovic)

* win: support sub-second precision in uv_fs_futimes() (Jason
  Ginchereau)

* unix: ignore EINPROGRESS in uv__close (Saúl Ibarra Corretgé)

* doc: add Imran Iqbal (iWuzHere) to maintainers (Imran Iqbal)

* doc: update docs with AIX related information (Imran Iqbal)

* test: silence build warnings (Kári Tristan Helgason)

* doc: add iWuzHere GPG ID (Imran Iqbal)

* linux-core: fix uv_get_total/free_memory on uclibc (Nicolas Cavallari)

* build: fix build on DragonFly (Michael Neumann)

* unix: correctly detect named pipes on DragonFly (Michael Neumann)

* test: make tap output the default (Ben Noordhuis)

* test: don't dump output for skipped tests (Ben Noordhuis)

* test: improve formatting of diagnostic messages (Ben Noordhuis)

* test: remove unused RETURN_TODO macro (Ben Noordhuis)

* doc: fix stream typos (Pierre-Marie de Rodat)

* doc: update coding style link (Imran Iqbal)

* unix,fs: use uint64_t instead of unsigned long (Imran Iqbal)

* build: check for warnings for -fvisibility=hidden (Imran Iqbal)

* unix: remove unneeded TODO note (Saúl Ibarra Corretgé)

* test: skip tty_pty test if pty is not available (Luca Bruno)

* sunos: set phys_addr of interface_address using ARP (Brian Maher)

* doc: clarify callbacks won't be called in error case (Saúl Ibarra
  Corretgé)

* unix: don't convert stat buffer when syscall fails (Ben Noordhuis)

* win: compare entire filename in watch events (cjihrig)

* doc: add a note on safe reuse of uv_write_t (neevek)

* linux: fix potential event loop stall (Ben Noordhuis)

* unix,win: make uv_get_process_title() stricter (cjihrig)

* test: close server before initiating new connection (John Barboza)

* test: account for multiple handles in one ipc read (John Barboza)

* unix: fix errno and retval conflict (liuxiaobo)

* doc: add missing entry in uv_fs_type enum (Michele Caini)

* unix: preserve loop->data across loop init/done (Ben Noordhuis)

* win: return UV_EINVAL on bad uv_tty_mode mode arg (Ben Noordhuis)

* win: simplify memory copy logic in fs.c (Ben Noordhuis)

* win: fix compilation on mingw (Bartosz Sosnowski)

* win: ensure 32-bit printf precision (Matej Knopp)

* darwin: handle EINTR in /dev/tty workaround (Ben Noordhuis)

* test: fix OOB buffer access (Saúl Ibarra Corretgé)

* test: don't close CRT fd handed off to uv_pipe_t (Saúl Ibarra
  Corretgé)

* test: fix android build error. (sunjin.lee)

* win: evaluate timers when system wakes up (Bartosz Sosnowski)

* doc: add supported platforms description (Saúl Ibarra Corretgé)

* win: fix lstat reparse point without link data (Jason Ginchereau)

* unix,win: make on_alloc_cb failures more resilient (Saúl Ibarra
  Corretgé)

* zos: add support for new platform (John Barboza)

* test: make tcp_close_while_connecting more resilient (Saúl Ibarra
  Corretgé)

* build: use '${prefix}' for pkg-config 'exec_prefix' (Matt Clarkson)

* build: GNU/kFreeBSD support (Jeffrey Clark)

* zos: use PLO instruction for atomic operations (John Barboza)

* zos: use pthread helper functions (John Barboza)

* zos: implement uv__fs_futime (John Barboza)

* unix: expand range of values for usleep (John Barboza)

* zos: track unbound handles and bind before listen (John Barboza)

* test: improve tap output on test failures (Santiago Gimeno)

* test: refactor fs_event_close_in_callback (Julien Gilli)

* zos: implement uv__io_check_fd (John Barboza)

* unix: unneccessary use const qualifier in container_of (John Barboza)

* win,tty: add support for ANSI codes in win10 v1511 (Imran Iqbal)

* doc: add santigimeno to maintainers (Santiago Gimeno)

* win: fix typo in type name (Saúl Ibarra Corretgé)

* unix: always define pthread barrier fallback pad (Saúl Ibarra
  Corretgé)

* test: use RETURN_SKIP in spawn_setuid_setgid test (Santiago Gimeno)

* win: add disk read/write count to uv_getrusage (Imran Iqbal)

* doc: document uv_fs_realpath caveats (Saúl Ibarra Corretgé)

* test: improve spawn_setuid_setgid test (Santiago Gimeno)

* test: fix building pty test on Android (Saúl Ibarra Corretgé)

* doc: uv_buf_t members are not readonly (Saúl Ibarra Corretgé)

* doc: improve documentation on uv_alloc_cb (Saúl Ibarra Corretgé)

* fs: fix uv_fs_fstat on platforms using musl libc (Santiago Gimeno)

* doc: update supported fields for uv_rusage_t (Imran Iqbal)

* test: fix test-tcp-writealot flakiness on arm (Santiago Gimeno)

* test: fix fs_event_watch_dir flakiness on arm (Santiago Gimeno)

* unix: don't use alphasort in uv_fs_scandir() (Ben Noordhuis)

* doc: fix confusing doc of uv_tcp_nodelay (Bart Robinson)

* build,osx: fix warnings on tests compilation with gyp (Santiago
  Gimeno)

* doc: add ABI tracker link to README (Saúl Ibarra Corretgé)

* win,tty: fix uv_tty_set_mode race conditions (Bartosz Sosnowski)

* test: fix fs_fstat on Android (Vit Gottwald)

* win, test: fix fs_event_watch_dir_recursive (Bartosz Sosnowski)

* doc: add description of uv_handle_type (Vit Gottwald)

* build: use -pthreads for tests with autotools (Julien Gilli)

* win: fix leaky fs request buffer (Jason Ginchereau)

* doc: note buffer lifetime requirements in uv_write (Vladimír Čunát)

* doc: add reference to uv_update_time on uv_timer_start (Alex Hultman)

* win: fix winapi function pointer typedef syntax (Brad King)

* test: fix tcp_close_while_connecting CI failures (Ben Noordhuis)

* test: make threadpool_cancel_single deterministic (Ben Noordhuis)

* test: make threadpool saturation reliable (Ben Noordhuis)

* unix: don't malloc in uv_thread_create() (Ben Noordhuis)

* unix: don't include CoreServices globally on macOS (Brad King)

* unix,win: add uv_translate_sys_error() public API (Philippe
  Laferriere)

* win: remove unused static variables (Ben Noordhuis)

* win: silence -Wmaybe-uninitialized warning (Ben Noordhuis)

* signal: replace pthread_once with uv_once (Santiago Gimeno)

* test: fix sign-compare warning (Will Speak)

* common: fix unused variable warning (Brad King)
2016-10-24 09:52:33 -04:00
Philippe Laferriere
f1863dae6b unix,win: add uv_translate_sys_error() public API
uv_translate_sys_error() was a private function for Windows.
This commit adds an equivalent function on other platforms, and
exposes it as public API.

Exposing this is useful in scenarios where the application uses
both libuv functions and platform-specific system calls and wants
to report errors uniformly as libuv errors.

Fixes: https://github.com/libuv/libuv/issues/79
PR-URL: https://github.com/libuv/libuv/pull/1060
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-16 17:47:42 -04:00
Brad King
cfc192212e win: fix winapi function pointer typedef syntax
Move the `PASCAL` calling convention marker from:

    typedef void PASCAL (*f)(...);

to the proper place for a calling convention in a function pointer type:

    typedef void (PASCAL *f)(...);

This is where the MS-provided winapi headers place it too.

PR-URL: https://github.com/libuv/libuv/pull/1075
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-14 07:30:08 +02:00
Saúl Ibarra Corretgé
5d96277834 unix: always define pthread barrier fallback pad
Fixes: https://github.com/libuv/libuv/issues/1019
PR-URL: https://github.com/libuv/libuv/pull/1020
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-08-27 11:06:19 +02:00
Jeffrey Clark
0a4b51fcb4 build: GNU/kFreeBSD support
autotools support only, gvp does not support kfreebsd detection.

PR-URL: https://github.com/libuv/libuv/pull/960
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-08-20 08:55:30 +02:00
John Barboza
1cff5b7557 zos: add support for new platform
- zos: disable test cases not applicable
- zos: build options
- zos: semaphore implementation
- zos: use compare and swap builtins
- zos: struct rusage not the same as other platforms
- zos: backlog<=0 produces undefined behaviour
    Will redefine backlog in the following way
    * if backlog == 0, set it to 1
    * if backlog < 0, set it to SOMAXCONN
- zos: define IMAXBEL as empty flag and implement uv__tty_make_raw
- zos: use udp multicast operations from aix
- zos: ESC in ebcdic
- zos: use LIBPATH for dynamic linker path
- zos: uv_udp_set_ttl only works for ipv6
- zos: increase pthread stack size by factor of 4
- zos: return ENODEV instead of ENXIO errors for setsockopt
- zos: use uv_cond_init the same way as aix
- test: enable oob test for zos
- zos: return EINVAL for zos error code EOPNOTSUPP

PR-URL: https://github.com/libuv/libuv/pull/937
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-08-19 01:34:29 +02:00
Saúl Ibarra Corretgé
67f4d1c531 Now working on version 1.9.2 2016-05-16 23:49:30 +02:00
Saúl Ibarra Corretgé
d989902ac6 2016.05.17, Version 1.9.1 (Stable)
Changes since version 1.9.0:

* test: handle root home directories (cjihrig)

* unix: implement uv__fs_futime for AIX 7.1 (Imran Iqbal)

* test: skip early bind tests if no IPv6 is supported (Saúl Ibarra
  Corretgé)

* win: fix var declaration to be C89 compliant (Michael Fero)

* unix: use POLL{IN,OUT,etc} constants directly (Ben Noordhuis)

* doc: add ability to live reload and regenerate HTML (Saúl Ibarra
  Corretgé)

* Revert "win,build: remove unused build defines" (cjihrig)

* linux: fix fd leaks in uv_cpu_info() error paths (Ben Noordhuis)

* linux: don't abort on malformed /proc/stat (Ben Noordhuis)

* linux: fix long lines in linux-core.c (Ben Noordhuis)

* test: fix fs_event_watch_file_current_dir for AIX (Imran Iqbal)

* unix,fs: code cleanup of uv_fs_event_start for AIX (Imran Iqbal)

* unix: delay signal handling until after normal i/o (Ben Noordhuis)

* android: pthread_sigmask() does not set errno (Oguz Bastemur)

* win: work around sharepoint scandir bug (Ben Noordhuis)

* unix: guard against clobbering errno in uv__free() (Ben Noordhuis)

* unix: remove unneeded SAVE_ERRNO wrappers (Ben Noordhuis)

* test: skip fs_event_close_in_callback on AIX (Imran Iqbal)

* win: add maxrss, pagefaults to uv_getrusage() (Robert Jefe Lindstaedt)

* test: set a big send buffer size for tcp_write_queue_order (Andrius
  Bentkus)

* unix: error on realpath if PATH_MAX is undefined (Myles Borins)

* unix: fix bug in barrier fallback implementation (Kári Tristan
  Helgason)

* build: bump android ndk version (Kári Tristan Helgason)

* build: always compile with -fvisibility=hidden (Ben Noordhuis)

* test: fix -Wformat warnings in platform test (Ben Noordhuis)

* win: clarify fsevents handling code (Saúl Ibarra Corretgé)

* test: fix POLLHDRUP related failures for AIX (Imran Iqbal)

* build, mingw: set LIBS in configure.ac (Tony Theodore)

* win: improve uv__convert_utf16_to_utf8 (Saúl Ibarra Corretgé)

* win: simplified UTF16 -> UTF8 conversions (Saúl Ibarra Corretgé)

* win: remove unneeded condition (Saúl Ibarra Corretgé)

* darwin: work around condition variable kernel bug (Ben Noordhuis)

* darwin: make thread stack multiple of page size (Ben Noordhuis)

* build,win: rename platform to msbuild_platform (João Reis)

* gitignore: ignore VS temporary database files (João Reis)

* test: skip emfile on AIX (Imran Iqbal)

* unix: use system allocator for scandir() (cjihrig)

* common: release uv_fs_scandir() array (cjihrig)

* win: call uv__fs_scandir_cleanup() (cjihrig)

* win,tty: fix read stop in line mode (João Reis)

* win,tty: don't duplicate handle for line reads (João Reis)

* win,tty: restore cursor after canceling line read (Alexis Campailla)
2016-05-16 23:22:19 +02:00
João Reis
349aa6c0dd win,tty: don't duplicate handle for line reads
Since we cancel ReadConsole by sending a newline, the duplicate
handle is no longer necessary.

PR-URL: https://github.com/libuv/libuv/pull/866
Reviewed-by: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-16 23:05:50 +02:00
Kári Tristan Helgason
f57bfd4dca unix: fix bug in barrier fallback implementation
There was a memory corruption issue with the pthread barrier
implementation on android, where a barrier could still be in use by one
thread when being freed by another.

This fixes that issue and adds lots of missing error handling.

This implementation is now also used for the OSX fallback.

Fixes: https://github.com/libuv/libuv/issues/615
PR-URL: https://github.com/libuv/libuv/pull/790
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-04-26 09:35:47 +02:00
Saúl Ibarra Corretgé
d476185bb3 Now working on version 1.9.1 2016-04-07 07:52:59 -03:00
Saúl Ibarra Corretgé
229b3a4cc1 2016.04.08, Version 1.9.0 (Stable)
Changes since version 1.8.0:

* win: wait for full timeout duration (João Reis)

* unix: fix support for uClibc-ng (Martin Bark)

* doc: indicate where new test files need to be added (Dave)

* test,unix: fix logic error in test runner (Ben Noordhuis)

* fs: don't nullify req->bufs on EINTR (Dave)

* osx: set the default thread stack size to RLIMIT_STACK (Saúl Ibarra
  Corretgé)

* build: invoke libtoolize with --copy (Ben Noordhuis)

* test: fixup eintr_handling (Saúl Ibarra Corretgé)

* osx: avoid compilation warning with Clang (Saúl Ibarra Corretgé)

* test,win: fix compilation with shared lib (Alexis Murzeau)

* test: fix race condition in pipe-close-stdout (Imran Iqbal)

* unix,win: add uv_os_tmpdir() (cjihrig)

* ios: fix undefined PTHREAD_STACK_MIN (Didiet)

* test: fix threadpool_multiple_event_loops for AIX (Imran Iqbal)

* unix: report errors for unpollable fds (Ben Noordhuis)

* win: fix watching root files (Nicholas Vavilov)

* build,win: print the Visual Studio version in use (Saúl Ibarra
  Corretgé)

* build,win: remove unneeded condition from GYP file (Saúl Ibarra
  Corretgé)

* test,win: fix compilation warning (Saúl Ibarra Corretgé)

* test: use uv_loop_close and assert its result (Nan Xiang)

* build: map 'AMD64' host arch to 'x64' (Ben Noordhuis)

* osx: protected use of potentially undefined macro (Samuel Lorétan)

* linux: fix compilation with musl (Saúl Ibarra Corretgé)

* doc: describe how to make release builds on Unix (Saúl Ibarra
  Corretgé)

* doc: add missing link in README (Saúl Ibarra Corretgé)

* build: python 2.x/3.x consistent print usage (Rasmus Christian
  Pedersen)

* test: assume no IPv6 if interfaces cannot be listed (Nan Xiang)

* darwin: replace F_FULLFSYNC with fdatasync syscall (Saúl Ibarra
  Corretgé)

* doc: add missing write callback to example (Nándor István Krácser)

* build: compile with -D_THREAD_SAFE on AIX (Imran Iqbal)

* test: fix threadpool_multiple_event_loops on PPC (Imran Iqbal)

* test: reduce timeout in tcp_close_while_connecting (Imran Iqbal)

* unix, win: consistently null-terminate buffers (Saúl Ibarra Corretgé)

* unix, win: count null byte on UV_ENOBUFS (Saúl Ibarra Corretgé)

* test: fix deadlocks in uv_cond_wait (Katsutoshi Horie)

* linux: fix cpu count (Lukasz Jagiello)

* unix: fix uv__handle_type for AIX (Imran Iqbal)

* linux: call fclose(), fix fdopen() memory leak (Ben Noordhuis)

* win: remove unneeded condition (Saúl Ibarra Corretgé)

* unix: fix compile error in Android using bionic (Robert Chiras)

* linux: add braces to multi-statement if (Kári Tristan Helgason)

* doc: add @cjihrig as a maintainer (Saúl Ibarra Corretgé)

* unix: add fork-safe open file function (Kári Tristan Helgason)

* linux: replace calls to fopen with uv__open_file (Kári Tristan
  Helgason)

* linux: remove redundant call to rewind() (Krishnaraj Bhat)

* win: remove duplicated code when processing fsevents (Saúl Ibarra
  Corretgé)

* test: fix poll_bad_fdtype for AIX (Imran Iqbal)

* linux: fix error checking in uv__open_file (Saúl Ibarra Corretgé)

* poll: add UV_DISCONNECT event (Santiago Gimeno)

* fs: realpath: fix string size before converting (Yuval Brik)

* win: use native APIs for UTF conversions (cjihrig)

* doc: clarify uv_loop_close() (Ben Noordhuis)

* unix: retry ioctl(TIOCGWINSZ) on EINTR (Ben Noordhuis)

* win,build: remove unused build defines (Saúl Ibarra Corretgé)

* win: fix buffer overflow in fs events (Joran Dirk Greef)

* win: fix uv_relative_path and remove dead branch (Joran Dirk Greef)

* unix: use open(2) with O_CLOEXEC on OS X (Kári Tristan Helgason)

* test: add missing copyright header (cjihrig)

* aix: fix 'POLLRDHUP undeclared' build error (Ben Noordhuis)

* unix,win: add uv_get_passwd() (cjihrig)

* process: fix uv_spawn edge-case (Santiago Gimeno)

* test: use %ld for printing uid/gid (Ben Noordhuis)

* aix: fix ahafs implementation (Imran Iqbal)

* aix: do not store absolute path to ahafs (Imran Iqbal)

* process: close process pipes safely (Santiago Gimeno)

* unix: open ttyname instead of /dev/tty (Enno Boland)

* unix: remove outdated comment (Kári Tristan Helgason)
2016-04-07 12:14:56 +02:00
cjihrig
217f81b6a1 unix,win: add uv_get_passwd()
This commit adds the uv_get_passwd() function, which returns a
subset of the current effective user's password file entry.

Refs: https://github.com/libuv/libuv/issues/11
Fixes: https://github.com/libuv/libuv/issues/731
PR-URL: https://github.com/libuv/libuv/pull/742
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-03-29 08:13:59 -04:00
cjihrig
f04d5fc3b9 win: use native APIs for UTF conversions
This commit replaces uv_utf16_to_utf8() and uv_utf8_to_utf16()
with calls to the native Windows API equivalents.

Refs: https://github.com/libuv/libuv/pull/672#discussion_r49049746
PR-URL: https://github.com/libuv/libuv/pull/762
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-03-18 12:40:57 -04:00
Santiago Gimeno
c7c8e916b8 poll: add UV_DISCONNECT event
It allows detecting the remote socket closing the connection. It's
emitted when `EPOLLRDHUP`(Linux), `EV_EOF`(BSD), `POLLRDHUP`(Solaris,
AIX) and `AFD_POLL_DISCONNECT`(Windows) events are received.

PR-URL: https://github.com/libuv/libuv/pull/691
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-03-15 23:39:49 +01:00
cjihrig
c0fa2e7518 unix,win: add uv_os_tmpdir()
PR-URL: https://github.com/libuv/libuv/pull/672
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-01-21 09:11:56 +01:00
Saúl Ibarra Corretgé
61f13a6d5e Now working on version 1.8.1 2015-12-14 21:07:52 +01:00
Saúl Ibarra Corretgé
5467299450 2015.12.15, Version 1.8.0 (Stable)
Changes since version 1.7.5:

* unix: fix memory leak in uv_interface_addresses (Jianghua Yang)

* unix: make uv_guess_handle work properly for AIX (Gireesh Punathil)

* fs: undo uv__req_init when uv__malloc failed (Jianghua Yang)

* build: remove unused 'component' GYP option (Saúl Ibarra Corretgé)

* include: remove duplicate extern declaration (Jianghua Yang)

* win: use the MSVC provided snprintf where possible (Jason Williams)

* win, test: fix compilation warning (Saúl Ibarra Corretgé)

* win: fix compilation with VS < 2012 (Ryan Johnston)

* stream: support empty uv_try_write on unix (Fedor Indutny)

* unix: fix request handle leak in uv__udp_send (Jianghua Yang)

* src: replace QUEUE_SPLIT with QUEUE_MOVE (Ben Noordhuis)

* unix: use QUEUE_MOVE when iterating over lists (Ben Noordhuis)

* unix: squelch harmless valgrind warning (Ben Noordhuis)

* test: don't abort on setrlimit() failure (Ben Noordhuis)

* unix: only undo fs req registration in async mode (Ben Noordhuis)

* unix: fix uv__getiovmax return value (HungMingWu)

* unix: make work with Solaris Studio. (Adam Stylinski)

* test: fix fs_event_watch_file_currentdir flakiness (Santiago Gimeno)

* unix: skip prohibited syscalls on tvOS and watchOS (Nathan Corvino)

* test: use FQDN in getaddrinfo_fail test (Wink Saville)

* docs: clarify documentation of uv_tcp_init_ex (Andrius Bentkus)

* win: fix comment (Miodrag Milanovic)

* doc: fix typo in README (Angel Leon)

* darwin: abort() if (un)locking fs mutex fails (Ben Noordhuis)

* pipe: enable inprocess uv_write2 on Windows (Louis DeJardin)

* win: properly return UV_EBADF when _close() fails (Nicholas Vavilov)

* test: skip process_title for AIX (Imran Iqbal)

* misc: expose handle print APIs (Petka Antonov)

* include: add stdio.h to uv.h (Saúl Ibarra Corretgé)

* misc: remove unnecessary null pointer checks (Ian Kronquist)

* test,freebsd: skip udp_dual_stack if not supported (Santiago Gimeno)

* linux: don't retry dup2/dup3 on EINTR (Ben Noordhuis)

* unix: don't retry dup2/dup3 on EINTR (Ben Noordhuis)

* test: fix -Wtautological-pointer-compare warnings (Saúl Ibarra
  Corretgé)

* win: map ERROR_BAD_PATHNAME to UV_ENOENT (Tony Kelman)

* test: fix test/test-tty.c for AIX (Imran Iqbal)

* android: support api level less than 21 (kkdaemon)

* fsevents: fix race on simultaneous init+close (Fedor Indutny)

* linux,fs: fix p{read,write}v with a 64bit offset (Saúl Ibarra
  Corretgé)

* fs: add uv_fs_realpath() (Yuval Brik)

* win: fix path for removed and renamed fs events (Joran Dirk Greef)

* win: do not read more from stream than available (Jeremy Whitlock)

* test: test that uv_close() doesn't corrupt QUEUE (Andrey Mazo)

* unix: fix uv_fs_event_stop() from fs_event_cb (Andrey Mazo)

* test: fix self-deadlocks in thread_rwlock_trylock (Ben Noordhuis)

* src: remove non ascii character (sztomi)

* test: fix test udp_multicast_join6 for AIX (Imran Iqbal)
2015-12-14 20:54:30 +01:00
Yuval Brik
e76b8838e5 fs: add uv_fs_realpath()
Equivalent to realpath(3), returns the full resolved absolute path of a
file or directory.

PR-URL: https://github.com/libuv/libuv/pull/531
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-12-05 11:32:58 +01:00
Saúl Ibarra Corretgé
f41b7386de include: add stdio.h to uv.h
Fixes a compilation problem in some platforms (notably OSX) after
6490c50.

PR-URL: https://github.com/libuv/libuv/pull/618
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremy Whitlock <jwhitlock@apache.org>
2015-11-17 09:14:01 +01:00
Petka Antonov
6490c508a9 misc: expose handle print APIs
PR-URL: https://github.com/libuv/libuv/pull/291
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-11-16 09:34:34 +01:00
Jianghua Yang
e5c03aed6b include: remove duplicate extern declaration
PR-URL: https://github.com/libuv/libuv/pull/547
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-09-24 23:19:31 +02:00
Saúl Ibarra Corretgé
455c4035d4 Now working on version 1.7.6 2015-09-22 22:27:51 +02:00
Saúl Ibarra Corretgé
a8c1136de2 2015.09.23, Version 1.7.5 (Stable)
Changes since version 1.7.4:

* unix: Support atomic compare & swap xlC on AIX (nmushell)

* unix: Fix including uv-aix.h on AIX (nmushell)

* unix: consolidate rwlock tryrdlock trywrlock errors (Saúl Ibarra
  Corretgé)

* unix, win: consolidate mutex trylock errors (Saúl Ibarra Corretgé)

* darwin: fix memory leak in uv_cpu_info (Jianghua Yang)

* test: add tests for the uv_rwlock implementation (Bert Belder)

* win: redo/fix the uv_rwlock APIs (Bert Belder)

* win: don't fetch function pointers to SRWLock APIs (Bert Belder)
2015-09-22 22:12:07 +02:00
Bert Belder
9a4fd2689d win: redo/fix the uv_rwlock APIs
Previously, on Windows Vista and later, we'd use the Windows native
SRWLock APIs. However they turned out to be semantically incompatible
with pthread read-write locks and/or plain buggy. This patch makes sure
that the custom implementation that was previously only used on old
Windows versions is now used everywhere.

This patch fixes a number of issues with the old fallback
implementation. Specifically:

* The reader count would not be incremented when a thread successfully
  acquired a read lock while another thread *also* held a read lock.

* `uv_rwlock_tryrdlock()` and `uv_rwlock_trywrlock()` now
  consistently return UV_EBUSY when a lock couldn't be acquired.

* Any unexpected errors now cause libuv to abort, with the exception of
  `uv_rwlock_init()`.

See also https://github.com/libuv/libuv/issues/515.

PR-URL: https://github.com/libuv/libuv/pull/525
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-09-22 11:18:13 -04:00
Saúl Ibarra Corretgé
e2db9240db Working on the next version 2015-09-11 17:58:25 +02:00
Saúl Ibarra Corretgé
a7ad4f5218 2015.09.12, Version 1.7.4 (Stable)
Changes since version 1.7.3:

* doc: uv_read_start and uv_read_cb clarifications (Ben Trask)

* freebsd: obtain true uptime through clock_gettime() (Jianghua Yang)

* win, tty: do not convert \r to \r\n (Colin Snover)

* build,gyp: add DragonFly to the list of OSes (Michael Neumann)

* fs: fix bug in sendfile for DragonFly (Michael Neumann)

* doc: add uv_dlsym() return type (Brian White)

* tests: fix fs tests run w/o full getdents support (Jeremy Whitlock)

* doc: fix typo (Devchandra Meetei Leishangthem)

* doc: fix uv-unix.h location (Sakthipriyan Vairamani)

* unix: fix error check when closing process pipe fd (Ben Noordhuis)

* test,freebsd: fix ipc_listen_xx_write tests (Santiago Gimeno)

* win: fix unsavory rwlock fallback implementation (Bert Belder)

* doc: clarify repeat timer behavior (Eli Skeggs)
2015-09-11 17:44:02 +02:00
Bert Belder
3eb6764acd win: fix unsavory rwlock fallback implementation
Before this patch an uv_mutex_t (backed by a critical section) could be
released by a tread different from the thread that acquired it, which is
not allowed. This is fixed by using a semaphore instead.

Note that the affected code paths were used on Windows XP and Windows
Server 2003 only.

Fixes: https://github.com/libuv/libuv/issues/515
PR-URL: https://github.com/libuv/libuv/pull/516
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-09-11 06:05:32 +02:00
Saúl Ibarra Corretgé
93877b11c8 2015.08.28, Version 1.7.3 (Stable)
Changes since version 1.7.2:

* threadpool: fix thread starvation bug (Ben Noordhuis)
2015-08-27 23:42:36 +02:00
Saúl Ibarra Corretgé
4d13a013fc 2015.08.25, Version 1.7.2 (Stable)
Changes since version 1.7.1:

* unix, win: make uv_loop_init return on error (Willem Thiart)

* win: reset pipe handle for pipe servers (Saúl Ibarra Corretgé)

* win: fix replacing pipe handle for pipe servers (Saúl Ibarra Corretgé)

* win: fix setting pipe pending instances after bind (Saúl Ibarra
  Corretgé)
2015-08-24 23:26:27 +02:00
Saúl Ibarra Corretgé
44f4b6bd82 2015.08.20, Version 1.7.1 (Stable)
Changes since version 1.7.0:

* doc: document the procedure for verifying releases (Saúl Ibarra
  Corretgé)

* doc: add note about Windows binaries to the README (Saúl Ibarra
  Corretgé)

* doc: use long GPG IDs in MAINTAINERS.md (Saúl Ibarra Corretgé)

* Revert "stream: squelch ECONNRESET error if already closed" (Saúl
  Ibarra Corretgé)

* doc: clarify uv_read_stop() is idempotent (Corbin Simpson)

* unix: OpenBSD's setsockopt needs an unsigned char for multicast
  (Zachary Hamm)

* test: Fix two memory leaks (Karl Skomski)

* unix,win: return EINVAL on nullptr args in uv_fs_{read,write} (Karl
  Skomski)

* win: set accepted TCP sockets as non-inheritable (Saúl Ibarra
  Corretgé)

* unix: remove superfluous parentheses in fs macros (Ben Noordhuis)

* unix: don't copy arguments for sync fs requests (Ben Noordhuis)

* test: plug small memory leak in unix test runner (Ben Noordhuis)

* unix,windows: allow NULL loop for sync fs requests (Ben Noordhuis)

* unix,windows: don't assert on unknown error code (Ben Noordhuis)

* stream: retry write on EPROTOTYPE on OSX (Brian White)

* common: fix use of snprintf on Windows (Saúl Ibarra Corretgé)

* tests: refactored fs watch_dir tests for stability (Jeremy Whitlock)
2015-08-19 22:45:07 +02:00
Saúl Ibarra Corretgé
415a865d63 2015.08.06, Version 1.7.0 (Stable)
Changes since version 1.6.1:

* win,stream: add slot to remember CRT fd (Bert Belder)

* win,pipe: properly close when created from CRT fd (Bert Belder)

* win,pipe: don't close fd 0-2 (Bert Belder)

* win,tty: convert fd -> handle safely (Bert Belder)

* win,tty: properly close when created from CRT fd (Bert Belder)

* win,tty: don't close fd 0-2 (Bert Belder)

* win,fs: don't close fd 0-2 (Bert Belder)

* win: include "malloc.h" (Cheng Zhao)

* windows: MSVC 2015 has C99 inline (Jason Williams)

* dragonflybsd: fixes for nonblocking and cloexec (Michael Neumann)

* dragonflybsd: use sendfile(2) for uv_fs_sendfile (Michael Neumann)

* dragonflybsd: fix uv_exepath (Michael Neumann)

* win,fs: Fixes align(8) directive on mingw (Stefano Cristiano)

* unix, win: prevent replacing fd in uv_{udp,tcp,pipe}_t (Saúl Ibarra
  Corretgé)

* win: move logic to set socket non-inheritable to uv_tcp_set_socket
  (Saúl Ibarra Corretgé)

* unix, win: add ability to create tcp/udp sockets early (Saúl Ibarra
  Corretgé)

* test: retry select() on EINTR, honor milliseconds (Ben Noordhuis)

* unix: consolidate tcp and udp bind error (Saúl Ibarra Corretgé)

* test: conditionally skip udp_ipv6_multicast_join6 (heshamsafi)

* core: add UV_VERSION_HEX macro (Saúl Ibarra Corretgé)

* doc: add section with version-checking macros and functions (Saúl
  Ibarra Corretgé)

* tty: cleanup handle if uv_tty_init fails (Saúl Ibarra Corretgé)

* darwin: save a fd when FSEvents is used (Saúl Ibarra Corretgé)

* win: fix returning thread id in uv_thread_self (Saúl Ibarra Corretgé)

* common: use offsetof for QUEUE_DATA (Saúl Ibarra Corretgé)

* win: remove UV_HANDLE_CONNECTED (A. Hauptmann)

* docs: add Windows specific note for uv_fs_open (Saúl Ibarra Corretgé)

* doc: add note about uv_fs_scandir (Saúl Ibarra Corretgé)

* test,unix: reduce stack size of watchdog threads (Ben Noordhuis)

* win: add support for recursive file watching (Saúl Ibarra Corretgé)

* win,tty: support consoles with non-default colors (John McNamee)

* doc: add missing variable name (Yosuke Furukawa)

* stream: squelch ECONNRESET error if already closed (Santiago Gimeno)

* build: remove ancient condition from common.gypi (Saúl Ibarra
  Corretgé)

* tests: skip some tests when network is unreachable (Luca Bruno)

* build: proper support for android cross compilation (guworks)

* android: add missing include to pthread-fixes.c (RossBencina)

* test: fix compilation warning (Saúl Ibarra Corretgé)

* doc: add a note about uv_dirent_t.type (Saúl Ibarra Corretgé)

* win,test: fix shared library build (Saúl Ibarra Corretgé)

* test: fix compilation warning (Santiago Gimeno)

* build: add experimental Windows installer (Roger A. Light)

* threadpool: send signal only when queue is empty (chenttuuvv)

* aix: fix uv_exepath with relative paths (Richard Lau)

* build: fix version syntax in AppVeyor file (Saúl Ibarra Corretgé)

* unix: allow nbufs > IOV_MAX in uv_fs_{read,write} (ronkorving)
2015-08-05 22:10:09 +02:00
Saúl Ibarra Corretgé
ede94898aa core: add UV_VERSION_HEX macro
PR-URL: https://github.com/libuv/libuv/pull/412
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-29 23:08:41 +02:00
Saúl Ibarra Corretgé
f8f59824c4 unix, win: add ability to create tcp/udp sockets early
Introduce two new APIs:

int uv_tcp_init_ex(uv_loop_t*, uv_tcp_t* handle, int flags)
int uv_udp_init_ex(uv_loop_t*, uv_udp_t* handle, int flags)

The lower 8 bits of the flags field are used for the socket domain.
AF_INET, AF_INET6 and AF_UNSPEC are supported. If AF_UNSPEC is specified
the socket is created lazily, just like uv_{tcp,udp}_init.

Some Windows notes:

getsockname fails with WSAEINVAL if the socket is not bound. This could
potentially be improved by detecting the socket family and filling
the sockaddr_in/6 struct manually.

bind returns WSAEFAULT if we try to bind a socket to the wrong family.
Unix returns EINVAL.

PR-URL: https://github.com/libuv/libuv/pull/400
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-19 09:37:19 +02:00
Bert Belder
b6bf6d2d1f win,stream: add slot to remember CRT fd
Certain types of streams may be opened from a CRT file descriptor (as
opposed to a Windows HANDLE). In order to close the file descriptor
later, libuv must store the file descriptor used to open the stream.

PR-URL: https://github.com/libuv/libuv/pull/396
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-14 16:22:17 -07:00
Saúl Ibarra Corretgé
30c8be07bb 2015.06.06, Version 1.6.1 (Stable)
Changes since version 1.6.0:

* unix: handle invalid _SC_GETPW_R_SIZE_MAX values (cjihrig)
2015-06-05 19:45:58 +02:00
Saúl Ibarra Corretgé
adfccad764 2015.06.04, Version 1.6.0 (Stable)
Changes since version 1.5.0:

* aix: fix setsockopt for multicast options (Michael)

* unix: don't block for io if any io handle is primed (Saúl Ibarra
  Corretgé)

* windows: MSVC 2015 has snprintf() (Rui Abreu Ferreira)

* windows: Add VS2015 support to vcbuild.bat (Jason Williams)

* doc: fix typo in tcp.rst (Igor Soarez)

* linux: work around epoll bug in kernels < 2.6.37 (Ben Noordhuis)

* unix,win: add uv_os_homedir() (cjihrig)

* stream: fix `select()` race condition (Fedor Indutny)

* unix: prevent infinite loop in uv__run_pending (Saúl Ibarra Corretgé)

* unix: make sure UDP send callbacks are asynchronous (Saúl Ibarra
  Corretgé)

* test: fix `platform_output` netmask printing. (Andrew Paprocki)

* aix: add ahafs autoconf detection and README notes (Andrew Paprocki)

* core: add ability to customize memory allocator (Saúl Ibarra Corretgé)
2015-06-03 21:32:57 +02:00
Saúl Ibarra Corretgé
bddd6a8489 core: add ability to customize memory allocator
This patch is composed by the work done in
https://github.com/libuv/libuv/pull/231 and
https://github.com/libuv/libuv/pull/287 plus some changes by yours
truly.

Thanks @beevik and @mattsta for their work on this!

PR-URL: https://github.com/libuv/libuv/pull/368
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-02 12:05:20 +02:00
cjihrig
a62c2d5928 unix,win: add uv_os_homedir()
PR-URL: https://github.com/libuv/libuv/pull/350
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-05-21 17:31:35 +02:00
Saúl Ibarra Corretgé
4e77f74c7b 2015.05.07, Version 1.5.0 (Stable)
Changes since version 1.4.2:

* doc: clarify that the thread pool primites are not thread safe
  (Andrius Bentkus)

* aix: always deregister closing fds from epoll (Michael)

* unix: fix glibc-2.20+ macro incompatibility (Massimiliano Torromeo)

* doc: add Sphinx plugin for generating links to man pages (Saúl Ibarra
  Corretgé)

* doc: link system and library calls to man pages (Saúl Ibarra Corretgé)

* doc: document uv_getnameinfo_t.{host|service} (Saúl Ibarra Corretgé)

* build: update the location of gyp (Stephen von Takach)

* win: name all anonymous structs and unions (TomCrypto)

* linux: work around epoll bug in kernels 3.10-3.19 (Ben Noordhuis)

* darwin: fix size calculation in select() fallback (Ole André Vadla
  Ravnås)

* solaris: fix setsockopt for multicast options (Julien Gilli)

* test: fix race condition in multithreaded test (Ben Noordhuis)

* doc: fix long lines in tty.rst (Ben Noordhuis)

* test: use UV_TTY_MODE_* values in tty test (Ben Noordhuis)

* unix: don't clobber errno in uv_tty_reset_mode() (Ben Noordhuis)

* unix: reject non-tty fds in uv_tty_init() (Ben Noordhuis)

* win: fix pipe blocking writes (Alexis Campailla)

* build: fix cross-compiling for iOS (Steven Kabbes)

* win: remove unnecessary malloc.h

* include: use `extern "c++"` for defining C++ code (Kazuho Oku)

* unix: reap child on execvp() failure (Ryan Phillips)

* windows: fix handle leak on EMFILE (Brian Green)

* test: fix tty_file, close handle if initialized (Saúl Ibarra Corretgé)

* doc: clarify what uv_*_open accepts (Saúl Ibarra Corretgé)

* doc: clarify that we don't maintain external doc resources (Saúl
  Ibarra Corretgé)

* build: add documentation for ninja support (Devchandra Meetei
  Leishangthem)

* doc: document uv_buf_t members (Corey Farrell)

* linux: fix epoll_pwait() fallback on arm64 (Ben Noordhuis)

* android: fix compilation warning (Saúl Ibarra Corretgé)

* unix: don't close the fds we just setup (Sam Roberts)

* test: spawn child replacing std{out,err} to stderr (Saúl Ibarra
  Corretgé)

* unix: fix swapping fds order in uv_spawn (Saúl Ibarra Corretgé)

* unix: fix potential bug if dup2 fails in uv_spawn (Saúl Ibarra
  Corretgé)

* test: remove LOG and LOGF variadic macros (Saúl Ibarra Corretgé)

* win: fix uv_fs_access on directories (Saúl Ibarra Corretgé)

* win: fix of double free in uv_uptime (Per Nilsson)

* unix: open "/dev/null" instead of "/" for emfile_fd (Alan Rogers)

* docs: add some missing words (Daryl Haresign)

* unix: clean up uv_fs_open() O_CLOEXEC logic (Ben Noordhuis)

* build: set SONAME for shared library in uv.gyp (Rui Abreu Ferreira)

* windows: define snprintf replacement as inline instead of static (Rui
  Abreu Ferreira)

* win: fix unlink of readonly files (João Reis)

* doc: fix uv_run(UV_RUN_DEFAULT) description (Ben Noordhuis)

* linux: intercept syscall when running under memory sanitizer (Keno
  Fischer)

* aix: fix uv_interface_addresses return value (farblue68)

* windows: defer reporting TCP write failure until next tick (Saúl
  Ibarra Corretgé)

* test: add test for deferred TCP write failure (Saúl Ibarra Corretgé)
2015-05-06 21:48:15 +02:00
Saúl Ibarra Corretgé
1f711e4d6d Revert "memory: add uv_replace_allocator"
This reverts commit c272f1f1bc.

The concept will come back to libuv, but it needs some more work.
2015-04-29 09:37:02 +02:00
Kazuho Oku
252f3624c2 include: use extern "c++" for defining C++ code
PR-URL: https://github.com/libuv/libuv/pull/265
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-03-18 09:40:51 +01:00
Brett Vickers
c272f1f1bc memory: add uv_replace_allocator
With uv_replace_allocator, it's possible to override the default
memory allocator's malloc and free calls with functions of the user's
choosing. This allows libuv to interoperate with projects requiring a
custom memory allocator.

Internally, all calls to malloc and free have been replaced with
uv__malloc and uv__free, respectively. The uv__malloc and uv__free
functions call malloc and free unless they have been overridden by a
previous call to uv_replace_allocator.

As part of this change, the special aligned memory allocations
performed in src/win/fs-event.c have been replaced with standard
allocations. The 4-byte alignment being requested in this file was
unnecessary, since standard allocators already guarantee at least an
8-byte alignment.

PR-URL: https://github.com/libuv/libuv/pull/231
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-03-05 20:02:16 +01:00
TomCrypto
073323baca win: name all anonymous structs and unions
All the public structs and unions in the private fields in uv-win.h have
been named and all code accessing them updated, to comply to the C89
spec (which were previously causing warnings with the -pedantic flag).

PR-URL: https://github.com/libuv/libuv/pull/239
Reviewed-By: Andrius Bentkus <andrius.bentkus@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-03-04 09:35:10 +01:00
Saúl Ibarra Corretgé
8ef34592a9 doc: document uv_getnameinfo_t.{host|service}
Fixes: https://github.com/libuv/libuv/issues/182
PR-URL: https://github.com/libuv/libuv/pull/233
Reviewed-By: Tim Caswell <tim@creationix.com>
2015-03-02 16:53:57 +01:00
Saúl Ibarra Corretgé
1a7391348a 2015.02.27, Version 1.4.2 (Stable)
Changes since version 1.4.1:

* stream: ignore EINVAL for SO_OOBINLINE on OS X (Fedor Indutny)
2015-02-26 11:20:00 +01:00
Saúl Ibarra Corretgé
e8e3fc5789 2015.02.25, Version 1.4.1 (Stable)
Changes since version 1.4.0:

* win: don't use inline keyword in thread.c (Ben Noordhuis)

* windows: fix setting dirent types on uv_fs_scandir_next (Saúl Ibarra
  Corretgé)

* unix,windows: make uv_thread_create() return errno (Ben Noordhuis)

* tty: fix build for SmartOS (Julien Gilli)

* unix: fix for uv_async data race (Michael Penick)

* unix, windows: map EHOSTDOWN errno (Ben Noordhuis)

* stream: use SO_OOBINLINE on OS X (Fedor Indutny)
2015-02-24 20:45:46 +01:00
Ben Noordhuis
3f910a0196 unix, windows: map EHOSTDOWN errno
Fixes: https://github.com/libuv/libuv/issues/195
PR-URL: https://github.com/libuv/libuv/pull/212
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-02-19 15:38:12 +01:00
Saúl Ibarra Corretgé
3ddfb4a9cc windows: fix setting dirent types on uv_fs_scandir_next
Also make the tests more strict.

PR-URL: https://github.com/libuv/libuv/pull/201
Reviewed-By: Tim Caswell <tim@creationix.com>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-02-12 09:05:48 +01:00
Saúl Ibarra Corretgé
19fb8a9064 2015.02.10, Version 1.4.0 (Stable)
Changes since version 1.3.0:

* unix: check Android support for pthread_cond_timedwait_monotonic_np
  (Leith Bade)

* test: use modified path in test (cjihrig)

* unix: implement uv_stream_set_blocking() (Ben Noordhuis)
2015-02-09 21:06:37 +01:00
Saúl Ibarra Corretgé
165685b2a9 2015.01.29, Version 1.3.0 (Stable)
Changes since version 1.2.1:

* unix, windows: set non-block mode in uv_poll_init (Saúl Ibarra
  Corretgé)

* doc: clarify which flags are supported in uv_fs_event_start (Saúl
  Ibarra Corretgé)

* win,unix: move loop functions which have identical implementations
  (Andrius Bentkus)

* doc: explain how the threadpool is allocated (Alex Mo)

* doc: clarify uv_default_loop (Saúl Ibarra Corretgé)

* unix: fix implicit declaration compiler warning (Ben Noordhuis)

* unix: fix long line introduced in commit 94e628fa (Ben Noordhuis)

* unix, win: add synchronous uv_get{addr,name}info (Saúl Ibarra
  Corretgé)

* linux: fix epoll_pwait() regression with < 2.6.19 (Ben Noordhuis)

* build: compile -D_GNU_SOURCE on linux (Ben Noordhuis)

* build: use -fvisibility=hidden in autotools build (Ben Noordhuis)

* fs, pipe: no trailing terminator in exact sized buffers (Andrius
  Bentkus)

* style: rename buf to buffer and len to size for consistency (Andrius
  Bentkus)

* test: fix test-spawn on MinGW32 (Luis Martinez de Bartolome)

* win, pipe: fix assertion when destroying timer (Andrius Bentkus)

* win, unix: add pipe_peername implementation (Andrius Bentkus)
2015-01-28 21:54:27 +01:00
Andrius Bentkus
39a0936fec win, unix: add pipe_peername implementation
PR-URL: https://github.com/libuv/libuv/pull/166
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-01-28 21:40:32 +01:00
Andrius Bentkus
2bfa2e5e22 style: rename buf to buffer and len to size for consistency
PR-URL: https://github.com/libuv/libuv/pull/159
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-01-27 11:31:16 +01:00
Saúl Ibarra Corretgé
f2bb8d394c unix, win: add synchronous uv_get{addr,name}info
PR-URL: https://github.com/libuv/libuv/pull/156
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-01-23 01:12:05 +01:00
Saúl Ibarra Corretgé
4ca78e9890 2015.01.15, Version 1.2.1 (Stable)
Changes since version 1.2.0:

* unix: remove unused dtrace file (Saúl Ibarra Corretgé)

* test: skip TTY select test if /dev/tty can't be opened (Saúl Ibarra
  Corretgé)

* doc: clarify the behavior of uv_tty_init (Saúl Ibarra Corretgé)

* doc: clarify how uv_async_send behaves (Saúl Ibarra Corretgé)

* build: make dist now generates a full tarball (Johan Bergström)

* freebsd: make uv_exepath more resilient (Saúl Ibarra Corretgé)

* unix: make setting the tty mode to the same value a no-op (Saúl Ibarra
  Corretgé)

* win,tcp: support uv_try_write (Bert Belder)

* test: enable test-tcp-try-write on windows (Bert Belder)

* win,tty: support uv_try_write (Bert Belder)

* unix: set non-block mode in uv_{pipe,tcp,udp}_open (Ben Noordhuis)
2015-01-14 19:52:26 +01:00
Saúl Ibarra Corretgé
09f25b13cd 2015.01.06, Version 1.2.0 (Stable)
Changes since version 1.1.0:

* linux: fix epoll_pwait() sigmask size calculation (Ben Noordhuis)

* tty: implement binary I/O terminal mode (Yuri D'Elia)

* test: fix spawn test with autotools build (Ben Noordhuis)

* test: skip ipv6 tests when ipv6 is not supported (Ben Noordhuis)

* common: move STATIC_ASSERT to uv-common.h (Alexey Melnichuk)

* win/thread: store thread handle in a TLS slot (Alexey Melnichuk)

* unix: fix ttl, multicast ttl and loop options on IPv6 (Saúl Ibarra
  Corretgé)

* linux: fix support for preadv/pwritev-less kernels (Ben Noordhuis)

* unix: make uv_exepath(size=0) return UV_EINVAL (Ben Noordhuis)

* darwin: fix uv_exepath(smallbuf) UV_EPERM error (Ben Noordhuis)

* openbsd: fix uv_exepath(smallbuf) UV_EINVAL error (Ben Noordhuis)

* linux: fix uv_exepath(size=1) UV_EINVAL error (Ben Noordhuis)

* sunos: preemptively fix uv_exepath(size=1) (Ben Noordhuis)

* win: fix and clarify comments in winapi.h (Bert Belder)

* win: make available NtQueryDirectoryFile (Bert Belder)

* win: add definitions for directory information types (Bert Belder)

* win: use NtQueryDirectoryFile to implement uv_fs_scandir (Bert Belder)

* unix: don't unlink unix socket on bind error (Ben Noordhuis)

* build: fix bad comment in autogen.sh (Ben Noordhuis)

* build: add AC_PROG_LIBTOOL to configure.ac (Ben Noordhuis)

* test: skip udp_options6 if there no IPv6 support (Saúl Ibarra
  Corretgé)

* win: add definitions for MUI errors mingw lacks (Bert Belder)

* build: enable warnings in autotools build (Ben Noordhuis)

* build: remove -Wno-dollar-in-identifier-extension (Ben Noordhuis)

* build: move flags from Makefile.am to configure.ac (Ben Noordhuis)
2015-01-05 20:28:35 +01:00
Yuri D'Elia
025602da13 tty: implement binary I/O terminal mode
Introduce a uv_tty_mode_t enum for uv_tty_set_mode(), with backward
compatible values.  Add a new mode UV_TTY_MODE_IO, which uses
cfmakeraw() internally.

PR-URL: https://github.com/libuv/libuv/pull/86
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2014-12-27 18:18:24 +01:00
Saúl Ibarra Corretgé
a6d3d5a0f5 2014.12.25, Version 1.1.0 (Stable)
Changes since version 1.0.2:

* test: test that closing a poll handle doesn't corrupt the stack (Bert
  Belder)

* win: fix compilation of tests (Marc Schlaich)

* Revert "win: keep a reference to AFD_POLL_INFO in cancel poll" (Bert
  Belder)

* win: avoid stack corruption when closing a poll handle (Bert Belder)

* test: fix test-fs-file-loop on Windows (Bert Belder)

* test: fix test-cwd-and-chdir (Bert Belder)

* doc: indicate what version uv_loop_configure was added on (Saúl Ibarra
  Corretgé)

* doc: fix sphinx warning (Saúl Ibarra Corretgé)

* test: skip spawn_setuid_setgid if we get EACCES (Saúl Ibarra Corretgé)

* test: silence some Clang warnings (Saúl Ibarra Corretgé)

* test: relax osx_select_many_fds (Saúl Ibarra Corretgé)

* test: fix compilation warnings when building with Clang (Saúl Ibarra
  Corretgé)

* win: fix autotools build of tests (Luis Lavena)

* gitignore: ignore Visual Studio files (Marc Schlaich)

* win: set fallback message if FormatMessage fails (Marc Schlaich)

* win: fall back to default language in uv_dlerror (Marc Schlaich)

* test: improve compatibility for dlerror test (Marc Schlaich)

* test: check dlerror is "no error" in no error case (Marc Schlaich)

* unix: change uv_cwd not to return a trailing slash (Saúl Ibarra
  Corretgé)

* test: fix cwd_and_chdir test on Unix (Saúl Ibarra Corretgé)

* test: add uv_cwd output to platform_output test (Saúl Ibarra Corretgé)

* build: fix dragonflybsd autotools build (John Marino)

* win: scandir use 'ls' for formatting long strings (Kenneth Perry)

* build: remove clang and gcc_version gyp defines (Ben Noordhuis)

* unix, windows: don't treat uv_run_mode as a bitmask (Saúl Ibarra
  Corretgé)

* unix, windows: fix UV_RUN_ONCE mode if progress was made (Saúl Ibarra
  Corretgé)
2014-12-24 09:03:51 +01:00
Bert Belder
9f3fa71cfa Merge branch 'v0.10' into v1.x
Conflicts:
	src/win/poll.c
	test/test-poll-close-doesnt-corrupt-stack.c
2014-12-10 16:58:01 +01:00
Bert Belder
152c35d54d Revert "win: keep a reference to AFD_POLL_INFO in cancel poll"
The offending patch doesn't completely fix the issue, it just trades
stack corruption for heap corruption which is less likely.

In addition there is a much simpler solution for this problem.

This reverts commit cd894521dd.

PR-URL: https://github.com/libuv/libuv/pull/49
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Marc Schlaich <marc.schlaich@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2014-12-10 16:44:28 +01:00
Saúl Ibarra Corretgé
d42630dd9b 2014.12.10, Version 1.0.2 (Stable)
Changes since version 1.0.1:

* linux: fix sigmask size arg in epoll_pwait() call (Ben Noordhuis)

* linux: handle O_NONBLOCK != SOCK_NONBLOCK case (Helge Deller)

* doc: fix spelling (Joey Geralnik)

* unix, windows: fix typos in comments (Joey Geralnik)

* test: canonicalize test runner path (Ben Noordhuis)

* test: fix compilation warnings (Saúl Ibarra Corretgé)

* test: skip tty test if detected width and height are 0 (Saúl Ibarra
  Corretgé)

* doc: update README with IRC channel (Saúl Ibarra Corretgé)

* Revert "unix: use cfmakeraw() for setting raw TTY mode" (Ben
  Noordhuis)

* doc: document how to get result of uv_fs_mkdtemp (Tim Caswell)

* unix: add flag for blocking SIGPROF during poll (Ben Noordhuis)

* unix, windows: add uv_loop_configure() function (Ben Noordhuis)

* win: keep a reference to AFD_POLL_INFO in cancel poll (Marc Schlaich)

* test: raise fd limit for OSX select test (Saúl Ibarra Corretgé)

* unix: remove overzealous assert in uv_read_stop (Saúl Ibarra Corretgé)

* unix: reset the reading flag when a stream gets EOF (Saúl Ibarra
  Corretgé)

* unix: stop reading if an error is produced (Saúl Ibarra Corretgé)

* cleanup: remove all dead assignments (Maciej Małecki)

* linux: return early if we have no interfaces (Maciej Małecki)

* cleanup: remove a dead increment (Maciej Małecki)
2014-12-09 20:17:06 +01:00
Saúl Ibarra Corretgé
7d144851b5 Merge branch 'v0.10' into v1.x
Conflicts:
	AUTHORS
	ChangeLog
	src/version.c
	src/win/poll.c
2014-12-09 19:58:38 +01:00
schlamar
cd894521dd win: keep a reference to AFD_POLL_INFO in cancel poll 2014-12-09 08:49:59 +01:00
Ben Noordhuis
a6f2a4f834 Merge branch 'v0.10' into v1.x
Conflicts:
	AUTHORS
	ChangeLog
	README.md
	config-unix.mk
	include/uv.h
	src/unix/internal.h
	src/unix/kqueue.c
	src/unix/linux-core.c
	src/unix/stream.c
	src/uv-common.c
	src/uv-common.h
	src/version.c
	test/test-osx-select.c
2014-12-05 19:18:36 +01:00
Ben Noordhuis
9da5fd443e unix, windows: add uv_loop_configure() function
The only supported option right now is UV_LOOP_BLOCK_SIGNAL, which only
supports the SIGPROF signal and only on UNIX platforms.  So yes, it is
kind of limited right now.  But everything has to start somewhere.

Refs strongloop/strong-agent#3 and strongloop-internal/scrum-cs#37.

PR-URL: https://github.com/libuv/libuv/pull/15
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2014-12-05 17:39:43 +01:00
Bert Belder
0a8e81374e 2014.11.27, Version 1.0.1 (Stable)
Changes since version 1.0.0:

* readme: remove Rust from users (Elijah Andrews)

* doc,build,include: update project links (Ben Noordhuis)

* doc: fix typo: Strcutures -> Structures (Michael Ira Krufky)

* unix: fix processing process handles queue (Saúl Ibarra Corretgé)

* win: replace non-ansi characters in source file (Bert Belder)
2014-11-26 21:31:41 +01:00
Ben Noordhuis
7ce1113885 doc,build,include: update project links
The project home has moved from https://github.com/joyent/libuv to
https://github.com/libuv/libuv.  Update the links inside the repo.
2014-11-25 15:39:12 +01:00
Saúl Ibarra Corretgé
feb2a9e694 2014.11.21, Version 1.0.0 (Stable)
Changes since version 1.0.0-rc2:

* doc: fix git/svn url for gyp repo in README (Emmanuel Odeke)

* windows: fix fs_read with nbufs > 1 and offset (Unknown W. Brackets)

* win: add missing IP_ADAPTER_UNICAST_ADDRESS_LH definition for MinGW
  (huxingyi)

* doc: mention homebrew in README (Mikhail Mukovnikov)

* doc: add learnuv workshop to README (Thorsten Lorenz)

* doc: fix parameter name in uv_fs_access (Saúl Ibarra Corretgé)

* unix: use cfmakeraw() for setting raw TTY mode (Yuri D'Elia)

* win: fix uv_thread_self() (Alexis Campailla)

* build: add x32 support to gyp build (Ben Noordhuis)

* build: remove dtrace probes (Ben Noordhuis)

* doc: fix link in misc.rst (Manos Nikolaidis)

* mailmap: remove duplicated entries (Saúl Ibarra Corretgé)

* gyp: fix comment regarding version info location (Saúl Ibarra
  Corretgé)
2014-11-20 19:34:12 +01:00
Saúl Ibarra Corretgé
e03c0c7383 doc: fix parameter name in uv_fs_access
Closes #1560
2014-11-06 21:14:57 -05:00
Saúl Ibarra Corretgé
f277e80707 version: now working on 1.0.0-rc3 2014-10-20 22:50:40 +02:00
Saúl Ibarra Corretgé
e3ea6c1179 2014.10.21, Version 1.0.0-rc2 (Pre-release)
Changes since version 1.0.0-rc1:

* build: add missing fixtures to distribution tarball (Rob Adams)

* doc: update references to current stable branch (Zachary Newman)

* fs: fix readdir on empty directory (Fedor Indutny)

* fs: rename uv_fs_readdir to uv_fs_scandir (Saúl Ibarra Corretgé)

* doc: document uv_alloc_cb (Saúl Ibarra Corretgé)

* doc: add migration guide from version 0.10 (Saúl Ibarra Corretgé)

* build: add DragonFly BSD support in autotools (Robin Hahling)

* doc: document missing stream related structures (Saúl Ibarra Corretgé)

* doc: clarify uv_loop_t.data field lifetime (Saúl Ibarra Corretgé)

* doc: add documentation for missing functions and structures (Saúl
  Ibarra Corretgé)

* doc: fix punctuation and grammar in README (Jeff Widman)

* windows: return libuv error codes in uv_poll_init() (cjihrig)

* unix, windows: add uv_fs_access() (cjihrig)

* windows: fix netmask detection (Alexis Campailla)

* unix, windows: don't include null byte in uv_cwd size (Saúl Ibarra
  Corretgé)

* unix, windows: add uv_thread_equal (Tomasz Kołodziejski)

* windows: fix fs_write with nbufs > 1 and offset (Unknown W. Brackets)
2014-10-20 22:47:56 +02:00
Tomasz Kołodziejski
59658a8de7 unix, windows: add uv_thread_equal 2014-10-20 09:51:49 +02:00
cjihrig
c18205a1c5 unix, windows: add uv_fs_access() 2014-10-13 10:23:53 +02:00
Saúl Ibarra Corretgé
03e53f1cf7 fs: rename uv_fs_readdir to uv_fs_scandir
Closes #1431
2014-09-25 10:09:58 +02:00
Saúl Ibarra Corretgé
01293ac03a version: now working on 1.0.0-rc2 2014-09-18 18:48:09 +02:00
Saúl Ibarra Corretgé
0c28bbf7b4 version: set version to 1.0.0-rc1 2014-09-18 18:13:53 +02:00
Alexis Campailla
6ced8c2cc7 windows: improve timer precision
Improve timing precision by using QueryPerformanceCounter.

This is part of the fix for Node.js' test-timers-first-fire.js.
2014-09-17 23:17:41 +02:00
Saúl Ibarra Corretgé
f70b3fae8b version: add ability to specify a version suffix 2014-09-11 20:58:41 +02:00
Saúl Ibarra Corretgé
1cc5f179f5 include: cleanup uv.h
Remove comments describing the API which are now part of the
documentation, thus avoiding future comment rot (and removing the
existing part).
2014-09-11 09:38:35 +02:00
Saúl Ibarra Corretgé
2d5eaea1cd unix: simplify how process handle queue is managed 2014-09-04 10:06:52 +02:00
mattn
ae6197d730 windows: remove duplicated field
Fixes build
2014-09-03 18:42:46 +02:00
Saúl Ibarra Corretgé
06f9e1438e core: add a reserved field to uv_handle_t and uv_req_t
Just in case we need to work hard in keeping ABI compatibility.
2014-08-29 13:27:53 +02:00
Saúl Ibarra Corretgé
e524f89beb core: update version to 1.0.0 2014-08-29 10:31:50 +02:00
Saúl Ibarra Corretgé
4ca9a36389 unix, windows: add uv_fileno
Returns the platform specific file descriptor for handles that are
backed by one. The datatype is abstracted as uv_os_fd_t, which maps to
int on Unices and HANDLE on Windows.

Users can use this function to set specific socket options, for example,
in a non portable way.

This function is essentially a shotgun, you better be careful with
whatever you do with it, don't blame me if you used it to get the fd of
a stream, close it yourself and expect things to Just Work.
2014-08-27 10:53:40 +02:00
Saúl Ibarra Corretgé
df8ab507a0 fs: extend reported types in uv_fs_readdir_next
Support all possible types on Unix, and files, directories and links on
Windows. Some systems (hello SunOS!) don't have the d_type field on struct
dirent, so mark them as UV_DIRENT_UNKNOWN.
2014-08-15 16:44:44 +02:00
Fedor Indutny
ab2c4425a5 fs: introduce uv_readdir_next() and report types
Introduce:

    int uv_fs_readdir_next(uv_fs_t* req, uv_dirent_t* ent);

`uv_fs_readdir()` is not returning a file names list in `req->ptr`
anymore, the proper way to gather them is to call `uv_fs_readdir_next()`
in a callback.
2014-08-14 17:19:45 +04:00
Pavel Platto
a669f21bf8 windows: use OpenBSD implementation for uv_fs_mkdtemp 2014-08-12 10:04:09 +02:00
Leonard Hecker
4c90cc8e14 unix: fix typedef of uv_buf_t
Typedefs of unnamed structs cannot be forward declared.
Giving the uv_buf_t struct a name makes forward declarations possible.
2014-08-10 17:30:13 +02:00
huxingyi
ca4741b4a5 windows: fix build on MinGW 2014-08-10 12:09:04 +02:00
Andrius Bentkus
0ecee213ea unix, windows: add uv_recv_buffer_size and uv_send_buffer_size 2014-08-09 11:36:35 +02:00
Jameson Nash
837c62c71b windows: make uv_read_stop immediately stop reading
This implements locking around the blocking call to ReadFile to get
around a Windows kernel bug where a blocking ReadFile operation on a
stream can deadlock the thread. This allows uv_read_stop to immediately
cancel a pending IO operation, and allows uv_pipe_getsockname to
"pause" any pending read (from libuv) while it retrieves the
sockname information.

If unsupported by the OS (pre-Vista), this reverts to the old
(e.g. deadlock-prone) behavior

Closes #1313
2014-08-09 11:10:57 +02:00
Saúl Ibarra Corretgé
02e1ebd40b include: remove unneeded EADDRINFO errno
EADDRINFO is not a readl errno, it was used to signal any error that
getaddrinfo would return, but we return actual errors now.
2014-08-07 21:24:55 +02:00
Saúl Ibarra Corretgé
a9a4872c29 Now working on v0.11.29 2014-08-07 12:21:41 +02:00
Saúl Ibarra Corretgé
fc9e2a0bc4 2014.08.08, Version 0.11.28 (Unstable)
Changes since version 0.11.27:

* unix, windows: const-ify handle in uv_udp_getsockname (Rasmus
  Pedersen)

* windows: use UV_ECANCELED for aborted TCP writes (Saúl Ibarra
  Corretgé)

* windows: add more required environment variables (Jameson Nash)

* windows: sort environment variables before calling CreateProcess
  (Jameson Nash)

* unix, windows: move uv_loop_close out of assert (John Firebaugh)

* windows: fix buffer overflow on uv__getnameinfo_work() (lilohuang)

* windows: add uv_backend_timeout (Jameson Nash)

* test: disable tcp_close_accept on Windows (Saúl Ibarra Corretgé)

* windows: read the PATH env var of the child (Alex Crichton)

* include: avoid using C++ 'template' reserved word (Iñaki Baz Castillo)

* include: fix version number (Saúl Ibarra Corretgé)
2014-08-07 12:18:10 +02:00
Saúl Ibarra Corretgé
6bcb799a0d include: fix version number 2014-08-07 12:17:06 +02:00
Iñaki Baz Castillo
a1ff22cb7e include: avoid using C++ 'template' reserved word
Closes #1394
2014-08-06 12:52:46 +02:00
Rasmus Christian Pedersen
e72d48ddab unix, windows: const-ify handle in uv_udp_getsockname 2014-07-31 22:27:36 +02:00
Alexis Campailla
6d3a051eb4 windows: relay TCP bind errors via ipc
This is the libuv side of the fix for Node's cluster module on Windows.
https://github.com/joyent/node/issues/7691

Windows and Unix return certain socket errors (i.e. EADDRINUSE) at
different times: bind on Windows, and listen on Unix.
In an effort to hide this difference, libuv on Windows stores such
errors in the bind_error field of uv_tcp_t, to defer raising it at
listen time.
This worked fine except for the case in which a socket is shared in
a Node cluster and a bind error occurs.

A previous attempt to fix this (
d1e6be1460
3da36fe00e
) was flawed becaused in an attempt to relay the error at the JS level
it caused the master to start accepting connections.

With this new approach, libuv itself is relaying the bind errors,
providing for a uniform behavior of uv_tcp_listen.
2014-07-31 17:24:40 +02:00
Pavel Platto
e99b89f2ad unix, windows: add uv_fs_mkdtemp 2014-07-31 09:43:55 +02:00
Andrew Low
cdc979dbe0 aix: improve AIX compatibility 2014-07-22 22:57:24 +02:00
Graham Lee
dc1ea27c73 doc: clarify the return value of uv_default_loop 2014-07-13 11:23:08 +02:00
Iñaki Baz Castillo
bf6e90f4d6 doc: cleanup API documentation in uv.h 2014-07-06 22:33:15 +02:00
mattn
b17223cd60 build: fix build on MinGW32 2014-07-06 20:40:59 +02:00
Andrius Bentkus
b9b386ac5a doc: grammar, udp documentation fix up 2014-07-05 11:23:48 +02:00
Saúl Ibarra Corretgé
40ad12e5be unix: return UV_EAGAIN if uv_try_write cannot write any data 2014-07-04 20:45:09 +02:00
Andrius Bentkus
0d43992c3b unix, win: add uv_udp_try_send
The function returns UV_EAGAIN if the queue is not empty and
the message couldn't be sent immediately.
2014-07-04 18:30:33 +02:00
Andrius Bentkus
b769484ca3 unix, win: add send_queue_size and send_queue_count to uv_udp_t
This functionality is present in stream and uv_udp_t has a queue
as well so it makes sense for udp to have a send_write_size.
Since udp sends entire messages atomically, the send_queue_count field
lets the user determine how many messages are there left to send.
2014-07-04 18:28:18 +02:00
Andrius Bentkus
d17bfc617e doc: add documentation to uv_udp_start_recv 2014-07-02 18:49:06 +02:00
Saúl Ibarra Corretgé
4bace4d67c unix: use struct sockaddr_storage for target UDP addr 2014-06-29 23:52:46 +02:00
Saúl Ibarra Corretgé
8d11aacb79 unix, windows: use the same threadpool implementation 2014-06-27 14:27:04 +02:00
Tim Cooper
546fa7d508 doc: remove duplicate word 2014-06-27 08:16:53 +02:00
Fedor Indutny
4661f2d6c0
Now working on v0.11.27 2014-06-27 04:41:02 +04:00
Fedor Indutny
115281a105
2014.06.28, Version 0.11.26 (Unstable)
Changes since version 0.11.25:

* windows: add VT100 codes ?25l and ?25h (JD Ballard)

* windows: add invert ANSI (7 / 27) emulation (JD Ballard)

* unix: fix handling error on UDP socket creation (Saúl Ibarra Corretgé)

* unix, windows: getnameinfo implementation (Rasmus Pedersen)

* heap: fix `heap_remove()` (Fedor Indutny)

* unix, windows: fix parsing scoped IPv6 addresses (Saúl Ibarra
  Corretgé)

* windows: fix handling closed socket while poll handle is closing (Saúl
  Ibarra Corretgé)

* thread: barrier functions (Ben Noordhuis)

* windows: fix PYTHON environment variable usage (Jay Satiro)

* unix, windows: return system error on EAI_SYSTEM (Saúl Ibarra
  Corretgé)

* windows: fix handling closed socket while poll handle is closing (Saúl
  Ibarra Corretgé)

* unix: don't run i/o callbacks after prepare callbacks (Saúl Ibarra
  Corretgé)

* windows: add tty unicode support for input (Peter Atashian)

* header: introduce `uv_loop_size()` (Andrius Bentkus)

* darwin: invoke `mach_timebase_info` only once (Fedor Indutny)
2014-06-27 04:40:57 +04:00
Saúl Ibarra Corretgé
d4c1228d15 include: const-ify arguments to uv_getnameinfo_cb 2014-06-26 22:46:39 +02:00
Saúl Ibarra Corretgé
029e1273b8 unix: define NI_MAXHOST and NI_MAXSERV if needed
OSX only exposes them if _POSIX_C_SOURCE is not defined, for instance.
2014-06-24 10:20:43 +02:00
Andrius Bentkus
e392a1af4d header: introduce uv_loop_size()
We add a function called uv_loop_size which returns the size of
the loop. It is an additional function which complements
`uv_handle_size` and` uv_req_size` in order to provide full FFI
support.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-24 08:47:17 +04:00
Saúl Ibarra Corretgé
a098ac66dd unix, windows: return system error on EAI_SYSTEM 2014-06-16 10:09:45 +02:00
Ben Noordhuis
b64c359557 include: document barrier functions
Add some basic doc comments to the uv_barrier_*() functions and document
the "serializer" return value from the previous commit.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-07 07:57:09 -07:00
Ben Noordhuis
91985d48f6 unix, windows: make uv_barrier_wait() return bool
Make uv_barrier_wait() return a boolean value indicating whether this
thread was the "serializer".

From `man pthread_barrier_wait`:

    Upon successful completion, the pthread_barrier_wait() function
    shall return PTHREAD_BARRIER_SERIAL_THREAD for a single (arbitrary)
    thread synchronized at the barrier and zero for each of the other
    threads.

Exposing that information from libuv is useful because it can make
cleanup significantly easier:

    if (uv_barrier_wait(&barrier) > 0)
      uv_barrier_destroy(&barrier);

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-07 07:57:08 -07:00
Saúl Ibarra Corretgé
aab8d9dab4 doc: clarify return value when UV_RUN_NOWAIT is used
Signed-off-by: Saúl Ibarra Corretgé <saghul@gmail.com>
2014-05-25 23:39:40 +02:00
Rasmus Christian Pedersen
70c42563c1 unix, windows: getnameinfo implementation
Closes #852
2014-05-20 17:33:52 +02:00
Rasmus Christian Pedersen
ecaede660c unix, windows: uv_dlerror const argument 2014-05-13 00:00:54 +02:00
Saúl Ibarra Corretgé
fa0e1e5071 unix, windows: remove unneeded define 2014-05-08 09:08:33 +02:00
Trevor Norris
32597100b8 thread: add uv_thread_cb typedef
To keep with convention, add a typedef for the function called that
initializes the new thread.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-02 01:33:13 +04:00
Timothy J Fontaine
b5548f18c9 Now working on v0.11.26 2014-05-01 09:16:48 -07:00
Timothy J Fontaine
2acd544cff 2014.05.02, Version 0.11.25 (Unstable)
Changes since version 0.11.24:

* osx: pass const handle pointer to uv___stream_fd (Chernyshev
  Viacheslav)

* unix, windows: pass const handle ptr to uv_tcp_get*name (Chernyshev
  Viacheslav)

* common: pass const sockaddr ptr to uv_ip*_name (Chernyshev Viacheslav)

* unix, windows: validate flags on uv_udp|tcp_bind (Saúl Ibarra
  Corretgé)

* unix: handle case when addr is not initialized after recvmsg (Saúl
  Ibarra Corretgé)

* unix, windows: uv_now constness (Rasmus Pedersen)
2014-05-01 09:16:45 -07:00
Rasmus Christian Pedersen
87ae69b638 unix, windows: uv_now constness
uv_now doesnt require modification of uv_loop_t as such argument is
changed to a const uv_loop_t* as this more in spirit with remaining
API in libuv.
2014-04-29 19:39:13 -03:00
Saúl Ibarra Corretgé
76eb7518c6 doc: clarify what the addr argument of uv_udp_recv_cb contains 2014-04-23 19:28:30 +02:00
Saúl Ibarra Corretgé
d86d86633e doc: clarify uv_try_write return values 2014-04-22 08:41:16 +02:00
Chernyshev Viacheslav
20d092edc8 common: pass const sockaddr ptr to uv_ip*_name
uv_ip4_name and uv_ip6_name do not modify passed sockaddr pointer,
so there is no need to keep this parameter non-const.
2014-04-18 12:07:38 +02:00
Chernyshev Viacheslav
886e2bcd55 unix, windows: pass const handle ptr to uv_tcp_get*name
uv_tcp_getsockname and uv_tcp_getpeername do not modify passed handle
pointer, so there is no need to keep this parameter non-const.
2014-04-18 12:07:38 +02:00
Trevor Norris
f212ceffae include: reorder UV_HANDLE_PRIVATE_FIELDS
The fields for UV_HANDLE_PRIVATE_FIELDS in uv-win.h and uv-unix.h are
the same, but in different order. Simply swap them so uv_handle_t are
the same on both platforms.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-04-17 14:31:23 +04:00
Timothy J Fontaine
1daff47ae9 Now working on v0.11.25 2014-04-14 09:56:52 -07:00
Timothy J Fontaine
ed948c29f6 2014.04.15, Version 0.11.24 (Unstable)
Changes since version 0.11.23:

* linux: reduce file descriptor count of async pipe (Ben Noordhuis)

* sunos: support IPv6 qualified link-local addresses (Saúl Ibarra
  Corretgé)

* windows: fix opening of read-only stdin pipes (Alexis Campailla)

* windows: Fix an infinite loop in uv_spawn (Alex Crichton)

* windows: fix console signal handler refcount (李港平)

* inet: allow scopeid in uv_inet_pton (Fedor Indutny)

* win: always leave crit section in get_proc_title (Fedor Indutny)
2014-04-14 09:56:49 -07:00
Fedor Indutny
6a657dcbee include: add reserved field for #926
Introduce reserved field to be able to fix #926 after v0.12 release.
2014-04-14 20:44:49 +04:00
Saúl Ibarra Corretgé
2c02c4ee1e sunos: support IPv6 qualified link-local addresses 2014-04-09 19:40:01 +02:00
Fedor Indutny
842c70c5c5
Now working on v0.11.24
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-04-07 15:39:10 +04:00
Fedor Indutny
e54de537ef
2014.04.07, Version 0.11.23 (Unstable)
Changes since version 0.11.22:

* fs: avoid using readv/writev where possible (Fedor Indutny)

* mingw: fix build with autotools (Saúl Ibarra Corretgé)

* bsd: support IPv6 qualified link-local addresses (Saúl Ibarra Corretgé)

* unix: add UV_HANDLE_IPV6 flag to tcp and udp handles (Saúl Ibarra Corretgé)

* unix, windows: do not set SO_REUSEADDR by default on udp (Saúl Ibarra
  Corretgé)

* windows: fix check in uv_tty_endgame() (Maks Naumov)

* unix, windows: add IPv6 support for uv_udp_multicast_interface (Saúl Ibarra
  Corretgé)

* unix: fallback to blocking writes if reopening a tty fails (Saúl Ibarra
  Corretgé)

* unix: fix handling uv__open_cloexec failure (Saúl Ibarra Corretgé)

* unix, windows: add IPv6 support to uv_udp_set_membership (Saúl Ibarra
  Corretgé)

* unix, windows: removed unused status parameter (Saúl Ibarra Corretgé)

* android: add support of ifaddrs in android (Javier Hernández)

* build: fix SunOS and AIX build with autotools (Saúl Ibarra Corretgé)

* build: freebsd link with libelf if dtrace enabled (Saúl Ibarra Corretgé)

* stream: do not leak `alloc_cb` buffers on error (Fedor Indutny)

* unix: fix setting written size on uv_wd (Saúl Ibarra Corretgé)

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-04-07 15:38:27 +04:00
Fedor Indutny
7d5ac7b9cc Merge branch 'v0.10'
Conflicts:
	include/uv.h
	src/unix/error.c
2014-04-03 17:04:32 +04:00
Fedor Indutny
295882ed32 error: add EMLINK mapping
fix joyent/node#7307
2014-04-03 16:37:25 +04:00
Saúl Ibarra Corretgé
e89740a957 bsd: support IPv6 qualified link-local addresses 2014-04-02 01:27:01 +02:00
Saúl Ibarra Corretgé
3558d65d2f unix, windows: do not set SO_REUSEADDR by default on udp
Add UV_UDP_REUSEADDR flag instead, which can be passed to uv_udp_bind.
If the udp handle is unbound when uv_udp_set_memberhsip or
uv_udp_set_multicast_interface is called, the handle will be bound with
UV_UDP_REUSEADDR set.
2014-04-02 01:21:35 +02:00
Saúl Ibarra Corretgé
db2a9072bc unix, windows: removed unused status parameter
async, timer, prepare, idle and check handles don't need the status
parameter.
2014-03-17 21:42:36 +01:00
Javier Hernández
a2506c9362 android: add support of ifaddrs in android
Fixes https://github.com/joyent/node/issues/7291
2014-03-16 23:16:25 +01:00
Timothy J Fontaine
1dc2709b99 Now working on v0.11.23 2014-03-10 16:58:32 -07:00
Timothy J Fontaine
cd0c19b1d3 2014.03.11, Version 0.11.22 (Unstable)
Changes since version 0.11.21:

* unix, windows: map ERANGE errno (Saúl Ibarra Corretgé)

* unix, windows: make uv_cwd be consistent with uv_exepath (Saúl Ibarra
  Corretgé)

* process: remove debug perror() prints (Fedor Indutny)

* windows: fall back for volume info query (Isaiah Norton)

* pipe: allow queueing pending handles (Fedor Indutny)

* windows: fix winsock status codes for address errors (Raul Martins)

* windows: Remove unused variable from uv__pipe_insert_pending_socket
  (David Capello)

* unix: workaround broken pthread_sigmask on Android (Paul Tan)

* error: add ENXIO for O_NONBLOCK FIFO open() (Fedor Indutny)

* freebsd: use accept4, introduced in version 10 (Saúl Ibarra Corretgé)

* windows: fix warnings of MinGW -Wall -O3 (StarWing)

* openbsd, osx: fix compilation warning on scandir (Saúl Ibarra
  Corretgé)

* linux: always deregister closing fds from epoll (Geoffry Song)

* unix: reopen tty as /dev/tty (Saúl Ibarra Corretgé)

* kqueue: invalidate fd in uv_fs_event_t (Fedor Indutny)
2014-03-10 16:54:33 -07:00
Fedor Indutny
9aa48312bc Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	include/uv.h
	src/unix/error.c
	src/unix/process.c
	src/version.c
2014-03-06 20:45:15 +04:00
Fedor Indutny
4f72f2145b error: add ENXIO for O_NONBLOCK FIFO open()
When opening FIFO with `O_NONBLOCK` flag, `ENXIO` could be returned if
the readable side hasn't yet opened this FIFO.
2014-03-06 20:36:07 +04:00
Paul Tan
347000929d unix: workaround broken pthread_sigmask on Android
On android, if a call to `pthread_sigmask` fails with EINVAL, fallback
to `sigprocmask`. This workarounds the broken behaviour of
`pthread_sigmask` on Android versions < 4.1. See:

* https://android.googlesource.com/platform/bionic/+/9bf330b5
* https://code.google.com/p/android/issues/detail?id=15337

This is implemented by replacing all calls of `pthread_sigmask` to a new
function `uv__pthread_sigmask` which implements this fallback mechanism.
2014-03-06 11:54:50 +01:00