Commit Graph

4148 Commits

Author SHA1 Message Date
Yuri D'Elia
0f25560c8a unix: use cfmakeraw() for setting raw TTY mode 2014-11-10 20:00:23 -03:00
Saúl Ibarra Corretgé
e03c0c7383 doc: fix parameter name in uv_fs_access
Closes #1560
2014-11-06 21:14:57 -05:00
Thorsten Lorenz
3f585626a4 doc: add learnuv workshop to README 2014-11-06 19:25:42 -05:00
Mikhail Mukovnikov
41ddd1f267 doc: mention homebrew in README 2014-11-06 19:22:35 -05:00
huxingyi
97bb41f35c win: add missing IP_ADAPTER_UNICAST_ADDRESS_LH definition for MinGW 2014-11-06 19:20:32 -05:00
Unknown W. Brackets
5ac921bb6a windows: fix fs_read with nbufs > 1 and offset
ReadFile() does not seem to update the offset at all.
2014-10-26 07:49:00 -03:00
Emmanuel Odeke
b174a84e39 doc: fix git/svn url for gyp repo in README 2014-10-26 07:44:57 -03:00
Saúl Ibarra Corretgé
39a5728dd9 Now working on v0.10.30 2014-10-21 01:01:08 +02:00
Saúl Ibarra Corretgé
2d728542d3 2014.10.21, Version 0.10.29 (Stable)
Changes since version 0.10.28:

* darwin: allocate enough space for select() hack (Fedor Indutny)

* linux: try epoll_pwait if epoll_wait is missing (Michael Hudson-Doyle)

* windows: map ERROR_INVALID_DRIVE to UV_ENOENT (Saúl Ibarra Corretgé)
2014-10-21 01:01:03 +02:00
Saúl Ibarra Corretgé
5e507159c9 windows: map ERROR_INVALID_DRIVE to UV_ENOENT
Backport c44f264641 for v0.10 branch.
2014-10-21 00:23:48 +02:00
Michael Hudson-Doyle
ef7b783d8d linux: try epoll_pwait if epoll_wait is missing
It seems that epoll_wait is implemented in glibc in terms of epoll_pwait and
new architectures (like arm64) do not implement the epoll_wait syscall at all.
So if epoll_wait errors with ENOSYS, just call epoll_pwait.

This is a backport of 861de3d71d for v0.10
branch.
2014-10-20 23:40:28 +02: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
Unknown W. Brackets
6760d51b52 windows: fix fs_write with nbufs > 1 and offset
When multiple bufs are specified, overlapped needs to be advanced
manually between each write.  Without this, each buf will be written
to the same position (if offset is specified.)

ReadFile() automatically advances, but WriteFile() does not.
2014-10-20 22:44:46 +02:00
Tomasz Kołodziejski
59658a8de7 unix, windows: add uv_thread_equal 2014-10-20 09:51:49 +02:00
Saúl Ibarra Corretgé
8a8cff4b34 unix, windows: don't include null byte in uv_cwd size
Make it consistent with uv_exepath
2014-10-16 14:18:27 +02:00
Alexis Campailla
68ac0a68e7 windows: fix netmask detection
uv_interface_addresses was using the linked list pointed to by
the FirstPrefix member of IP_ADAPTER_ADDRESSES in order to compute the
network prefix / network mask.

This was flawed in several ways:
- FirstPrefix can be NULL, and we would crash.
- On Windows Vista and later, the prefix list includes three IP adapter prefixes
  for each IP address assigned to the adapter. We were assuming a 1:1 mapping
  with the unicast address list.
- Even on Windows versions (i.e. XP) where the prefix list is supposed to have
  one and only one element for each unicast address, the order of the two lists
  is not guaranteed to be the same.

This fix was inspired and adapted from a commit in the Chromium project:
https://codereview.chromium.org/25167002/diff/6001/net/base/net_util_win.cc

See MSDN article for reference:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366058(v=vs.85).aspx

Excerpt from MSDN below:

In addition, the linked IP_ADAPTER_UNICAST_ADDRESS structures pointed to
by the FirstUnicastAddress member and the linked IP_ADAPTER_PREFIX
structures pointed to by the FirstPrefix member are maintained as separate
internal linked lists by the operating system. As a result, the order of
linked IP_ADAPTER_UNICAST_ADDRESS structures pointed to by the
FirstUnicastAddress member does not have any relationship with the order
of linked IP_ADAPTER_PREFIX structures pointed to by the FirstPrefix member.

