Commit Graph

1337 Commits

Author SHA1 Message Date
Bert Belder
fa21584878 Whitespace 2012-04-12 03:17:03 +02:00
Ben Noordhuis
4741a112ad test: disable fs_event_close_in_callback on kqueue-based systems 2012-04-12 02:33:14 +02:00
Bert Belder
2e5e1165ce Tests: don't use %zu placeholder in printf statements
It's not supported by msvcrt.
2012-04-11 22:54:02 +02:00
Ben Noordhuis
42d3533487 unix: fix udp_options test on OS X and Solaris
setsockopt(IP_TTL) will happily let you set a TTL > 255 on OS X, cap it.

-1 or 0 is a valid TTL on Linux but not portable, deny it.
2012-04-11 14:51:46 +00:00
Ben Noordhuis
3c415975d9 unix: don't conditionally compile kqueue fs watcher
Always compile in the kqueue-based fs event watcher and handle it at run-time
if the kernel doesn't actually support it.

Works around build issues when -mmacosx-version-min is not set properly.

Fixes joyent/node#3075.
2012-04-10 23:22:32 +02:00
Ben Noordhuis
8e6f332fed unix: fix compiler warning, #include <unistd.h> 2012-04-06 01:24:20 +02:00
saghul
e3468e9d42 unix: add missing function declaration 2012-04-06 01:23:10 +02:00
Ben Noordhuis
637d976c19 Revert "Fix memory leak in uv_exepath() on OSX."
This reverts commit f6c8e78db9.

realpath() on OS X 10.5 crashes if resolved_path == NULL.
2012-04-06 00:55:04 +02:00
Bert Belder
f6df47b474 Merge branch 'v0.6' 2012-04-05 17:26:23 +02:00
Bert Belder
3506cd1dc5 Windows: don't report ENOTSOCK when attempting to bind an udp handle twice 2012-04-05 17:25:21 +02:00
Bert Belder
cda7a28039 Windows: backport pipe-connect-to-file fixes from master
Conflicts:

    src/win/pipe.c


commit e53ab6675ba12d97ad6d93c9913a473ba5172617
Author: Bert Belder <bertbelder@gmail.com>
Date:   Fri Mar 9 17:04:03 2012 +0100

    Windows: report UV_ENOTSOCK when we opened a file instead of a pipe

    Makes the pipe_connect_to_file test pass on Windows.

commit 8cbbfbe4c6489868470a7e410f80d4729f4091bf
Author: Igor Zinkovsky <igorzi@microsoft.com>
Date:   Thu Mar 1 14:32:59 2012 -0800

    test: make pipe_connect_to_file succeed with ECONNREFUSED

commit 6bbccf1fe0
Author: Igor Zinkovsky <igorzi@microsoft.com>
Date:   Thu Mar 1 12:11:12 2012 -0800

    windows: return UV_ENOTSOCK when doing uv_pipe_connect to a file
2012-04-05 16:47:49 +02:00
Bulat Shakirzyanov
f09f7bc6a8 Add functions to look up req and handle sizes
Useful for FFI bindings. Closes #370.
2012-04-05 01:39:40 +02:00
Bert Belder
5f38ba1a89 Move private req and handle fields to platform headers
And fix other problems introduced with UV_HANDLE_TYPE_MAP and UV_REQ_TYPE_MAP.
2012-04-05 01:28:24 +02:00
Ben Noordhuis
f4e7537184 unix: move inotify init logic to loop.c 2012-04-05 15:13:14 +02:00
Ben Noordhuis
68bed698fc unix: move loop init logic out of core.c 2012-04-04 05:54:39 -07:00
Ben Noordhuis
5a8446c309 unix: move handle specific close logic out of core.c 2012-04-04 05:30:15 -07:00
Ben Noordhuis
ed395e0619 unix: replace handle->next_watcher
Remove the next_watcher and replace it with a linked list. Said list is named
endgame_handles (because the uv-win calls it that) and contains all the handles
that are in the UV_CLOSING state.

The goal of this commit is two-fold:

a) remove a dependency on libev, and
b) share more code with uv-win in the future

