Commit Graph

1261 Commits

Author SHA1 Message Date
Ben Noordhuis
7f8130a21b unix: remove src/unix/cygwin.c
The cygwin build has been broken for a long time now and no one is
complaining, which strongly suggests that no one actually uses it.
Remove it.
2013-04-18 21:53:33 +02:00
Bert Belder
79f96298c1 Merge branch 'v0.10' 2013-04-18 02:58:44 +02:00
Bert Belder
a3963883b8 windows: remove superfluous assert statement 2013-04-18 02:56:07 +02:00
Saúl Ibarra Corretgé
a92b66fe33 unix, windows: add uv_has_ref() function 2013-04-17 15:31:08 +02:00
Miroslav Bajtoš
09ff5100e3 windows: make timers handle large timeouts
Fixes a bug where timers with very large timeouts run on the next tick.
Based on a similar bug fix for unix (9b61939).

Fixes joyent/node#5101.
2013-04-16 16:30:33 +02:00
Ben Noordhuis
ef85bdaffb unix: silence STATIC_ASSERT compiler warnings
Newer versions of gcc complain about the definition of the zero element
array. Squelch that warning by turning it into a one element array.
2013-04-12 19:40:57 +02:00
Bert Belder
aa23eea5cf Merge branch 'v0.10' 2013-04-12 13:20:30 +02:00
isaacs
5ed1d02cc0 Now working on v0.10.5 2013-04-11 09:00:10 -07:00
isaacs
85827e2640 2013.04.12, Version 0.10.4 (Stable)
Changes since version 0.10.3:

* include: update uv_backend_fd() documentation (Ben Noordhuis)

* unix: include uv.h in src/version.c (Ben Noordhuis)

* unix: don't write more than IOV_MAX iovecs (Fedor Indutny)

* mingw-w64: don't call _set_invalid_parameter_handler (Nils Maier)

* build: gyp disable thin archives (Timothy J. Fontaine)

* sunos: re-export entire library when static (Timothy J. Fontaine)

* unix: dtrace probes for tick-start and tick-stop (Timothy J. Fontaine)

* windows: fix memory leak in fs__sendfile (Shannen Saez)

* windows: remove double initialization in uv_tty_init (Shannen Saez)

* build: fix dtrace-enabled out of tree build (Ben Noordhuis)

* build: squelch -Wdollar-in-identifier-extension warnings (Ben
  Noordhuis)

* inet: snprintf returns int, not size_t (Brian White)

* win: refactor uv_cpu_info (Bert Belder)

* build: add support for Visual Studio 2012 (Nicholas Vavilov)

* build: -Wno-dollar-in-identifier-extension is clang only (Ben
  Noordhuis)
2013-04-11 09:00:06 -07:00
Ben Noordhuis
145f7b3560 darwin: look up file path with F_GETPATH
Look up the file path with fcntl(F_GETPATH) and pass it to
the uv_fs_event_cb callback.
2013-04-10 19:45:43 +02:00
Bert Belder
fcac38abe4 Now working on v0.11.2 2013-04-10 19:43:10 +02:00
Bert Belder
5c10e82ae0 2013.04.11, Version 0.11.1 (Unstable)
This is the first versioned release from the current unstable libuv
branch.

Changes since Node.js v0.11.0:

* all platforms: nanosecond resolution support for uv_fs_[fl]stat
  (Timothy J. Fontaine)

* all platforms: add netmask to uv_interface_address (Ben Kelly)

* unix: make sure the `status` parameter passed to the `uv_getaddrinfo`
  is 0 or -1 (Ben Noordhuis)

* unix: limit the number of iovecs written in a single `writev` syscall
  to IOV_MAX (Fedor Indutny)

* unix: add dtrace probes for tick-start and tick-stop (Timothy J.
  Fontaine)

* mingw-w64: don't call _set_invalid_parameter_handler (Nils Maier)

* windows: fix memory leak in fs__sendfile (Shannen Saez)

* windows: fix edge case bugs in uv_cpu_info (Bert Belder)

* include: no longer ship with / include ngx-queue.h (Ben Noordhuis)

