uv: Upgrade to v0.11.17
[platform/upstream/nodejs.git] / deps / uv / checksparse.sh
1 #!/bin/sh
2
3 # Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
4 #
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
8 #
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
17 SPARSE=${SPARSE:-sparse}
18
19 SPARSE_FLAGS=${SPARSE_FLAGS:-"
20 -D__POSIX__
21 -Wsparse-all
22 -Wno-do-while
23 -Wno-transparent-union
24 -Iinclude
25 -Isrc
26 "}
27
28 SOURCES="
29 include/tree.h
30 include/uv-unix.h
31 include/uv.h
32 src/fs-poll.c
33 src/inet.c
34 src/queue.h
35 src/unix/async.c
36 src/unix/core.c
37 src/unix/dl.c
38 src/unix/fs.c
39 src/unix/getaddrinfo.c
40 src/unix/internal.h
41 src/unix/loop-watcher.c
42 src/unix/loop.c
43 src/unix/pipe.c
44 src/unix/poll.c
45 src/unix/process.c
46 src/unix/signal.c
47 src/unix/stream.c
48 src/unix/tcp.c
49 src/unix/thread.c
50 src/unix/threadpool.c
51 src/unix/timer.c
52 src/unix/tty.c
53 src/unix/udp.c
54 src/uv-common.c
55 src/uv-common.h
56 "
57
58 TESTS="
59 test/benchmark-async-pummel.c
60 test/benchmark-async.c
61 test/benchmark-fs-stat.c
62 test/benchmark-getaddrinfo.c
63 test/benchmark-loop-count.c
64 test/benchmark-million-async.c
65 test/benchmark-million-timers.c
66 test/benchmark-multi-accept.c
67 test/benchmark-ping-pongs.c
68 test/benchmark-pound.c
69 test/benchmark-pump.c
70 test/benchmark-sizes.c
71 test/benchmark-spawn.c
72 test/benchmark-tcp-write-batch.c
73 test/benchmark-thread.c
74 test/benchmark-udp-pummel.c
75 test/blackhole-server.c
76 test/dns-server.c
77 test/echo-server.c
78 test/run-benchmarks.c
79 test/run-tests.c
80 test/runner-unix.c
81 test/runner-unix.h
82 test/runner.c
83 test/runner.h
84 test/task.h
85 test/test-active.c
86 test/test-async.c
87 test/test-barrier.c
88 test/test-callback-order.c
89 test/test-callback-stack.c
90 test/test-condvar.c
91 test/test-connection-fail.c
92 test/test-cwd-and-chdir.c
93 test/test-delayed-accept.c
94 test/test-dlerror.c
95 test/test-embed.c
96 test/test-error.c
97 test/test-fail-always.c
98 test/test-fs-event.c
99 test/test-fs-poll.c
100 test/test-fs.c
101 test/test-get-currentexe.c
102 test/test-get-loadavg.c
103 test/test-get-memory.c
104 test/test-getaddrinfo.c
105 test/test-getsockname.c
106 test/test-hrtime.c
107 test/test-idle.c
108 test/test-ip6-addr.c
109 test/test-ipc-send-recv.c
110 test/test-ipc.c
111 test/test-loop-handles.c
112 test/test-multiple-listen.c
113 test/test-mutexes.c
114 test/test-pass-always.c
115 test/test-ping-pong.c
116 test/test-pipe-bind-error.c
117 test/test-pipe-connect-error.c
118 test/test-pipe-server-close.c
119 test/test-platform-output.c
120 test/test-poll-close.c
121 test/test-poll.c
122 test/test-process-title.c
123 test/test-ref.c
124 test/test-run-nowait.c
125 test/test-run-once.c
126 test/test-semaphore.c
127 test/test-shutdown-close.c
128 test/test-shutdown-eof.c
129 test/test-signal-multiple-loops.c
130 test/test-signal.c
131 test/test-spawn.c
132 test/test-stdio-over-pipes.c
133 test/test-tcp-bind-error.c
134 test/test-tcp-bind6-error.c
135 test/test-tcp-close-while-connecting.c
136 test/test-tcp-close-accept.c
137 test/test-tcp-close.c
138 test/test-tcp-connect-error-after-write.c
139 test/test-tcp-connect-error.c
140 test/test-tcp-connect-timeout.c
141 test/test-tcp-connect6-error.c
142 test/test-tcp-flags.c
143 test/test-tcp-open.c
144 test/test-tcp-read-stop.c
145 test/test-tcp-shutdown-after-write.c
146 test/test-tcp-unexpected-read.c
147 test/test-tcp-write-error.c
148 test/test-tcp-write-to-half-open-connection.c
149 test/test-tcp-writealot.c
150 test/test-thread.c
151 test/test-threadpool-cancel.c
152 test/test-threadpool.c
153 test/test-timer-again.c
154 test/test-timer.c
155 test/test-tty.c
156 test/test-udp-dgram-too-big.c
157 test/test-udp-ipv6.c
158 test/test-udp-multicast-join.c
159 test/test-udp-multicast-ttl.c
160 test/test-udp-open.c
161 test/test-udp-options.c
162 test/test-udp-send-and-recv.c
163 test/test-walk-handles.c
164 test/test-watcher-cross-stop.c
165 "
166
167 case `uname -s` in
168 AIX)
169   SPARSE_FLAGS="$SPARSE_FLAGS -D_AIX=1"
170   SOURCES="$SOURCES
171            src/unix/aix.c"
172   ;;
173 Darwin)
174   SPARSE_FLAGS="$SPARSE_FLAGS -D__APPLE__=1"
175   SOURCES="$SOURCES
176            include/uv-bsd.h
177            src/unix/darwin.c
178            src/unix/kqueue.c
179            src/unix/fsevents.c"
180   ;;
181 DragonFly)
182   SPARSE_FLAGS="$SPARSE_FLAGS -D__DragonFly__=1"
183   SOURCES="$SOURCES
184            include/uv-bsd.h
185            src/unix/kqueue.c
186            src/unix/freebsd.c"
187   ;;
188 FreeBSD)
189   SPARSE_FLAGS="$SPARSE_FLAGS -D__FreeBSD__=1"
190   SOURCES="$SOURCES
191            include/uv-bsd.h
192            src/unix/kqueue.c
193            src/unix/freebsd.c"
194   ;;
195 Linux)
196   SPARSE_FLAGS="$SPARSE_FLAGS -D__linux__=1"
197   SOURCES="$SOURCES
198            include/uv-linux.h
199            src/unix/linux-inotify.c
200            src/unix/linux-core.c
201            src/unix/linux-syscalls.c
202            src/unix/linux-syscalls.h"
203   ;;
204 NetBSD)
205   SPARSE_FLAGS="$SPARSE_FLAGS -D__NetBSD__=1"
206   SOURCES="$SOURCES
207            include/uv-bsd.h
208            src/unix/kqueue.c
209            src/unix/netbsd.c"
210   ;;
211 OpenBSD)
212   SPARSE_FLAGS="$SPARSE_FLAGS -D__OpenBSD__=1"
213   SOURCES="$SOURCES
214            include/uv-bsd.h
215            src/unix/kqueue.c
216            src/unix/openbsd.c"
217   ;;
218 SunOS)
219   SPARSE_FLAGS="$SPARSE_FLAGS -D__sun=1"
220   SOURCES="$SOURCES
221            include/uv-sunos.h
222            src/unix/sunos.c"
223   ;;
224 esac
225
226 for ARCH in __i386__ __x86_64__ __arm__ __mips__; do
227   $SPARSE $SPARSE_FLAGS -D$ARCH=1 $SOURCES
228 done
229
230 # Tests are architecture independent.
231 $SPARSE $SPARSE_FLAGS -Itest $TESTS