Commit Graph

522 Commits

Author SHA1 Message Date
Bruce Mitchener
d513d9bb41 Fix typos. 2011-11-30 14:35:13 +01:00
Bert Belder
fce90652ed Windows: avoid the loop starvation bug. Closes GH-154 2011-11-28 19:36:41 +01:00
Bert Belder
01f64f6612 Win: get rid of UV_EAINONAME, use UV_ENOENT instead 2011-11-25 10:11:29 +01:00
Bert Belder
b4698d414b Strip trailing whitespace 2011-11-25 10:03:27 +01:00
Igor Zinkovsky
cfa4112950 windows: make uv_fs_stat use open + fstat to support long paths 2011-11-24 19:18:17 -08:00
Bert Belder
3a50f8fca0 Win: fix uv_getaddrinfo error reporting 2011-11-25 02:05:07 +01:00
Bert Belder
45b976abd9 Win: add mapping for ERROR_ACCESS_DENIED 2011-11-25 00:59:40 +01:00
Bert Belder
ea63f06987 Win: ignore ECONNRESET when receiving udp packets 2011-11-24 19:16:24 +01:00
Bert Belder
261d792a7a Win: map STATUS_HOPLIMIT_EXCEEDED status to WSAECONNRESET error 2011-11-24 19:16:18 +01:00
Bert Belder
0ded5d29cd Win: fix improper treatment of real ntstatus codes as mapped win32 errors 2011-11-24 19:16:12 +01:00
Ben Noordhuis
96c230344d linux: fix build when compiling with -std=c89 -pedantic 2011-11-23 19:05:46 +01:00
Ben Noordhuis
92c9e95721 unix: fix stray pointer free() when HAVE_FUTIMES=0
uv_fs_futime() failed to initialize req.path when HAVE_FUTIMES=0.
uv_fs_req_cleanup() later on tried to free the bogus pointer.
2011-11-22 00:00:52 +01:00
Shimon Doodkin
1b9d00fb42 cygwin: fix undefined _SC_PAGESIZE
unistd.h was not included, when tried to build node 0.5.9 had an error of:
_SC_PAGESIZE undefined
2011-11-20 15:02:16 +01:00
Ben Noordhuis
2bd181a8d2 unix: properly disarm kqueue fs watcher
Fixes "Assertion failed: (revents == EV_LIBUV_KQUEUE_HACK),
function uv__fs_event, file ../src/unix/kqueue.c, line 58."
2011-11-18 01:40:11 +01:00
Igor Zinkovsky
08a5546753 windows: return UV_FILE for non-console FILE_TYPE_CHAR 2011-11-17 15:36:34 -08:00
Ryan Dahl
2007eb813d Set uv_write_t errno correctly
Fixes #206.
2011-11-16 13:02:18 -08:00
Frank Denis
89ea3be6c2 Add support for DragonFly BSD by sharing code for FreeBSD. 2011-11-13 19:46:24 +01:00
Frank Denis
93faeb2189 Fix typo that broke libuv on NetBSD: psysconf() -> sysconf() 2011-11-13 19:42:57 +01:00
Ben Noordhuis
224584c53e sunos: check that event ports supports fs watching 2011-11-10 20:04:55 +01:00
Ben Noordhuis
26806e2b1c sunos: add getaddrinfo() compatibility hack
getaddrinfo() returns EAI_MEMORY if strlen(hostname) >= MAXHOSTNAMELEN
2011-11-10 16:39:03 +00:00
Ben Noordhuis
04dfd46349 unix: remove unused uv__translate_lib_error() function 2011-11-10 15:26:12 +00:00
Ben Noordhuis
61ef8cc962 freebsd: remove unused variables 2011-11-10 13:57:58 +01:00
Ryan Dahl
808bb8ed0b Shared uv_strerror 2011-11-09 18:06:49 -08:00
Ryan Dahl
fd2b04d784 Alternative errno strategy 2011-11-09 17:47:24 -08:00
Igor Zinkovsky
f17d4837a8 windows: turn WSAECONNABORTED from WSARecv to UV_ECONNRESET 2011-11-09 14:57:41 -08:00
Ben Noordhuis
4794c12f58 linux: fall back to traditional syscalls if necessary
libuv uses feature checks to determine if newer syscalls like pipe2() are
available. This works fine until someone compiles libuv against kernel headers
that are newer than the actual kernel our software runs on.

