uv: Upgrade to v0.10.19
[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 -Iinclude/uv-private
26 -Isrc
27 "}
28
29 SOURCES="
30 include/uv-private/ngx-queue.h
31 include/uv-private/tree.h
32 include/uv-private/uv-unix.h
33 include/uv.h
34 src/fs-poll.c
35 src/inet.c
36 src/unix/async.c
37 src/unix/core.c
38 src/unix/dl.c
39 src/unix/error.c
40 src/unix/fs.c
41 src/unix/getaddrinfo.c
42 src/unix/internal.h
43 src/unix/loop-watcher.c
44 src/unix/loop.c
45 src/unix/pipe.c
46 src/unix/poll.c
47 src/unix/process.c
48 src/unix/signal.c
49 src/unix/stream.c
50 src/unix/tcp.c
51 src/unix/thread.c
52 src/unix/threadpool.c
53 src/unix/timer.c
54 src/unix/tty.c
55 src/unix/udp.c
56 src/uv-common.c
57 src/uv-common.h
58 "
59
60 TESTS="
61 test/benchmark-async-pummel.c
62 test/benchmark-async.c
63 test/benchmark-fs-stat.c
64 test/benchmark-getaddrinfo.c
65 test/benchmark-loop-count.c
66 test/benchmark-million-async.c
67 test/benchmark-million-timers.c
68 test/benchmark-multi-accept.c
69 test/benchmark-ping-pongs.c
70 test/benchmark-pound.c
71 test/benchmark-pump.c
72 test/benchmark-sizes.c
73 test/benchmark-spawn.c
74 test/benchmark-tcp-write-batch.c
75 test/benchmark-thread.c
76 test/benchmark-udp-pummel.c
77 test/blackhole-server.c
78 test/dns-server.c
79 test/echo-server.c
80 test/run-benchmarks.c
81 test/run-tests.c
82 test/runner-unix.c
83 test/runner-unix.h
84 test/runner.c
85 test/runner.h
86 test/task.h
87 test/test-active.c
88 test/test-async.c
89 test/test-barrier.c
90 test/test-callback-order.c
91 test/test-callback-stack.c
92 test/test-condvar.c
93 test/test-connection-fail.c
94 test/test-cwd-and-chdir.c
95 test/test-delayed-accept.c
96 test/test-dlerror.c
97 test/test-embed.c
98 test/test-error.c
99 test/test-fail-always.c
100 test/test-fs-event.c
101 test/test-fs-poll.c
102 test/test-fs.c
103 test/test-get-currentexe.c
104 test/test-get-loadavg.c
105 test/test-get-memory.c
106 test/test-getaddrinfo.c
107 test/test-getsockname.c
108 test/test-hrtime.c
109 test/test-idle.c
110 test/test-ipc-send-recv.c
111 test/test-ipc.c
112 test/test-loop-handles.c
113 test/test-multiple-listen.c
114 test/test-mutexes.c
115 test/test-pass-always.c
116 test/test-ping-pong.c
117 test/test-pipe-bind-error.c
118 test/test-pipe-connect-error.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-util.c
164 test/test-walk-handles.c
165 test/test-watcher-cross-stop.c
166 "
167
168 case `uname -s` in
169 AIX)
170   SPARSE_FLAGS="$SPARSE_FLAGS -D_AIX=1"
171   SOURCES="$SOURCES
172            src/unix/aix.c"
173   ;;
174 Darwin)
175   SPARSE_FLAGS="$SPARSE_FLAGS -D__APPLE__=1"
176   SOURCES="$SOURCES
177            include/uv-private/uv-bsd.h
178            src/unix/darwin.c
179            src/unix/kqueue.c
180            src/unix/fsevents.c"
181   ;;
182 DragonFly)
183   SPARSE_FLAGS="$SPARSE_FLAGS -D__DragonFly__=1"
184   SOURCES="$SOURCES
185            include/uv-private/uv-bsd.h
186            src/unix/kqueue.c
187            src/unix/freebsd.c"
188   ;;
189 FreeBSD)
190   SPARSE_FLAGS="$SPARSE_FLAGS -D__FreeBSD__=1"
191   SOURCES="$SOURCES
192            include/uv-private/uv-bsd.h
193            src/unix/kqueue.c
194            src/unix/freebsd.c"
195   ;;
196 Linux)
197   SPARSE_FLAGS="$SPARSE_FLAGS -D__linux__=1"
198   SOURCES="$SOURCES
199            include/uv-private/uv-linux.h
200            src/unix/linux-inotify.c
201            src/unix/linux-core.c
202            src/unix/linux-syscalls.c
203            src/unix/linux-syscalls.h"
204   ;;
205 NetBSD)
206   SPARSE_FLAGS="$SPARSE_FLAGS -D__NetBSD__=1"
207   SOURCES="$SOURCES
208            include/uv-private/uv-bsd.h
209            src/unix/kqueue.c
210            src/unix/netbsd.c"
211   ;;
212 OpenBSD)
213   SPARSE_FLAGS="$SPARSE_FLAGS -D__OpenBSD__=1"
214   SOURCES="$SOURCES
215            include/uv-private/uv-bsd.h
216            src/unix/kqueue.c
217            src/unix/openbsd.c"
218   ;;
219 SunOS)
220   SPARSE_FLAGS="$SPARSE_FLAGS -D__sun=1"
221   SOURCES="$SOURCES
222            include/uv-private/uv-sunos.h
223            src/unix/sunos.c"
224   ;;
225 esac
226
227 for ARCH in __i386__ __x86_64__ __arm__ __mips__; do
228   $SPARSE $SPARSE_FLAGS -D$ARCH=1 $SOURCES
229 done
230
231 # Tests are architecture independent.
232 $SPARSE $SPARSE_FLAGS -Itest $TESTS