foolio 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +22 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +29 -0
- data/Rakefile +21 -0
- data/examples/timer.rb +20 -0
- data/ext/foolio/extconf.rb +34 -0
- data/ext/foolio/foolio_ext.c +921 -0
- data/ext/foolio/gen.rb +50 -0
- data/ext/foolio/make_table.rb +12 -0
- data/ext/foolio/templ +243 -0
- data/ext/libuv/.gitignore +33 -0
- data/ext/libuv/.mailmap +13 -0
- data/ext/libuv/.travis.yml +9 -0
- data/ext/libuv/AUTHORS +61 -0
- data/ext/libuv/LICENSE +44 -0
- data/ext/libuv/Makefile +71 -0
- data/ext/libuv/README.md +90 -0
- data/ext/libuv/common.gypi +178 -0
- data/ext/libuv/gyp_uv +73 -0
- data/ext/libuv/include/uv-private/eio.h +403 -0
- data/ext/libuv/include/uv-private/ev.h +838 -0
- data/ext/libuv/include/uv-private/ngx-queue.h +108 -0
- data/ext/libuv/include/uv-private/tree.h +768 -0
- data/ext/libuv/include/uv-private/uv-unix.h +324 -0
- data/ext/libuv/include/uv-private/uv-win.h +517 -0
- data/ext/libuv/include/uv.h +1838 -0
- data/ext/libuv/src/fs-poll.c +235 -0
- data/ext/libuv/src/inet.c +293 -0
- data/ext/libuv/src/unix/async.c +148 -0
- data/ext/libuv/src/unix/core.c +696 -0
- data/ext/libuv/src/unix/cygwin.c +83 -0
- data/ext/libuv/src/unix/darwin.c +342 -0
- data/ext/libuv/src/unix/dl.c +83 -0
- data/ext/libuv/src/unix/eio/Changes +63 -0
- data/ext/libuv/src/unix/eio/LICENSE +36 -0
- data/ext/libuv/src/unix/eio/Makefile.am +15 -0
- data/ext/libuv/src/unix/eio/aclocal.m4 +8957 -0
- data/ext/libuv/src/unix/eio/autogen.sh +3 -0
- data/ext/libuv/src/unix/eio/config.h.in +86 -0
- data/ext/libuv/src/unix/eio/config_cygwin.h +80 -0
- data/ext/libuv/src/unix/eio/config_darwin.h +141 -0
- data/ext/libuv/src/unix/eio/config_freebsd.h +81 -0
- data/ext/libuv/src/unix/eio/config_linux.h +94 -0
- data/ext/libuv/src/unix/eio/config_netbsd.h +81 -0
- data/ext/libuv/src/unix/eio/config_openbsd.h +137 -0
- data/ext/libuv/src/unix/eio/config_sunos.h +84 -0
- data/ext/libuv/src/unix/eio/configure.ac +22 -0
- data/ext/libuv/src/unix/eio/demo.c +194 -0
- data/ext/libuv/src/unix/eio/ecb.h +370 -0
- data/ext/libuv/src/unix/eio/eio.3 +3428 -0
- data/ext/libuv/src/unix/eio/eio.c +2593 -0
- data/ext/libuv/src/unix/eio/eio.pod +969 -0
- data/ext/libuv/src/unix/eio/libeio.m4 +195 -0
- data/ext/libuv/src/unix/eio/xthread.h +164 -0
- data/ext/libuv/src/unix/error.c +105 -0
- data/ext/libuv/src/unix/ev/Changes +388 -0
- data/ext/libuv/src/unix/ev/LICENSE +36 -0
- data/ext/libuv/src/unix/ev/Makefile.am +18 -0
- data/ext/libuv/src/unix/ev/Makefile.in +771 -0
- data/ext/libuv/src/unix/ev/README +58 -0
- data/ext/libuv/src/unix/ev/aclocal.m4 +8957 -0
- data/ext/libuv/src/unix/ev/autogen.sh +6 -0
- data/ext/libuv/src/unix/ev/config.guess +1526 -0
- data/ext/libuv/src/unix/ev/config.h.in +125 -0
- data/ext/libuv/src/unix/ev/config.sub +1658 -0
- data/ext/libuv/src/unix/ev/config_cygwin.h +123 -0
- data/ext/libuv/src/unix/ev/config_darwin.h +122 -0
- data/ext/libuv/src/unix/ev/config_freebsd.h +120 -0
- data/ext/libuv/src/unix/ev/config_linux.h +141 -0
- data/ext/libuv/src/unix/ev/config_netbsd.h +120 -0
- data/ext/libuv/src/unix/ev/config_openbsd.h +126 -0
- data/ext/libuv/src/unix/ev/config_sunos.h +122 -0
- data/ext/libuv/src/unix/ev/configure +13037 -0
- data/ext/libuv/src/unix/ev/configure.ac +18 -0
- data/ext/libuv/src/unix/ev/depcomp +630 -0
- data/ext/libuv/src/unix/ev/ev++.h +816 -0
- data/ext/libuv/src/unix/ev/ev.3 +5311 -0
- data/ext/libuv/src/unix/ev/ev.c +3925 -0
- data/ext/libuv/src/unix/ev/ev.pod +5243 -0
- data/ext/libuv/src/unix/ev/ev_epoll.c +266 -0
- data/ext/libuv/src/unix/ev/ev_kqueue.c +235 -0
- data/ext/libuv/src/unix/ev/ev_poll.c +148 -0
- data/ext/libuv/src/unix/ev/ev_port.c +179 -0
- data/ext/libuv/src/unix/ev/ev_select.c +310 -0
- data/ext/libuv/src/unix/ev/ev_vars.h +203 -0
- data/ext/libuv/src/unix/ev/ev_win32.c +153 -0
- data/ext/libuv/src/unix/ev/ev_wrap.h +196 -0
- data/ext/libuv/src/unix/ev/event.c +402 -0
- data/ext/libuv/src/unix/ev/event.h +170 -0
- data/ext/libuv/src/unix/ev/install-sh +294 -0
- data/ext/libuv/src/unix/ev/libev.m4 +39 -0
- data/ext/libuv/src/unix/ev/ltmain.sh +8413 -0
- data/ext/libuv/src/unix/ev/missing +336 -0
- data/ext/libuv/src/unix/ev/mkinstalldirs +111 -0
- data/ext/libuv/src/unix/freebsd.c +326 -0
- data/ext/libuv/src/unix/fs.c +739 -0
- data/ext/libuv/src/unix/internal.h +188 -0
- data/ext/libuv/src/unix/kqueue.c +120 -0
- data/ext/libuv/src/unix/linux/inotify.c +239 -0
- data/ext/libuv/src/unix/linux/linux-core.c +557 -0
- data/ext/libuv/src/unix/linux/syscalls.c +388 -0
- data/ext/libuv/src/unix/linux/syscalls.h +124 -0
- data/ext/libuv/src/unix/loop-watcher.c +62 -0
- data/ext/libuv/src/unix/loop.c +94 -0
- data/ext/libuv/src/unix/netbsd.c +108 -0
- data/ext/libuv/src/unix/openbsd.c +295 -0
- data/ext/libuv/src/unix/pipe.c +259 -0
- data/ext/libuv/src/unix/poll.c +114 -0
- data/ext/libuv/src/unix/process.c +495 -0
- data/ext/libuv/src/unix/signal.c +269 -0
- data/ext/libuv/src/unix/stream.c +990 -0
- data/ext/libuv/src/unix/sunos.c +481 -0
- data/ext/libuv/src/unix/tcp.c +393 -0
- data/ext/libuv/src/unix/thread.c +251 -0
- data/ext/libuv/src/unix/timer.c +136 -0
- data/ext/libuv/src/unix/tty.c +145 -0
- data/ext/libuv/src/unix/udp.c +659 -0
- data/ext/libuv/src/unix/uv-eio.c +107 -0
- data/ext/libuv/src/unix/uv-eio.h +13 -0
- data/ext/libuv/src/uv-common.c +380 -0
- data/ext/libuv/src/uv-common.h +170 -0
- data/ext/libuv/src/win/async.c +100 -0
- data/ext/libuv/src/win/atomicops-inl.h +56 -0
- data/ext/libuv/src/win/core.c +278 -0
- data/ext/libuv/src/win/dl.c +86 -0
- data/ext/libuv/src/win/error.c +155 -0
- data/ext/libuv/src/win/fs-event.c +510 -0
- data/ext/libuv/src/win/fs.c +1948 -0
- data/ext/libuv/src/win/getaddrinfo.c +365 -0
- data/ext/libuv/src/win/handle-inl.h +149 -0
- data/ext/libuv/src/win/handle.c +154 -0
- data/ext/libuv/src/win/internal.h +343 -0
- data/ext/libuv/src/win/loop-watcher.c +122 -0
- data/ext/libuv/src/win/pipe.c +1672 -0
- data/ext/libuv/src/win/poll.c +616 -0
- data/ext/libuv/src/win/process-stdio.c +500 -0
- data/ext/libuv/src/win/process.c +1013 -0
- data/ext/libuv/src/win/req-inl.h +220 -0
- data/ext/libuv/src/win/req.c +25 -0
- data/ext/libuv/src/win/signal.c +57 -0
- data/ext/libuv/src/win/stream-inl.h +67 -0
- data/ext/libuv/src/win/stream.c +167 -0
- data/ext/libuv/src/win/tcp.c +1394 -0
- data/ext/libuv/src/win/thread.c +372 -0
- data/ext/libuv/src/win/threadpool.c +74 -0
- data/ext/libuv/src/win/timer.c +224 -0
- data/ext/libuv/src/win/tty.c +1799 -0
- data/ext/libuv/src/win/udp.c +716 -0
- data/ext/libuv/src/win/util.c +864 -0
- data/ext/libuv/src/win/winapi.c +132 -0
- data/ext/libuv/src/win/winapi.h +4452 -0
- data/ext/libuv/src/win/winsock.c +557 -0
- data/ext/libuv/src/win/winsock.h +171 -0
- data/ext/libuv/test/benchmark-async-pummel.c +97 -0
- data/ext/libuv/test/benchmark-async.c +137 -0
- data/ext/libuv/test/benchmark-fs-stat.c +135 -0
- data/ext/libuv/test/benchmark-getaddrinfo.c +94 -0
- data/ext/libuv/test/benchmark-list.h +127 -0
- data/ext/libuv/test/benchmark-loop-count.c +88 -0
- data/ext/libuv/test/benchmark-million-timers.c +65 -0
- data/ext/libuv/test/benchmark-ping-pongs.c +213 -0
- data/ext/libuv/test/benchmark-pound.c +324 -0
- data/ext/libuv/test/benchmark-pump.c +462 -0
- data/ext/libuv/test/benchmark-sizes.c +44 -0
- data/ext/libuv/test/benchmark-spawn.c +162 -0
- data/ext/libuv/test/benchmark-tcp-write-batch.c +140 -0
- data/ext/libuv/test/benchmark-thread.c +64 -0
- data/ext/libuv/test/benchmark-udp-packet-storm.c +247 -0
- data/ext/libuv/test/blackhole-server.c +118 -0
- data/ext/libuv/test/dns-server.c +321 -0
- data/ext/libuv/test/echo-server.c +378 -0
- data/ext/libuv/test/fixtures/empty_file +0 -0
- data/ext/libuv/test/fixtures/load_error.node +1 -0
- data/ext/libuv/test/run-benchmarks.c +64 -0
- data/ext/libuv/test/run-tests.c +138 -0
- data/ext/libuv/test/runner-unix.c +295 -0
- data/ext/libuv/test/runner-unix.h +36 -0
- data/ext/libuv/test/runner-win.c +285 -0
- data/ext/libuv/test/runner-win.h +42 -0
- data/ext/libuv/test/runner.c +355 -0
- data/ext/libuv/test/runner.h +159 -0
- data/ext/libuv/test/task.h +112 -0
- data/ext/libuv/test/test-async.c +118 -0
- data/ext/libuv/test/test-callback-order.c +76 -0
- data/ext/libuv/test/test-callback-stack.c +203 -0
- data/ext/libuv/test/test-connection-fail.c +148 -0
- data/ext/libuv/test/test-cwd-and-chdir.c +64 -0
- data/ext/libuv/test/test-delayed-accept.c +188 -0
- data/ext/libuv/test/test-dlerror.c +58 -0
- data/ext/libuv/test/test-error.c +59 -0
- data/ext/libuv/test/test-fail-always.c +29 -0
- data/ext/libuv/test/test-fs-event.c +474 -0
- data/ext/libuv/test/test-fs-poll.c +146 -0
- data/ext/libuv/test/test-fs.c +1843 -0
- data/ext/libuv/test/test-get-currentexe.c +63 -0
- data/ext/libuv/test/test-get-loadavg.c +36 -0
- data/ext/libuv/test/test-get-memory.c +38 -0
- data/ext/libuv/test/test-getaddrinfo.c +122 -0
- data/ext/libuv/test/test-getsockname.c +342 -0
- data/ext/libuv/test/test-hrtime.c +54 -0
- data/ext/libuv/test/test-idle.c +81 -0
- data/ext/libuv/test/test-ipc-send-recv.c +209 -0
- data/ext/libuv/test/test-ipc.c +620 -0
- data/ext/libuv/test/test-list.h +427 -0
- data/ext/libuv/test/test-loop-handles.c +336 -0
- data/ext/libuv/test/test-multiple-listen.c +102 -0
- data/ext/libuv/test/test-mutexes.c +63 -0
- data/ext/libuv/test/test-pass-always.c +28 -0
- data/ext/libuv/test/test-ping-pong.c +253 -0
- data/ext/libuv/test/test-pipe-bind-error.c +140 -0
- data/ext/libuv/test/test-pipe-connect-error.c +96 -0
- data/ext/libuv/test/test-platform-output.c +87 -0
- data/ext/libuv/test/test-poll-close.c +72 -0
- data/ext/libuv/test/test-poll.c +573 -0
- data/ext/libuv/test/test-process-title.c +49 -0
- data/ext/libuv/test/test-ref.c +338 -0
- data/ext/libuv/test/test-run-once.c +48 -0
- data/ext/libuv/test/test-semaphore.c +111 -0
- data/ext/libuv/test/test-shutdown-close.c +103 -0
- data/ext/libuv/test/test-shutdown-eof.c +183 -0
- data/ext/libuv/test/test-signal.c +162 -0
- data/ext/libuv/test/test-spawn.c +863 -0
- data/ext/libuv/test/test-stdio-over-pipes.c +246 -0
- data/ext/libuv/test/test-tcp-bind-error.c +191 -0
- data/ext/libuv/test/test-tcp-bind6-error.c +154 -0
- data/ext/libuv/test/test-tcp-close-while-connecting.c +80 -0
- data/ext/libuv/test/test-tcp-close.c +129 -0
- data/ext/libuv/test/test-tcp-connect-error-after-write.c +95 -0
- data/ext/libuv/test/test-tcp-connect-error.c +70 -0
- data/ext/libuv/test/test-tcp-connect-timeout.c +85 -0
- data/ext/libuv/test/test-tcp-connect6-error.c +68 -0
- data/ext/libuv/test/test-tcp-flags.c +51 -0
- data/ext/libuv/test/test-tcp-shutdown-after-write.c +131 -0
- data/ext/libuv/test/test-tcp-unexpected-read.c +113 -0
- data/ext/libuv/test/test-tcp-write-error.c +168 -0
- data/ext/libuv/test/test-tcp-write-to-half-open-connection.c +135 -0
- data/ext/libuv/test/test-tcp-writealot.c +170 -0
- data/ext/libuv/test/test-thread.c +183 -0
- data/ext/libuv/test/test-threadpool.c +57 -0
- data/ext/libuv/test/test-timer-again.c +141 -0
- data/ext/libuv/test/test-timer.c +152 -0
- data/ext/libuv/test/test-tty.c +110 -0
- data/ext/libuv/test/test-udp-dgram-too-big.c +86 -0
- data/ext/libuv/test/test-udp-ipv6.c +156 -0
- data/ext/libuv/test/test-udp-multicast-join.c +139 -0
- data/ext/libuv/test/test-udp-multicast-ttl.c +86 -0
- data/ext/libuv/test/test-udp-options.c +86 -0
- data/ext/libuv/test/test-udp-send-and-recv.c +208 -0
- data/ext/libuv/test/test-util.c +97 -0
- data/ext/libuv/test/test-walk-handles.c +77 -0
- data/ext/libuv/uv.gyp +375 -0
- data/ext/libuv/vcbuild.bat +105 -0
- data/foolio.gemspec +18 -0
- data/lib/foolio.rb +9 -0
- data/lib/foolio/handle.rb +27 -0
- data/lib/foolio/listener.rb +26 -0
- data/lib/foolio/loop.rb +79 -0
- data/lib/foolio/stream.rb +109 -0
- data/lib/foolio/version.rb +3 -0
- metadata +309 -0
data/ext/libuv/uv.gyp
ADDED
@@ -0,0 +1,375 @@
|
|
1
|
+
{
|
2
|
+
'target_defaults': {
|
3
|
+
'conditions': [
|
4
|
+
['OS != "win"', {
|
5
|
+
'defines': [
|
6
|
+
'_LARGEFILE_SOURCE',
|
7
|
+
'_FILE_OFFSET_BITS=64',
|
8
|
+
'_GNU_SOURCE',
|
9
|
+
'EIO_STACKSIZE=262144'
|
10
|
+
],
|
11
|
+
'conditions': [
|
12
|
+
['OS=="solaris"', {
|
13
|
+
'cflags': ['-pthreads'],
|
14
|
+
'ldlags': ['-pthreads'],
|
15
|
+
}, {
|
16
|
+
'cflags': ['-pthread'],
|
17
|
+
'ldlags': ['-pthread'],
|
18
|
+
}],
|
19
|
+
],
|
20
|
+
}],
|
21
|
+
],
|
22
|
+
},
|
23
|
+
|
24
|
+
'targets': [
|
25
|
+
{
|
26
|
+
'target_name': 'uv',
|
27
|
+
'type': '<(library)',
|
28
|
+
'include_dirs': [
|
29
|
+
'include',
|
30
|
+
'include/uv-private',
|
31
|
+
'src/',
|
32
|
+
],
|
33
|
+
'direct_dependent_settings': {
|
34
|
+
'include_dirs': [ 'include' ],
|
35
|
+
'conditions': [
|
36
|
+
['OS=="linux"', {
|
37
|
+
'libraries': [ '-ldl' ],
|
38
|
+
}],
|
39
|
+
],
|
40
|
+
},
|
41
|
+
|
42
|
+
'sources': [
|
43
|
+
'common.gypi',
|
44
|
+
'include/uv.h',
|
45
|
+
'include/uv-private/ngx-queue.h',
|
46
|
+
'include/uv-private/tree.h',
|
47
|
+
'src/fs-poll.c',
|
48
|
+
'src/inet.c',
|
49
|
+
'src/uv-common.c',
|
50
|
+
'src/uv-common.h',
|
51
|
+
],
|
52
|
+
'conditions': [
|
53
|
+
[ 'OS=="win"', {
|
54
|
+
'defines': [
|
55
|
+
'_WIN32_WINNT=0x0600',
|
56
|
+
'EIO_STACKSIZE=262144',
|
57
|
+
'_GNU_SOURCE',
|
58
|
+
],
|
59
|
+
'sources': [
|
60
|
+
'include/uv-private/uv-win.h',
|
61
|
+
'src/win/async.c',
|
62
|
+
'src/win/atomicops-inl.h',
|
63
|
+
'src/win/core.c',
|
64
|
+
'src/win/dl.c',
|
65
|
+
'src/win/error.c',
|
66
|
+
'src/win/fs.c',
|
67
|
+
'src/win/fs-event.c',
|
68
|
+
'src/win/getaddrinfo.c',
|
69
|
+
'src/win/handle.c',
|
70
|
+
'src/win/handle-inl.h',
|
71
|
+
'src/win/internal.h',
|
72
|
+
'src/win/loop-watcher.c',
|
73
|
+
'src/win/pipe.c',
|
74
|
+
'src/win/thread.c',
|
75
|
+
'src/win/poll.c',
|
76
|
+
'src/win/process.c',
|
77
|
+
'src/win/process-stdio.c',
|
78
|
+
'src/win/req.c',
|
79
|
+
'src/win/req-inl.h',
|
80
|
+
'src/win/signal.c',
|
81
|
+
'src/win/stream.c',
|
82
|
+
'src/win/stream-inl.h',
|
83
|
+
'src/win/tcp.c',
|
84
|
+
'src/win/tty.c',
|
85
|
+
'src/win/threadpool.c',
|
86
|
+
'src/win/timer.c',
|
87
|
+
'src/win/udp.c',
|
88
|
+
'src/win/util.c',
|
89
|
+
'src/win/winapi.c',
|
90
|
+
'src/win/winapi.h',
|
91
|
+
'src/win/winsock.c',
|
92
|
+
'src/win/winsock.h',
|
93
|
+
],
|
94
|
+
'link_settings': {
|
95
|
+
'libraries': [
|
96
|
+
'-lws2_32.lib',
|
97
|
+
'-lpsapi.lib',
|
98
|
+
'-liphlpapi.lib'
|
99
|
+
],
|
100
|
+
},
|
101
|
+
}, { # Not Windows i.e. POSIX
|
102
|
+
'cflags': [
|
103
|
+
'-g',
|
104
|
+
'--std=gnu89',
|
105
|
+
'-pedantic',
|
106
|
+
'-Wall',
|
107
|
+
'-Wextra',
|
108
|
+
'-Wno-unused-parameter'
|
109
|
+
],
|
110
|
+
'sources': [
|
111
|
+
'include/uv-private/eio.h',
|
112
|
+
'include/uv-private/ev.h',
|
113
|
+
'include/uv-private/uv-unix.h',
|
114
|
+
'src/unix/async.c',
|
115
|
+
'src/unix/core.c',
|
116
|
+
'src/unix/dl.c',
|
117
|
+
'src/unix/eio/ecb.h',
|
118
|
+
'src/unix/eio/eio.c',
|
119
|
+
'src/unix/eio/xthread.h',
|
120
|
+
'src/unix/error.c',
|
121
|
+
'src/unix/ev/ev.c',
|
122
|
+
'src/unix/ev/ev_vars.h',
|
123
|
+
'src/unix/ev/ev_wrap.h',
|
124
|
+
'src/unix/ev/event.h',
|
125
|
+
'src/unix/fs.c',
|
126
|
+
'src/unix/internal.h',
|
127
|
+
'src/unix/loop.c',
|
128
|
+
'src/unix/loop-watcher.c',
|
129
|
+
'src/unix/pipe.c',
|
130
|
+
'src/unix/poll.c',
|
131
|
+
'src/unix/process.c',
|
132
|
+
'src/unix/signal.c',
|
133
|
+
'src/unix/stream.c',
|
134
|
+
'src/unix/tcp.c',
|
135
|
+
'src/unix/thread.c',
|
136
|
+
'src/unix/timer.c',
|
137
|
+
'src/unix/tty.c',
|
138
|
+
'src/unix/udp.c',
|
139
|
+
'src/unix/uv-eio.c',
|
140
|
+
'src/unix/uv-eio.h',
|
141
|
+
],
|
142
|
+
'include_dirs': [ 'src/unix/ev', ],
|
143
|
+
'libraries': [ '-lm' ]
|
144
|
+
}],
|
145
|
+
[ 'OS=="mac"', {
|
146
|
+
'sources': [ 'src/unix/darwin.c' ],
|
147
|
+
'direct_dependent_settings': {
|
148
|
+
'libraries': [
|
149
|
+
'$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
|
150
|
+
],
|
151
|
+
},
|
152
|
+
'defines': [
|
153
|
+
'_DARWIN_USE_64_BIT_INODE=1',
|
154
|
+
'EV_CONFIG_H="config_darwin.h"',
|
155
|
+
'EIO_CONFIG_H="config_darwin.h"',
|
156
|
+
]
|
157
|
+
}],
|
158
|
+
[ 'OS=="linux"', {
|
159
|
+
'sources': [
|
160
|
+
'src/unix/linux/linux-core.c',
|
161
|
+
'src/unix/linux/inotify.c',
|
162
|
+
'src/unix/linux/syscalls.c',
|
163
|
+
'src/unix/linux/syscalls.h',
|
164
|
+
],
|
165
|
+
'defines': [
|
166
|
+
'EV_CONFIG_H="config_linux.h"',
|
167
|
+
'EIO_CONFIG_H="config_linux.h"',
|
168
|
+
],
|
169
|
+
'direct_dependent_settings': {
|
170
|
+
'libraries': [ '-lrt' ],
|
171
|
+
},
|
172
|
+
}],
|
173
|
+
[ 'OS=="solaris"', {
|
174
|
+
'sources': [ 'src/unix/sunos.c' ],
|
175
|
+
'defines': [
|
176
|
+
'__EXTENSIONS__',
|
177
|
+
'_XOPEN_SOURCE=500',
|
178
|
+
'EV_CONFIG_H="config_sunos.h"',
|
179
|
+
'EIO_CONFIG_H="config_sunos.h"',
|
180
|
+
],
|
181
|
+
'direct_dependent_settings': {
|
182
|
+
'libraries': [
|
183
|
+
'-lkstat',
|
184
|
+
'-lsocket',
|
185
|
+
'-lnsl',
|
186
|
+
],
|
187
|
+
},
|
188
|
+
}],
|
189
|
+
[ 'OS=="freebsd"', {
|
190
|
+
'sources': [ 'src/unix/freebsd.c' ],
|
191
|
+
'defines': [
|
192
|
+
'EV_CONFIG_H="config_freebsd.h"',
|
193
|
+
'EIO_CONFIG_H="config_freebsd.h"',
|
194
|
+
],
|
195
|
+
'direct_dependent_settings': {
|
196
|
+
'libraries': [
|
197
|
+
'-lkvm',
|
198
|
+
],
|
199
|
+
},
|
200
|
+
}],
|
201
|
+
[ 'OS=="openbsd"', {
|
202
|
+
'sources': [ 'src/unix/openbsd.c' ],
|
203
|
+
'defines': [
|
204
|
+
'EV_CONFIG_H="config_openbsd.h"',
|
205
|
+
'EIO_CONFIG_H="config_openbsd.h"',
|
206
|
+
],
|
207
|
+
}],
|
208
|
+
[ 'OS=="mac" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
|
209
|
+
'sources': [ 'src/unix/kqueue.c' ],
|
210
|
+
}],
|
211
|
+
]
|
212
|
+
},
|
213
|
+
|
214
|
+
{
|
215
|
+
'target_name': 'run-tests',
|
216
|
+
'type': 'executable',
|
217
|
+
'dependencies': [ 'uv' ],
|
218
|
+
'sources': [
|
219
|
+
'test/blackhole-server.c',
|
220
|
+
'test/echo-server.c',
|
221
|
+
'test/run-tests.c',
|
222
|
+
'test/runner.c',
|
223
|
+
'test/runner.h',
|
224
|
+
'test/test-get-loadavg.c',
|
225
|
+
'test/task.h',
|
226
|
+
'test/test-util.c',
|
227
|
+
'test/test-async.c',
|
228
|
+
'test/test-error.c',
|
229
|
+
'test/test-callback-stack.c',
|
230
|
+
'test/test-callback-order.c',
|
231
|
+
'test/test-connection-fail.c',
|
232
|
+
'test/test-cwd-and-chdir.c',
|
233
|
+
'test/test-delayed-accept.c',
|
234
|
+
'test/test-fail-always.c',
|
235
|
+
'test/test-fs.c',
|
236
|
+
'test/test-fs-event.c',
|
237
|
+
'test/test-get-currentexe.c',
|
238
|
+
'test/test-get-memory.c',
|
239
|
+
'test/test-getaddrinfo.c',
|
240
|
+
'test/test-getsockname.c',
|
241
|
+
'test/test-hrtime.c',
|
242
|
+
'test/test-idle.c',
|
243
|
+
'test/test-ipc.c',
|
244
|
+
'test/test-ipc-send-recv.c',
|
245
|
+
'test/test-list.h',
|
246
|
+
'test/test-loop-handles.c',
|
247
|
+
'test/test-walk-handles.c',
|
248
|
+
'test/test-multiple-listen.c',
|
249
|
+
'test/test-pass-always.c',
|
250
|
+
'test/test-ping-pong.c',
|
251
|
+
'test/test-pipe-bind-error.c',
|
252
|
+
'test/test-pipe-connect-error.c',
|
253
|
+
'test/test-platform-output.c',
|
254
|
+
'test/test-poll.c',
|
255
|
+
'test/test-poll-close.c',
|
256
|
+
'test/test-process-title.c',
|
257
|
+
'test/test-ref.c',
|
258
|
+
'test/test-run-once.c',
|
259
|
+
'test/test-semaphore.c',
|
260
|
+
'test/test-shutdown-close.c',
|
261
|
+
'test/test-shutdown-eof.c',
|
262
|
+
'test/test-signal.c',
|
263
|
+
'test/test-spawn.c',
|
264
|
+
'test/test-fs-poll.c',
|
265
|
+
'test/test-stdio-over-pipes.c',
|
266
|
+
'test/test-tcp-bind-error.c',
|
267
|
+
'test/test-tcp-bind6-error.c',
|
268
|
+
'test/test-tcp-close.c',
|
269
|
+
'test/test-tcp-close-while-connecting.c',
|
270
|
+
'test/test-tcp-connect-error-after-write.c',
|
271
|
+
'test/test-tcp-shutdown-after-write.c',
|
272
|
+
'test/test-tcp-flags.c',
|
273
|
+
'test/test-tcp-connect-error.c',
|
274
|
+
'test/test-tcp-connect-timeout.c',
|
275
|
+
'test/test-tcp-connect6-error.c',
|
276
|
+
'test/test-tcp-write-error.c',
|
277
|
+
'test/test-tcp-write-to-half-open-connection.c',
|
278
|
+
'test/test-tcp-writealot.c',
|
279
|
+
'test/test-tcp-unexpected-read.c',
|
280
|
+
'test/test-threadpool.c',
|
281
|
+
'test/test-mutexes.c',
|
282
|
+
'test/test-signal.c',
|
283
|
+
'test/test-thread.c',
|
284
|
+
'test/test-timer-again.c',
|
285
|
+
'test/test-timer.c',
|
286
|
+
'test/test-tty.c',
|
287
|
+
'test/test-udp-dgram-too-big.c',
|
288
|
+
'test/test-udp-ipv6.c',
|
289
|
+
'test/test-udp-options.c',
|
290
|
+
'test/test-udp-send-and-recv.c',
|
291
|
+
'test/test-udp-multicast-join.c',
|
292
|
+
'test/test-dlerror.c',
|
293
|
+
'test/test-udp-multicast-ttl.c',
|
294
|
+
],
|
295
|
+
'conditions': [
|
296
|
+
[ 'OS=="win"', {
|
297
|
+
'sources': [
|
298
|
+
'test/runner-win.c',
|
299
|
+
'test/runner-win.h'
|
300
|
+
],
|
301
|
+
'libraries': [ 'ws2_32.lib' ]
|
302
|
+
}, { # POSIX
|
303
|
+
'defines': [ '_GNU_SOURCE' ],
|
304
|
+
'sources': [
|
305
|
+
'test/runner-unix.c',
|
306
|
+
'test/runner-unix.h',
|
307
|
+
],
|
308
|
+
}],
|
309
|
+
[ 'OS=="solaris"', { # make test-fs.c compile, needs _POSIX_C_SOURCE
|
310
|
+
'defines': [
|
311
|
+
'__EXTENSIONS__',
|
312
|
+
'_XOPEN_SOURCE=500',
|
313
|
+
],
|
314
|
+
}],
|
315
|
+
],
|
316
|
+
'msvs-settings': {
|
317
|
+
'VCLinkerTool': {
|
318
|
+
'SubSystem': 1, # /subsystem:console
|
319
|
+
},
|
320
|
+
},
|
321
|
+
},
|
322
|
+
|
323
|
+
{
|
324
|
+
'target_name': 'run-benchmarks',
|
325
|
+
'type': 'executable',
|
326
|
+
'dependencies': [ 'uv' ],
|
327
|
+
'sources': [
|
328
|
+
'test/benchmark-async.c',
|
329
|
+
'test/benchmark-async-pummel.c',
|
330
|
+
'test/benchmark-fs-stat.c',
|
331
|
+
'test/benchmark-getaddrinfo.c',
|
332
|
+
'test/benchmark-list.h',
|
333
|
+
'test/benchmark-loop-count.c',
|
334
|
+
'test/benchmark-million-timers.c',
|
335
|
+
'test/benchmark-ping-pongs.c',
|
336
|
+
'test/benchmark-pound.c',
|
337
|
+
'test/benchmark-pump.c',
|
338
|
+
'test/benchmark-sizes.c',
|
339
|
+
'test/benchmark-spawn.c',
|
340
|
+
'test/benchmark-thread.c',
|
341
|
+
'test/benchmark-tcp-write-batch.c',
|
342
|
+
'test/benchmark-udp-packet-storm.c',
|
343
|
+
'test/dns-server.c',
|
344
|
+
'test/echo-server.c',
|
345
|
+
'test/blackhole-server.c',
|
346
|
+
'test/run-benchmarks.c',
|
347
|
+
'test/runner.c',
|
348
|
+
'test/runner.h',
|
349
|
+
'test/task.h',
|
350
|
+
],
|
351
|
+
'conditions': [
|
352
|
+
[ 'OS=="win"', {
|
353
|
+
'sources': [
|
354
|
+
'test/runner-win.c',
|
355
|
+
'test/runner-win.h',
|
356
|
+
],
|
357
|
+
'libraries': [ 'ws2_32.lib' ]
|
358
|
+
}, { # POSIX
|
359
|
+
'defines': [ '_GNU_SOURCE' ],
|
360
|
+
'sources': [
|
361
|
+
'test/runner-unix.c',
|
362
|
+
'test/runner-unix.h',
|
363
|
+
]
|
364
|
+
}]
|
365
|
+
],
|
366
|
+
'msvs-settings': {
|
367
|
+
'VCLinkerTool': {
|
368
|
+
'SubSystem': 1, # /subsystem:console
|
369
|
+
},
|
370
|
+
},
|
371
|
+
}
|
372
|
+
]
|
373
|
+
}
|
374
|
+
|
375
|
+
|
@@ -0,0 +1,105 @@
|
|
1
|
+
@echo off
|
2
|
+
|
3
|
+
cd %~dp0
|
4
|
+
|
5
|
+
if /i "%1"=="help" goto help
|
6
|
+
if /i "%1"=="--help" goto help
|
7
|
+
if /i "%1"=="-help" goto help
|
8
|
+
if /i "%1"=="/help" goto help
|
9
|
+
if /i "%1"=="?" goto help
|
10
|
+
if /i "%1"=="-?" goto help
|
11
|
+
if /i "%1"=="--?" goto help
|
12
|
+
if /i "%1"=="/?" goto help
|
13
|
+
|
14
|
+
@rem Process arguments.
|
15
|
+
set config=
|
16
|
+
set target=Build
|
17
|
+
set noprojgen=
|
18
|
+
set nobuild=
|
19
|
+
set run=
|
20
|
+
|
21
|
+
:next-arg
|
22
|
+
if "%1"=="" goto args-done
|
23
|
+
if /i "%1"=="debug" set config=Debug&goto arg-ok
|
24
|
+
if /i "%1"=="release" set config=Release&goto arg-ok
|
25
|
+
if /i "%1"=="test" set run=run-tests.exe&goto arg-ok
|
26
|
+
if /i "%1"=="bench" set run=run-benchmarks.exe&goto arg-ok
|
27
|
+
if /i "%1"=="clean" set target=Clean&goto arg-ok
|
28
|
+
if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok
|
29
|
+
if /i "%1"=="nobuild" set nobuild=1&goto arg-ok
|
30
|
+
:arg-ok
|
31
|
+
shift
|
32
|
+
goto next-arg
|
33
|
+
:args-done
|
34
|
+
|
35
|
+
if not "%config%"=="" goto project-gen
|
36
|
+
if "%run%"=="run-tests.exe" set config=Debug& goto project-gen
|
37
|
+
if "%run%"=="run-benchmarks.exe" set config=Release& goto project-gen
|
38
|
+
set config=Debug
|
39
|
+
|
40
|
+
:project-gen
|
41
|
+
@rem Skip project generation if requested.
|
42
|
+
if defined noprojgen goto msbuild
|
43
|
+
|
44
|
+
@rem Generate the VS project.
|
45
|
+
|
46
|
+
if exist build\gyp goto have_gyp
|
47
|
+
echo svn co http://gyp.googlecode.com/svn/trunk@983 build/gyp
|
48
|
+
svn co http://gyp.googlecode.com/svn/trunk@983 build/gyp
|
49
|
+
if errorlevel 1 goto gyp_install_failed
|
50
|
+
goto have_gyp
|
51
|
+
|
52
|
+
:gyp_install_failed
|
53
|
+
echo Failed to download gyp. Make sure you have subversion installed, or
|
54
|
+
echo manually install gyp into %~dp0build\gyp.
|
55
|
+
goto exit
|
56
|
+
|
57
|
+
:have_gyp
|
58
|
+
python gyp_uv
|
59
|
+
if errorlevel 1 goto create-msvs-files-failed
|
60
|
+
if not exist uv.sln goto create-msvs-files-failed
|
61
|
+
echo Project files generated.
|
62
|
+
|
63
|
+
:msbuild
|
64
|
+
@rem Skip project generation if requested.
|
65
|
+
if defined nobuild goto run
|
66
|
+
|
67
|
+
@rem If not running in the VS build env, try to start it. If that fails, bail
|
68
|
+
@rem out.
|
69
|
+
if defined VCINSTALLDIR goto msbuild-found
|
70
|
+
if not defined VS100COMNTOOLS goto msbuild-not-found
|
71
|
+
if not exist "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" goto msbuild-not-found
|
72
|
+
call "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat"
|
73
|
+
if not defined VCINSTALLDIR goto msbuild-not-found
|
74
|
+
goto msbuild-found
|
75
|
+
|
76
|
+
:msbuild-not-found
|
77
|
+
echo Build skipped. To build, this file needs to run from VS cmd prompt.
|
78
|
+
goto run
|
79
|
+
|
80
|
+
@rem Build the sln with msbuild.
|
81
|
+
:msbuild-found
|
82
|
+
msbuild uv.sln /t:%target% /p:Configuration=%config% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
|
83
|
+
if errorlevel 1 goto exit
|
84
|
+
|
85
|
+
:run
|
86
|
+
@rem Run tests if requested.
|
87
|
+
if "%run%"=="" goto exit
|
88
|
+
if not exist %config%\%run% goto exit
|
89
|
+
echo running '%config%\%run%'
|
90
|
+
%config%\%run%
|
91
|
+
goto exit
|
92
|
+
|
93
|
+
:create-msvs-files-failed
|
94
|
+
echo Failed to create vc project files.
|
95
|
+
goto exit
|
96
|
+
|
97
|
+
:help
|
98
|
+
echo vcbuild.bat [debug/release] [test/bench] [clean] [noprojgen] [nobuild]
|
99
|
+
echo Examples:
|
100
|
+
echo vcbuild.bat : builds debug build
|
101
|
+
echo vcbuild.bat test : builds debug build and runs tests
|
102
|
+
echo vcbuild.bat release bench: builds release build and runs benchmarks
|
103
|
+
goto exit
|
104
|
+
|
105
|
+
:exit
|