* include: remove UV_VERSION_* macros from uv.h (Ben Noordhuis)

* documentation updates (Kristian Evensen, Ben Kelly, Ben Noordhuis)

* build: fix dtrace-enabled builds (Ben Noordhuis, Timothy J. Fontaine)

* build: gyp disable thin archives (Timothy J. Fontaine)

* build: add support for Visual Studio 2012 (Nicholas Vavilov)
2013-04-10 19:43:07 +02:00
mscdex
633d33a92a cygwin: remove unused variable 2013-04-10 18:30:37 +02:00
Bert Belder
db1a8b85d2 Merge branch 'v0.10' 2013-04-10 17:53:10 +02:00
Bert Belder
1d5c61a8b3 windows: simplify netmask detection in uv_interface_addresses 2013-04-10 17:33:37 +02:00
Bert Belder
a9bce29f0c win: refactor uv_cpu_info
Fixes a couple of error handling issues:

* Don't free an uninitialized pointer when allocating memory for
  `cpu_infos` fails.
* Don't return a bogus error value when NtQuerySystemInformation fails.
  That function returns an NTSTATUS code instead of setting the last
  error.
* Don't clobber out parameters when an error happens.
2013-04-10 16:04:15 +02:00
Brian White
9021dbcd8d inet: snprintf returns int, not size_t 2013-04-10 15:50:39 +02:00
Brian White
4d4f1496d9 windows, unix: remove dead code 2013-04-10 15:50:39 +02:00
Ben Noordhuis
8041c52fcd unix: style fixups 2013-04-10 14:59:02 +02:00
Ben Kelly
14aa6153be unix, win: add netmask to uv_interface_address
Include the netmask when returning information about the OS network
interfaces.

This commit provides implementations for windows and those unix
platforms using getifaddrs().

AIX was not implemented because it requires the use of ioctls and I do
not have an AIX development/test environment.  The windows code was
developed using mingw on winxp as I do not have access to visual studio.

Tested on darwin (ipv4/ipv6) and winxp (ipv4 only).  Needs testing on
newer windows using ipv6 and other unix platforms.
2013-04-10 14:48:23 +02:00
Ben Noordhuis
f78bcfbd6a Merge remote-tracking branch 'origin/v0.10' 2013-04-10 14:24:18 +02:00
Shannen Saez
603915dd00 windows: remove double initialization in uv_tty_init 2013-04-10 14:17:28 +02:00
Shannen Saez
7570a35b70 windows: fix memory leak in fs__sendfile 2013-04-10 14:17:28 +02:00
Timothy J Fontaine
e1ffc6c0ee unix: dtrace probes for tick-start and tick-stop 2013-04-10 14:10:05 +02:00
Nils Maier
5676924c5b mingw-w64: don't call _set_invalid_parameter_handler
Check the __MSVCRT_VERSION__, as mingw-w64 always defines
_WRITE_ABORT_MSG.

Closes #774
2013-04-10 14:03:23 +02:00
Fedor Indutny
895e77639e unix: don't write more than IOV_MAX iovecs
Write no more than `IOV_MAX` chunks with `writev()` at
once, otherwise `writev()` returns EINVAL.
2013-04-08 19:51:30 +04:00
Ben Noordhuis
4a55522e9a unix: remove superfluous check in stream.c 2013-04-08 01:32:38 +02:00
Ben Noordhuis
78e8034b32 Merge remote-tracking branch 'origin/v0.10' 2013-04-04 03:11:33 +02:00
Ben Noordhuis
f1215b7918 unix: include uv.h in src/version.c
Include uv.h so the compiler sees the right visibility attribute for
uv_version() and uv_version_string().

GYP builds compile with -fvisibility=hidden. Before this commit, the
symbols were not visible in libuv.so.

Fixes joyent/node#5213.
2013-04-04 03:05:38 +02:00
Ben Noordhuis
3a8c3987d6 sunos: fix syntax error introduced in 76d831e4
Moving around the code for #754 inadvertently introduced a syntax error
in a SunOS-only code path.

