Commit Graph

343 Commits

Author SHA1 Message Date
Ben Noordhuis
4ed2a78f0e unix,win: add uv_random()
Add an API for obtaining cryptographically strong random data from the
system PRNG.

Co-authored-by: Saúl Ibarra Corretgé <s@saghul.net>
Refs: https://github.com/libuv/libuv/pull/1055
PR-URL: https://github.com/libuv/libuv/pull/2347
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2019-09-18 08:09:14 +02:00
Santiago Gimeno
80e931b38c
build,zos: add _OPEN_SYS_SOCK_EXT3 flag
To support source specific multicast operations.

PR-URL: https://github.com/libuv/libuv/pull/2202
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2019-08-23 21:12:53 +02:00
Ben Noordhuis
3a1be72532 linux: read free/total memory from /proc/meminfo
It was reported that uv_get_free_memory() and uv_get_total_memory()
report the wrong values inside an lxc container.

Libuv calls sysinfo(2) but that isn't intercepted by lxc. /proc/meminfo
however is because /proc is a FUSE fs inside the container.

This commit makes libuv try /proc/meminfo first and fall back to
sysinfo(2) in case /proc isn't mounted.

Fixes: https://github.com/libuv/libuv/issues/2249
PR-URL: https://github.com/libuv/libuv/pull/2258
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-04-23 11:49:37 +02:00
Ben Noordhuis
8972e65bf5 unix: harden string copying, introduce strscpy()
Replace calls to strcpy() and strncpy() with the newly introduced
uv__strscpy() function that is meticulous about zero-terminating
the destination buffer.

PR-URL: https://github.com/libuv/libuv/pull/2065
Refs: https://www.kernel.org/doc/htmldocs/kernel-api/API-strscpy.html
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-12-04 17:08:09 +01:00
Ben Noordhuis
6dd44caa35 unix,win: support IDNA 2008 in uv_getaddrinfo()
Encode domain names before passing them on to the libc resolver.
Some getaddrinfo() implementations support IDNA 2008, some only
IDNA 2003 and some don't support i18n domain names at all.

This is a potential security issue because it means a domain name
might resolve differently depending on the system that libuv is
running on.

Fixes: https://github.com/libuv/libuv/issues/2028
PR-URL: https://github.com/libuv/libuv/pull/2046
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2018-10-30 20:50:23 +01:00
Santiago Gimeno
d0b15844dd
core,bsd: refactor process_title functions
Use `setproctitle()` in `FreeBSD` as in the other `BSD` flavours.
Move `uv_setup_args()`, `uv_set_process_title()` and `uv_get_process_title()` to
`bsd-proctitle.c` so it's used by the supported BSDs.

PR-URL: https://github.com/libuv/libuv/pull/2042
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-18 10:11:40 +02:00
Carlo Marcelo Arenas Belón
672b96fab4
win: remove req.c and other cleanup
PR-URL: https://github.com/libuv/libuv/pull/2018
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-10-08 11:06:15 -04:00
Ben Noordhuis
95c5bf8db1 unix,win: merge timers implementation
Merge src/unix/timer.c and src/win/timer.c into src/timer.c.  This
changes the Windows implementation from a binary tree to a binary
heap for generally better performance.

PR-URL: https://github.com/libuv/libuv/pull/1882
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-06-25 23:48:15 +02:00
Saúl Ibarra Corretgé
99ae3edf28 core: move all include files except uv.h to uv/
This is a cherry-pick of commit d010030ad5 from the master branch.

Conflicts:
 	Makefile.am
 	include/uv.h
 	include/uv/unix.h
 	libuv.nsi (deleted)
 	src/unix/pthread-barrier.c (deleted)

PR-URL: https://github.com/libuv/libuv/pull/1850
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-06-14 18:39:32 +02:00
ThePrez
7f85924e8b
unix: use __PASE__ on IBM i platforms
IBM i compilers now predefine __PASE__. This commit updates
code to rely on that rather than manually setting (or relying on)
a _PASE definition.

