joyent/libuv — pull request #549 by shigeki (2012-09-09 14:56:20+00:00)
Title: unix: support missing api on NetBSD

I need to run Node on NetBSD so I've just added several missing platform depended APIs with this commit.

Tests were made on only i386 with NetBSD-5.1.2. Several tests are still failed but it seems that they are not directly related to this commit. I will try to fix them later.
I have two points which should be noticed in this PR.

+ `uv_set_process_title` uses `setproctitle`
On FreeBSD, 94355e4718a788c5f2d97f1d9da34cbcd2c74b03 uses sysctl instead of `setproctitle` because of libc fault. I tried to check it on NetBSD but vg4nbsd, valgrind for NetBSD, cannot be built on current NetBSD release. Is there any way to check it beside using valgrind?

+ `cpuspeed` is taken from `machdep.tsc_freq` .
It seems to be implemented only in i386 and amd64 form a kernel source. In case that this kernel parameter does not exist, it returns 0 in the current commit. I wonder it causes some side effects when someone would calculate its clock time. If a positive value is prefer, please let me know it.