Commits on Jan 22, 2013
  1. test: remove .travis.yml

    Travis CI was generating a lot of false positives (or rather, false
    negatives - tests that fail due to the environment they run in) and
    it's been in a continuous error state for days now.
    Remove it, we'll set up something ourselves.
    bnoordhuis committed Jan 22, 2013
  2. build: don't export _POSIX_C_SOURCE on non-linux

    Don't export _POSIX_C_SOURCE to dependents. On the BSDs (and the
    BSD-ish, like OS X), it hides SysV and BSD definitions.
    The exception is Linux: _POSIX_C_SOURCE=200112 unlocks some of the
    newer pthreads features like spinlocks and barriers, so keep
    exporting it on that platform.
    bnoordhuis committed Jan 22, 2013
  3. unix, windows: return UV_EINVAL, not UV_EFAULT

    A wrong multicast membership should return EINVAL.
    txdv committed with bnoordhuis Jan 22, 2013
Commits on Jan 18, 2013
  1. unix, windows: make uv_*_bind() error codes consistent

    Just like uv_tcp_connect() it should return an EINVAL when the handle
    is of an invalid type or when the network address is faulty.
    txdv committed with bnoordhuis Jan 18, 2013
Commits on Jan 17, 2013
  1. linux: translate futimes() fallback error codes

    The fallback added in 9d4a16e uses the /proc filesystem to emulate
    Translate error codes that indicate no procfs is mounted to ENOSYS.
    Letting those error codes through unchecked will only confuse callers.
    bnoordhuis committed Jan 17, 2013
  2. linux: add futimes() fallback

    The utimensat() syscall was added in 2.6.22. Add a fallback mode for
    older kernels that uses utimes("/proc/self/fd/<fd>").
    Fixes #687.
    bnoordhuis committed Jan 17, 2013
  3. linux: use stdint types in structs

    Use the typedefs from stdint.h to avoid build breakage on systems
    where __u64 and friends are hidden when --std=c89 is in effect.
    Fixes #685.
    bnoordhuis committed Jan 17, 2013
Commits on Jan 16, 2013
  1. test: make threadpool tests valgrind-compliant

    Delete the event loop after the test to stop valgrind from complaining
    about memory leaks.
    bnoordhuis committed Jan 16, 2013
  2. unix, windows: rename uv_run2 to uv_run

    This changes the prototype of uv_run() from:
      int uv_run(uv_loop_t* loop);
      int uv_run(uv_loop_t* loop, uv_run_mode mode);
    Fixes #683.
    bnoordhuis committed Jan 16, 2013
Commits on Jan 15, 2013
  1. test: remove bad tcp_write_error test

    It makes the assumption that if you try to write to a localhost socket
    often enough, eventually its send queue will fill up - which doesn't
    happen if the machine it's running on is fast enough.
    bnoordhuis committed Jan 15, 2013
Commits on Jan 14, 2013
Commits on Jan 12, 2013
  1. linux: only pack struct uv__epoll_event on x86_64

    On i386, it does not need packing; it's 12 bytes packed or unpacked.
    On ARM, it's actively harmful: the struct is 12 bytes when packed and
    16 bytes when unpacked.
    bnoordhuis committed Jan 12, 2013
  2. build: fix host/target arch detection

    Setting the target_arch without setting the host_arch as well was
    effectively broken.
    bnoordhuis committed Jan 12, 2013
Commits on Jan 11, 2013
  1. Revert "unix: improve uv_guess_handle() implementation"

    This reverts commit 98bcddc.
    It's making a lot of tests in the node.js test suite fail.
    bnoordhuis committed Jan 11, 2013
  2. unix: set closed fd to -1, avoid double close bugs

    * abort() if close() fails
    * set fd to -1 after close() to prevent double close bugs
    bnoordhuis committed Jan 11, 2013
  3. unix: don't swap stdin file descriptors

    Bug introduced in 47f496a. It turns out the file descriptors of the
    stdin pipe don't have to be swapped around.
    bnoordhuis committed Jan 11, 2013
Commits on Jan 10, 2013
  1. unix: omit second fcntl() call if possible

    Omit the fcntl() syscall when the O_NONBLOCK or FD_CLOEXEC is already
    set/clear because it's a no-op in that case.
    bnoordhuis committed Jan 10, 2013
Commits on Jan 9, 2013
Commits on Jan 8, 2013
  1. unix: improve uv_guess_handle() implementation

    uv_guess_handle is currently squelching both fifo and all
    sockets on to the UV_NAMED_PIPE type. Rather than treating
    all sockets as UV_NAMED_PIPE, use getsockopt() and
    getsockaddr() to determine if the socket is an AF_UNIX
    stream (in which case return UV_NAMED_PIPE), or an AF_INET
    stream (in which case return UV_TCP), or an AF_INET datagram
    socket (in which case return UV_UDP).
    Additionally, currently all other file descriptor types are
    squelched to the UV_FILE type. Instead, only file descriptors
    that are marked as regular files are treated as UV_FILE. All
    other types (such as directories, character and block devices)
    are now treated as UV_UNKNOWN_HANDLE.
    bennoleslie committed with bnoordhuis Dec 9, 2012
Commits on Jan 7, 2013
  1. unix: fix GNU-ism introduced in edd1007

    Don't use features.h, it's only available on GNU/glibc systems.
    bnoordhuis committed Jan 7, 2013
Commits on Jan 6, 2013
  1. test: fix #if defined checks

    Same as edd1007 but this time for the tests.
    bnoordhuis committed Jan 6, 2013
  2. test: simplify tcp_ref2b

    Said test doesn't need its own close callback, it can piggyback on the
    common close callback.
    bnoordhuis committed Jan 6, 2013
  3. test, bench: make functions/variables static

    Make functions and variables that are local to the compilation unit
    static. Remove what turns out to be unused.
    bnoordhuis committed Jan 6, 2013
  4. test, bench: ANSI-fy function prototypes

    Replace `void f()` with `void f(void)`; the former means "a function
    that takes any number of arguments, including none" while the latter
    is what is actually intended: a function taking no arguments.
    The first form also isn't strictly conforming ANSI/ISO C.
    bnoordhuis committed Jan 6, 2013
  5. linux: fix race in uv_resident_set_memory()

    uv_resident_set_memory() used a global buffer to read data into, which
    is a decidedly unsafe thing to do in a multi-threaded environment.
    bnoordhuis committed Jan 6, 2013
  6. unix: fix up #if defined checks

    `#if FOO` (where FOO is undefined) is a legal construct in C89 and C99
    but gcc, clang and sparse complain loudly about it at higher warning
    Squelch those warnings. Makes the code more consistent as well.
    bnoordhuis committed Jan 6, 2013