PR-URL: https://github.com/libuv/libuv/pull/1782
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2018-03-31 16:41:53 -04:00
Ben Noordhuis
ee875f9d05 build: build with -D_FILE_OFFSET_BITS=64 again
Faulty logic in commit fdf7c2a ("build: split off tests into separate
gyp file") accidentally disabled `-D_FILE_OFFSET_BITS=64` on Unices,
breaking file operations on files > 2 GB on 32 bits platforms.

Fixes: https://github.com/nodejs/node/issues/19455
PR-URL: https://github.com/libuv/libuv/pull/1779
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2018-03-21 10:27:50 +01:00
Ben Noordhuis
fdf7c2ad1d build: split off tests into separate gyp file
Make it easier for Node.js to ship libuv in its tarballs without also
including the test suite.  Node.js already does so but recent changes
to its build system complicate that.

Kills two birds with one stone: it helps out Node.js and it makes it
harder for us to introduce hidden dependencies between the library and
the test suite.

PR-URL: https://github.com/libuv/libuv/pull/1725
Refs: https://github.com/nodejs/node/pull/18287
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-27 22:59:47 +01:00
Ben Noordhuis
b0f3310bb1 Revert "unix,fs: fix for potential partial reads/writes"
This commit has been reported as introducing a backwards-incompatible
change in reading from stdin and is independently suspected of breaking
the Node.js test suite on MacOS and maybe other platforms, possibly in
combination with commit fd049399 ("unix,tcp: avoid marking server
sockets connected".)

This reverts commit 14bfc27e64.

Fixes: https://github.com/libuv/libuv/issues/1716
Fixes: https://github.com/libuv/libuv/issues/1720
Fixes: https://github.com/nodejs/node/issues/18225
PR-URL: https://github.com/libuv/libuv/pull/1717
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2018-01-19 17:51:08 +01:00
Ben Wijen
14bfc27e64
unix,fs: fix for potential partial reads/writes
Added a check in uv__fs_buf_iter to detect partial reads and writes.
Partial reads and writes are looped until all data has been processed.

PR-URL: https://github.com/libuv/libuv/pull/640
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2018-01-10 17:14:53 +01:00
Bartosz Sosnowski
2b32e77bb6 win: map 0.0.0.0 and :: addresses to localhost
On Linux when connecting IP addresses 0.0.0.0 and :: are automatically
converted to localhost. This adds same functionality to Windows.

PR-URL: https://github.com/libuv/libuv/pull/1515
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-12-28 10:42:11 +01:00
John Barboza
b01de7341f
zos: implement uv_fs_event* functions
This commit uses the Register File Interest feature on z/OS
to enable users to monitor file system events.
The poll call is used to check for file descriptors as well
as a message queue that z/OS will report file system events
on. The last item on the list used by poll will contain the
message queue id instead of a file descriptor.

Limitation:
Writes to a directory (that is, file creation and deletion)
do not generate a change message for a registered directory.

PR-URL: https://github.com/libuv/libuv/pull/1311
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-12-15 11:04:16 +01:00
Matt Harrison
8a6d1b32c5 unix: make get(set)_process_title MT-safe
Used a shared uv_mutex_t in unix implementations of these functions
to prevent simultaneous execution.

Fixes: https://github.com/libuv/libuv/issues/271
PR-URL: https://github.com/libuv/libuv/pull/1640
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-12-02 12:06:34 +01:00
Anna Henningsen
0d6525acae core: add getter/setter functions for easier ABI compat
Add getter/setter functions for the fields of public structs that
might be relevant to e.g. Node.js addons.

Through these methods, ABI compatibility for a subset of the ABI
is easier to achieve, since using them makes code independent
of the exact offsets of these fields.

The intended use case that prompted this are N-API addons for
Node.js, which look for more long-term ABI compatibility guarantees
than typical Node code. With these helper functions, using libuv
directly should no longer be an obstacle for such addons.

PR-URL: https://github.com/libuv/libuv/pull/1657
Refs: https://github.com/nodejs/node/issues/13512
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-12-02 09:51:25 +01:00
Xu Meng
bb3d093bbb ibmi: add support for new platform
Support the IBM i platform.

- add a new file src/unix/ibmi.c
- extract the common functions from /src/unix/aix.c into aix-common.c
- update uv.gyp and include/uv-unix.h to enable the new file ibmi.c

PR-URL: https://github.com/libuv/libuv/pull/1601
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-11-22 12:18:04 +01:00
Bartosz Sosnowski
fd02ab681b pipe: allow access from other users
Adds new uv_pipe_chmod function which can be used to make the pipe
writable or readable by all users.

PR-URL: https://github.com/libuv/libuv/pull/1386
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-11-06 15:45:00 +01:00
John Barboza
9991bb7c62 build: avoid -fstrict-aliasing compile option
Libuv is not aliasing-safe if you consider aliasing to be nominal
rather than structural and it's not as if it makes much of a
difference in the quality of the generated code, at least for libuv.

PR-URL: https://github.com/libuv/libuv/pull/1457
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-09-30 14:21:11 +02:00
John Barboza
eb1fe77f66 zos: change platform name to match python
The latest python on z/OS (2.7.13) was changed to update sys.platform to
return "zos" instead of "os390". So a change has been submitted to the
official gyp repository here.

PR-URL: https://github.com/libuv/libuv/pull/1557
Refs: https://chromium-review.googlesource.com/c/external/gyp/+/679077
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-26 19:35:08 +02:00
cjihrig
766d7e9c0b
unix, windows: add basic uv_fs_copyfile()
Fixes: https://github.com/libuv/libuv/issues/925
PR-URL: https://github.com/libuv/libuv/pull/1465
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-08-15 10:43:49 -04:00
Saúl Ibarra Corretgé
7dabd57af4 android: fix compilation with new NDK versions
Fixes compiling with Android NDK when using Unified Headers (default
since r15).

Fixes: https://github.com/libuv/libuv/issues/1417
PR-URL: https://github.com/libuv/libuv/pull/1433
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-07-25 22:50:39 +02:00
CurlyMoo
d731fd1bd9 poll: add support for OOB TCP and GPIO interrupts
Out-of-band TCP messages are used for TCP data
transmission outside (outband) the inbound TCP
data. These packets are sent with an
"urgent pointer", but previously discarded.

Additionally, when using (e)poll a POLLPRI is
triggered when an interrupt signal is received
on GPIO capable systems such as the Raspberry Pi.

PR-URL: https://github.com/libuv/libuv/pull/1040
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-07-12 23:04:34 +02:00
Robert Ayrapetyan
4987b6325b
freebsd: replace kvm with sysctl
PR-URL: https://github.com/libuv/libuv/pull/1377
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-07-01 18:10:21 +02:00
Gemini Wen
57f4180cf3 build: add a comma to uv.gyp
PR-URL: https://github.com/libuv/libuv/pull/1368
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-06-05 09:47:55 -04:00
Brad King
77326e86a2 unix: factor out reusable procfs exepath impl
On Linux we read `/proc/self/exe` for the path to the executable.
Factor out a dedicated source file to make this implementation
available for use on other platforms that support it.

PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-21 16:12:18 +02:00
Brad King
76bcf9f91d unix: factor out reusable sysinfo loadavg impl
On Linux we use `sysinfo(2)` to look up the load average.
Factor out a dedicated source file to make this implementation
available for use on other platforms that support it.

PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-21 16:12:16 +02:00
Brad King
ea795b29ef unix: factor out reusable sysinfo memory lookup
On Linux we use `sysinfo(2)` to look up available memory.
Factor out a dedicated source file to make this implementation
available for use on other platforms that support it.

PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-21 16:12:14 +02:00
Brad King
32ef58bf72 unix: factor out reusable no-fsevents impl
On os390 we implement no support for fsevents.  Other platforms may not
support fsevents either, so provide a dedicated source file to use in
this case.

PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-21 16:12:11 +02:00
Brad King
470b0258b0 unix: factor out reusable no-proctitle impl
On SunOS we implement no support for proctitle.  Other platforms may not
support proctitle either, so provide a dedicated source file to use in
this case.

PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-21 16:11:33 +02:00
cjihrig
d8cd08bd98 unix,win: add uv_os_gethostname()
Fixes: https://github.com/libuv/libuv/issues/1315
PR-URL: https://github.com/libuv/libuv/pull/1342
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-05-18 10:27:47 -04:00
Jameson Nash
fd39cec4b8
build: add -Wstrict-prototypes
Fixes: https://github.com/libuv/libuv/pull/1320
PR-URL: https://github.com/libuv/libuv/pull/1326
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-02 23:00:33 +02:00
Trevor Norris
d898a1f6f8 test: add test for uv_udp_send() fix
Test that the fast path will continue writing. On failure, this test
will timeout.

PR-URL: https://github.com/libuv/libuv/pull/1308
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-04-20 18:10:43 -04:00
Jason Madden
fd7ce57f2b unix: make loops and watchers usable after fork()
Added the uv_loop_fork() API that must be called in a child process to
continue using an existing loop. Internally this calls a uv__io_fork
function for each supported platform, similar to the way
uv__platform_loop_init works.

After this call, existing and new IO, async and signal watchers will
contiue working as before on all platforms, as will the
threadpool (although any threads it was using are of course gone).

On Linux and BSDs that use kqueue, existing and new fsevent watchers
will also continue to work as expected. On OS X, though, directory
fsevents will not be able to use the optimized CoreFoundation path if
they had already been used in the parent process, instead falling back
to the kqueue path used on other BSDs.

Existing fsevent watchers will not function on AIX or SunOS. This
could be relatively easily fixed by someone with AIX knowledge in the
future, but SunOS will require some additional work to keep track if
the watchers.

A new test file, test/test-fork.c, was added to contain fork-related
tests to verify functionality in the child process.

PR-URL: https://github.com/libuv/libuv/pull/846
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-03-21 12:23:44 +01:00
Brad King
f277cb6f92 unix: factor out reusable BSD ifaddrs impl
Create a dedicated source file to share among platforms on which we find
ifaddrs using the BSD getifaddrs API.  De-duplicate our existing copies
of this implementation on such platforms.

PR-URL: https://github.com/libuv/libuv/pull/1240
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-03-14 08:33:43 +01:00
cjihrig
ee02f60c90 unix,win: add uv_os_{get,set,unset}env()
These functions are used to create, retrieve, update, and delete
environment variables.

Fixes: https://github.com/libuv/libuv/issues/1198
PR-URL: https://github.com/libuv/libuv/pull/1234
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-03-08 20:39:33 -05:00
Brad King
2ba39be67e
unix: factor out reusable POSIX hrtime impl
Create a dedicated source file to share among platforms on which we
implement hrtime using POSIX `clock_gettime`.  De-duplicate our
existing copies of this implementation on such platforms.

PR-URL: https://github.com/libuv/libuv/pull/1239
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-03-03 15:52:42 +01:00
Gireesh Punathil
fb0f87b6d7 aix: re-enable fs watch facility
On AIX, watch feature depends on AHAFS based Event infrastructure.
While in principle the watch use case is same across platforms, there
are subtle differences in the way AIX deals with this, with few
behavioral changes (external).

This commit opens up the AIX code for watch feature which was masked
under a macro HAVE_SYS_AHAFS_EVPRODS_H and addresses an assertion
failure on folder watch.

PR-URL: https://github.com/libuv/libuv/pull/1156
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-01-30 21:20:10 +01:00
John Barboza
f9484cf515 zos: use built-in proctitle implementation
Use built-in proctitle implementation because there is no such thing as
a process title on zOS.

PR-URL: https://github.com/libuv/libuv/pull/1208
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-01-27 18:08:28 +01:00
John Barboza
c5bb773bdd zos: use gyp OS label "os390" on z/OS
This is what `uname` on the system actually displays.
Also, other gyp based projects use 'os390'

PR-URL: https://github.com/libuv/libuv/pull/1207
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-01-23 07:46:51 +01:00
John Barboza
011e02e3e5 zos: make platform functional
Fix all functional test cases:

* use PLO compare,swap,store for atomic instruction
* do not use semaphore.h
* use xplink flag when linking
* scandir implementation
* nanosleep implementation
* add proctitle
* uv_loadavg
* uv_fs_event_init/start
* uv_fs_event_stop
* uv_exepath using __getthent syscall
* read free/total memory from mvs data areas
* uv_resident_set_memory implementation
* network interfaces implementation
* cpu_info implementation
* implement uv__hrtime
* make uv__fs_mkdtemp implementation
* epoll implementation for asyncio
* uv__fs_event_close implementation
* set process title
* read ancillary data that remains on queue
* ancillary data
* implement uv__fs_access
* use /dev/urandom for temporary directory name
* disable proctitle on zos completely

PR-URL: https://github.com/libuv/libuv/pull/1037
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-01-18 08:42:59 -06:00
Santiago Gimeno
1a96fe3334 build,osx: fix warnings on tests compilation with gyp
Add `-Wno-long-long` to `WARNING_CFLAGS`.

PR-URL: https://github.com/libuv/libuv/pull/1049
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-09-15 18:45:39 +02:00
John Barboza
9e641d251f zos: implement uv__io_check_fd
This method uses the poll syscall to determine whether POLLNVAL is
flagged or not.

PR-URL: https://github.com/libuv/libuv/pull/957
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-08-25 13:04:04 +01:00
John Barboza
00c0ff149d zos: use pthread helper functions
zOS does not implement some pthread_barrier functions. So we will use
the provided helper functions in src/unix/pthread*.

PR-URL: https://github.com/libuv/libuv/pull/954
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-08-24 09:50:54 +01:00
John Barboza
1cff5b7557 zos: add support for new platform
- zos: disable test cases not applicable
- zos: build options
- zos: semaphore implementation
- zos: use compare and swap builtins
- zos: struct rusage not the same as other platforms
- zos: backlog<=0 produces undefined behaviour
    Will redefine backlog in the following way
    * if backlog == 0, set it to 1
    * if backlog < 0, set it to SOMAXCONN
- zos: define IMAXBEL as empty flag and implement uv__tty_make_raw
- zos: use udp multicast operations from aix
- zos: ESC in ebcdic
- zos: use LIBPATH for dynamic linker path
- zos: uv_udp_set_ttl only works for ipv6
- zos: increase pthread stack size by factor of 4
- zos: return ENODEV instead of ENXIO errors for setsockopt
- zos: use uv_cond_init the same way as aix
- test: enable oob test for zos
- zos: return EINVAL for zos error code EOPNOTSUPP

PR-URL: https://github.com/libuv/libuv/pull/937
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-08-19 01:34:29 +02:00
Saúl Ibarra Corretgé
d796bedf5b unix,win: make on_alloc_cb failures more resilient
Treat both the base being NULL or the length being 0 as ENOBUFS.

PR-URL: https://github.com/libuv/libuv/pull/997
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-08-17 09:57:55 +02:00
Bartosz Sosnowski
6fa3524ea7 win: evaluate timers when system wakes up
When Windows resumes after sleep GetQueuedCompletionStatus timeout is
not updated. This commit adds a method for signaling all loops to
wake up and update their timers.

Fixes: https://github.com/nodejs/node/issues/6763
PR-URL: https://github.com/libuv/libuv/pull/962
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-08-12 11:27:37 +01:00
Kári Tristan Helgason
89f01a41ab test: silence build warnings
PR-URL: https://github.com/libuv/libuv/pull/893
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-03 01:18:17 +02:00