Skip to content

Commit 41b1265

Browse files
committed
Rip out c-ares
1 parent a069956 commit 41b1265

93 files changed

Lines changed: 6 additions & 29031 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LICENSE

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ The externally maintained libraries used by libuv are:
3333

3434
- ngx_queue.h (from Nginx), copyright Igor Sysoev. Two clause BSD license.
3535

36-
- c-ares, copyright Daniel Stenberg and others. MIT licensed.
37-
3836
- libev, located at ev/ is copyright Marc Alexander Lehmann, and
3937
dual-licensed under the MIT license and GPL2.
4038

Makefile

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -24,54 +24,7 @@ ifdef MSVC
2424
uname_S := MINGW
2525
endif
2626

27-
CPPFLAGS += -Iinclude -Iinclude/uv-private -Isrc/ares
28-
29-
CARES_OBJS =
30-
CARES_OBJS += src/ares/ares__close_sockets.o
31-
CARES_OBJS += src/ares/ares__get_hostent.o
32-
CARES_OBJS += src/ares/ares__read_line.o
33-
CARES_OBJS += src/ares/ares__timeval.o
34-
CARES_OBJS += src/ares/ares_cancel.o
35-
CARES_OBJS += src/ares/ares_data.o
36-
CARES_OBJS += src/ares/ares_destroy.o
37-
CARES_OBJS += src/ares/ares_expand_name.o
38-
CARES_OBJS += src/ares/ares_expand_string.o
39-
CARES_OBJS += src/ares/ares_fds.o
40-
CARES_OBJS += src/ares/ares_free_hostent.o
41-
CARES_OBJS += src/ares/ares_free_string.o
42-
CARES_OBJS += src/ares/ares_gethostbyaddr.o
43-
CARES_OBJS += src/ares/ares_gethostbyname.o
44-
CARES_OBJS += src/ares/ares_getnameinfo.o
45-
CARES_OBJS += src/ares/ares_getopt.o
46-
CARES_OBJS += src/ares/ares_getsock.o
47-
CARES_OBJS += src/ares/ares_init.o
48-
CARES_OBJS += src/ares/ares_library_init.o
49-
CARES_OBJS += src/ares/ares_llist.o
50-
CARES_OBJS += src/ares/ares_mkquery.o
51-
CARES_OBJS += src/ares/ares_nowarn.o
52-
CARES_OBJS += src/ares/ares_options.o
53-
CARES_OBJS += src/ares/ares_parse_a_reply.o
54-
CARES_OBJS += src/ares/ares_parse_aaaa_reply.o
55-
CARES_OBJS += src/ares/ares_parse_mx_reply.o
56-
CARES_OBJS += src/ares/ares_parse_naptr_reply.o
57-
CARES_OBJS += src/ares/ares_parse_ns_reply.o
58-
CARES_OBJS += src/ares/ares_parse_ptr_reply.o
59-
CARES_OBJS += src/ares/ares_parse_soa_reply.o
60-
CARES_OBJS += src/ares/ares_parse_srv_reply.o
61-
CARES_OBJS += src/ares/ares_parse_txt_reply.o
62-
CARES_OBJS += src/ares/ares_process.o
63-
CARES_OBJS += src/ares/ares_query.o
64-
CARES_OBJS += src/ares/ares_search.o
65-
CARES_OBJS += src/ares/ares_send.o
66-
CARES_OBJS += src/ares/ares_strcasecmp.o
67-
CARES_OBJS += src/ares/ares_strdup.o
68-
CARES_OBJS += src/ares/ares_strerror.o
69-
CARES_OBJS += src/ares/ares_timeout.o
70-
CARES_OBJS += src/ares/ares_version.o
71-
CARES_OBJS += src/ares/ares_writev.o
72-
CARES_OBJS += src/ares/bitncmp.o
73-
CARES_OBJS += src/ares/inet_net_pton.o
74-
CARES_OBJS += src/ares/inet_ntop.o
27+
CPPFLAGS += -Iinclude -Iinclude/uv-private
7528