The syntax error didn't actually manifest at build time because
the #elif it was wrapped in was, alas, wrong as well.
2013-04-02 21:58:21 +02:00
Ben Noordhuis
c43e8516b1 src: bump version to 0.11.1-pre 2013-03-29 16:01:58 +01:00
Ben Noordhuis
23947fdabb Merge remote-tracking branch 'origin/v0.10' 2013-03-29 15:57:10 +01:00
Bert Belder
9e90cdeae7 Now working on v0.10.4 2013-03-28 19:59:51 +01:00
Bert Belder
31ebe23973 2013.02.04, Version 0.10.3 (Stable)
Changes since version 0.10.2:

* include: remove extraneous const from uv_version() (Ben Noordhuis)

* doc: update README, replace `OS` by `PLATFORM` (Ben Noordhuis)

* build: simplify .buildstamp rule (Ben Noordhuis)

* build: disable -Wstrict-aliasing on darwin (Ben Noordhuis)

* darwin: don't select(&exceptfds) in fallback path (Ben Noordhuis)

* unix: don't clear flags after closing UDP handle (Saúl Ibarra
  Corretgé)
2013-03-28 19:56:36 +01:00
Saúl Ibarra Corretgé
a9a23dc28e unix: don't clear flags after closing UDP handle 2013-03-28 16:08:42 +01:00
Ben Noordhuis
75141493ba darwin: don't select(&exceptfds) in fallback path
The exceptfds set is for polling OOB data, not errors.

Fixes joyent/node#5155.
2013-03-28 00:15:59 +01:00
Ben Noordhuis
0635e29714 unix, windows: remove ngx-queue.h
Avoids an extra #include in public headers and stops the ngx_queue_*
types and macros from leaking into user code.
2013-03-27 00:09:36 +01:00
Ben Noordhuis
76d831e4c8 unix: getaddrinfo_cb status arg should be 0 or -1
The documentation in uv.h states that the status argument to the
uv_getaddrinfo() callback is either 0 or -1 but uv-unix actually
passed it the addrinfo error code. Rectify that and add a regression
test.

Fixes #754.
2013-03-26 22:30:46 +01:00
Ben Noordhuis
73524cdd3a Merge remote-tracking branch 'origin/v0.10' 2013-03-26 15:17:00 +01:00
Ben Noordhuis
3f6122b3f7 include: remove extraneous const from uv_version()
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);
2013-03-26 14:48:30 +01:00
Bert Belder
d5f8c1a4d3 Now working on v0.10.3 2013-03-25 15:41:25 +01:00
Bert Belder
0f36a00568 2013.03.25, Version 0.10.2 (Stable)
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)
2013-03-25 15:40:53 +01:00
Bert Belder
c7b1c53ef1 Prepare for making releases, add uv_version/uv_version_string API 2013-03-25 15:35:00 +01:00
Ben Noordhuis
eca008a386 Merge remote-tracking branch 'origin/v0.10' 2013-03-23 19:15:45 +01:00
Ben Noordhuis
9b619396d9 unix: make timers handle large timeouts
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.

Fixes joyent/node#5101.
2013-03-21 14:54:36 +01:00
Brian Mazza
77cb29a723 unix: make uv_timer_init() initialize repeat
uv_timer_get_repeat() should return 0 for timers that haven't been
started.
2013-03-19 23:15:30 +01:00
Timothy J Fontaine
499c7976c6 unix, windows: nanosecond resolution for uv_fs_[fl]stat
Closes #739.
2013-03-19 21:48:15 +01:00
Fedor Indutny
b45a74fab3 stream: run try_select only for pipes and ttys
Its not necesary for TCP and other streams, since fd is always working
with kqueue there.
2013-03-16 23:29:24 +01:00
Ben Noordhuis
7b66ea18ff unix: improve uv_guess_handle() implementation
Make it understand FIFOs, character devices and sockets.
2013-03-14 14:22:04 +01:00
Ben Noordhuis
905d56c140 unix: fix uv_tcp_simultaneous_accepts() logic
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.
2013-03-12 12:39:37 +01:00