On Windows Vista and later, the linked IP_ADAPTER_PREFIX structures pointed to
by the FirstPrefix member include three IP adapter prefixes for each IP address
assigned to the adapter. These include the host IP address prefix, the subnet
IP address prefix, and the subnet broadcast IP address prefix. In addition, for
each adapter there is a multicast address prefix and a broadcast address prefix.
2014-10-13 23:18:14 +02:00
cjihrig
c18205a1c5 unix, windows: add uv_fs_access() 2014-10-13 10:23:53 +02:00
cjihrig
416b7335fc windows: return libuv error codes in uv_poll_init()
Closes #1518
2014-10-10 09:50:01 +02:00
Jeff Widman
471e844793 doc: fix punctuation and grammar in README 2014-10-06 09:03:25 +02:00
Saúl Ibarra Corretgé
e4dc4aaac5 doc: add documentation for missing functions and structures
* uv_process_kill, uv_kill
* uv_fs_poll_init
* uv_timespec_t
2014-10-01 09:23:09 +02:00
Saúl Ibarra Corretgé
00df3ec75b doc: clarify uv_loop_t.data field lifetime
Fixes #1503
2014-09-30 09:14:56 +02:00
Saúl Ibarra Corretgé
9486e462fc doc: document missing stream related structures
uv_connect_t, uv_write_t and uv_shutdown_t.

Closes #1507
2014-09-30 09:09:59 +02:00
Robin Hahling
3193b67ff0 build: add DragonFly BSD support in autotools 2014-09-27 11:25:59 +02:00
Saúl Ibarra Corretgé
958009bb04 doc: add migration guide from version 0.10 2014-09-26 10:05:23 +02:00
Saúl Ibarra Corretgé
5e822033b4 doc: document uv_alloc_cb
Fixes #1498
2014-09-25 21:38:03 +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
Fedor Indutny
2f54947b72 fs: fix readdir on empty directory
`uv_fd_readdir()` should initialize all fields even if there are no
files. Fix the implementation and fix the test that should have been
covered it.
2014-09-23 21:06:54 +04:00
Zachary Newman
b7003beb0d doc: update references to current stable branch
The contribution guidelines in CONTRIBUTING.md referred to v0.10 as
the current stable branch, rather than v1.x.
2014-09-22 20:37:45 -04:00
Rob Adams
1cc25170ed build: add missing fixtures to distribution tarball 2014-09-22 08:27:16 +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é
e47d4f0056 2014.09.18, Version 1.0.0-rc1 (Unstable) 2014-09-18 18:39:56 +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
Recep ASLANTAS
234b1e046b build, gyp: set xcode flags 2014-09-17 22:52:25 +02:00
Recep ASLANTAS
ffa432451d ignore: include m4 files which are created manually 2014-09-17 22:51:04 +02:00
Recep ASLANTAS
facf595cad build: add m4 for feature/flag-testing 2014-09-17 22:50:55 +02:00
Recep ASLANTAS
f2ec3ee41a ignore: ignore Xcode project and workspace files 2014-09-17 22:50:40 +02:00
Recep ASLANTAS
3fa24a2b70 unix: fix warnings about dollar symbol usage in identifiers 2014-09-17 22:47:28 +02:00
Recep ASLANTAS
94e628faf1 unix: fix warnings when loading functions with dlsym 2014-09-17 22:47:01 +02:00
Michael Hudson-Doyle
861de3d71d linux: try epoll_pwait if epoll_wait is missing
It seems that epoll_wait is implemented in glibc in terms of epoll_pwait and
new architectures (like arm64) do not implement the epoll_wait syscall at all.
So if epoll_wait errors with ENOSYS, just call epoll_pwait.
2014-09-17 00:25:46 +02:00
Saúl Ibarra Corretgé
5ccdfc568d test: add test for closing and recreating default loop 2014-09-15 21:34:09 +02:00
Saúl Ibarra Corretgé
0e5004ba77 windows: properly close the default loop
Also close the IOCP handle for any loop.

Closes #393
2014-09-15 21:34:09 +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é
95797f48e8 doc: mention API documentation in README 2014-09-11 09:38:35 +02:00
Saúl Ibarra Corretgé
32e2e75f60 doc: add API documentation 2014-09-11 09:38:35 +02:00
Trevor Norris
3d38eae377 test: don't close connection on write error
The echo server shouldn't close the connection when there's an error on
write. Instead simply echo the error message and allow the other side to
close the connection.

Also do a partial revert of 4d905fb where after_shutdown was removed.

Fixes: 4d905fb "test: close stream immediately on error"
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Signed-off-by: Saúl Ibarra Corretgé <saghul@gmail.com>
2014-09-10 22:50:54 +02:00
Saúl Ibarra Corretgé
54ce3f6c8e windows: further simplify the code for timers
- Remove the UV_HANDLE_ACTIVE flag. It's a duplicate from
  UV__HANDLE_ACTIVE, which was used solely on timers and loop watchers.

- Avoid duplicated code when running timers by stopping the handle and
  rearming it with the repeat time, thus having a single place where the
  timers are added and removed to and from the RB tree, respectively.
2014-09-10 09:52:00 +02:00
Fedor Indutny
bbf6a144e1 gyp: remove UNLIMITED_SELECT from dependent define
It isn't really needed here.
2014-09-08 09:10:00 +01:00