Fall back to traditional (but race-y!) syscalls when the kernel reports ENOSYS
or EINVAL.
2011-11-09 15:38:51 +01:00
Igor Zinkovsky
942c68b80e windows: fix utf16->utf8 conversion in uv_fs_readdir 2011-11-08 19:23:30 -08:00
Ryan Dahl
196e14528f Map UV_ESRCH in uv_err_name 2011-11-08 16:59:05 -08:00
Bert Belder
2b7774ae49 Windows: return UV_ESRCH from uv_kill 2011-11-09 01:48:04 +01:00
Tj Holowaychuk
a378110f9e Add UV_ESRCH
Fixes #239.
2011-11-08 16:36:20 -08:00
Ryan Dahl
b7da0a69bf Add uv__new_artificial_error() 2011-11-08 15:11:16 -08:00
Igor Zinkovsky
f1859eb841 windows: convert WSAECONNABORTED to EOF 2011-11-07 16:53:27 -08:00
Ben Noordhuis
51df5e3b00 unix: map EISDIR 2011-11-07 09:20:54 +01:00
Ben Noordhuis
16d48befba win: add uv_loop_new() and uv_loop_delete() stubs 2011-11-06 04:08:43 +01:00
Ben Noordhuis
7b973eb4ad Fix uv_loop_new() and uv_default_loop() function prototypes. 2011-11-06 04:04:32 +01:00
Ben Noordhuis
cee56c96f8 unix: unbreak linux build, broken in 1997e10 2011-11-05 02:58:48 +01:00
Bert Belder
1997e10b50 Add flags to uv_fs_event_init 2011-11-05 01:42:08 +01:00
Igor Zinkovsky
faca1402ef make uv_pipe_connect return void 2011-11-04 16:06:53 -07:00
Igor Zinkovsky
82cf0b38c0 windows: remove quotes from PATH in uv_spawn 2011-11-04 15:08:53 -07:00
Igor Zinkovsky
fe97c4dc63 windows: honor O_APPEND in uv_fs_open 2011-11-04 12:41:23 -07:00
saghul
677bb70bfb Added missing error codes to uv_err_name 2011-11-04 05:37:56 +01:00
Ryan Dahl
9c7ed0dad0 One more EACCESS -> EACCES 2011-11-03 16:30:19 -07:00
Ryan Dahl
681bd290e6 UV_EACCESS -> UV_EACCES
In order to match existing Node API. See
https://github.com/joyent/node/pull/2001
2011-11-03 16:17:12 -07:00
Ryan Dahl
147487afe6 UNIX: Error map ENOTSOCK 2011-11-03 16:08:58 -07:00
Ryan Dahl
0698e3f905 Fix UNIX pipe connect error reporting, add test 2011-11-03 15:47:43 -07:00
Igor Zinkovsky
ee8a681ace windows: uv_kill and uv_process_kill to terminate the process on SIGINT 2011-11-03 14:03:42 -07:00
Igor Zinkovsky
0fb3769586 windows: don't emit fs-event callback after uv_fs_event handle is closed 2011-11-02 19:10:04 -07:00
Ben Noordhuis
77a2477c3f unix: add EAI_NODATA #ifdef guard, freebsd doesn't have it 2011-11-03 02:38:31 +01:00
Ryan Dahl
e1bee05ecd UNIX: Loop on blocking streams
Also removes a superfluous syscall during uv_tty_init for writable TTY
streams.
2011-11-02 16:47:01 -07:00
Igor Zinkovsky
74b49e821b uv_kill 2011-11-02 14:34:07 -07:00
Ben Noordhuis
8d5c64adf5 unix: map EAFNOSUPPORT error code 2011-11-02 17:20:00 +01:00
Igor Zinkovsky
7a53924aed windows: call SetErrorMode on startup to ask the system not to handle critical errors 2011-11-01 15:36:04 -07:00
Igor Zinkovsky
90b0b7d099 windows: increase the number of OVERLAPPED_ENTRYs passed to GetQueuedCompletionStatusEx 2011-11-01 10:27:46 -07:00
Igor Zinkovsky
9c6103a479 windows: add tests for uv_tcp_simultaneous_accepts 2011-11-01 01:13:13 -07:00
Igor Zinkovsky
78f4b120a1 windows: knob for tuning number of concurrent accept requests 2011-10-31 23:37:45 -07:00
Ben Noordhuis
bd82d02467 ev: fix epoll_init file descriptor leak
Fix the edge case where epoll_init() leaks a file descriptor when it is called
when the process has no open file descriptors.
2011-10-31 04:21:24 +01:00
Ben Noordhuis
70381cef9b unix: add getaddrinfo compatibility hack
Revisit in the future. This is not a good hack.
2011-10-30 02:55:12 +01:00
Ben Noordhuis
84bc18684e linux: omit superfluous fcntl(F_GETFD) syscall 2011-10-29 05:32:34 +02:00
Bert Belder
c0792e5405 Windows: the correct way to make TCP_KEEPALIVE work on MinGW 2011-10-29 02:00:04 +02:00
Luis Lavena
99b512e890 Windows: use SO_KEEPALIVE instead of TCP_KEEPALIVE
MinGW doesn't understand the latter. Closes GH-228.
2011-10-29 01:47:47 +02:00
Ben Noordhuis
ed2b5e60cb linux: use ioctl(FIONBIO) to set O_NONBLOCK, saves a syscall 2011-10-29 01:31:11 +02:00
Bert Belder
90e15f1110 Implement uv_dlopen and friends 2011-10-29 00:52:34 +02:00
Bert Belder
c985ea4b10 Add uv__new_sys_error 2011-10-29 00:52:33 +02:00
Bert Belder
e9472fe02b Prepare libuv for shared library build 2011-10-29 00:52:32 +02:00
Ben Noordhuis
f2c6b4106d unix: have uv_strerror() handle getaddrinfo() errors 2011-10-28 01:31:55 +02:00
Igor Zinkovsky
314d0ee4f6 windows: don't fail uv_listen with UV_EALREADY if already listening. fixes #227. 2011-10-26 13:48:53 -07:00
Ben Noordhuis
3e4af533ae sunos: implement file watcher API 2011-10-26 03:49:34 +00:00
Igor Zinkovsky
d15b88a935 windows: implement uv_tcp_nodelay and uv_tcp_keepalive 2011-10-25 16:30:04 -07:00
Igor Zinkovsky
0cb2213db0 windows: when sharing a server socket, only call listen in the parent process 2011-10-25 13:23:53 -07:00
Ryan Dahl
b5d69f9a3e Map EHOSTUNREACH on Unix 2011-10-24 14:07:49 -07:00
Bert Belder
179f475b2a win: fix fs__readdir buffer overflow bug
Thanks Runner Mei for pointing this out. Closes GH-224.
2011-10-21 18:42:40 -07:00
Bert Belder
66f39250b7 Fix MinGW build 2011-10-21 18:42:39 -07:00
Bert Belder
45882e0bdc win: flush output buffer before doing a console reset 2011-10-21 18:42:38 -07:00
Ben Noordhuis
2dd02829c1 win: fix function prototype
Mea culpa.
2011-10-21 18:27:24 -07:00
Ben Noordhuis
ec825ffc62 unix: add TCP keepalive and no-delay control knobs 2011-10-21 16:08:26 -07:00
Ben Noordhuis
9da53df457 unix: fix uv_freeaddrinfo() segfault on sunos
The system freeaddrinfo() on SunOS does not handle NULL values graciously.
2011-10-21 14:20:36 -07:00
Igor Zinkovsky
773830604d windows: fixes queued_bytes for ipc pipes 2011-10-21 13:37:38 -07:00
Ben Noordhuis
d396799210 Change return type of uv_get_*_memory() functions
... from double to uint64_t. Limit use of floating point in public API as much
as possible.
2011-10-21 10:09:59 -07:00
Ben Noordhuis
9757a43a57 unix: remove unused variable 2011-10-21 10:09:43 -07:00
Bert Belder
fb7138614d Improve ansi escape code support on windows 2011-10-20 19:31:24 -07:00
Ryan Dahl
2c7e8bb137 Map EAI_NONAME to ENOENT 2011-10-20 17:13:48 -07:00
Igor Zinkovsky
28234d7336 windows: ref pipe writes to keep the event loop alive 2011-10-20 15:14:55 -07:00
Igor Zinkovsky
54982a23ef windows: stdio over non-overlapped pipes 2011-10-20 15:14:39 -07:00
Bert Belder
cb474b24c1 Ignore rogue DNS servers reported by windows 2011-10-20 15:10:14 -07:00
Ben Noordhuis
c0e5db2d49 linux: fix events after close bug 2011-10-20 15:02:50 -07:00
Bert Belder
51e9dbc2bb Work around windows udp bug, allow zero reads 2011-10-20 15:01:31 -07:00
Ben Noordhuis
2069a24e8c unix: fix file descriptor leak 2011-10-15 02:34:30 +02:00
Igor Zinkovsky
456f831389 windows: ensure that the ipc frame header is properly initialized 2011-10-14 15:38:02 -07:00
Frank DENIS
4ab1990064 unix: add support for OpenBSD 2011-10-14 01:59:45 +02:00
Igor Zinkovsky
fd9dbb1279 fix mingw build 2011-10-12 21:46:06 -07:00
Igor Zinkovsky
72b5976e83 windows: support utf8 in uv_fs functions
fixes #201
2011-10-12 13:24:22 -07:00
Ryan Dahl
c903bc3f32 unix: fix a few compiler warnings 2011-10-12 12:25:05 -07:00
Igor Zinkovsky
81303a72be fix fs_readdir_file on windows 2011-10-12 11:37:22 -07:00
Igor Zinkovsky
2216d38c29 windows: enable uv_fs_open to open directories 2011-10-12 10:42:41 -07:00
Ben Noordhuis
197f591ebc common: add UV_ENOTDIR error code 2011-10-12 16:43:29 +02:00
Ben Noordhuis
721ad8c74f sunos: implement uv_fs_futime() 2011-10-12 02:05:52 +00:00
Igor Zinkovsky
72fb469a43 windows: check for fd==-1 in uv_fs functions 2011-10-11 18:22:10 -07:00
Ben Noordhuis
e0a4e72640 sunos: look up free memory with sysconf(_SC_AVPHYS_PAGES) 2011-10-12 00:27:30 +00:00
Ben Noordhuis
04daabd58f win: unbreak build, use UV_ENOSYS 2011-10-11 23:17:58 +02:00
Ben Noordhuis
61343ecfbd common: add UV_ENOSYS error code 2011-10-11 23:15:41 +02:00