A nice side effect is that it shaves a few bytes off a uv_handle_t.
2012-04-04 05:22:20 -07:00
Ben Noordhuis
bf9a2b3463 x-macro-ify uv_handle_type and uv_req_type 2012-04-04 09:05:13 +02:00
Ben Noordhuis
5fbe0aab33 unix: move active checks out of core.c
Move active checks out of core.c and into their respective compilation units:
check, idle, prepare, timer.
2012-04-04 06:52:29 +02:00
Ben Noordhuis
5a59e4924a unix: move idle code from core.c to idle.c 2012-04-04 05:25:34 +02:00
Ben Noordhuis
dd31265751 unix: move check code from core.c to check.c 2012-04-04 05:25:34 +02:00
Ben Noordhuis
f1a19e6d34 unix: move prepare code from core.c to prepare.c 2012-04-04 05:25:34 +02:00
Ben Noordhuis
f7359a335c unix: move async code from core.c to async.c 2012-04-04 05:25:34 +02:00
Ben Noordhuis
fd987a26fe unix: move timer code from core.c to timer.c 2012-04-04 05:25:27 +02:00
Ben Noordhuis
c733cb807d build: sort source files 2012-04-04 05:12:02 +02:00
Ben Noordhuis
effa3b65b1 Rename __unused to UV__UNUSED.
__unused is - contrary to its name - used in glibc.

The ANSI/ISO standards reserve all identifiers starting with two underscores so
it's generally a good idea not to use those.
2012-04-03 17:41:50 +02:00
Ben Noordhuis
8895c9e672 unix: use uv_timer_t for c-ares' timeout timer 2012-04-03 03:23:57 +02:00
Ben Noordhuis
42095c85a0 Remove UV_ARES_TASK_PRIVATE_FIELDS.
It's only used internally, it doesn't have to be part of a public header file.
2012-04-03 02:44:50 +02:00
Ben Noordhuis
396d1383fe Merge branch 'v0.6' 2012-04-02 23:50:27 +02:00
Ben Noordhuis
9c8f6dd4f9 build: define _DARWIN_USE_64_BIT_INODE=1 on OS X
Fixes a segmentation fault on some OS X systems due to sizeof(struct stat)
mismatches.
2012-04-02 23:49:53 +02:00
Brian White
9d3c00046f test: ensure valid uptime value 2012-04-01 21:15:51 +02:00
Brian White
442aa1f469 win: use performance counter instead of GetTickCount for uptime 2012-04-01 21:15:38 +02:00
Vladimir Dronnikov
b309f2e2e6 Add uv_is_closing()
Closes #367.
2012-04-01 21:05:50 +02:00
Ben Noordhuis
685b36ba66 linux: tidy up syscall code 2012-03-31 00:19:01 +00:00
Ben Noordhuis
4632163190 sunos: don't use fopen()
FILE uses an unsigned char to store the file descriptor so it cannot handle
situations where there are more than 256 open file descriptors.
2012-03-31 00:04:37 +00:00
Ben Noordhuis
1ab8f5a3c5 Conditionally define __unused.
Fixes compiler warning '"__unused" redefined' on OS X.

Reported by Saúl Ibarra Corretgé.
2012-03-30 22:40:53 +02:00
Igor Zinkovsky
4360018774 add missing uv_tcp_close declaration 2012-03-30 11:49:31 -07:00
Igor Zinkovsky
ab8c3b85c1 export uv_is_readable & uv_is_writable 2012-03-29 18:38:33 -07:00
Igor Zinkovsky
c3daa44c25 windows: explicitly disallow sending non-listening or non-connected
TCP sockets over IPC
2012-03-29 18:19:01 -07:00
Igor Zinkovsky
70925c3bb9 windows: Enable passing of TCP connections over IPC 2012-03-29 18:18:46 -07:00
Bulat Shakirzyanov
31ff9863a1 unix: fix TARGET_OS_IPHONE conditional 2012-03-28 15:45:44 +02:00
Bert Belder
6e0ca3aa8f Merge branch 'v0.6'
Conflicts:
	src/unix/linux/inotify.c
2012-03-27 23:46:23 +02:00
Bert Belder
1795427ab0 Windows: never call fs event callbacks after closing the watcher 2012-03-27 23:00:26 +02:00
Bert Belder
aff078390f Test: verify that uv_close from an fs event callback works properly 2012-03-27 23:00:26 +02:00
Bert Belder
732cf91d6d Test: verify that no callbacks are made after closing an fs event watcher 2012-03-27 23:00:26 +02:00
Bert Belder
89303f365e Fs event tests: don't fail if a previously failed test left stray files 2012-03-27 23:00:25 +02:00
Bert Belder
7e8fe3ece7 test-fs-event.c: style 2012-03-27 23:00:25 +02:00
Aaron Bieber
40e6373263 unix: fix compiler warning
Fix warning "for loop initial declaration used outside C99 mode" on openbsd.
2012-03-27 17:34:18 +02:00
Vladimir Dronnikov
2b3ba91eb9 build: make make clean really clean 2012-03-27 16:14:06 +02:00
saghul
e729a82e7d build: don't link against the Carbon framework
Unused. The Makefile doesn't link against it either.
2012-03-26 00:13:55 +02:00