Skip to content

Commit

Permalink
Upgrade libuv to 90e15f1110
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Oct 28, 2011
1 parent c0c4bd4 commit 2f22024
Show file tree
Hide file tree
Showing 21 changed files with 697 additions and 205 deletions.
20 changes: 20 additions & 0 deletions deps/uv/build/gcc_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env python

import os
import re
import subprocess
import sys


def DoMain(*args):
cc = os.environ.get('CC', 'gcc')
stdin, stderr = os.pipe()
subprocess.call([cc, '-v'], stderr=stderr)
output = os.read(stdin, 4096)
match = re.search("\ngcc version (\d+\.\d+\.\d+)", output)
if match:
print(match.group(1))


if __name__ == '__main__':
DoMain(*sys.argv)
15 changes: 12 additions & 3 deletions deps/uv/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@
],
}],
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
'cflags': [ '-Wall', '-pthread', ],
'variables': {
'gcc_version%': '<!(python build/gcc_version.py)>)',
},
'cflags': [ '-Wall' ],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
'ldflags': [ '-pthread', ],
'conditions': [
[ 'host_arch != target_arch and target_arch=="ia32"', {
'cflags': [ '-m32' ],
Expand All @@ -125,7 +127,14 @@
[ 'OS=="linux"', {
'cflags': [ '-ansi' ],
}],
[ 'visibility=="hidden"', {
[ 'OS=="solaris"', {
'cflags': [ '-pthreads' ],
'ldflags': [ '-pthreads' ],
}, {
'cflags': [ '-pthread' ],
'ldflags': [ '-pthread' ],
}],
[ 'visibility=="hidden" and gcc_version >= "4.0.0"', {
'cflags': [ '-fvisibility=hidden' ],
}],
],
Expand Down
14 changes: 14 additions & 0 deletions deps/uv/include/uv-private/uv-unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ typedef struct {

typedef int uv_file;

/* Platform-specific definitions for uv_dlopen support. */
typedef void* uv_lib_t;
#define UV_DYNAMIC /* empty */

#define UV_LOOP_PRIVATE_FIELDS \
ares_channel channel; \
/* \
Expand Down Expand Up @@ -195,6 +199,16 @@ typedef int uv_file;
uv_fs_event_cb cb; \
int fflags; \

#elif defined(__sun)

#include <sys/port.h>
#include <port.h>

#define UV_FS_EVENT_PRIVATE_FIELDS \
ev_io event_watcher; \
uv_fs_event_cb cb; \
file_obj_t fo; \

#else

/* Stub for platforms where the file watcher isn't implemented yet. */
Expand Down
4 changes: 4 additions & 0 deletions deps/uv/include/uv-private/uv-win.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ typedef struct uv_buf_t {

typedef int uv_file;

/* Platform-specific definitions for uv_dlopen support. */
typedef HMODULE uv_lib_t;
#define UV_DYNAMIC FAR WINAPI

RB_HEAD(uv_timer_tree_s, uv_timer_s);

#define UV_LOOP_PRIVATE_FIELDS \
Expand Down
Loading

0 comments on commit 2f22024

Please sign in to comment.