7629
ifneq (,$(findstring MINGW,$(uname_S)))
7730
include config-mingw.mk
@@ -84,9 +37,6 @@ BENCHMARKS=test/blackhole-server.c test/echo-server.c test/dns-server.c test/ben
8437

8538
all: uv.a
8639

87-
$(CARES_OBJS): %.o: %.c
88-
$(CC) -o $*.o -c $(CFLAGS) $(CPPFLAGS) $< -DHAVE_CONFIG_H
89-
9040
test/run-tests$(E): test/*.h test/run-tests.c $(RUNNER_SRC) test/runner-unix.c $(TESTS) uv.a
9141
$(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) -o test/run-tests test/run-tests.c \
9242
test/runner.c $(RUNNER_SRC) $(TESTS) uv.a $(RUNNER_LIBS) $(RUNNER_LINKFLAGS)

config-mingw.mk

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ CC = $(PREFIX)gcc
2424
AR = $(PREFIX)ar
2525
E=.exe
2626

27-
CFLAGS=$(CPPFLAGS) -g --std=gnu89 -D_WIN32_WINNT=0x0600 -Isrc/ares/config_win32
27+
CFLAGS=$(CPPFLAGS) -g --std=gnu89 -D_WIN32_WINNT=0x0600
2828
LINKFLAGS=-lm
2929

30-
CARES_OBJS += src/ares/windows_port.o
31-
CARES_OBJS += src/ares/ares_platform.o
3230
WIN_SRCS=$(wildcard src/win/*.c)
3331
WIN_OBJS=$(WIN_SRCS:.c=.o)
3432

@@ -37,7 +35,7 @@ RUNNER_LINKFLAGS=$(LINKFLAGS)
3735
RUNNER_LIBS=-lws2_32 -lpsapi -liphlpapi
3836
RUNNER_SRC=test/runner-win.c
3937

40-
uv.a: $(WIN_OBJS) src/fs-poll.o src/inet.o src/uv-common.o $(CARES_OBJS)
38+
uv.a: $(WIN_OBJS) src/fs-poll.o src/inet.o src/uv-common.o
4139
$(AR) rcs uv.a $^
4240

4341
src/%.o: src/%.c include/uv.h include/uv-private/uv-win.h
@@ -47,9 +45,7 @@ src/win/%.o: src/win/%.c include/uv.h include/uv-private/uv-win.h src/win/intern
4745
$(CC) $(CFLAGS) -o $@ -c $<
4846

4947
clean-platform:
50-
-rm -f src/ares/*.o
5148
-rm -f src/win/*.o
5249

5350
distclean-platform:
54-
-rm -f src/ares/*.o
5551
-rm -f src/win/*.o

config-unix.mk

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ OBJS += src/unix/udp.o
4747
ifeq (SunOS,$(uname_S))
4848
EV_CONFIG=config_sunos.h
4949
EIO_CONFIG=config_sunos.h
50-
CPPFLAGS += -Isrc/ares/config_sunos -D__EXTENSIONS__ -D_XOPEN_SOURCE=500
50+
CPPFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500
5151
LINKFLAGS+=-lsocket -lnsl -lkstat
5252
OBJS += src/unix/sunos.o
5353
endif
5454

5555
ifeq (Darwin,$(uname_S))
5656
EV_CONFIG=config_darwin.h
5757
EIO_CONFIG=config_darwin.h
58-
CPPFLAGS += -D_DARWIN_USE_64_BIT_INODE=1 -Isrc/ares/config_darwin
58+
CPPFLAGS += -D_DARWIN_USE_64_BIT_INODE=1
5959
LINKFLAGS+=-framework CoreServices
6060
OBJS += src/unix/darwin.o
6161
OBJS += src/unix/kqueue.o
@@ -65,7 +65,6 @@ ifeq (Linux,$(uname_S))
6565
EV_CONFIG=config_linux.h
6666
EIO_CONFIG=config_linux.h
6767
CSTDFLAG += -D_GNU_SOURCE
68-
CPPFLAGS += -Isrc/ares/config_linux
6968
LINKFLAGS+=-ldl -lrt
7069
OBJS += src/unix/linux/linux-core.o \
7170
src/unix/linux/inotify.o \
@@ -75,7 +74,6 @@ endif
7574
ifeq (FreeBSD,$(uname_S))
7675
EV_CONFIG=config_freebsd.h
7776
EIO_CONFIG=config_freebsd.h
78-
CPPFLAGS += -Isrc/ares/config_freebsd
7977
LINKFLAGS+=-lkvm
8078
OBJS += src/unix/freebsd.o
8179
OBJS += src/unix/kqueue.o
@@ -84,7 +82,6 @@ endif
8482
ifeq (DragonFly,$(uname_S))
8583
EV_CONFIG=config_freebsd.h
8684
EIO_CONFIG=config_freebsd.h
87-
CPPFLAGS += -Isrc/ares/config_freebsd
8885
LINKFLAGS+=
8986
OBJS += src/unix/freebsd.o
9087
OBJS += src/unix/kqueue.o
@@ -93,7 +90,6 @@ endif
9390
ifeq (NetBSD,$(uname_S))
9491
EV_CONFIG=config_netbsd.h
9592
EIO_CONFIG=config_netbsd.h
96-
CPPFLAGS += -Isrc/ares/config_netbsd
9793
LINKFLAGS+=
9894
OBJS += src/unix/netbsd.o
9995
OBJS += src/unix/kqueue.o
@@ -102,7 +98,6 @@ endif
10298
ifeq (OpenBSD,$(uname_S))
10399
EV_CONFIG=config_openbsd.h
104100
EIO_CONFIG=config_openbsd.h
105-
CPPFLAGS += -Isrc/ares/config_openbsd
106101
LINKFLAGS+=-lkvm
107102
OBJS += src/unix/openbsd.o
108103
OBJS += src/unix/kqueue.o
@@ -113,7 +108,6 @@ EV_CONFIG=config_cygwin.h
113108
EIO_CONFIG=config_cygwin.h
114109
# We drop the --std=c89, it hides CLOCK_MONOTONIC on cygwin
115110
CSTDFLAG = -D_GNU_SOURCE
116-
CPPFLAGS += -Isrc/ares/config_cygwin
117111
LINKFLAGS+=
118112
OBJS += src/unix/cygwin.o
119113
endif
@@ -131,7 +125,7 @@ endif
131125
RUNNER_LIBS=
132126
RUNNER_SRC=test/runner-unix.c
133127

134-
uv.a: $(OBJS) src/fs-poll.o src/inet.o src/uv-common.o src/unix/ev/ev.o src/unix/uv-eio.o src/unix/eio/eio.o $(CARES_OBJS)
128+
uv.a: $(OBJS) src/fs-poll.o src/inet.o src/uv-common.o src/unix/ev/ev.o src/unix/uv-eio.o src/unix/eio/eio.o
135129
$(AR) rcs uv.a $^
136130

137131
src/%.o: src/%.c include/uv.h include/uv-private/uv-unix.h
@@ -157,15 +151,13 @@ src/unix/uv-eio.o: src/unix/uv-eio.c
157151

158152

159153
clean-platform:
160-
-rm -f src/ares/*.o
161154
-rm -f src/unix/*.o
162155
-rm -f src/unix/ev/*.o
163156
-rm -f src/unix/eio/*.o
164157
-rm -f src/unix/linux/*.o
165158
-rm -rf test/run-tests.dSYM run-benchmarks.dSYM
166159

167160
distclean-platform:
168-
-rm -f src/ares/*.o
169161
-rm -f src/unix/*.o
170162
-rm -f src/unix/ev/*.o
171163
-rm -f src/unix/eio/*.o

0 commit comments

Comments
 (0)