Commit Graph

2166 Commits

Author SHA1 Message Date
Ben Kelly
8ef07ccac7 doc: add link to Visual Studio Express in README 2013-04-08 00:05:02 +02:00
Elliot Saba
d67d713fac build: make make clean remove test/runner.o 2013-04-08 00:00:17 +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
ec24bfac19 include: update uv_backend_fd() documentation
uv_run_once() is no more, replace with uv_run(UV_RUN_NOWAIT).

Fixes #759.
2013-03-31 20:02:25 +02:00
Ben Noordhuis
c43e8516b1 src: bump version to 0.11.1-pre 2013-03-29 16:01:58 +01:00
Ben Noordhuis
3c3a348abd include: remove UV_VERSION_* macros
Superseded by uv_version() and uv_version_string().
2013-03-29 16:01:14 +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
fe136cedb9 build: disable -Wstrict-aliasing on darwin
The antiquated gcc/clang that ships with Xcode emits waaaay too many
false positives.
2013-03-28 00:10:51 +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
0fb9b22ce6 build: simplify .buildstamp rule 2013-03-26 15:16:24 +01:00
Ben Noordhuis
bd20b37170 doc: update README, s/OS/PLATFORM/
Commit a9740c9 changed the name of the OS var to PLATFORM but forgot to
update the README.
2013-03-26 14:50:21 +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
eeeb07934b Update AUTHORS and .mailmap 2013-03-25 15:36:20 +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
1487d5aea7 build: add OBJC makefile var
Overrides the Objective-C compiler that is used. Defaults to $(CC).
2013-03-23 23:16:54 +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
Ben Noordhuis
ab935a25a5 include: use x macros for uv_any_{handle,req} unions
Generate the members of the uv_any_handle and uv_any_req unions with
the UV_HANDLE_TYPE_MAP and UV_REQ_TYPE_MAP macros. Eases maintenance
when new handle or request types are added.
2013-03-17 20:32:42 +01:00
Ben Noordhuis
a9740c9bc4 build: rename OS to PLATFORM
Rename the OS make variable to PLATFORM, it conflicts with the OS env
var. That is, running `make` when the OS env var is set, may cause
spurious build breakage.

Fixes #737.
2013-03-17 00:12:43 +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
9f714a1d25 include: bump UV_VERSION_MINOR
Fixes #740.
2013-03-14 12:49:21 +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
Timothy J Fontaine
2f84a57566 test: add tap output for windows 2013-03-11 18:12:25 +01:00
Bert Belder
5462dab889 win/tcp: don't enable iocp sync bypass when iocp emulation is used
When iocp sync bypass is in use libuv doesn't expect the system to
generate events when an i/o operation completes synchronously. However
when iocp emulation is enabled an event will always be generated because
SetFileCompletionNotificationModes() doesn't stop OVERLAPPED.hEvent from
becoming signaled.

This should fix joyent/node#4959.
2013-03-09 20:22:50 +01:00
Bert Belder
f59dc221e6 win: fix potential HANDLE corruption due to incorrect cast
Closes #738.
2013-03-09 18:24:59 +01:00
isaacs
b68ee40496 win: Map ERROR_INVALID_FUNCTION to EISDIR
This error is raised when calling read() or write() on a directory.

A bit of googling turns up some cases where this error can be raised
that are not properly mapped to EISDIR, but are also cases that libuv
doesn't really care about, like the Password Manager API,
GetFirmwareEnvironmentVariable, or CreateTapePartition.

If libuv ever needs to handle these cases, then I suppose that the
ERROR_INVALID_FUNCTION->EISDIR mapping could be done directly in the
fs read() and write() functions, but doing so at this point seems
premature, as it makes the error code mapping a bit more messy.

Fixes joyent/node#4951
2013-03-07 16:00:50 -08:00
Ben Noordhuis
8fbe43379d unix: please valgrind, free memory in threadpool.c 2013-03-07 01:57:30 +01:00
Ben Noordhuis
dac5a758f8 unix: replace volatile cast with ACCESS_ONCE macro 2013-03-07 00:53:07 +01:00
Ben Noordhuis
e0df7b6873 unix: fix strict aliasing warning in udp.c 2013-03-07 00:53:06 +01:00
Ben Noordhuis
b6a50c7295 unix: add uv_buf_t static asserts to core.c
Verify that our uv_buf_t type is ABI-compatible with struct iovec.
2013-03-07 00:53:06 +01:00
Ben Noordhuis
ef9b065532 unix: add STATIC_ASSERT macro 2013-03-07 00:52:50 +01:00
Ben Noordhuis
ee9899e28b unix: fix strict aliasing warnings, macro-ify functions
Replace a few internal functions in uv-common.h with macros to avoid
strict aliasing warnings with older versions of gcc.

It's not smart enough to figure out that e.g. a uv_tcp_t is an instance
of uv_handle_t with similar alignment requirements and therefore no
aliasing happens. More recent versions of gcc don't suffer from this.

I'm not normally in the habit of catering to compiler defects but the
aliasing warnings drown out legitimate warnings, hence the change.
2013-03-06 23:47:43 +01:00
Ben Noordhuis
1e97b4567e unix: honor UV_THREADPOOL_SIZE environment var
Make the size of the thread pool configurable through an environment
variable. For sanity reasons, the size is clamped to the range 1-128.
2013-03-06 23:19:34 +01:00
Bert Belder
f89125e0e6 win/tty: fix typo in color attributes enumeration 2013-03-05 20:31:52 +01:00
Bert Belder
4abad2381e win/tty: don't touch insert mode or quick edit mode
Hopefully this fixes joyent/node#4809.
2013-03-05 20:05:58 +01:00
Bert Belder
8a99762c0e win/tty: fix case where uv_read_start incorrectly reports failure
In very rare circumstances a uv_read_start() call on a uv_tty_t handle
in raw mode would return -1 but there was no actual failure. This patch
fixes that.
2013-03-05 20:05:57 +01:00
Ben Noordhuis
0b26af376a unix: handle POLLERR and POLLHUP in uv__stream_io
Fixes a busy loop when the file descriptor emits POLLHUP but not POLLIN
or POLLOUT, e.g. when polling the read end of a pipe and the write end
is closed.

Fixes joyent/node#4923.
2013-03-05 16:04:31 +01:00