Compare commits
477 Commits
curl-7_19_
...
curl-7_19_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bf9d56485 | ||
|
|
367114bc87 | ||
|
|
81d45ed3a2 | ||
|
|
7d74e02519 | ||
|
|
7611d30a05 | ||
|
|
3704375292 | ||
|
|
ea1f30e686 | ||
|
|
9732b7cebe | ||
|
|
f39380b1ac | ||
|
|
c8da2980ed | ||
|
|
b19dc0eeb0 | ||
|
|
41de897b6b | ||
|
|
108b414bb8 | ||
|
|
be7af8beaa | ||
|
|
db1281fa9b | ||
|
|
223d848104 | ||
|
|
d8884168e3 | ||
|
|
5dd64e9e4b | ||
|
|
ce6731baf1 | ||
|
|
2c0b65d37b | ||
|
|
a76f4ab7dd | ||
|
|
d68f215f03 | ||
|
|
0a5ac52b49 | ||
|
|
8acb3803e4 | ||
|
|
ac62a94de3 | ||
|
|
0abcb37e3f | ||
|
|
7da5efd55c | ||
|
|
d4ff44d5f6 | ||
|
|
fff706d702 | ||
|
|
eac4310b2e | ||
|
|
e87ee29e32 | ||
|
|
61ebbc01ed | ||
|
|
15f425bdb8 | ||
|
|
861092637b | ||
|
|
3717b7a792 | ||
|
|
950a034895 | ||
|
|
982e655c07 | ||
|
|
308497ffc6 | ||
|
|
b205525d34 | ||
|
|
654b6b6c63 | ||
|
|
3b908ed143 | ||
|
|
265ed24ac0 | ||
|
|
57eeee2ec3 | ||
|
|
6a79b0e859 | ||
|
|
0d9f14f5c1 | ||
|
|
9fced16efb | ||
|
|
f16868d301 | ||
|
|
21af9bf1cd | ||
|
|
b2f4308980 | ||
|
|
6a37135f4d | ||
|
|
b8e1e63379 | ||
|
|
448d2b5f49 | ||
|
|
7867d44251 | ||
|
|
2380ca1714 | ||
|
|
a1cc78d5a1 | ||
|
|
7531ac89d6 | ||
|
|
72acffc66c | ||
|
|
525549f204 | ||
|
|
3f8d3e9c50 | ||
|
|
1951cd1eee | ||
|
|
55aee95f11 | ||
|
|
777134a07b | ||
|
|
4b8ce9423f | ||
|
|
051ab439a9 | ||
|
|
12e60c6d4e | ||
|
|
ff3223259f | ||
|
|
3da1ade4e5 | ||
|
|
ff40c83aa7 | ||
|
|
f49427d364 | ||
|
|
04e8ff84fe | ||
|
|
6f4a5a4612 | ||
|
|
6d4e6cc813 | ||
|
|
86cec97b22 | ||
|
|
e5ee822745 | ||
|
|
167a92810a | ||
|
|
b8b8c3d538 | ||
|
|
21105ab344 | ||
|
|
e49d928ce4 | ||
|
|
5e253785af | ||
|
|
3cbc8d1ba3 | ||
|
|
b4af26a188 | ||
|
|
6daede08cb | ||
|
|
3669ff3c1e | ||
|
|
9afdb05fe8 | ||
|
|
4d9279cb3b | ||
|
|
640e49976f | ||
|
|
f1aa936d2c | ||
|
|
a5ba25a5f6 | ||
|
|
b4e6418aef | ||
|
|
0077a6d51b | ||
|
|
4798f4e652 | ||
|
|
b38e28b6bc | ||
|
|
052dac0d3f | ||
|
|
2eeafcf9a6 | ||
|
|
45e093fc45 | ||
|
|
e593715d72 | ||
|
|
1209f2c014 | ||
|
|
7c821a85f8 | ||
|
|
cf367a62ce | ||
|
|
b233957885 | ||
|
|
492aed1450 | ||
|
|
cd91a1eeca | ||
|
|
5ed274d0b7 | ||
|
|
4271f44a9e | ||
|
|
78d07cb0f9 | ||
|
|
5b11e3883c | ||
|
|
7d22ce5573 | ||
|
|
b64dd3c63d | ||
|
|
0ea6abe7df | ||
|
|
8646cecb78 | ||
|
|
867a0de670 | ||
|
|
4f47fc4e14 | ||
|
|
8d39a31e89 | ||
|
|
66fcebdc9e | ||
|
|
af9ce990f0 | ||
|
|
e3d623f190 | ||
|
|
15be441ad8 | ||
|
|
c7c84e7420 | ||
|
|
37489a855f | ||
|
|
f03130a36e | ||
|
|
a1d18227e5 | ||
|
|
1549605c55 | ||
|
|
14a3f4cd54 | ||
|
|
9448659fc6 | ||
|
|
4002714825 | ||
|
|
61ea058d9f | ||
|
|
0fdb77d643 | ||
|
|
0c90cb7b83 | ||
|
|
ede2ac0ea2 | ||
|
|
d006efebc0 | ||
|
|
f2f45339dc | ||
|
|
be5c815f63 | ||
|
|
31e106ced2 | ||
|
|
250ba99498 | ||
|
|
c2c3a46e3e | ||
|
|
3eee678ab1 | ||
|
|
62ed553054 | ||
|
|
e3049e98d8 | ||
|
|
86f9168797 | ||
|
|
f7690db37d | ||
|
|
7e0b0763fc | ||
|
|
c67c4e7095 | ||
|
|
64a05e540e | ||
|
|
beb0a345ac | ||
|
|
f60cb60fc6 | ||
|
|
4002fbe1f5 | ||
|
|
7ff4b4f2b5 | ||
|
|
945feafe25 | ||
|
|
5389ac0ddf | ||
|
|
5d4a1e245b | ||
|
|
3c199daa95 | ||
|
|
4dd33ac575 | ||
|
|
bb3bbfe56d | ||
|
|
f09de577f5 | ||
|
|
c2ce4e55f0 | ||
|
|
5e3796349a | ||
|
|
56a161e09a | ||
|
|
2786ecaeef | ||
|
|
1486a11839 | ||
|
|
c4c15288d2 | ||
|
|
aaed838872 | ||
|
|
43fba2627a | ||
|
|
7df26a5415 | ||
|
|
f3611c2773 | ||
|
|
d5de849552 | ||
|
|
6569a23890 | ||
|
|
2cf0f80e9f | ||
|
|
223c0b980b | ||
|
|
7ab1139f07 | ||
|
|
d055226949 | ||
|
|
cf910f3097 | ||
|
|
183c9ce1cf | ||
|
|
777168cb77 | ||
|
|
0dd6c329e3 | ||
|
|
7a642c8bf1 | ||
|
|
e47c939822 | ||
|
|
a0bbe25eef | ||
|
|
b96f11f7ec | ||
|
|
7e07da977c | ||
|
|
ddb1fb7535 | ||
|
|
ea2754e028 | ||
|
|
ceda7e98f8 | ||
|
|
2d0aca3b92 | ||
|
|
4e9d3c26ed | ||
|
|
f3bd0c3fc3 | ||
|
|
eb438719f7 | ||
|
|
44e2832b2a | ||
|
|
9539d32298 | ||
|
|
60c0994677 | ||
|
|
e7f81d59b0 | ||
|
|
f1320d6733 | ||
|
|
68f7d5b8d3 | ||
|
|
e8baa332d7 | ||
|
|
39704bec3c | ||
|
|
fad14bca01 | ||
|
|
9e8eec4816 | ||
|
|
fa2ea23c96 | ||
|
|
1a255e0e28 | ||
|
|
1d92cf1dab | ||
|
|
8d1e46bdcc | ||
|
|
b0b2824b58 | ||
|
|
0cb6f3053f | ||
|
|
95c2b205a4 | ||
|
|
6ede4ce79d | ||
|
|
10f2fa9c72 | ||
|
|
8b5102ca83 | ||
|
|
1048043963 | ||
|
|
2c4fcf2ea8 | ||
|
|
681162510a | ||
|
|
5c59ee9488 | ||
|
|
9075195ec4 | ||
|
|
62960f8a42 | ||
|
|
6293fe98a0 | ||
|
|
5c716247aa | ||
|
|
daf688eba6 | ||
|
|
c6712a0c6c | ||
|
|
4d74b52656 | ||
|
|
be2fcbcbf1 | ||
|
|
6247b6d468 | ||
|
|
966cb698e6 | ||
|
|
4b44638f4d | ||
|
|
13afff5752 | ||
|
|
e73fe837a8 | ||
|
|
a9caeb1064 | ||
|
|
171eef68c3 | ||
|
|
33368ebd02 | ||
|
|
501f9f8309 | ||
|
|
9fe787fc1f | ||
|
|
0dec3e5e6a | ||
|
|
66f5baa16e | ||
|
|
1cb921b7f3 | ||
|
|
0cf6721898 | ||
|
|
97c8bc9757 | ||
|
|
2cad095425 | ||
|
|
37d509f04f | ||
|
|
35eb9fc6ad | ||
|
|
df09088a96 | ||
|
|
1a14966577 | ||
|
|
0606b792f0 | ||
|
|
a53525e930 | ||
|
|
3a9c03bef3 | ||
|
|
f0dbdcff9d | ||
|
|
9d03dd7fb8 | ||
|
|
781b82baf5 | ||
|
|
2838362a7b | ||
|
|
0b66efac9c | ||
|
|
47a9660ec1 | ||
|
|
aabf62e7d2 | ||
|
|
6d891d2a3b | ||
|
|
c0e8bed5bf | ||
|
|
0dce2ff8a0 | ||
|
|
2642638fca | ||
|
|
8b0fc9819f | ||
|
|
bf5f91244b | ||
|
|
e8e84cf1da | ||
|
|
0179dbe1c2 | ||
|
|
8978b87728 | ||
|
|
0684128209 | ||
|
|
9b5c00a664 | ||
|
|
b347a7a96e | ||
|
|
240bfaa69e | ||
|
|
7dc48e57a6 | ||
|
|
8570883412 | ||
|
|
1d5627b181 | ||
|
|
038fff6c9f | ||
|
|
21dd9a8021 | ||
|
|
59934c1176 | ||
|
|
2f6ff57d96 | ||
|
|
77eba8727d | ||
|
|
47c392e135 | ||
|
|
9cff716925 | ||
|
|
4c207a004c | ||
|
|
650543a042 | ||
|
|
5f0cae8037 | ||
|
|
95c2ab77e7 | ||
|
|
d7f33b7e4e | ||
|
|
56e6441ceb | ||
|
|
b74b5e0602 | ||
|
|
b4dcbbfabd | ||
|
|
6dd0277c22 | ||
|
|
fb08218a04 | ||
|
|
08d95bff5e | ||
|
|
b476530755 | ||
|
|
a8ea1e9ef4 | ||
|
|
6dade671ad | ||
|
|
38b88b5892 | ||
|
|
340e3b952f | ||
|
|
35c91f6ea9 | ||
|
|
f5f9354093 | ||
|
|
600460ffc6 | ||
|
|
18b3833f90 | ||
|
|
f671d0513c | ||
|
|
100f6b7703 | ||
|
|
4e75c70874 | ||
|
|
bdbfe1f8a9 | ||
|
|
bea9d2cafd | ||
|
|
d709cb2ae3 | ||
|
|
444bb03fab | ||
|
|
966cc10fcc | ||
|
|
0c7087c41f | ||
|
|
c42a06bc1f | ||
|
|
b4c00a8fb0 | ||
|
|
f3403d4c5b | ||
|
|
5cf78472e1 | ||
|
|
2aaff16a87 | ||
|
|
6236198d43 | ||
|
|
83fb285d40 | ||
|
|
3050f10676 | ||
|
|
175fc5096d | ||
|
|
18f238dd53 | ||
|
|
4f551259dd | ||
|
|
9cb68c6e32 | ||
|
|
a9a89c604a | ||
|
|
e96a9190a3 | ||
|
|
1ff4e9008b | ||
|
|
2d716517a8 | ||
|
|
22226a8aec | ||
|
|
9b8e56c97c | ||
|
|
ad1bfc5468 | ||
|
|
2c0c05e96d | ||
|
|
d6d63147b6 | ||
|
|
98f7771d74 | ||
|
|
37eba37019 | ||
|
|
40b2f2553b | ||
|
|
d3e35d49ae | ||
|
|
a0474685c1 | ||
|
|
0b317b72ae | ||
|
|
afe06d1563 | ||
|
|
c40365e9b6 | ||
|
|
4b6d3a2bfd | ||
|
|
7ae624e700 | ||
|
|
c32cf33a16 | ||
|
|
7eb59de7df | ||
|
|
5931cf77f4 | ||
|
|
989aace192 | ||
|
|
65cf30e441 | ||
|
|
d4480c979d | ||
|
|
169e94d68b | ||
|
|
0cc8184057 | ||
|
|
a7c75142fa | ||
|
|
02d3c452e4 | ||
|
|
1c148575ea | ||
|
|
d1a1865650 | ||
|
|
067544abc5 | ||
|
|
77da57057f | ||
|
|
aa1da57c37 | ||
|
|
c2ce2aa4de | ||
|
|
90c9fd55fc | ||
|
|
47e403640b | ||
|
|
4ea513cc38 | ||
|
|
3ca0b9bb47 | ||
|
|
e592da5a59 | ||
|
|
2c93f889fd | ||
|
|
6173ce6463 | ||
|
|
065a51d2e1 | ||
|
|
7edcc22136 | ||
|
|
352177090f | ||
|
|
9d18c0b156 | ||
|
|
ec65a9a364 | ||
|
|
5c4b6a8ef0 | ||
|
|
5d502eb90c | ||
|
|
d6662d8442 | ||
|
|
1d97f13462 | ||
|
|
2c16681225 | ||
|
|
065047dc62 | ||
|
|
eba8d6d5f5 | ||
|
|
744dceaffe | ||
|
|
8740d147c9 | ||
|
|
16ae283fb4 | ||
|
|
312600fe9c | ||
|
|
3e0c067e43 | ||
|
|
f90551ff41 | ||
|
|
9442fc0b52 | ||
|
|
dbb93a2718 | ||
|
|
242cf423f8 | ||
|
|
217faf778b | ||
|
|
01b74950b7 | ||
|
|
420bfbcf40 | ||
|
|
89f6567fda | ||
|
|
efec05d581 | ||
|
|
47198dce5d | ||
|
|
f45500c612 | ||
|
|
6f3e817372 | ||
|
|
cfda5df020 | ||
|
|
2b4f41603d | ||
|
|
448f448d14 | ||
|
|
ee6a618116 | ||
|
|
e08f81c891 | ||
|
|
9324f1c29f | ||
|
|
d71c1514f2 | ||
|
|
2df75e84e7 | ||
|
|
9ab89734de | ||
|
|
960c0319c4 | ||
|
|
439891cb9f | ||
|
|
bdfb3ef11c | ||
|
|
8d581f7fe4 | ||
|
|
262907d0a3 | ||
|
|
15be673054 | ||
|
|
16a5649670 | ||
|
|
6582895b51 | ||
|
|
e3d65389d7 | ||
|
|
027cb376f3 | ||
|
|
f1261bcdd7 | ||
|
|
2e7b36d04f | ||
|
|
ce1a58414a | ||
|
|
1012c5705a | ||
|
|
1c2947581b | ||
|
|
00883822be | ||
|
|
13fdb9d8a5 | ||
|
|
52b2bc4109 | ||
|
|
b59b3a5152 | ||
|
|
fe6c03370e | ||
|
|
e3f128875c | ||
|
|
7bf82a814b | ||
|
|
e1270928a3 | ||
|
|
6fce5b54a8 | ||
|
|
3c38eafd75 | ||
|
|
9dcc1b3370 | ||
|
|
e3c37aac28 | ||
|
|
61a967095d | ||
|
|
c0e004ec1c | ||
|
|
0a1b7296b9 | ||
|
|
cd5e6743f7 | ||
|
|
2091fe530f | ||
|
|
cda8d63d43 | ||
|
|
bef1b140e9 | ||
|
|
c9188e2260 | ||
|
|
15eaf27bc7 | ||
|
|
bf2277e263 | ||
|
|
348ffbc47e | ||
|
|
f13cbcf175 | ||
|
|
9418c56fd3 | ||
|
|
7dbd502931 | ||
|
|
0bf9c1e881 | ||
|
|
bf07d37737 | ||
|
|
eecb713616 | ||
|
|
bf085e2c4b | ||
|
|
ce1a97d6c8 | ||
|
|
34c9ec4e1a | ||
|
|
e73fb6808a | ||
|
|
1c93d9dcfe | ||
|
|
675d6ec5e6 | ||
|
|
1ad43c54c0 | ||
|
|
1cf6c15ab4 | ||
|
|
8fc17ed764 | ||
|
|
26028068e8 | ||
|
|
8519682564 | ||
|
|
5ca0c73e98 | ||
|
|
4c979aa44f | ||
|
|
274dc3ecac | ||
|
|
5e2b5edde5 | ||
|
|
b8b6521659 | ||
|
|
e37b1b0623 | ||
|
|
4a79462c3e | ||
|
|
c328cc9608 | ||
|
|
cf2d39220a | ||
|
|
7dbd649f60 | ||
|
|
4282199bb4 | ||
|
|
7071dd0162 | ||
|
|
e61a687eda | ||
|
|
7e85d2fbd4 | ||
|
|
969ab28261 | ||
|
|
90d36cc630 | ||
|
|
1bb68cbcfa | ||
|
|
de7a14003c | ||
|
|
e3ead9f585 | ||
|
|
a461b0ae44 | ||
|
|
1b28f9fa89 | ||
|
|
dff8076022 | ||
|
|
dd3c187484 | ||
|
|
4677778f85 | ||
|
|
f96204dbe0 | ||
|
|
0427b783e2 | ||
|
|
4650732f4a | ||
|
|
1e138c1401 | ||
|
|
89fb7c85bf | ||
|
|
0e51fc90e3 |
@@ -5,7 +5,7 @@ aclocal.m4.bak
|
|||||||
autom4te.cache
|
autom4te.cache
|
||||||
compile
|
compile
|
||||||
config.guess
|
config.guess
|
||||||
config.h
|
curl_config.h
|
||||||
config.log
|
config.log
|
||||||
config.lt
|
config.lt
|
||||||
config.status
|
config.status
|
||||||
|
|||||||
87
Android.mk
Normal file
87
Android.mk
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
# Google Android makefile for curl and libcurl
|
||||||
|
#
|
||||||
|
# Place the curl source (including this makefile) into external/curl/ in the
|
||||||
|
# Android source tree. Then build them with 'make curl' or just 'make libcurl'
|
||||||
|
# from the Android root. Tested with Android 1.5
|
||||||
|
#
|
||||||
|
# Note: you must first create a curl_config.h file by running configure in the
|
||||||
|
# Android environment. The only way I've found to do this is tricky. Perform a
|
||||||
|
# normal Android build with libcurl in the source tree, providing the target
|
||||||
|
# "showcommands" to make. The build will eventually fail (because curl_config.h
|
||||||
|
# doesn't exist yet), but the compiler commands used to build curl will be
|
||||||
|
# shown. Now, from the external/curl/ directory, run curl's normal configure
|
||||||
|
# command with flags that match what Android itself uses. This will mean
|
||||||
|
# putting the compiler directory into the PATH, putting the -I, -isystem and
|
||||||
|
# -D options into CPPFLAGS, putting the -m, -f, -O and -nostdlib options into
|
||||||
|
# CFLAGS, and putting the -Wl, -L and -l options into LIBS, along with the path
|
||||||
|
# to the files libgcc.a, crtbegin_dynamic.o, and ccrtend_android.o. Remember
|
||||||
|
# that the paths must be absolute since you will not be running configure from
|
||||||
|
# the same directory as the Android make. The normal cross-compiler options
|
||||||
|
# must also be set.
|
||||||
|
#
|
||||||
|
# The end result will be a configure command that looks something like this
|
||||||
|
# (the environment variable A is set to the Android root path):
|
||||||
|
#
|
||||||
|
# A=`realpath ../..` && \
|
||||||
|
# PATH="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/bin:$PATH" \
|
||||||
|
# ./configure --host=arm-linux CC=arm-eabi-gcc \
|
||||||
|
# CPPFLAGS="-I $A/system/core/include ..." \
|
||||||
|
# CFLAGS="-fno-exceptions -Wno-multichar ..." \
|
||||||
|
# LIB="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/lib/gcc/arm-eabi/X\
|
||||||
|
# /interwork/libgcc.a ..." \
|
||||||
|
#
|
||||||
|
# Dan Fandrich
|
||||||
|
# September 2009
|
||||||
|
|
||||||
|
LOCAL_PATH:= $(call my-dir)
|
||||||
|
|
||||||
|
common_CFLAGS := -Wpointer-arith -Wwrite-strings -Wunused -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal -Wno-multichar -Wsign-compare -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wno-system-headers -DHAVE_CONFIG_H
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# Build the libcurl library
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
include $(LOCAL_PATH)/lib/Makefile.inc
|
||||||
|
CURL_HEADERS := \
|
||||||
|
curlbuild.h \
|
||||||
|
curl.h \
|
||||||
|
curlrules.h \
|
||||||
|
curlver.h \
|
||||||
|
easy.h \
|
||||||
|
mprintf.h \
|
||||||
|
multi.h \
|
||||||
|
stdcheaders.h \
|
||||||
|
typecheck-gcc.h \
|
||||||
|
types.h
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES := $(addprefix lib/,$(CSOURCES))
|
||||||
|
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include/
|
||||||
|
LOCAL_CFLAGS += $(common_CFLAGS)
|
||||||
|
|
||||||
|
LOCAL_COPY_HEADERS_TO := libcurl/curl
|
||||||
|
LOCAL_COPY_HEADERS := $(addprefix include/curl/,$(CURL_HEADERS))
|
||||||
|
|
||||||
|
LOCAL_MODULE:= libcurl
|
||||||
|
|
||||||
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# Build the curl binary
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
include $(LOCAL_PATH)/src/Makefile.inc
|
||||||
|
LOCAL_SRC_FILES := $(addprefix src/,$(CURL_SOURCES))
|
||||||
|
|
||||||
|
LOCAL_MODULE := curl
|
||||||
|
LOCAL_STATIC_LIBRARIES := libcurl
|
||||||
|
LOCAL_SYSTEM_SHARED_LIBRARIES := libc
|
||||||
|
|
||||||
|
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/lib
|
||||||
|
|
||||||
|
# This will also need to include $(CURLX_ONES) in order to correctly build
|
||||||
|
# a dynamic library
|
||||||
|
LOCAL_CFLAGS += $(common_CFLAGS)
|
||||||
|
|
||||||
|
include $(BUILD_EXECUTABLE)
|
||||||
|
|
||||||
536
CHANGES
536
CHANGES
@@ -6,6 +6,542 @@
|
|||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
Version 7.19.7 (4 November 2009)
|
||||||
|
|
||||||
|
Daniel Stenberg (2 Nov 2009)
|
||||||
|
- As reported independent by both Stan van de Burgt and Didier Brisebourg,
|
||||||
|
CURLINFO_SIZE_DOWNLOAD (the -w variable size_download) didn't work when
|
||||||
|
getting data from ldap!
|
||||||
|
|
||||||
|
Daniel Stenberg (31 Oct 2009)
|
||||||
|
- Gabriel Kuri reported a problem with CURLINFO_CONTENT_LENGTH_DOWNLOAD if the
|
||||||
|
download was 0 bytes, as libcurl would then return the size as unknown (-1)
|
||||||
|
and not 0. I wrote a fix and test case 566 to verify it.
|
||||||
|
|
||||||
|
Daniel Stenberg (30 Oct 2009)
|
||||||
|
- Liza Alenchery mentioned a problem with re-used SCP connection when a bad
|
||||||
|
auth is used, as it caused a crash. I failed to repeat the issue, but still
|
||||||
|
made a change that now forces the TCP connection used for a freed SCP
|
||||||
|
session to get closed and not be re-used.
|
||||||
|
|
||||||
|
- "Tom" posted a bug report that mentioned how libcurl did wrong when doing a
|
||||||
|
POST using a read callback, with Digest authentication and
|
||||||
|
"Transfer-Encoding: chunked" enforced. I would then cause the first request
|
||||||
|
to be wrongly sent and then basically hang until the server closed the
|
||||||
|
connection. I fixed the problem and added test case 565 to verify it.
|
||||||
|
|
||||||
|
Daniel Stenberg (25 Oct 2009)
|
||||||
|
- Dima Barsky made the curl cookie parser accept cookies even with blank or
|
||||||
|
unparsable expiry dates and then treat them as session cookies - previously
|
||||||
|
libcurl would reject cookies with a date format it couldn't parse. Research
|
||||||
|
shows that the major browser treat such cookies as session cookies. I
|
||||||
|
modified test 8 and 31 to verify this.
|
||||||
|
|
||||||
|
Daniel Stenberg (21 Oct 2009)
|
||||||
|
- Attempt to use pkg-config for finding out libssh2 installation details
|
||||||
|
during configure.
|
||||||
|
|
||||||
|
- A patch in bug report #2883177 (http://curl.haxx.se/bug/view.cgi?id=2883177)
|
||||||
|
by Johan van Selst introduced the --crlfile option to curl, which makes curl
|
||||||
|
tell libcurl about a file with CRL (certificate revocation list) data to
|
||||||
|
read.
|
||||||
|
|
||||||
|
Daniel Stenberg (18 Oct 2009)
|
||||||
|
- Ray Dassen provided a patch in Debian's bug tracker (bug number #551461)
|
||||||
|
that now makes curl_getdate(3) actually handles RFC 822 formatted dates that
|
||||||
|
use the "single letter military timezones".
|
||||||
|
http://www.rfc-ref.org/RFC-TEXTS/822/chapter5.html has the details.
|
||||||
|
|
||||||
|
- Fixed memory leak in the SCP/SFTP code as it never freed the knownhosts
|
||||||
|
data!
|
||||||
|
|
||||||
|
- John Dennis filed bug report #2873666
|
||||||
|
(http://curl.haxx.se/bug/view.cgi?id=2873666) which identified a problem
|
||||||
|
which made libcurl loop infinitely when given incorrect credentials when
|
||||||
|
using HTTP GSS negotiate authentication. He also provided a small and simple
|
||||||
|
patch for it.
|
||||||
|
|
||||||
|
- Kevin Baughman found a double close() problem with libcurl-NSS, as when
|
||||||
|
libcurl called NSS to close the SSL "session" it also closed the actual
|
||||||
|
socket.
|
||||||
|
|
||||||
|
Yang Tse (17 Oct 2009)
|
||||||
|
- Bug report #2866724 indicated
|
||||||
|
(http://curl.haxx.se/bug/view.cgi?id=2866724) that curl on Windows failed
|
||||||
|
when writing files whose file names originally contained characters which
|
||||||
|
are not valid for file names on Windows. Dan Fandrich provided an initial
|
||||||
|
patch and another revised one to fix this issue.
|
||||||
|
|
||||||
|
Daniel Stenberg (1 Oct 2009)
|
||||||
|
- Tom Mueller correctly reported in bug report #2870221
|
||||||
|
(http://curl.haxx.se/bug/view.cgi?id=2870221) that libcurl returned an
|
||||||
|
incorrect return code from the internal trynextip() function which caused
|
||||||
|
him grief. This is a regression that was introduced in 7.19.1 and I find it
|
||||||
|
strange it hasn't hit us harder, but I won't persue into figuring out
|
||||||
|
exactly why.
|
||||||
|
|
||||||
|
- Constantine Sapuntzakis: The current implementation will always set
|
||||||
|
SO_SNDBUF to CURL_WRITE_SIZE even if the SO_SNDBUF starts out larger. The
|
||||||
|
patch doesn't do a setsockopt if SO_SNDBUF is already greater than
|
||||||
|
CURL_WRITE_SIZE. This should help folks who have set up their computer with
|
||||||
|
large send buffers.
|
||||||
|
|
||||||
|
Daniel Stenberg (27 Sep 2009)
|
||||||
|
- I introduced a maximum limit for received HTTP headers. It is controlled by
|
||||||
|
the define CURL_MAX_HTTP_HEADER which is even exposed in the public header
|
||||||
|
file to allow for users to fairly easy rebuild libcurl with a modified
|
||||||
|
limit. The rationale for a fixed limit is that libcurl is realloc()ing a
|
||||||
|
buffer to be able to put a full header into it, so that it can call the
|
||||||
|
header callback with the entire header, but that also risk getting it into
|
||||||
|
trouble if a server by mistake or willingly sends a header that is more or
|
||||||
|
less without an end. The limit is set to 100K.
|
||||||
|
|
||||||
|
Daniel Stenberg (26 Sep 2009)
|
||||||
|
- John P. McCaskey posted a bug report that showed how libcurl did wrong when
|
||||||
|
saving received cookies with no given path, if the path in the request had a
|
||||||
|
query part. That is means a question mark (?) and characters on the right
|
||||||
|
side of that. I wrote test case 1105 and fixed this problem.
|
||||||
|
|
||||||
|
Kamil Dudka (26 Sep 2009)
|
||||||
|
- Implemented a protocol independent way to specify blocking direction, used by
|
||||||
|
transfer.c for blocking. It is currently used only by SCP and SFTP protocols.
|
||||||
|
This enhancement resolves an issue with 100% CPU usage during SFTP upload,
|
||||||
|
reported by Vourhey.
|
||||||
|
|
||||||
|
Daniel Stenberg (25 Sep 2009)
|
||||||
|
- Chris Mumford filed bug report #2861587
|
||||||
|
(http://curl.haxx.se/bug/view.cgi?id=2861587) identifying that libcurl used
|
||||||
|
the OpenSSL function X509_load_crl_file() wrongly and failed if it would
|
||||||
|
load a CRL file with more than one certificate within. This is now fixed.
|
||||||
|
|
||||||
|
Daniel Stenberg (16 Sep 2009)
|
||||||
|
- Sven Anders reported that we introduced a cert verfication flaw for OpenSSL-
|
||||||
|
powered libcurl in 7.19.6. If there was a X509v3 Subject Alternative Name
|
||||||
|
field in the certficate it had to match and so even if non-DNS and non-IP
|
||||||
|
entry was present it caused the verification to fail.
|
||||||
|
|
||||||
|
Daniel Fandrich (15 Sep 2009)
|
||||||
|
- Moved the libssh2 checks after the SSL library checks. This helps when
|
||||||
|
statically linking since libssh2 needs the SSL library link flags to be
|
||||||
|
set up already to satisfy its dependencies. This wouldn't be necessary if
|
||||||
|
the libssh2 configure check was changed to use pkg-config since the
|
||||||
|
--static flag would add the dependencies automatically.
|
||||||
|
|
||||||
|
Yang Tse (14 Sep 2009)
|
||||||
|
- Revert Joshua Kwan's patch committed 11 Sep 2009.
|
||||||
|
|
||||||
|
Some systems poll function sets POLLHUP in revents without setting
|
||||||
|
POLLIN, and sets POLLERR without setting POLLIN and POLLOUT. In some
|
||||||
|
libcurl code execution paths this could trigger busy wait loops with
|
||||||
|
high CPU usage until a timeout condition aborted the loop.
|
||||||
|
|
||||||
|
The reverted patch addressed the above issue for a very specific case,
|
||||||
|
when awaiting c-ares to resolve. A libcurl-wide fix for Curl_poll now
|
||||||
|
superceeds this one.
|
||||||
|
|
||||||
|
Guenter Knauf (11 Sep 2009)
|
||||||
|
- Joshua Kwan provided a patch to pass POLLERR / POLLHUP back to c-ares.
|
||||||
|
This fixes a loop problem with high CPU usage.
|
||||||
|
|
||||||
|
Daniel Stenberg (10 Sep 2009)
|
||||||
|
- Claes Jakobsson fixed a problem with cookie expiry dates at exctly the epoch
|
||||||
|
start second "Thu Jan 1 00:00:00 GMT 1970" as the date parser then returns 0
|
||||||
|
which internally then is treated as a session cookie. That particular date
|
||||||
|
is now made to get the value of 1.
|
||||||
|
|
||||||
|
Daniel Stenberg (2 Sep 2009)
|
||||||
|
- Daniel Johnson found a flaw in the code converting sftp-errors to libcurl
|
||||||
|
errors.
|
||||||
|
|
||||||
|
Daniel Stenberg (1 Sep 2009)
|
||||||
|
- Peter Sylvester made a debug feature for Curl_resolv() that now will force
|
||||||
|
libcurl to resolve 'localhost' whatever name you use in the URL *if* you set
|
||||||
|
the --interface option to (exactly) "LocalHost". This will enable us to
|
||||||
|
write tests for custom hosts names but still use a local host server.
|
||||||
|
|
||||||
|
- configure now tries to use pkg-config for a number of sub-dependencies even
|
||||||
|
when cross-compiling. The key to success is then you properly setup
|
||||||
|
PKG_CONFIG_PATH before invoking configure.
|
||||||
|
|
||||||
|
I also improved how NSS is detected by trying nss-config if pkg-config isn't
|
||||||
|
present, and as a last resort just use the lib name and force the user to
|
||||||
|
setup the LIBS/LDFLAGS/CFLAGS etc properly. The previous last resort would
|
||||||
|
add a range of various libs that would almost never be quite correct.
|
||||||
|
|
||||||
|
Daniel Stenberg (31 Aug 2009)
|
||||||
|
- When using the multi interface with FTP and you asked for NOBODY, you did no
|
||||||
|
QUOTE commands and the request used the same path as the connection had
|
||||||
|
already changed to, it would decide that no commands would be necessary for
|
||||||
|
the "DO" action and that was not handled properly but libcurl would instead
|
||||||
|
hang.
|
||||||
|
|
||||||
|
Kamil Dudka (28 Aug 2009)
|
||||||
|
- Improved error message for not matching certificate subject name in
|
||||||
|
libcurl-NSS. Originally reported at:
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=516056#c9
|
||||||
|
|
||||||
|
Patrick Monnerat (24 Aug 2009)
|
||||||
|
- Introduced a SYST-based test to properly set-up name format when dealing
|
||||||
|
with the OS/400 FTP server.
|
||||||
|
|
||||||
|
- Fixed an ftp_readresp() bug preventing detection of failing control socket
|
||||||
|
and causing FTP client to loop forever.
|
||||||
|
|
||||||
|
Daniel Stenberg (24 Aug 2009)
|
||||||
|
- Marc de Bruin pointed out that configure --with-gnutls=PATH didn't work
|
||||||
|
properly and provided a fix. http://curl.haxx.se/bug/view.cgi?id=2843008
|
||||||
|
|
||||||
|
- Eric Wong introduced support for the new option -T. (dot) that makes curl
|
||||||
|
read stdin in a non-blocking fashion. This also brings back -T- (minus) to
|
||||||
|
the previous blocking behavior since it could break stuff for people at
|
||||||
|
times.
|
||||||
|
|
||||||
|
Michal Marek (21 Aug 2009)
|
||||||
|
- With CURLOPT_PROXY_TRANSFER_MODE, avoid sending invalid URLs like
|
||||||
|
ftp://example.com;type=i if the user specified ftp://example.com without the
|
||||||
|
slash.
|
||||||
|
|
||||||
|
Daniel Stenberg (21 Aug 2009)
|
||||||
|
- Andre Guibert de Bruet pointed out a missing return code check for a
|
||||||
|
strdup() that could lead to segfault if it returned NULL. I extended his
|
||||||
|
suggest patch to now have Curl_retry_request() return a regular return code
|
||||||
|
and better check that.
|
||||||
|
|
||||||
|
- Lots of good work by Krister Johansen, mostly related to pipelining:
|
||||||
|
|
||||||
|
Fix SIGSEGV on free'd easy_conn when pipe unexpectedly breaks
|
||||||
|
Fix data corruption issue with re-connected transfers
|
||||||
|
Fix use after free if we're completed but easy_conn not NULL
|
||||||
|
|
||||||
|
Kamil Dudka (13 Aug 2009)
|
||||||
|
- Changed NSS code to not ignore the value of ssl.verifyhost and produce more
|
||||||
|
verbose error messages. Originally reported at:
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=516056
|
||||||
|
|
||||||
|
Daniel Stenberg (12 Aug 2009)
|
||||||
|
- Karl Moerder fixed the Makefile.vc* makefiles to include the new file
|
||||||
|
nonblock.c so that they work fine again
|
||||||
|
|
||||||
|
- I expanded test 517 with a bunch of more dates that originate from the
|
||||||
|
Chrome browser test suite. It turns out most of them get parsed the same
|
||||||
|
way.
|
||||||
|
|
||||||
|
Version 7.19.6 (12 August 2009)
|
||||||
|
|
||||||
|
Daniel Stenberg (12 Aug 2009)
|
||||||
|
- Carsten Lange reported a bug and provided a patch for TFTP upload and the
|
||||||
|
sending of the TSIZE option. I don't like fixing bugs just hours before
|
||||||
|
a release, but since it was broken and the patch fixes this for him I decided
|
||||||
|
to get it in anyway.
|
||||||
|
|
||||||
|
Daniel Stenberg (11 Aug 2009)
|
||||||
|
- Peter Sylvester made the HTTPS test server use specific certificates for
|
||||||
|
each test, so that the test suite can now be used to actually test the
|
||||||
|
verification of cert names etc. This made an error show up in the OpenSSL-
|
||||||
|
specific code where it would attempt to match the CN field even if a
|
||||||
|
subjectAltName exists that doesn't match. This is now fixed and verified
|
||||||
|
in test 311.
|
||||||
|
|
||||||
|
- Benbuck Nason posted the bug report #2835196
|
||||||
|
(http://curl.haxx.se/bug/view.cgi?id=2835196), fixing a few compiler
|
||||||
|
warnings when mixing ints and bools.
|
||||||
|
|
||||||
|
Daniel Fandrich (10 Aug 2009)
|
||||||
|
- Fixed a memory leak in the FTP code and an off-by-one heap buffer overflow.
|
||||||
|
|
||||||
|
Daniel Fandrich (9 Aug 2009)
|
||||||
|
- Fixed some memory leaks in the command-line tool that caused most of the
|
||||||
|
torture tests to fail.
|
||||||
|
|
||||||
|
Daniel Stenberg (2 Aug 2009)
|
||||||
|
- Curt Bogmine reported a problem with SNI enabled on a particular server. We
|
||||||
|
should introduce an option to disable SNI, but as we're in feature freeze
|
||||||
|
now I've addressed the obvious bug here (pointed out by Peter Sylvester): we
|
||||||
|
shouldn't try to enable SNI when SSLv2 or SSLv3 is explicitly selected.
|
||||||
|
Code for OpenSSL and GnuTLS was fixed. NSS doesn't seem to have a particular
|
||||||
|
option for SNI, or are we simply not using it?
|
||||||
|
|
||||||
|
Daniel Stenberg (1 Aug 2009)
|
||||||
|
- Scott Cantor posted the bug report #2829955
|
||||||
|
(http://curl.haxx.se/bug/view.cgi?id=2829955) mentioning the recent SSL cert
|
||||||
|
verification flaw found and exploited by Moxie Marlinspike. The presentation
|
||||||
|
he did at Black Hat is available here:
|
||||||
|
https://www.blackhat.com/html/bh-usa-09/bh-usa-09-archives.html#Marlinspike
|
||||||
|
|
||||||
|
Apparently at least one CA allowed a subjectAltName or CN that contain a
|
||||||
|
zero byte, and thus clients that assumed they would never have zero bytes
|
||||||
|
were exploited to OK a certificate that didn't actually match the site. Like
|
||||||
|
if the name in the cert was "example.com\0theatualsite.com", libcurl would
|
||||||
|
happily verify that cert for example.com.
|
||||||
|
|
||||||
|
libcurl now better uses the length of the extracted name, not using the zero
|
||||||
|
termination for getting the string length.
|
||||||
|
|
||||||
|
This fixing only made and needed in OpenSSL interfacing code.
|
||||||
|
|
||||||
|
- Tanguy Fautre pointed out that OpenSSL's function RAND_screen() (present
|
||||||
|
only in some OpenSSL installs - like on Windows) isn't thread-safe and we
|
||||||
|
agreed that moving it to the global_init() function is a decent way to deal
|
||||||
|
with this situation.
|
||||||
|
|
||||||
|
- Alexander Beedie provided the patch for a noproxy problem: If I have set
|
||||||
|
CURLOPT_NOPROXY to "*", or to a host that should not use a proxy, I actually
|
||||||
|
could still end up using a proxy if a proxy environment variable was set.
|
||||||
|
|
||||||
|
Daniel Stenberg (27 Jul 2009)
|
||||||
|
- All the quote options (CURLOPT_QUOTE, CURLOPT_POSTQUOTE and
|
||||||
|
CURLOPT_PREQUOTE) now accept a preceeding asterisk before the command to
|
||||||
|
send when using FTP, as a sign that libcurl shall simply ignore the response
|
||||||
|
from the server instead of treating it as an error. Not treating a 400+ FTP
|
||||||
|
response code as an error means that failed commands will not abort the
|
||||||
|
chain of commands, nor will they cause the connection to get disconnected.
|
||||||
|
|
||||||
|
Daniel Stenberg (26 Jul 2009)
|
||||||
|
- Johan van Selst posted bug report #2825989
|
||||||
|
(http://curl.haxx.se/bug/view.cgi?id=2825989) pointing out that
|
||||||
|
OpenSSL-powered libcurl didn't support the SHA-2 digest algorithm, and
|
||||||
|
provided the solution too: to use OpenSSL_add_all_algorithms() in addition
|
||||||
|
to the older SSLeay_* alternative. OpenSSL_add_all_algorithms was added in
|
||||||
|
OpenSSL 0.9.5
|
||||||
|
|
||||||
|
Daniel Stenberg (23 Jul 2009)
|
||||||
|
- Added CURLOPT_SSH_KNOWNHOSTS, CURLOPT_SSH_KEYFUNCTION, CURLOPT_SSH_KEYDATA.
|
||||||
|
They introduce known_host support for SSH keys to libcurl. See docs for
|
||||||
|
details. Note that this feature depends on a new enough libssh2 version, to
|
||||||
|
be supported in libssh2 1.2 and later (or current git repo at this time).
|
||||||
|
|
||||||
|
Michal Marek (22 Jul 2009)
|
||||||
|
- David Binderman found a memory and fd leak in lib/gtls.c:load_file()
|
||||||
|
(https://bugzilla.novell.com/523919). When looking at the code, I found that
|
||||||
|
also the ptr pointer can leak.
|
||||||
|
|
||||||
|
Kamil Dudka (20 Jul 2009)
|
||||||
|
- Claes Jakobsson improved the support for client certificates handling in
|
||||||
|
NSS-powered libcurl. Now the client certificates can be selected
|
||||||
|
automatically by a NSS built-in hook. Additionally pre-login to all PKCS11
|
||||||
|
slots is no more performed. It used to cause problems with HW tokens.
|
||||||
|
|
||||||
|
- Fixed reference counting for NSS client certificates. Now the PEM reader
|
||||||
|
module should be always properly unloaded on Curl_nss_cleanup(). If the
|
||||||
|
unload fails though, libcurl will try to reuse the already loaded instance.
|
||||||
|
|
||||||
|
Daniel Fandrich (15 Jul 2009)
|
||||||
|
- Added nonblock.c to the non-automake makefiles (note that the dependencies
|
||||||
|
in the Watcom makefiles aren't quite correct).
|
||||||
|
|
||||||
|
Michal Marek (15 Jul 2009)
|
||||||
|
- Changed the description of CURLINFO_OS_ERRNO to make it clear that the
|
||||||
|
errno is not reset on success.
|
||||||
|
|
||||||
|
Guenter Knauf (14 Jul 2009)
|
||||||
|
- renamed generated config.h to curl_config.h to avoid any future clashes
|
||||||
|
with config.h from other projects.
|
||||||
|
|
||||||
|
Daniel Stenberg (9 Jul 2009)
|
||||||
|
- Eric Wong introduced curlx_nonblock() that the curl tool now (re-)uses for
|
||||||
|
setting a file descriptor non-blocking. Used by the functionality Eric
|
||||||
|
himself brough on June 15th.
|
||||||
|
|
||||||
|
Daniel Stenberg (8 Jul 2009)
|
||||||
|
- Constantine Sapuntzakis posted bug report #2813123
|
||||||
|
(http://curl.haxx.se/bug/view.cgi?id=2813123) and an a patch that fixes the
|
||||||
|
problem:
|
||||||
|
|
||||||
|
Url A is accessed using auth. Url A redirects to Url B (on a different
|
||||||
|
server0. Url B reuses a persistent connection. Url B has auth, even though
|
||||||
|
it's on a different server.
|
||||||
|
|
||||||
|
Note: if Url B does not reuse a persistent connection, auth is not sent.
|
||||||
|
|
||||||
|
reason:
|
||||||
|
|
||||||
|
data->state.first_host is not initialized becuase Curl_http_connect is not
|
||||||
|
called when a connection is reused.
|
||||||
|
|
||||||
|
Solution:
|
||||||
|
|
||||||
|
move initialization of data->state.first_host to Curl_http. No code before
|
||||||
|
Curl_http uses data->state.first_host anyway.
|
||||||
|
|
||||||
|
Guenter Knauf (4 Jul 2009)
|
||||||
|
- Markus Koetter provided a patch to avoid getnameinfo() usage which broke a
|
||||||
|
couple of both IPv4 and IPv6 autobuilds.
|
||||||
|
|
||||||
|
Daniel Stenberg (29 Jun 2009)
|
||||||
|
- Markus Koetter made CURLOPT_FTPPORT (and curl's -P/--ftpport) support a port
|
||||||
|
range if given colon-separated after the host name/address part. Like
|
||||||
|
"192.168.0.1:2000-10000"
|
||||||
|
|
||||||
|
- Modified the separators used for CURLOPT_CERTINFO in multi-part outputs. I
|
||||||
|
don't know how they got wrong in the first place, but using this output
|
||||||
|
format makes it possible to quite easily separate the string into an array
|
||||||
|
of multiple items.
|
||||||
|
|
||||||
|
Daniel Fandrich (16 June 2009)
|
||||||
|
- Added a few more compiler warning options for gcc.
|
||||||
|
|
||||||
|
Daniel Stenberg (16 Jun 2009)
|
||||||
|
- Reuven Wachtfogel made curl -o - properly produce a binary output on windows
|
||||||
|
(no newline translations). Use -B/--use-ascii if you rather get the ascii
|
||||||
|
approach.
|
||||||
|
|
||||||
|
Michal Marek (16 Jun 2009)
|
||||||
|
- When doing non-anonymous ftp via http proxies and the password is not
|
||||||
|
provided in the url, add it there (squid needs this).
|
||||||
|
|
||||||
|
Daniel Stenberg (15 Jun 2009)
|
||||||
|
- Eric Wong's patch:
|
||||||
|
|
||||||
|
This allows curl(1) to be used as a client-side tunnel for arbitrary stream
|
||||||
|
protocols by abusing chunked transfer encoding in both the HTTP request and
|
||||||
|
HTTP response. This requires server support for sending a response while a
|
||||||
|
request is still being read, of course.
|
||||||
|
|
||||||
|
If attempting to read from stdin returns EAGAIN, then we pause our sender.
|
||||||
|
This leaves curl to attempt to read from the socket while reading from stdin
|
||||||
|
(and thus sending) is paused.
|
||||||
|
|
||||||
|
This change was needed to allow successfully tunneling the git protocol over
|
||||||
|
HTTP (--no-buffer is needed, as well).
|
||||||
|
|
||||||
|
Patrick Monnerat (15 Jun 2009)
|
||||||
|
- Replaced use of standard C library rand()/srand() by our own pseudo-random
|
||||||
|
number generator.
|
||||||
|
|
||||||
|
Yang Tse (11 Jun 2009)
|
||||||
|
- I adapted testcurl script to allow building test harness programs when
|
||||||
|
cross-compiling for a *-*-mingw* host.
|
||||||
|
|
||||||
|
Daniel Stenberg (10 Jun 2009)
|
||||||
|
- Fabian Keil ran clang on the (lib)curl code, found a bunch of warnings and
|
||||||
|
contributed a range of patches to fix them.
|
||||||
|
|
||||||
|
Yang Tse (10 Jun 2009)
|
||||||
|
- I introduced configure script option --enable-curldebug which now allows
|
||||||
|
the decoupled enabling or disabling of the curl debug memory tracking
|
||||||
|
feature from the --enable-debug option which no longer controls this.
|
||||||
|
|
||||||
|
curl --version will list 'Debug' feature for debug enabled builds, and
|
||||||
|
will list 'TrackMemory' feature for curl debug memory tracking capable
|
||||||
|
builds. These features are independent and can be controlled when running
|
||||||
|
the configure script. When --enable-debug is given both features will be
|
||||||
|
enabled, unless some restriction prevents memory tracking from being used.
|
||||||
|
|
||||||
|
Internally, definition of preprocessor symbol DEBUGBUILD restricts code
|
||||||
|
which is only compiled for debug enabled builds. And symbol CURLDEBUG is
|
||||||
|
used to differentiate code which is _only_ used for memory tracking.
|
||||||
|
|
||||||
|
Yang Tse (9 Jun 2009)
|
||||||
|
- Daniel Steinberg pointed out that Curl_FormInit() in formdata.c was not
|
||||||
|
initializing the fread callback pointer and this triggered a compiler
|
||||||
|
warning, also provided a friendly suggestion on how to fix it.
|
||||||
|
|
||||||
|
Daniel Stenberg (8 Jun 2009)
|
||||||
|
- Claes Jakobsson provided a patch for libcurl-NSS that fixed a bad refcount
|
||||||
|
issue with client certs that caused issues like segfaults.
|
||||||
|
http://curl.haxx.se/mail/lib-2009-05/0316.html
|
||||||
|
|
||||||
|
- Triggered by bug report #2798852 and the patch in there, I fixed configure
|
||||||
|
to detect gnutls build options with pkg-config only and not libgnutls-config
|
||||||
|
anymore since GnuTLS has stopped distributing that tool. If an explicit path
|
||||||
|
is given to configure, we will instead guess on how to link and use that
|
||||||
|
lib. I did not use the patch from the bug report.
|
||||||
|
|
||||||
|
Yang Tse (8 Jun 2009)
|
||||||
|
- Igor Novoseltsev adjusted Makefile.vxworks to get sources and headers
|
||||||
|
included from Makefile.inc, and provided docs\INSTALL VxWorks section.
|
||||||
|
|
||||||
|
- I removed buildconf.bat from release and daily snapshot archives. This
|
||||||
|
file is only for CVS tree checkout builds.
|
||||||
|
|
||||||
|
Daniel Stenberg (8 Jun 2009)
|
||||||
|
- Eric Wong fixed --no-buffer to actually switch off output buffering. Been
|
||||||
|
broken since 7.19.0
|
||||||
|
|
||||||
|
Bill Hoffman (6 Jun 2009)
|
||||||
|
- Added some cmake docs and fixed socklen_t in the build.
|
||||||
|
|
||||||
|
Yang Tse (5 Jun 2009)
|
||||||
|
- John E. Malmberg provided VMS specific patch: "This fixes an existing bug
|
||||||
|
in urlglob.c where it was not converting the Curl Unix exit code to a VMS
|
||||||
|
DCL compatible exit code. This fix required the enhancement described next.
|
||||||
|
This also adds an enhancement to main.c so that when curl is run under a
|
||||||
|
Unix shell like Bash on VMS, it will return the standard Unix exit codes
|
||||||
|
and messages." And another patch for docs/examples.
|
||||||
|
|
||||||
|
I introduced os-specific.c and os-specific.h for use in curl tool code
|
||||||
|
and adjusted John E. Malmberg's patch placement to use these new files
|
||||||
|
as an effort to prevent main.c from growing ad infinitum. Code already
|
||||||
|
existing in main.c which is OS specific should be moved into these files.
|
||||||
|
|
||||||
|
Daniel Stenberg (4 June 2009)
|
||||||
|
- Setting the Content-Length: header from your app when you do a POST or PUT
|
||||||
|
is almost always a VERY BAD IDEA. Yet there are still apps out there doing
|
||||||
|
this, and now recently it triggered a bug/side-effect in libcurl as when
|
||||||
|
libcurl sends a POST or PUT with NTLM, it sends an empty post first when it
|
||||||
|
knows it will just get a 401/407 back. If the app then replaced the
|
||||||
|
Content-Length header, it caused the server to wait for input that libcurl
|
||||||
|
wouldn't send. Aaron Oneal reported this problem in bug report #2799008
|
||||||
|
(http://curl.haxx.se/bug/view.cgi?id=2799008) and helped us verify the fix.
|
||||||
|
|
||||||
|
Yang Tse (4 Jun 2009)
|
||||||
|
- Igor Novoseltsev provided patches and information, that after some
|
||||||
|
adjustments to better fit curl's way of doing things, have resulted
|
||||||
|
in the posibility of building libcurl for VxWorks.
|
||||||
|
|
||||||
|
Daniel Fandrich (2 June 2009)
|
||||||
|
- Checked in a Google Android make file. To use it, you must first
|
||||||
|
create a config.h file by running configure in the Android environment,
|
||||||
|
which doesn't seem to be easy to do. If no easy way can be found, a
|
||||||
|
static config-android.h may need to be created and checked in to the
|
||||||
|
libcurl source tree.
|
||||||
|
|
||||||
|
Daniel Stenberg (1 June 2009)
|
||||||
|
- Claes Jakobsson fixed the configure script to better find and use NSS
|
||||||
|
without pkg-config.
|
||||||
|
|
||||||
|
Yang Tse (1 Jun 2009)
|
||||||
|
- John E. Malmberg provided a VMS specific clean-up for curl.h, and pointed
|
||||||
|
out that the configure script was failing to detect the timeval struct on
|
||||||
|
VMS when building with _XOPEN_SOURCE_EXTENDED undefined due to definition
|
||||||
|
taking place in socket.h instead of time.h. I have adjusted configure
|
||||||
|
script to also include this header when checking struct timeval.
|
||||||
|
|
||||||
|
Daniel Stenberg (27 May 2009)
|
||||||
|
- Frank McGeough provided a small OpenSSL #include fix to make libcurl compile
|
||||||
|
fine with Nokia 5th edition 1.0 SDK for Symbian.
|
||||||
|
|
||||||
|
- Andre Guibert de Bruet found a call to a OpenSSL function that didn't check
|
||||||
|
for a failure properly.
|
||||||
|
|
||||||
|
- Mike Crowe pointed out that setting CURLOPT_USERPWD to NULL used to clear
|
||||||
|
the auth credentials back in 7.19.0 and earlier while now you have to set ""
|
||||||
|
to get the same effect. His patch brings back the ability to use NULL.
|
||||||
|
|
||||||
|
- Claes Jakobsson fixed libcurl-NSS to build fine even without the
|
||||||
|
PK11_CreateGenericObject() function.
|
||||||
|
|
||||||
|
Daniel Stenberg (25 May 2009)
|
||||||
|
- bug report #2796358 (http://curl.haxx.se/bug/view.cgi?id=2796358) pointed
|
||||||
|
out that the cookie parser would leak memory when it parses cookies that are
|
||||||
|
received with domain, path etc set multiple times in the same header. While
|
||||||
|
such a cookie is questionable, they occur in the wild and libcurl no longer
|
||||||
|
leaks memory for them. I added such a header to test case 8.
|
||||||
|
|
||||||
|
Daniel Fandrich (22 May 2009)
|
||||||
|
- Removed some obsolete digest code that caused a valgrind error in test 551.
|
||||||
|
|
||||||
|
Daniel Fandrich (20 May 2009)
|
||||||
|
- Added "non-existing host" test keywords to make it easy to skip those
|
||||||
|
tests on machines that have broken DNS configurations (such as
|
||||||
|
those configured to use OpenDNS).
|
||||||
|
|
||||||
|
Daniel Stenberg (19 May 2009)
|
||||||
|
- Kamil Dudka brought the patch from the Redhat bug entry
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=427966 which was libcurl closing
|
||||||
|
a bad file descriptor when closing down the FTP data connection. Caolan
|
||||||
|
McNamara seems to be the original author of it.
|
||||||
|
|
||||||
Version 7.19.5 (18 May 2009)
|
Version 7.19.5 (18 May 2009)
|
||||||
|
|
||||||
Daniel Stenberg (17 May 2009)
|
Daniel Stenberg (17 May 2009)
|
||||||
|
|||||||
@@ -6,6 +6,13 @@
|
|||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
#endif /* HAVE_SYS_TYPES_H */
|
#endif /* HAVE_SYS_TYPES_H */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
# include <winsock2.h>
|
||||||
|
# include <ws2tcpip.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_STDINT_H
|
#ifdef HAVE_STDINT_H
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
#endif /* HAVE_STDINT_H */
|
#endif /* HAVE_STDINT_H */
|
||||||
|
|||||||
@@ -6,51 +6,51 @@
|
|||||||
# VARIABLE - variable to store size if the type exists.
|
# VARIABLE - variable to store size if the type exists.
|
||||||
# HAVE_${VARIABLE} - does the variable exists or not
|
# HAVE_${VARIABLE} - does the variable exists or not
|
||||||
|
|
||||||
MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
|
macro(CHECK_TYPE_SIZE TYPE VARIABLE)
|
||||||
SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
|
set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
|
||||||
IF(NOT DEFINED ${VARIABLE})
|
if(NOT DEFINED ${VARIABLE})
|
||||||
IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
if("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
||||||
SET(CHECK_TYPE_SIZE_TYPE "${TYPE}")
|
set(CHECK_TYPE_SIZE_TYPE "${TYPE}")
|
||||||
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
|
set(MACRO_CHECK_TYPE_SIZE_FLAGS
|
||||||
"${CMAKE_REQUIRED_FLAGS}")
|
"${CMAKE_REQUIRED_FLAGS}")
|
||||||
FOREACH(def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H)
|
foreach(def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H)
|
||||||
IF("${def}")
|
if("${def}")
|
||||||
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
|
set(MACRO_CHECK_TYPE_SIZE_FLAGS
|
||||||
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
|
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
|
||||||
ENDIF("${def}")
|
endif("${def}")
|
||||||
ENDFOREACH(def)
|
endforeach(def)
|
||||||
SET(CHECK_TYPE_SIZE_PREMAIN)
|
set(CHECK_TYPE_SIZE_PREMAIN)
|
||||||
FOREACH(def ${CMAKE_EXTRA_INCLUDE_FILES})
|
foreach(def ${CMAKE_EXTRA_INCLUDE_FILES})
|
||||||
SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
set(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
||||||
ENDFOREACH(def)
|
endforeach(def)
|
||||||
CONFIGURE_FILE(
|
configure_file(
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
|
"${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
|
||||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
||||||
IMMEDIATE @ONLY)
|
IMMEDIATE @ONLY)
|
||||||
FILE(READ
|
file(READ
|
||||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
||||||
CHECK_TYPE_SIZE_FILE_CONTENT)
|
CHECK_TYPE_SIZE_FILE_CONTENT)
|
||||||
MESSAGE(STATUS "Check size of ${TYPE}")
|
message(STATUS "Check size of ${TYPE}")
|
||||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
if(CMAKE_REQUIRED_LIBRARIES)
|
||||||
SET(CHECK_TYPE_SIZE_ADD_LIBRARIES
|
set(CHECK_TYPE_SIZE_ADD_LIBRARIES
|
||||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||||
ENDIF(CMAKE_REQUIRED_LIBRARIES)
|
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||||
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
|
try_run(${VARIABLE} HAVE_${VARIABLE}
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
||||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
|
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
|
||||||
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
|
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
IF(HAVE_${VARIABLE})
|
if(HAVE_${VARIABLE})
|
||||||
MESSAGE(STATUS "Check size of ${TYPE} - done")
|
message(STATUS "Check size of ${TYPE} - done")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
|
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
|
||||||
ELSE(HAVE_${VARIABLE})
|
else(HAVE_${VARIABLE})
|
||||||
MESSAGE(STATUS "Check size of ${TYPE} - failed")
|
message(STATUS "Check size of ${TYPE} - failed")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSize.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n")
|
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSize.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n")
|
||||||
ENDIF(HAVE_${VARIABLE})
|
endif(HAVE_${VARIABLE})
|
||||||
ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
endif("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
||||||
ENDIF(NOT DEFINED ${VARIABLE})
|
endif(NOT DEFINED ${VARIABLE})
|
||||||
SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS )
|
set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS )
|
||||||
ENDMACRO(CHECK_TYPE_SIZE)
|
endmacro(CHECK_TYPE_SIZE)
|
||||||
|
|||||||
@@ -12,43 +12,43 @@
|
|||||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
||||||
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
||||||
|
|
||||||
MACRO(CURL_CHECK_C_SOURCE_COMPILES SOURCE VAR)
|
macro(CURL_CHECK_C_SOURCE_COMPILES SOURCE VAR)
|
||||||
IF("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
if("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
||||||
SET(message "${VAR}")
|
set(message "${VAR}")
|
||||||
# If the number of arguments is greater than 2 (SOURCE VAR)
|
# If the number of arguments is greater than 2 (SOURCE VAR)
|
||||||
IF(${ARGC} GREATER 2)
|
if(${ARGC} GREATER 2)
|
||||||
# then add the third argument as a message
|
# then add the third argument as a message
|
||||||
SET(message "${ARGV2} (${VAR})")
|
set(message "${ARGV2} (${VAR})")
|
||||||
ENDIF(${ARGC} GREATER 2)
|
endif(${ARGC} GREATER 2)
|
||||||
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
|
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||||
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
|
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
|
||||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
if(CMAKE_REQUIRED_LIBRARIES)
|
||||||
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
|
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
|
||||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||||
ELSE(CMAKE_REQUIRED_LIBRARIES)
|
else(CMAKE_REQUIRED_LIBRARIES)
|
||||||
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
|
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
|
||||||
ENDIF(CMAKE_REQUIRED_LIBRARIES)
|
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||||
IF(CMAKE_REQUIRED_INCLUDES)
|
if(CMAKE_REQUIRED_INCLUDES)
|
||||||
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
|
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
|
||||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
||||||
ELSE(CMAKE_REQUIRED_INCLUDES)
|
else(CMAKE_REQUIRED_INCLUDES)
|
||||||
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
|
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
|
||||||
ENDIF(CMAKE_REQUIRED_INCLUDES)
|
endif(CMAKE_REQUIRED_INCLUDES)
|
||||||
SET(src "")
|
set(src "")
|
||||||
FOREACH(def ${EXTRA_DEFINES})
|
foreach(def ${EXTRA_DEFINES})
|
||||||
SET(src "${src}#define ${def} 1\n")
|
set(src "${src}#define ${def} 1\n")
|
||||||
ENDFOREACH(def)
|
endforeach(def)
|
||||||
FOREACH(inc ${HEADER_INCLUDES})
|
foreach(inc ${HEADER_INCLUDES})
|
||||||
SET(src "${src}#include <${inc}>\n")
|
set(src "${src}#include <${inc}>\n")
|
||||||
ENDFOREACH(inc)
|
endforeach(inc)
|
||||||
|
|
||||||
SET(src "${src}\nint main() { ${SOURCE} ; return 0; }")
|
set(src "${src}\nint main() { ${SOURCE} ; return 0; }")
|
||||||
SET(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}")
|
set(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}")
|
||||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in
|
||||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
|
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
|
||||||
IMMEDIATE)
|
IMMEDIATE)
|
||||||
MESSAGE(STATUS "Performing Test ${message}")
|
message(STATUS "Performing Test ${message}")
|
||||||
TRY_COMPILE(${VAR}
|
try_compile(${VAR}
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
|
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
|
||||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||||
@@ -56,20 +56,20 @@ MACRO(CURL_CHECK_C_SOURCE_COMPILES SOURCE VAR)
|
|||||||
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
|
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
|
||||||
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
|
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
IF(${VAR})
|
if(${VAR})
|
||||||
SET(${VAR} 1 CACHE INTERNAL "Test ${message}")
|
set(${VAR} 1 CACHE INTERNAL "Test ${message}")
|
||||||
MESSAGE(STATUS "Performing Test ${message} - Success")
|
message(STATUS "Performing Test ${message} - Success")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
"Performing C SOURCE FILE Test ${message} succeded with the following output:\n"
|
"Performing C SOURCE FILE Test ${message} succeded with the following output:\n"
|
||||||
"${OUTPUT}\n"
|
"${OUTPUT}\n"
|
||||||
"Source file was:\n${src}\n")
|
"Source file was:\n${src}\n")
|
||||||
ELSE(${VAR})
|
else(${VAR})
|
||||||
MESSAGE(STATUS "Performing Test ${message} - Failed")
|
message(STATUS "Performing Test ${message} - Failed")
|
||||||
SET(${VAR} "" CACHE INTERNAL "Test ${message}")
|
set(${VAR} "" CACHE INTERNAL "Test ${message}")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
"Performing C SOURCE FILE Test ${message} failed with the following output:\n"
|
"Performing C SOURCE FILE Test ${message} failed with the following output:\n"
|
||||||
"${OUTPUT}\n"
|
"${OUTPUT}\n"
|
||||||
"Source file was:\n${src}\n")
|
"Source file was:\n${src}\n")
|
||||||
ENDIF(${VAR})
|
endif(${VAR})
|
||||||
ENDIF("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
endif("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
||||||
ENDMACRO(CURL_CHECK_C_SOURCE_COMPILES)
|
endmacro(CURL_CHECK_C_SOURCE_COMPILES)
|
||||||
|
|||||||
@@ -12,43 +12,43 @@
|
|||||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
||||||
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
||||||
|
|
||||||
MACRO(CURL_CHECK_C_SOURCE_RUNS SOURCE VAR)
|
macro(CURL_CHECK_C_SOURCE_RUNS SOURCE VAR)
|
||||||
IF("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
if("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
||||||
SET(message "${VAR}")
|
set(message "${VAR}")
|
||||||
# If the number of arguments is greater than 2 (SOURCE VAR)
|
# If the number of arguments is greater than 2 (SOURCE VAR)
|
||||||
IF(${ARGC} GREATER 2)
|
if(${ARGC} GREATER 2)
|
||||||
# then add the third argument as a message
|
# then add the third argument as a message
|
||||||
SET(message "${ARGV2} (${VAR})")
|
set(message "${ARGV2} (${VAR})")
|
||||||
ENDIF(${ARGC} GREATER 2)
|
endif(${ARGC} GREATER 2)
|
||||||
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
|
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||||
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
|
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
|
||||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
if(CMAKE_REQUIRED_LIBRARIES)
|
||||||
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
|
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
|
||||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||||
ELSE(CMAKE_REQUIRED_LIBRARIES)
|
else(CMAKE_REQUIRED_LIBRARIES)
|
||||||
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
|
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
|
||||||
ENDIF(CMAKE_REQUIRED_LIBRARIES)
|
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||||
IF(CMAKE_REQUIRED_INCLUDES)
|
if(CMAKE_REQUIRED_INCLUDES)
|
||||||
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
|
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
|
||||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
||||||
ELSE(CMAKE_REQUIRED_INCLUDES)
|
else(CMAKE_REQUIRED_INCLUDES)
|
||||||
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
|
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
|
||||||
ENDIF(CMAKE_REQUIRED_INCLUDES)
|
endif(CMAKE_REQUIRED_INCLUDES)
|
||||||
SET(src "")
|
set(src "")
|
||||||
FOREACH(def ${EXTRA_DEFINES})
|
foreach(def ${EXTRA_DEFINES})
|
||||||
SET(src "${src}#define ${def} 1\n")
|
set(src "${src}#define ${def} 1\n")
|
||||||
ENDFOREACH(def)
|
endforeach(def)
|
||||||
FOREACH(inc ${HEADER_INCLUDES})
|
foreach(inc ${HEADER_INCLUDES})
|
||||||
SET(src "${src}#include <${inc}>\n")
|
set(src "${src}#include <${inc}>\n")
|
||||||
ENDFOREACH(inc)
|
endforeach(inc)
|
||||||
|
|
||||||
SET(src "${src}\nint main() { ${SOURCE} ; return 0; }")
|
set(src "${src}\nint main() { ${SOURCE} ; return 0; }")
|
||||||
SET(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}")
|
set(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}")
|
||||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in
|
||||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
|
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
|
||||||
IMMEDIATE)
|
IMMEDIATE)
|
||||||
MESSAGE(STATUS "Performing Test ${message}")
|
message(STATUS "Performing Test ${message}")
|
||||||
TRY_RUN(${VAR} ${VAR}_COMPILED
|
try_run(${VAR} ${VAR}_COMPILED
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
|
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
|
||||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||||
@@ -57,27 +57,27 @@ MACRO(CURL_CHECK_C_SOURCE_RUNS SOURCE VAR)
|
|||||||
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
|
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
# if it did not compile make the return value fail code of 1
|
# if it did not compile make the return value fail code of 1
|
||||||
IF(NOT ${VAR}_COMPILED)
|
if(NOT ${VAR}_COMPILED)
|
||||||
SET(${VAR} 1)
|
set(${VAR} 1)
|
||||||
ENDIF(NOT ${VAR}_COMPILED)
|
endif(NOT ${VAR}_COMPILED)
|
||||||
# if the return value was 0 then it worked
|
# if the return value was 0 then it worked
|
||||||
SET(result_var ${${VAR}})
|
set(result_var ${${VAR}})
|
||||||
IF("${result_var}" EQUAL 0)
|
if("${result_var}" EQUAL 0)
|
||||||
SET(${VAR} 1 CACHE INTERNAL "Test ${message}")
|
set(${VAR} 1 CACHE INTERNAL "Test ${message}")
|
||||||
MESSAGE(STATUS "Performing Test ${message} - Success")
|
message(STATUS "Performing Test ${message} - Success")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
"Performing C SOURCE FILE Test ${message} succeded with the following output:\n"
|
"Performing C SOURCE FILE Test ${message} succeded with the following output:\n"
|
||||||
"${OUTPUT}\n"
|
"${OUTPUT}\n"
|
||||||
"Return value: ${${VAR}}\n"
|
"Return value: ${${VAR}}\n"
|
||||||
"Source file was:\n${src}\n")
|
"Source file was:\n${src}\n")
|
||||||
ELSE("${result_var}" EQUAL 0)
|
else("${result_var}" EQUAL 0)
|
||||||
MESSAGE(STATUS "Performing Test ${message} - Failed")
|
message(STATUS "Performing Test ${message} - Failed")
|
||||||
SET(${VAR} "" CACHE INTERNAL "Test ${message}")
|
set(${VAR} "" CACHE INTERNAL "Test ${message}")
|
||||||
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
"Performing C SOURCE FILE Test ${message} failed with the following output:\n"
|
"Performing C SOURCE FILE Test ${message} failed with the following output:\n"
|
||||||
"${OUTPUT}\n"
|
"${OUTPUT}\n"
|
||||||
"Return value: ${result_var}\n"
|
"Return value: ${result_var}\n"
|
||||||
"Source file was:\n${src}\n")
|
"Source file was:\n${src}\n")
|
||||||
ENDIF("${result_var}" EQUAL 0)
|
endif("${result_var}" EQUAL 0)
|
||||||
ENDIF("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
endif("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
||||||
ENDMACRO(CURL_CHECK_C_SOURCE_RUNS)
|
endmacro(CURL_CHECK_C_SOURCE_RUNS)
|
||||||
|
|||||||
42
CMake/FindCARES.cmake
Executable file
42
CMake/FindCARES.cmake
Executable file
@@ -0,0 +1,42 @@
|
|||||||
|
# - Find c-ares
|
||||||
|
# Find the c-ares includes and library
|
||||||
|
# This module defines
|
||||||
|
# CARES_INCLUDE_DIR, where to find ares.h, etc.
|
||||||
|
# CARES_LIBRARIES, the libraries needed to use c-ares.
|
||||||
|
# CARES_FOUND, If false, do not try to use c-ares.
|
||||||
|
# also defined, but not for general use are
|
||||||
|
# CARES_LIBRARY, where to find the c-ares library.
|
||||||
|
|
||||||
|
FIND_PATH(CARES_INCLUDE_DIR ares.h
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(CARES_NAMES ${CARES_NAMES} cares)
|
||||||
|
FIND_LIBRARY(CARES_LIBRARY
|
||||||
|
NAMES ${CARES_NAMES}
|
||||||
|
PATHS /usr/lib /usr/local/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
IF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
|
||||||
|
SET(CARES_LIBRARIES ${CARES_LIBRARY})
|
||||||
|
SET(CARES_FOUND "YES")
|
||||||
|
ELSE (CARES_LIBRARY AND CARES_INCLUDE_DIR)
|
||||||
|
SET(CARES_FOUND "NO")
|
||||||
|
ENDIF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
|
||||||
|
|
||||||
|
|
||||||
|
IF (CARES_FOUND)
|
||||||
|
IF (NOT CARES_FIND_QUIETLY)
|
||||||
|
MESSAGE(STATUS "Found c-ares: ${CARES_LIBRARIES}")
|
||||||
|
ENDIF (NOT CARES_FIND_QUIETLY)
|
||||||
|
ELSE (CARES_FOUND)
|
||||||
|
IF (CARES_FIND_REQUIRED)
|
||||||
|
MESSAGE(FATAL_ERROR "Could not find c-ares library")
|
||||||
|
ENDIF (CARES_FIND_REQUIRED)
|
||||||
|
ENDIF (CARES_FOUND)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(
|
||||||
|
CARES_LIBRARY
|
||||||
|
CARES_INCLUDE_DIR
|
||||||
|
)
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
# Extension of the standard FindOpenSSL.cmake
|
# Extension of the standard FindOpenSSL.cmake
|
||||||
# Adds OPENSSL_INCLUDE_DIRS and libeay32
|
# Adds OPENSSL_INCLUDE_DIRS and libeay32
|
||||||
INCLUDE("${CMAKE_ROOT}/Modules/FindOpenSSL.cmake")
|
include("${CMAKE_ROOT}/Modules/FindOpenSSL.cmake")
|
||||||
|
|
||||||
# Bill Hoffman told that libeay32 is necessary for him:
|
# Bill Hoffman told that libeay32 is necessary for him:
|
||||||
FIND_LIBRARY(SSL_LIBEAY NAMES libeay32)
|
find_library(SSL_LIBEAY NAMES libeay32)
|
||||||
|
|
||||||
IF(OPENSSL_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
IF(SSL_LIBEAY)
|
if(SSL_LIBEAY)
|
||||||
LIST(APPEND OPENSSL_LIBRARIES ${SSL_LIBEAY})
|
list(APPEND OPENSSL_LIBRARIES ${SSL_LIBEAY})
|
||||||
ELSE()
|
else()
|
||||||
SET(OPENSSL_FOUND FALSE)
|
set(OPENSSL_FOUND FALSE)
|
||||||
ENDIF()
|
endif()
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
IF(OPENSSL_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
SET(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
|
set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
|
||||||
ENDIF()
|
endif()
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# Locate zlib
|
# Locate zlib
|
||||||
INCLUDE("${CMAKE_ROOT}/Modules/FindZLIB.cmake")
|
include("${CMAKE_ROOT}/Modules/FindZLIB.cmake")
|
||||||
|
|
||||||
FIND_LIBRARY(ZLIB_LIBRARY_DEBUG NAMES zd zlibd zdlld zlib1d )
|
find_library(ZLIB_LIBRARY_DEBUG NAMES zd zlibd zdlld zlib1d )
|
||||||
|
|
||||||
IF(ZLIB_FOUND AND ZLIB_LIBRARY_DEBUG)
|
if(ZLIB_FOUND AND ZLIB_LIBRARY_DEBUG)
|
||||||
SET( ZLIB_LIBRARIES optimized "${ZLIB_LIBRARY}" debug ${ZLIB_LIBRARY_DEBUG})
|
set( ZLIB_LIBRARIES optimized "${ZLIB_LIBRARY}" debug ${ZLIB_LIBRARY_DEBUG})
|
||||||
ENDIF()
|
endif()
|
||||||
|
|||||||
@@ -1,250 +1,250 @@
|
|||||||
INCLUDE(CurlCheckCSourceCompiles)
|
include(CurlCheckCSourceCompiles)
|
||||||
SET(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
|
set(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
|
||||||
SET(HEADER_INCLUDES)
|
set(HEADER_INCLUDES)
|
||||||
SET(headers_hack)
|
set(headers_hack)
|
||||||
|
|
||||||
MACRO(add_header_include check header)
|
macro(add_header_include check header)
|
||||||
IF(${check})
|
if(${check})
|
||||||
SET(headers_hack
|
set(headers_hack
|
||||||
"${headers_hack}\n#include <${header}>")
|
"${headers_hack}\n#include <${header}>")
|
||||||
#SET(HEADER_INCLUDES
|
#SET(HEADER_INCLUDES
|
||||||
# ${HEADER_INCLUDES}
|
# ${HEADER_INCLUDES}
|
||||||
# "${header}")
|
# "${header}")
|
||||||
ENDIF(${check})
|
endif(${check})
|
||||||
ENDMACRO(add_header_include)
|
endmacro(add_header_include)
|
||||||
|
|
||||||
SET(signature_call_conv)
|
set(signature_call_conv)
|
||||||
IF(HAVE_WINDOWS_H)
|
if(HAVE_WINDOWS_H)
|
||||||
add_header_include(HAVE_WINDOWS_H "windows.h")
|
add_header_include(HAVE_WINDOWS_H "windows.h")
|
||||||
add_header_include(HAVE_WINSOCK2_H "winsock2.h")
|
add_header_include(HAVE_WINSOCK2_H "winsock2.h")
|
||||||
add_header_include(HAVE_WINSOCK_H "winsock.h")
|
add_header_include(HAVE_WINSOCK_H "winsock.h")
|
||||||
SET(EXTRA_DEFINES ${EXTRA_DEFINES}
|
set(EXTRA_DEFINES ${EXTRA_DEFINES}
|
||||||
"__unused7\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#define __unused3")
|
"__unused7\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#define __unused3")
|
||||||
SET(signature_call_conv "PASCAL")
|
set(signature_call_conv "PASCAL")
|
||||||
ELSE(HAVE_WINDOWS_H)
|
else(HAVE_WINDOWS_H)
|
||||||
add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
|
add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
|
||||||
add_header_include(HAVE_SYS_SOCKET_H "sys/socket.h")
|
add_header_include(HAVE_SYS_SOCKET_H "sys/socket.h")
|
||||||
ENDIF(HAVE_WINDOWS_H)
|
endif(HAVE_WINDOWS_H)
|
||||||
|
|
||||||
SET(EXTRA_DEFINES_BACKUP "${EXTRA_DEFINES}")
|
set(EXTRA_DEFINES_BACKUP "${EXTRA_DEFINES}")
|
||||||
SET(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
|
set(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
|
||||||
CURL_CHECK_C_SOURCE_COMPILES("recv(0, 0, 0, 0)" curl_cv_recv)
|
curl_check_c_source_compiles("recv(0, 0, 0, 0)" curl_cv_recv)
|
||||||
IF(curl_cv_recv)
|
if(curl_cv_recv)
|
||||||
# AC_CACHE_CHECK([types of arguments and return type for recv],
|
# AC_CACHE_CHECK([types of arguments and return type for recv],
|
||||||
#[curl_cv_func_recv_args], [
|
#[curl_cv_func_recv_args], [
|
||||||
#SET(curl_cv_func_recv_args "unknown")
|
#SET(curl_cv_func_recv_args "unknown")
|
||||||
#for recv_retv in 'int' 'ssize_t'; do
|
#for recv_retv in 'int' 'ssize_t'; do
|
||||||
IF(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
|
if(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
|
||||||
FOREACH(recv_retv "int" "ssize_t" )
|
foreach(recv_retv "int" "ssize_t" )
|
||||||
FOREACH(recv_arg1 "int" "ssize_t" "SOCKET")
|
foreach(recv_arg1 "int" "ssize_t" "SOCKET")
|
||||||
FOREACH(recv_arg2 "void *" "char *")
|
foreach(recv_arg2 "void *" "char *")
|
||||||
FOREACH(recv_arg3 "size_t" "int" "socklen_t" "unsigned int")
|
foreach(recv_arg3 "size_t" "int" "socklen_t" "unsigned int")
|
||||||
FOREACH(recv_arg4 "int" "unsigned int")
|
foreach(recv_arg4 "int" "unsigned int")
|
||||||
IF(NOT curl_cv_func_recv_done)
|
if(NOT curl_cv_func_recv_done)
|
||||||
SET(curl_cv_func_recv_test "UNKNOWN")
|
set(curl_cv_func_recv_test "UNKNOWN")
|
||||||
SET(extern_line "extern ${recv_retv} ${signature_call_conv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})\;")
|
set(extern_line "extern ${recv_retv} ${signature_call_conv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})\;")
|
||||||
SET(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
|
set(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
|
||||||
CURL_CHECK_C_SOURCE_COMPILES("
|
curl_check_c_source_compiles("
|
||||||
${recv_arg1} s=0;
|
${recv_arg1} s=0;
|
||||||
${recv_arg2} buf=0;
|
${recv_arg2} buf=0;
|
||||||
${recv_arg3} len=0;
|
${recv_arg3} len=0;
|
||||||
${recv_arg4} flags=0;
|
${recv_arg4} flags=0;
|
||||||
${recv_retv} res = recv(s, buf, len, flags)"
|
${recv_retv} res = recv(s, buf, len, flags)"
|
||||||
curl_cv_func_recv_test
|
curl_cv_func_recv_test
|
||||||
"${recv_retv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})")
|
"${recv_retv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})")
|
||||||
IF(curl_cv_func_recv_test)
|
if(curl_cv_func_recv_test)
|
||||||
SET(curl_cv_func_recv_args
|
set(curl_cv_func_recv_args
|
||||||
"${recv_arg1},${recv_arg2},${recv_arg3},${recv_arg4},${recv_retv}")
|
"${recv_arg1},${recv_arg2},${recv_arg3},${recv_arg4},${recv_retv}")
|
||||||
SET(RECV_TYPE_ARG1 "${recv_arg1}")
|
set(RECV_TYPE_ARG1 "${recv_arg1}")
|
||||||
SET(RECV_TYPE_ARG2 "${recv_arg2}")
|
set(RECV_TYPE_ARG2 "${recv_arg2}")
|
||||||
SET(RECV_TYPE_ARG3 "${recv_arg3}")
|
set(RECV_TYPE_ARG3 "${recv_arg3}")
|
||||||
SET(RECV_TYPE_ARG4 "${recv_arg4}")
|
set(RECV_TYPE_ARG4 "${recv_arg4}")
|
||||||
SET(RECV_TYPE_RETV "${recv_retv}")
|
set(RECV_TYPE_RETV "${recv_retv}")
|
||||||
SET(HAVE_RECV 1)
|
set(HAVE_RECV 1)
|
||||||
SET(curl_cv_func_recv_done 1)
|
set(curl_cv_func_recv_done 1)
|
||||||
ENDIF(curl_cv_func_recv_test)
|
endif(curl_cv_func_recv_test)
|
||||||
ENDIF(NOT curl_cv_func_recv_done)
|
endif(NOT curl_cv_func_recv_done)
|
||||||
ENDFOREACH(recv_arg4)
|
endforeach(recv_arg4)
|
||||||
ENDFOREACH(recv_arg3)
|
endforeach(recv_arg3)
|
||||||
ENDFOREACH(recv_arg2)
|
endforeach(recv_arg2)
|
||||||
ENDFOREACH(recv_arg1)
|
endforeach(recv_arg1)
|
||||||
ENDFOREACH(recv_retv)
|
endforeach(recv_retv)
|
||||||
ELSE(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
|
else(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
|
||||||
STRING(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG1 "${curl_cv_func_recv_args}")
|
string(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG1 "${curl_cv_func_recv_args}")
|
||||||
STRING(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG2 "${curl_cv_func_recv_args}")
|
string(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG2 "${curl_cv_func_recv_args}")
|
||||||
STRING(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG3 "${curl_cv_func_recv_args}")
|
string(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG3 "${curl_cv_func_recv_args}")
|
||||||
STRING(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" RECV_TYPE_ARG4 "${curl_cv_func_recv_args}")
|
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" RECV_TYPE_ARG4 "${curl_cv_func_recv_args}")
|
||||||
STRING(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" RECV_TYPE_RETV "${curl_cv_func_recv_args}")
|
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" RECV_TYPE_RETV "${curl_cv_func_recv_args}")
|
||||||
#MESSAGE("RECV_TYPE_ARG1 ${RECV_TYPE_ARG1}")
|
#MESSAGE("RECV_TYPE_ARG1 ${RECV_TYPE_ARG1}")
|
||||||
#MESSAGE("RECV_TYPE_ARG2 ${RECV_TYPE_ARG2}")
|
#MESSAGE("RECV_TYPE_ARG2 ${RECV_TYPE_ARG2}")
|
||||||
#MESSAGE("RECV_TYPE_ARG3 ${RECV_TYPE_ARG3}")
|
#MESSAGE("RECV_TYPE_ARG3 ${RECV_TYPE_ARG3}")
|
||||||
#MESSAGE("RECV_TYPE_ARG4 ${RECV_TYPE_ARG4}")
|
#MESSAGE("RECV_TYPE_ARG4 ${RECV_TYPE_ARG4}")
|
||||||
#MESSAGE("RECV_TYPE_RETV ${RECV_TYPE_RETV}")
|
#MESSAGE("RECV_TYPE_RETV ${RECV_TYPE_RETV}")
|
||||||
ENDIF(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
|
endif(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
|
||||||
|
|
||||||
IF("${curl_cv_func_recv_args}" STREQUAL "unknown")
|
if("${curl_cv_func_recv_args}" STREQUAL "unknown")
|
||||||
MESSAGE(FATAL_ERROR "Cannot find proper types to use for recv args")
|
message(FATAL_ERROR "Cannot find proper types to use for recv args")
|
||||||
ENDIF("${curl_cv_func_recv_args}" STREQUAL "unknown")
|
endif("${curl_cv_func_recv_args}" STREQUAL "unknown")
|
||||||
ELSE(curl_cv_recv)
|
else(curl_cv_recv)
|
||||||
MESSAGE(FATAL_ERROR "Unable to link function recv")
|
message(FATAL_ERROR "Unable to link function recv")
|
||||||
ENDIF(curl_cv_recv)
|
endif(curl_cv_recv)
|
||||||
SET(curl_cv_func_recv_args "${curl_cv_func_recv_args}" CACHE INTERNAL "Arguments for recv")
|
set(curl_cv_func_recv_args "${curl_cv_func_recv_args}" CACHE INTERNAL "Arguments for recv")
|
||||||
SET(HAVE_RECV 1)
|
set(HAVE_RECV 1)
|
||||||
|
|
||||||
CURL_CHECK_C_SOURCE_COMPILES("send(0, 0, 0, 0)" curl_cv_send)
|
curl_check_c_source_compiles("send(0, 0, 0, 0)" curl_cv_send)
|
||||||
IF(curl_cv_send)
|
if(curl_cv_send)
|
||||||
# AC_CACHE_CHECK([types of arguments and return type for send],
|
# AC_CACHE_CHECK([types of arguments and return type for send],
|
||||||
#[curl_cv_func_send_args], [
|
#[curl_cv_func_send_args], [
|
||||||
#SET(curl_cv_func_send_args "unknown")
|
#SET(curl_cv_func_send_args "unknown")
|
||||||
#for send_retv in 'int' 'ssize_t'; do
|
#for send_retv in 'int' 'ssize_t'; do
|
||||||
IF(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
|
if(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||||
FOREACH(send_retv "int" "ssize_t" )
|
foreach(send_retv "int" "ssize_t" )
|
||||||
FOREACH(send_arg1 "int" "ssize_t" "SOCKET")
|
foreach(send_arg1 "int" "ssize_t" "SOCKET")
|
||||||
FOREACH(send_arg2 "const void *" "void *" "char *" "const char *")
|
foreach(send_arg2 "const void *" "void *" "char *" "const char *")
|
||||||
FOREACH(send_arg3 "size_t" "int" "socklen_t" "unsigned int")
|
foreach(send_arg3 "size_t" "int" "socklen_t" "unsigned int")
|
||||||
FOREACH(send_arg4 "int" "unsigned int")
|
foreach(send_arg4 "int" "unsigned int")
|
||||||
IF(NOT curl_cv_func_send_done)
|
if(NOT curl_cv_func_send_done)
|
||||||
SET(curl_cv_func_send_test "UNKNOWN")
|
set(curl_cv_func_send_test "UNKNOWN")
|
||||||
SET(extern_line "extern ${send_retv} ${signature_call_conv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})\;")
|
set(extern_line "extern ${send_retv} ${signature_call_conv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})\;")
|
||||||
SET(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
|
set(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
|
||||||
CURL_CHECK_C_SOURCE_COMPILES("
|
curl_check_c_source_compiles("
|
||||||
${send_arg1} s=0;
|
${send_arg1} s=0;
|
||||||
${send_arg2} buf=0;
|
${send_arg2} buf=0;
|
||||||
${send_arg3} len=0;
|
${send_arg3} len=0;
|
||||||
${send_arg4} flags=0;
|
${send_arg4} flags=0;
|
||||||
${send_retv} res = send(s, buf, len, flags)"
|
${send_retv} res = send(s, buf, len, flags)"
|
||||||
curl_cv_func_send_test
|
curl_cv_func_send_test
|
||||||
"${send_retv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})")
|
"${send_retv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})")
|
||||||
IF(curl_cv_func_send_test)
|
if(curl_cv_func_send_test)
|
||||||
#MESSAGE("Found arguments: ${curl_cv_func_send_test}")
|
#MESSAGE("Found arguments: ${curl_cv_func_send_test}")
|
||||||
STRING(REGEX REPLACE "(const) .*" "\\1" send_qual_arg2 "${send_arg2}")
|
string(REGEX REPLACE "(const) .*" "\\1" send_qual_arg2 "${send_arg2}")
|
||||||
STRING(REGEX REPLACE "const (.*)" "\\1" send_arg2 "${send_arg2}")
|
string(REGEX REPLACE "const (.*)" "\\1" send_arg2 "${send_arg2}")
|
||||||
SET(curl_cv_func_send_args
|
set(curl_cv_func_send_args
|
||||||
"${send_arg1},${send_arg2},${send_arg3},${send_arg4},${send_retv},${send_qual_arg2}")
|
"${send_arg1},${send_arg2},${send_arg3},${send_arg4},${send_retv},${send_qual_arg2}")
|
||||||
SET(SEND_TYPE_ARG1 "${send_arg1}")
|
set(SEND_TYPE_ARG1 "${send_arg1}")
|
||||||
SET(SEND_TYPE_ARG2 "${send_arg2}")
|
set(SEND_TYPE_ARG2 "${send_arg2}")
|
||||||
SET(SEND_TYPE_ARG3 "${send_arg3}")
|
set(SEND_TYPE_ARG3 "${send_arg3}")
|
||||||
SET(SEND_TYPE_ARG4 "${send_arg4}")
|
set(SEND_TYPE_ARG4 "${send_arg4}")
|
||||||
SET(SEND_TYPE_RETV "${send_retv}")
|
set(SEND_TYPE_RETV "${send_retv}")
|
||||||
SET(HAVE_SEND 1)
|
set(HAVE_SEND 1)
|
||||||
SET(curl_cv_func_send_done 1)
|
set(curl_cv_func_send_done 1)
|
||||||
ENDIF(curl_cv_func_send_test)
|
endif(curl_cv_func_send_test)
|
||||||
ENDIF(NOT curl_cv_func_send_done)
|
endif(NOT curl_cv_func_send_done)
|
||||||
ENDFOREACH(send_arg4)
|
endforeach(send_arg4)
|
||||||
ENDFOREACH(send_arg3)
|
endforeach(send_arg3)
|
||||||
ENDFOREACH(send_arg2)
|
endforeach(send_arg2)
|
||||||
ENDFOREACH(send_arg1)
|
endforeach(send_arg1)
|
||||||
ENDFOREACH(send_retv)
|
endforeach(send_retv)
|
||||||
ELSE(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
|
else(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||||
STRING(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG1 "${curl_cv_func_send_args}")
|
string(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG1 "${curl_cv_func_send_args}")
|
||||||
STRING(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG2 "${curl_cv_func_send_args}")
|
string(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG2 "${curl_cv_func_send_args}")
|
||||||
STRING(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG3 "${curl_cv_func_send_args}")
|
string(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG3 "${curl_cv_func_send_args}")
|
||||||
STRING(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG4 "${curl_cv_func_send_args}")
|
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG4 "${curl_cv_func_send_args}")
|
||||||
STRING(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" SEND_TYPE_RETV "${curl_cv_func_send_args}")
|
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" SEND_TYPE_RETV "${curl_cv_func_send_args}")
|
||||||
STRING(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" SEND_QUAL_ARG2 "${curl_cv_func_send_args}")
|
string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" SEND_QUAL_ARG2 "${curl_cv_func_send_args}")
|
||||||
#MESSAGE("SEND_TYPE_ARG1 ${SEND_TYPE_ARG1}")
|
#MESSAGE("SEND_TYPE_ARG1 ${SEND_TYPE_ARG1}")
|
||||||
#MESSAGE("SEND_TYPE_ARG2 ${SEND_TYPE_ARG2}")
|
#MESSAGE("SEND_TYPE_ARG2 ${SEND_TYPE_ARG2}")
|
||||||
#MESSAGE("SEND_TYPE_ARG3 ${SEND_TYPE_ARG3}")
|
#MESSAGE("SEND_TYPE_ARG3 ${SEND_TYPE_ARG3}")
|
||||||
#MESSAGE("SEND_TYPE_ARG4 ${SEND_TYPE_ARG4}")
|
#MESSAGE("SEND_TYPE_ARG4 ${SEND_TYPE_ARG4}")
|
||||||
#MESSAGE("SEND_TYPE_RETV ${SEND_TYPE_RETV}")
|
#MESSAGE("SEND_TYPE_RETV ${SEND_TYPE_RETV}")
|
||||||
#MESSAGE("SEND_QUAL_ARG2 ${SEND_QUAL_ARG2}")
|
#MESSAGE("SEND_QUAL_ARG2 ${SEND_QUAL_ARG2}")
|
||||||
ENDIF(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
|
endif(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||||
|
|
||||||
IF("${curl_cv_func_send_args}" STREQUAL "unknown")
|
if("${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||||
MESSAGE(FATAL_ERROR "Cannot find proper types to use for send args")
|
message(FATAL_ERROR "Cannot find proper types to use for send args")
|
||||||
ENDIF("${curl_cv_func_send_args}" STREQUAL "unknown")
|
endif("${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||||
SET(SEND_QUAL_ARG2 "const")
|
set(SEND_QUAL_ARG2 "const")
|
||||||
ELSE(curl_cv_send)
|
else(curl_cv_send)
|
||||||
MESSAGE(FATAL_ERROR "Unable to link function send")
|
message(FATAL_ERROR "Unable to link function send")
|
||||||
ENDIF(curl_cv_send)
|
endif(curl_cv_send)
|
||||||
SET(curl_cv_func_send_args "${curl_cv_func_send_args}" CACHE INTERNAL "Arguments for send")
|
set(curl_cv_func_send_args "${curl_cv_func_send_args}" CACHE INTERNAL "Arguments for send")
|
||||||
SET(HAVE_SEND 1)
|
set(HAVE_SEND 1)
|
||||||
|
|
||||||
SET(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5")
|
set(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5")
|
||||||
CURL_CHECK_C_SOURCE_COMPILES("int flag = MSG_NOSIGNAL" HAVE_MSG_NOSIGNAL)
|
curl_check_c_source_compiles("int flag = MSG_NOSIGNAL" HAVE_MSG_NOSIGNAL)
|
||||||
|
|
||||||
SET(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
|
set(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
|
||||||
SET(HEADER_INCLUDES)
|
set(HEADER_INCLUDES)
|
||||||
SET(headers_hack)
|
set(headers_hack)
|
||||||
|
|
||||||
MACRO(add_header_include check header)
|
macro(add_header_include check header)
|
||||||
IF(${check})
|
if(${check})
|
||||||
SET(headers_hack
|
set(headers_hack
|
||||||
"${headers_hack}\n#include <${header}>")
|
"${headers_hack}\n#include <${header}>")
|
||||||
#SET(HEADER_INCLUDES
|
#SET(HEADER_INCLUDES
|
||||||
# ${HEADER_INCLUDES}
|
# ${HEADER_INCLUDES}
|
||||||
# "${header}")
|
# "${header}")
|
||||||
ENDIF(${check})
|
endif(${check})
|
||||||
ENDMACRO(add_header_include header)
|
endmacro(add_header_include header)
|
||||||
|
|
||||||
IF(HAVE_WINDOWS_H)
|
if(HAVE_WINDOWS_H)
|
||||||
SET(EXTRA_DEFINES ${EXTRA_DEFINES}
|
set(EXTRA_DEFINES ${EXTRA_DEFINES}
|
||||||
"__unused7\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#define __unused3")
|
"__unused7\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#define __unused3")
|
||||||
add_header_include(HAVE_WINDOWS_H "windows.h")
|
add_header_include(HAVE_WINDOWS_H "windows.h")
|
||||||
add_header_include(HAVE_WINSOCK2_H "winsock2.h")
|
add_header_include(HAVE_WINSOCK2_H "winsock2.h")
|
||||||
add_header_include(HAVE_WINSOCK_H "winsock.h")
|
add_header_include(HAVE_WINSOCK_H "winsock.h")
|
||||||
ELSE(HAVE_WINDOWS_H)
|
else(HAVE_WINDOWS_H)
|
||||||
add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
|
add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
|
||||||
add_header_include(HAVE_SYS_TIME_H "sys/time.h")
|
add_header_include(HAVE_SYS_TIME_H "sys/time.h")
|
||||||
add_header_include(TIME_WITH_SYS_TIME "time.h")
|
add_header_include(TIME_WITH_SYS_TIME "time.h")
|
||||||
add_header_include(HAVE_TIME_H "time.h")
|
add_header_include(HAVE_TIME_H "time.h")
|
||||||
ENDIF(HAVE_WINDOWS_H)
|
endif(HAVE_WINDOWS_H)
|
||||||
SET(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5")
|
set(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5")
|
||||||
CURL_CHECK_C_SOURCE_COMPILES("struct timeval ts;\nts.tv_sec = 0;\nts.tv_usec = 0" HAVE_STRUCT_TIMEVAL)
|
curl_check_c_source_compiles("struct timeval ts;\nts.tv_sec = 0;\nts.tv_usec = 0" HAVE_STRUCT_TIMEVAL)
|
||||||
|
|
||||||
|
|
||||||
INCLUDE(CurlCheckCSourceRuns)
|
include(CurlCheckCSourceRuns)
|
||||||
SET(EXTRA_DEFINES)
|
set(EXTRA_DEFINES)
|
||||||
SET(HEADER_INCLUDES)
|
set(HEADER_INCLUDES)
|
||||||
IF(HAVE_SYS_POLL_H)
|
if(HAVE_SYS_POLL_H)
|
||||||
SET(HEADER_INCLUDES "sys/poll.h")
|
set(HEADER_INCLUDES "sys/poll.h")
|
||||||
ENDIF(HAVE_SYS_POLL_H)
|
endif(HAVE_SYS_POLL_H)
|
||||||
CURL_CHECK_C_SOURCE_RUNS("return poll((void *)0, 0, 10 /*ms*/)" HAVE_POLL_FINE)
|
curl_check_c_source_runs("return poll((void *)0, 0, 10 /*ms*/)" HAVE_POLL_FINE)
|
||||||
|
|
||||||
SET(HAVE_SIG_ATOMIC_T 1)
|
set(HAVE_SIG_ATOMIC_T 1)
|
||||||
SET(EXTRA_DEFINES)
|
set(EXTRA_DEFINES)
|
||||||
SET(HEADER_INCLUDES)
|
set(HEADER_INCLUDES)
|
||||||
IF(HAVE_SIGNAL_H)
|
if(HAVE_SIGNAL_H)
|
||||||
SET(HEADER_INCLUDES "signal.h")
|
set(HEADER_INCLUDES "signal.h")
|
||||||
SET(CMAKE_EXTRA_INCLUDE_FILES "signal.h")
|
set(CMAKE_EXTRA_INCLUDE_FILES "signal.h")
|
||||||
ENDIF(HAVE_SIGNAL_H)
|
endif(HAVE_SIGNAL_H)
|
||||||
CHECK_TYPE_SIZE("sig_atomic_t" SIZEOF_SIG_ATOMIC_T)
|
check_type_size("sig_atomic_t" SIZEOF_SIG_ATOMIC_T)
|
||||||
IF(HAVE_SIZEOF_SIG_ATOMIC_T)
|
if(HAVE_SIZEOF_SIG_ATOMIC_T)
|
||||||
CURL_CHECK_C_SOURCE_COMPILES("static volatile sig_atomic_t dummy = 0" HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
curl_check_c_source_compiles("static volatile sig_atomic_t dummy = 0" HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
||||||
IF(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
if(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
||||||
SET(HAVE_SIG_ATOMIC_T_VOLATILE 1)
|
set(HAVE_SIG_ATOMIC_T_VOLATILE 1)
|
||||||
ENDIF(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
endif(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
||||||
ENDIF(HAVE_SIZEOF_SIG_ATOMIC_T)
|
endif(HAVE_SIZEOF_SIG_ATOMIC_T)
|
||||||
|
|
||||||
SET(CHECK_TYPE_SIZE_PREINCLUDE
|
set(CHECK_TYPE_SIZE_PREINCLUDE
|
||||||
"#undef inline")
|
"#undef inline")
|
||||||
|
|
||||||
IF(HAVE_WINDOWS_H)
|
if(HAVE_WINDOWS_H)
|
||||||
SET(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}
|
set(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}
|
||||||
#ifndef WIN32_LEAN_AND_MEAN
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#endif
|
#endif
|
||||||
#include <windows.h>")
|
#include <windows.h>")
|
||||||
IF(HAVE_WINSOCK2_H)
|
if(HAVE_WINSOCK2_H)
|
||||||
SET(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}\n#include <winsock2.h>")
|
set(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}\n#include <winsock2.h>")
|
||||||
ENDIF(HAVE_WINSOCK2_H)
|
endif(HAVE_WINSOCK2_H)
|
||||||
ELSE(HAVE_WINDOWS_H)
|
else(HAVE_WINDOWS_H)
|
||||||
IF(HAVE_SYS_SOCKET_H)
|
if(HAVE_SYS_SOCKET_H)
|
||||||
SET(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
|
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
|
||||||
"sys/socket.h")
|
"sys/socket.h")
|
||||||
ENDIF(HAVE_SYS_SOCKET_H)
|
endif(HAVE_SYS_SOCKET_H)
|
||||||
IF(HAVE_NETINET_IN_H)
|
if(HAVE_NETINET_IN_H)
|
||||||
SET(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
|
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
|
||||||
"netinet/in.h")
|
"netinet/in.h")
|
||||||
ENDIF(HAVE_NETINET_IN_H)
|
endif(HAVE_NETINET_IN_H)
|
||||||
IF(HAVE_ARPA_INET_H)
|
if(HAVE_ARPA_INET_H)
|
||||||
SET(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
|
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
|
||||||
"arpa/inet.h")
|
"arpa/inet.h")
|
||||||
ENDIF(HAVE_ARPA_INET_H)
|
endif(HAVE_ARPA_INET_H)
|
||||||
ENDIF(HAVE_WINDOWS_H)
|
endif(HAVE_WINDOWS_H)
|
||||||
|
|
||||||
CHECK_TYPE_SIZE("struct sockaddr_storage" SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
check_type_size("struct sockaddr_storage" SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||||
IF(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
if(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||||
SET(HAVE_STRUCT_SOCKADDR_STORAGE 1)
|
set(HAVE_STRUCT_SOCKADDR_STORAGE 1)
|
||||||
ENDIF(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
endif(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||||
|
|
||||||
|
|||||||
@@ -1,121 +1,121 @@
|
|||||||
IF(NOT UNIX)
|
if(NOT UNIX)
|
||||||
IF(WIN32)
|
if(WIN32)
|
||||||
SET(HAVE_LIBDL 0)
|
set(HAVE_LIBDL 0)
|
||||||
SET(HAVE_LIBUCB 0)
|
set(HAVE_LIBUCB 0)
|
||||||
SET(HAVE_LIBSOCKET 0)
|
set(HAVE_LIBSOCKET 0)
|
||||||
SET(NOT_NEED_LIBNSL 0)
|
set(NOT_NEED_LIBNSL 0)
|
||||||
SET(HAVE_LIBNSL 0)
|
set(HAVE_LIBNSL 0)
|
||||||
SET(HAVE_LIBZ 0)
|
set(HAVE_LIBZ 0)
|
||||||
SET(HAVE_LIBCRYPTO 0)
|
set(HAVE_LIBCRYPTO 0)
|
||||||
|
|
||||||
SET(HAVE_DLOPEN 0)
|
set(HAVE_DLOPEN 0)
|
||||||
|
|
||||||
SET(HAVE_ALLOCA_H 0)
|
set(HAVE_ALLOCA_H 0)
|
||||||
SET(HAVE_ARPA_INET_H 0)
|
set(HAVE_ARPA_INET_H 0)
|
||||||
SET(HAVE_DLFCN_H 0)
|
set(HAVE_DLFCN_H 0)
|
||||||
SET(HAVE_FCNTL_H 1)
|
set(HAVE_FCNTL_H 1)
|
||||||
SET(HAVE_FEATURES_H 0)
|
set(HAVE_FEATURES_H 0)
|
||||||
SET(HAVE_INTTYPES_H 0)
|
set(HAVE_INTTYPES_H 0)
|
||||||
SET(HAVE_IO_H 1)
|
set(HAVE_IO_H 1)
|
||||||
SET(HAVE_MALLOC_H 1)
|
set(HAVE_MALLOC_H 1)
|
||||||
SET(HAVE_MEMORY_H 1)
|
set(HAVE_MEMORY_H 1)
|
||||||
SET(HAVE_NETDB_H 0)
|
set(HAVE_NETDB_H 0)
|
||||||
SET(HAVE_NETINET_IF_ETHER_H 0)
|
set(HAVE_NETINET_IF_ETHER_H 0)
|
||||||
SET(HAVE_NETINET_IN_H 0)
|
set(HAVE_NETINET_IN_H 0)
|
||||||
SET(HAVE_NET_IF_H 0)
|
set(HAVE_NET_IF_H 0)
|
||||||
SET(HAVE_PROCESS_H 1)
|
set(HAVE_PROCESS_H 1)
|
||||||
SET(HAVE_PWD_H 0)
|
set(HAVE_PWD_H 0)
|
||||||
SET(HAVE_SETJMP_H 1)
|
set(HAVE_SETJMP_H 1)
|
||||||
SET(HAVE_SGTTY_H 0)
|
set(HAVE_SGTTY_H 0)
|
||||||
SET(HAVE_SIGNAL_H 1)
|
set(HAVE_SIGNAL_H 1)
|
||||||
SET(HAVE_SOCKIO_H 0)
|
set(HAVE_SOCKIO_H 0)
|
||||||
SET(HAVE_STDINT_H 0)
|
set(HAVE_STDINT_H 0)
|
||||||
SET(HAVE_STDLIB_H 1)
|
set(HAVE_STDLIB_H 1)
|
||||||
SET(HAVE_STRINGS_H 0)
|
set(HAVE_STRINGS_H 0)
|
||||||
SET(HAVE_STRING_H 1)
|
set(HAVE_STRING_H 1)
|
||||||
SET(HAVE_SYS_PARAM_H 0)
|
set(HAVE_SYS_PARAM_H 0)
|
||||||
SET(HAVE_SYS_POLL_H 0)
|
set(HAVE_SYS_POLL_H 0)
|
||||||
SET(HAVE_SYS_SELECT_H 0)
|
set(HAVE_SYS_SELECT_H 0)
|
||||||
SET(HAVE_SYS_SOCKET_H 0)
|
set(HAVE_SYS_SOCKET_H 0)
|
||||||
SET(HAVE_SYS_SOCKIO_H 0)
|
set(HAVE_SYS_SOCKIO_H 0)
|
||||||
SET(HAVE_SYS_STAT_H 1)
|
set(HAVE_SYS_STAT_H 1)
|
||||||
SET(HAVE_SYS_TIME_H 0)
|
set(HAVE_SYS_TIME_H 0)
|
||||||
SET(HAVE_SYS_TYPES_H 1)
|
set(HAVE_SYS_TYPES_H 1)
|
||||||
SET(HAVE_SYS_UTIME_H 1)
|
set(HAVE_SYS_UTIME_H 1)
|
||||||
SET(HAVE_TERMIOS_H 0)
|
set(HAVE_TERMIOS_H 0)
|
||||||
SET(HAVE_TERMIO_H 0)
|
set(HAVE_TERMIO_H 0)
|
||||||
SET(HAVE_TIME_H 1)
|
set(HAVE_TIME_H 1)
|
||||||
SET(HAVE_UNISTD_H 0)
|
set(HAVE_UNISTD_H 0)
|
||||||
SET(HAVE_UTIME_H 0)
|
set(HAVE_UTIME_H 0)
|
||||||
SET(HAVE_X509_H 0)
|
set(HAVE_X509_H 0)
|
||||||
SET(HAVE_ZLIB_H 0)
|
set(HAVE_ZLIB_H 0)
|
||||||
|
|
||||||
SET(HAVE_SIZEOF_LONG_DOUBLE 1)
|
set(HAVE_SIZEOF_LONG_DOUBLE 1)
|
||||||
SET(SIZEOF_LONG_DOUBLE 8)
|
set(SIZEOF_LONG_DOUBLE 8)
|
||||||
|
|
||||||
SET(HAVE_SOCKET 1)
|
set(HAVE_SOCKET 1)
|
||||||
SET(HAVE_POLL 0)
|
set(HAVE_POLL 0)
|
||||||
SET(HAVE_SELECT 1)
|
set(HAVE_SELECT 1)
|
||||||
SET(HAVE_STRDUP 1)
|
set(HAVE_STRDUP 1)
|
||||||
SET(HAVE_STRSTR 1)
|
set(HAVE_STRSTR 1)
|
||||||
SET(HAVE_STRTOK_R 0)
|
set(HAVE_STRTOK_R 0)
|
||||||
SET(HAVE_STRFTIME 1)
|
set(HAVE_STRFTIME 1)
|
||||||
SET(HAVE_UNAME 0)
|
set(HAVE_UNAME 0)
|
||||||
SET(HAVE_STRCASECMP 0)
|
set(HAVE_STRCASECMP 0)
|
||||||
SET(HAVE_STRICMP 1)
|
set(HAVE_STRICMP 1)
|
||||||
SET(HAVE_STRCMPI 1)
|
set(HAVE_STRCMPI 1)
|
||||||
SET(HAVE_GETHOSTBYADDR 1)
|
set(HAVE_GETHOSTBYADDR 1)
|
||||||
SET(HAVE_GETTIMEOFDAY 0)
|
set(HAVE_GETTIMEOFDAY 0)
|
||||||
SET(HAVE_INET_ADDR 1)
|
set(HAVE_INET_ADDR 1)
|
||||||
SET(HAVE_INET_NTOA 1)
|
set(HAVE_INET_NTOA 1)
|
||||||
SET(HAVE_INET_NTOA_R 0)
|
set(HAVE_INET_NTOA_R 0)
|
||||||
SET(HAVE_TCGETATTR 0)
|
set(HAVE_TCGETATTR 0)
|
||||||
SET(HAVE_TCSETATTR 0)
|
set(HAVE_TCSETATTR 0)
|
||||||
SET(HAVE_PERROR 1)
|
set(HAVE_PERROR 1)
|
||||||
SET(HAVE_CLOSESOCKET 1)
|
set(HAVE_CLOSESOCKET 1)
|
||||||
SET(HAVE_SETVBUF 0)
|
set(HAVE_SETVBUF 0)
|
||||||
SET(HAVE_SIGSETJMP 0)
|
set(HAVE_SIGSETJMP 0)
|
||||||
SET(HAVE_GETPASS_R 0)
|
set(HAVE_GETPASS_R 0)
|
||||||
SET(HAVE_STRLCAT 0)
|
set(HAVE_STRLCAT 0)
|
||||||
SET(HAVE_GETPWUID 0)
|
set(HAVE_GETPWUID 0)
|
||||||
SET(HAVE_GETEUID 0)
|
set(HAVE_GETEUID 0)
|
||||||
SET(HAVE_UTIME 1)
|
set(HAVE_UTIME 1)
|
||||||
SET(HAVE_RAND_EGD 0)
|
set(HAVE_RAND_EGD 0)
|
||||||
SET(HAVE_RAND_SCREEN 0)
|
set(HAVE_RAND_SCREEN 0)
|
||||||
SET(HAVE_RAND_STATUS 0)
|
set(HAVE_RAND_STATUS 0)
|
||||||
SET(HAVE_GMTIME_R 0)
|
set(HAVE_GMTIME_R 0)
|
||||||
SET(HAVE_LOCALTIME_R 0)
|
set(HAVE_LOCALTIME_R 0)
|
||||||
SET(HAVE_GETHOSTBYADDR_R 0)
|
set(HAVE_GETHOSTBYADDR_R 0)
|
||||||
SET(HAVE_GETHOSTBYNAME_R 0)
|
set(HAVE_GETHOSTBYNAME_R 0)
|
||||||
SET(HAVE_SIGNAL_FUNC 1)
|
set(HAVE_SIGNAL_FUNC 1)
|
||||||
SET(HAVE_SIGNAL_MACRO 0)
|
set(HAVE_SIGNAL_MACRO 0)
|
||||||
|
|
||||||
SET(HAVE_GETHOSTBYADDR_R_5 0)
|
set(HAVE_GETHOSTBYADDR_R_5 0)
|
||||||
SET(HAVE_GETHOSTBYADDR_R_5_REENTRANT 0)
|
set(HAVE_GETHOSTBYADDR_R_5_REENTRANT 0)
|
||||||
SET(HAVE_GETHOSTBYADDR_R_7 0)
|
set(HAVE_GETHOSTBYADDR_R_7 0)
|
||||||
SET(HAVE_GETHOSTBYADDR_R_7_REENTRANT 0)
|
set(HAVE_GETHOSTBYADDR_R_7_REENTRANT 0)
|
||||||
SET(HAVE_GETHOSTBYADDR_R_8 0)
|
set(HAVE_GETHOSTBYADDR_R_8 0)
|
||||||
SET(HAVE_GETHOSTBYADDR_R_8_REENTRANT 0)
|
set(HAVE_GETHOSTBYADDR_R_8_REENTRANT 0)
|
||||||
SET(HAVE_GETHOSTBYNAME_R_3 0)
|
set(HAVE_GETHOSTBYNAME_R_3 0)
|
||||||
SET(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)
|
set(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)
|
||||||
SET(HAVE_GETHOSTBYNAME_R_5 0)
|
set(HAVE_GETHOSTBYNAME_R_5 0)
|
||||||
SET(HAVE_GETHOSTBYNAME_R_5_REENTRANT 0)
|
set(HAVE_GETHOSTBYNAME_R_5_REENTRANT 0)
|
||||||
SET(HAVE_GETHOSTBYNAME_R_6 0)
|
set(HAVE_GETHOSTBYNAME_R_6 0)
|
||||||
SET(HAVE_GETHOSTBYNAME_R_6_REENTRANT 0)
|
set(HAVE_GETHOSTBYNAME_R_6_REENTRANT 0)
|
||||||
|
|
||||||
SET(TIME_WITH_SYS_TIME 0)
|
set(TIME_WITH_SYS_TIME 0)
|
||||||
SET(HAVE_O_NONBLOCK 0)
|
set(HAVE_O_NONBLOCK 0)
|
||||||
SET(HAVE_IN_ADDR_T 0)
|
set(HAVE_IN_ADDR_T 0)
|
||||||
SET(HAVE_INET_NTOA_R_DECL 0)
|
set(HAVE_INET_NTOA_R_DECL 0)
|
||||||
SET(HAVE_INET_NTOA_R_DECL_REENTRANT 0)
|
set(HAVE_INET_NTOA_R_DECL_REENTRANT 0)
|
||||||
SET(HAVE_GETADDRINFO 0)
|
set(HAVE_GETADDRINFO 0)
|
||||||
SET(STDC_HEADERS 1)
|
set(STDC_HEADERS 1)
|
||||||
SET(RETSIGTYPE_TEST 1)
|
set(RETSIGTYPE_TEST 1)
|
||||||
|
|
||||||
SET(HAVE_SIGACTION 0)
|
set(HAVE_SIGACTION 0)
|
||||||
SET(HAVE_MACRO_SIGSETJMP 0)
|
set(HAVE_MACRO_SIGSETJMP 0)
|
||||||
ELSE(WIN32)
|
else(WIN32)
|
||||||
MESSAGE("This file should be included on Windows platform only")
|
message("This file should be included on Windows platform only")
|
||||||
ENDIF(WIN32)
|
endif(WIN32)
|
||||||
ENDIF(NOT UNIX)
|
endif(NOT UNIX)
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
# File containing various utilities
|
# File containing various utilities
|
||||||
|
|
||||||
# Converts a CMake list to a string containing elements separated by spaces
|
# Converts a CMake list to a string containing elements separated by spaces
|
||||||
FUNCTION(TO_LIST_SPACES _LIST_NAME OUTPUT_VAR)
|
function(TO_LIST_SPACES _LIST_NAME OUTPUT_VAR)
|
||||||
SET(NEW_LIST_SPACE)
|
set(NEW_LIST_SPACE)
|
||||||
FOREACH(ITEM ${${_LIST_NAME}})
|
foreach(ITEM ${${_LIST_NAME}})
|
||||||
SET(NEW_LIST_SPACE "${NEW_LIST_SPACE} ${ITEM}")
|
set(NEW_LIST_SPACE "${NEW_LIST_SPACE} ${ITEM}")
|
||||||
ENDFOREACH()
|
endforeach()
|
||||||
STRING(STRIP ${NEW_LIST_SPACE} NEW_LIST_SPACE)
|
string(STRIP ${NEW_LIST_SPACE} NEW_LIST_SPACE)
|
||||||
SET(${OUTPUT_VAR} "${NEW_LIST_SPACE}" PARENT_SCOPE)
|
set(${OUTPUT_VAR} "${NEW_LIST_SPACE}" PARENT_SCOPE)
|
||||||
ENDFUNCTION()
|
endfunction()
|
||||||
|
|
||||||
# Appends a lis of item to a string which is a space-separated list, if they don't already exist.
|
# Appends a lis of item to a string which is a space-separated list, if they don't already exist.
|
||||||
FUNCTION(LIST_SPACES_APPEND_ONCE LIST_NAME)
|
function(LIST_SPACES_APPEND_ONCE LIST_NAME)
|
||||||
STRING(REPLACE " " ";" _LIST ${${LIST_NAME}})
|
string(REPLACE " " ";" _LIST ${${LIST_NAME}})
|
||||||
LIST(APPEND _LIST ${ARGN})
|
list(APPEND _LIST ${ARGN})
|
||||||
LIST(REMOVE_DUPLICATES _LIST)
|
list(REMOVE_DUPLICATES _LIST)
|
||||||
TO_LIST_SPACES(_LIST NEW_LIST_SPACE)
|
to_list_spaces(_LIST NEW_LIST_SPACE)
|
||||||
SET(${LIST_NAME} "${NEW_LIST_SPACE}" PARENT_SCOPE)
|
set(${LIST_NAME} "${NEW_LIST_SPACE}" PARENT_SCOPE)
|
||||||
ENDFUNCTION()
|
endfunction()
|
||||||
|
|
||||||
# Convinience function that does the same as LIST(FIND ...) but with a TRUE/FALSE return value.
|
# Convinience function that does the same as LIST(FIND ...) but with a TRUE/FALSE return value.
|
||||||
# Ex: IN_STR_LIST(MY_LIST "Searched item" WAS_FOUND)
|
# Ex: IN_STR_LIST(MY_LIST "Searched item" WAS_FOUND)
|
||||||
FUNCTION(IN_STR_LIST LIST_NAME ITEM_SEARCHED RETVAL)
|
function(IN_STR_LIST LIST_NAME ITEM_SEARCHED RETVAL)
|
||||||
LIST(FIND ${LIST_NAME} ${ITEM_SEARCHED} FIND_POS)
|
list(FIND ${LIST_NAME} ${ITEM_SEARCHED} FIND_POS)
|
||||||
IF(${FIND_POS} EQUAL -1)
|
if(${FIND_POS} EQUAL -1)
|
||||||
SET(${RETVAL} FALSE PARENT_SCOPE)
|
set(${RETVAL} FALSE PARENT_SCOPE)
|
||||||
ELSE()
|
else()
|
||||||
SET(${RETVAL} TRUE PARENT_SCOPE)
|
set(${RETVAL} TRUE PARENT_SCOPE)
|
||||||
ENDIF()
|
endif()
|
||||||
ENDFUNCTION()
|
endfunction()
|
||||||
|
|||||||
1087
CMakeLists.txt
1087
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,6 @@ set(CTEST_PROJECT_NAME "CURL")
|
|||||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
|
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
|
||||||
|
|
||||||
set(CTEST_DROP_METHOD "http")
|
set(CTEST_DROP_METHOD "http")
|
||||||
set(CTEST_DROP_SITE "www.cdash.org")
|
set(CTEST_DROP_SITE "my.cdash.org")
|
||||||
set(CTEST_DROP_LOCATION "/CDashPublic/submit.php?project=CURL")
|
set(CTEST_DROP_LOCATION "/submit.php?project=CURL")
|
||||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ CMake/FindZLIB.cmake CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \
|
|||||||
CMake/Utilities.cmake include/curl/curlbuild.h.cmake
|
CMake/Utilities.cmake include/curl/curlbuild.h.cmake
|
||||||
|
|
||||||
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
|
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
|
||||||
curl-style.el sample.emacs RELEASE-NOTES buildconf buildconf.bat \
|
curl-style.el sample.emacs RELEASE-NOTES buildconf \
|
||||||
libcurl.pc.in vc6curl.dsw MacOSX-Framework $(CMAKE_DIST)
|
libcurl.pc.in vc6curl.dsw MacOSX-Framework Android.mk $(CMAKE_DIST)
|
||||||
|
|
||||||
bin_SCRIPTS = curl-config
|
bin_SCRIPTS = curl-config
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ pkgconfig_DATA = libcurl.pc
|
|||||||
dist-hook:
|
dist-hook:
|
||||||
rm -rf $(top_builddir)/tests/log
|
rm -rf $(top_builddir)/tests/log
|
||||||
find $(distdir) -name "*.dist" -exec rm {} \;
|
find $(distdir) -name "*.dist" -exec rm {} \;
|
||||||
(distit=`find $(srcdir) -name "*.dist"`; \
|
(distit=`find $(srcdir) -name "*.dist" | grep -v ./ares/`; \
|
||||||
for file in $$distit; do \
|
for file in $$distit; do \
|
||||||
strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
|
strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
|
||||||
cp $$file $(distdir)$$strip; \
|
cp $$file $(distdir)$$strip; \
|
||||||
|
|||||||
@@ -130,9 +130,9 @@ vc:
|
|||||||
|
|
||||||
vc-x64:
|
vc-x64:
|
||||||
cd lib
|
cd lib
|
||||||
MACHINE=x64 nmake /f Makefile.$(VC) cfg=release
|
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release
|
||||||
cd ..\src
|
cd ..\src
|
||||||
MACHINE=x64 nmake /f Makefile.$(VC)
|
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release
|
||||||
|
|
||||||
vc-zlib:
|
vc-zlib:
|
||||||
cd lib
|
cd lib
|
||||||
@@ -152,6 +152,12 @@ vc-ssl-zlib:
|
|||||||
cd ..\src
|
cd ..\src
|
||||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib
|
nmake /f Makefile.$(VC) cfg=release-ssl-zlib
|
||||||
|
|
||||||
|
vc-x64-ssl-zlib:
|
||||||
|
cd lib
|
||||||
|
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
|
||||||
|
cd ..\src
|
||||||
|
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
|
||||||
|
|
||||||
vc-ssl-dll:
|
vc-ssl-dll:
|
||||||
cd lib
|
cd lib
|
||||||
nmake /f Makefile.$(VC) cfg=release-ssl-dll
|
nmake /f Makefile.$(VC) cfg=release-ssl-dll
|
||||||
|
|||||||
@@ -1,53 +1,51 @@
|
|||||||
Curl and libcurl 7.19.5
|
Curl and libcurl 7.19.7
|
||||||
|
|
||||||
Public curl releases: 111
|
Public curl releases: 113
|
||||||
Command line options: 132
|
Command line options: 132
|
||||||
curl_easy_setopt() options: 163
|
curl_easy_setopt() options: 163
|
||||||
Public functions in libcurl: 58
|
Public functions in libcurl: 58
|
||||||
Known libcurl bindings: 38
|
Known libcurl bindings: 38
|
||||||
Contributors: 715
|
Contributors: 732
|
||||||
|
|
||||||
This release includes the following changes:
|
This release includes the following changes:
|
||||||
|
|
||||||
o libcurl now closes all dead connections whenever you attempt to open a new
|
o -T. is now for non-blocking uploading from stdin
|
||||||
connection
|
o SYST handling on FTP for OS/400 FTP server cases
|
||||||
o libssh2's version number can now be figured out run-time instead of using
|
o libcurl refuses to read a single HTTP header longer than 100K
|
||||||
the build-time fixed number
|
o added the --crlfile option to curl
|
||||||
o CURLOPT_SEEKFUNCTION may now return CURL_SEEKFUNC_CANTSEEK
|
|
||||||
o curl can now upload with resume even when reading from a pipe
|
|
||||||
o a build-time configured curl_socklen_t is now used instead of socklen_t
|
|
||||||
|
|
||||||
This release includes the following bugfixes:
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
o NTLM authentication memory leak on SSPI enabled Windows builds
|
o The windows makefiles work again
|
||||||
o fixed the GnuTLS-using code to do correct return code checks
|
o libcurl-NSS acknowledges verifyhost
|
||||||
o an alloc-related call in the OpenSSL-using code didn't check the return value
|
o SIGSEGV when pipelined pipe unexpectedly breaks
|
||||||
o curl_easy_duphandle() failed to duplicate cookies at times
|
o data corruption issue with re-connected transfers
|
||||||
o missing TELNET timeout support in Windows builds
|
o use after free if we're completed but easy_conn not NULL (pipelined)
|
||||||
o missing Curl_read() and write callback result checking in TELNET transfers
|
o missing strdup() return code check
|
||||||
o more ciphers enabled in libcurl built to use NSS
|
o CURLOPT_PROXY_TRANSFER_MODE could pass along wrong syntax
|
||||||
o properly return an error code in curl_easy_recv
|
o configure --with-gnutls=PATH fixed
|
||||||
o Sun compilers specific preprocessor block removed from curlbuild.h.dist
|
o ftp response reader bug on failed control connections
|
||||||
o allow creation of four way fat libcurl Mac OS X Framework
|
o improved NSS error message on failed host name verifications
|
||||||
o several memory leaks in libcurl+NSS
|
o ftp NOBODY on re-used connection hang
|
||||||
o improved the CURLOPT_NOBODY set to 0 confusions
|
o configure uses pkg-config for cross-compiles as well
|
||||||
o persistent connections when doing FTP over a HTTP proxy
|
o improved NSS detection in configure
|
||||||
o --libcurl bogus strings where other data was pointed to
|
o cookie expiry date at 1970-jan-1 00:00:00
|
||||||
o crash related to FTP and "Re-used connection seems dead, get a new one"
|
o libcurl-OpenSSL failed to verify some certs with Subject Alternative Name
|
||||||
o CURLINFO_APPCONNECT_TIME with the multi interface
|
o libcurl-OpenSSL can load CRL files with more than one certificate inside
|
||||||
o Enhanced upload speeds on Windows
|
o received cookies without explicit path got saved wrong if the URL had a
|
||||||
o TFTP problems after a failed transfer to the same host
|
query part
|
||||||
o improved out of the box TPF compatibility
|
o don't shrink SO_SNDBUF on windows for those who have it set large already
|
||||||
o HTTP PUT protocol line endings portions mangled from CRLF to CRCRLF
|
o connect next bug
|
||||||
o Rejected SSL session ids are killed properly (for OpenSSL and GnuTLS builds)
|
o invalid file name characters handling on Windows
|
||||||
o Deal with the TFTP OACK packet
|
o double close() on the primary socket with libcurl-NSS
|
||||||
o fixed roff mistakes in man pages
|
o GSS negotiate infinite loop on bad credentials
|
||||||
o use SOCKS proxy with the multi interface
|
o memory leak in SCP/SFTP connections
|
||||||
o fixed the Curl_getoff_all_pipelines SIGSEGV
|
o use pkg-config to find out libssh2 installation details in configure
|
||||||
o POST, NTLM and following a redirect hang
|
o unparsable cookie expire dates make cookies get treated as session coookies
|
||||||
o libcurl+NSS endless loop on incorrect password for private key
|
o POST with Digest authentication and "Transfer-Encoding: chunked"
|
||||||
o gzip decompression memory leak
|
o SCP connection re-use with wrong auth
|
||||||
o no_proxy flaw with user name in URL
|
o CURLINFO_CONTENT_LENGTH_DOWNLOAD for 0 bytes transfers
|
||||||
|
o CURLINFO_SIZE_DOWNLOAD for ldap transfers (-w size_download)
|
||||||
|
|
||||||
This release includes the following known bugs:
|
This release includes the following known bugs:
|
||||||
|
|
||||||
@@ -56,12 +54,11 @@ This release includes the following known bugs:
|
|||||||
This release would not have looked like this without help, code, reports and
|
This release would not have looked like this without help, code, reports and
|
||||||
advice from friends like these:
|
advice from friends like these:
|
||||||
|
|
||||||
Daniel Fandrich, Yang Tse, David James, Chris Deidun, Bill Egert,
|
Karl Moerder, Kamil Dudka, Krister Johansen, Andre Guibert de Bruet,
|
||||||
Andre Guibert de Bruet, Andreas Farber, Frank Hempel, Pierre Brico,
|
Michal Marek, Eric Wong, Guenter Knauf, Peter Sylvester, Daniel Johnson,
|
||||||
Kamil Dudka, Jim Freeman, Daniel Johnson, Toshio Kuratomi, Martin Storsjo,
|
Claes Jakobsson, Sven Anders, Chris Mumford, John P. McCaskey,
|
||||||
Pramod Sharma, Gisle Vanem, Lenaic Lefever, Rainer Koenig, Sven Wegener,
|
Constantine Sapuntzakis, Michael Stillwell, Tom Mueller, Dan Fandrich,
|
||||||
Tim Chen, Constantine Sapuntzakis, David McCreedy, Michael Smith,
|
Kevin Baughman, John Dennis, Ray Dassen, Johan van Selst, Dima Barsky,
|
||||||
Colin Watson, Ebenezer Ikonne, Laurent Rabret, Michael Cronenworth,
|
Liza Alenchery, Gabriel Kuri, Stan van de Burgt, Didier Brisebourg
|
||||||
Balint Szilakszi, James Bursa
|
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
|||||||
23
TODO-RELEASE
23
TODO-RELEASE
@@ -1,9 +1,22 @@
|
|||||||
To be addressed in 7.19.6 (planned release: July 2009)
|
To be addressed in 7.19.8 (planned release: January 2010)
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
226 - Active Mode FTPS Data Port Range
|
244 - patch for [out] parameters
|
||||||
|
http://curl.haxx.se/mail/lib-2009-06/0342.html
|
||||||
|
|
||||||
235 - KNOWN_BUG #65
|
245 - HTTP version getinfo
|
||||||
Code adjustment for FTP over socks proxy remains
|
http://curl.haxx.se/mail/lib-2009-06/0312.html
|
||||||
|
|
||||||
|
247 - Using CURLINFO_ERROR in Curl_failf
|
||||||
|
http://curl.haxx.se/mail/lib-2009-06/0065.html
|
||||||
|
|
||||||
|
253 - add option to disable SNI for TLS handshakes
|
||||||
|
|
||||||
|
257 - bug #2891595 DNS cache
|
||||||
|
|
||||||
|
258 - bug #2891591 Curl_dns_entry
|
||||||
|
|
||||||
|
259 - Avoding connection re-use when using CURLOPT_HTTPPROXYTUNNEL
|
||||||
|
|
||||||
|
260 -
|
||||||
|
|
||||||
240 -
|
|
||||||
|
|||||||
74
acinclude.m4
74
acinclude.m4
@@ -1852,7 +1852,7 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
|
|||||||
AC_REQUIRE([AC_HEADER_TIME])dnl
|
AC_REQUIRE([AC_HEADER_TIME])dnl
|
||||||
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl
|
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl
|
||||||
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl
|
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl
|
||||||
AC_CHECK_HEADERS(sys/types.h sys/time.h time.h)
|
AC_CHECK_HEADERS(sys/types.h sys/time.h time.h sys/socket.h)
|
||||||
AC_CACHE_CHECK([for struct timeval], [ac_cv_struct_timeval], [
|
AC_CACHE_CHECK([for struct timeval], [ac_cv_struct_timeval], [
|
||||||
AC_COMPILE_IFELSE([
|
AC_COMPILE_IFELSE([
|
||||||
AC_LANG_PROGRAM([[
|
AC_LANG_PROGRAM([[
|
||||||
@@ -1882,6 +1882,9 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
|
|||||||
#ifdef HAVE_TIME_H
|
#ifdef HAVE_TIME_H
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
]],[[
|
]],[[
|
||||||
struct timeval ts;
|
struct timeval ts;
|
||||||
@@ -2199,6 +2202,52 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CURL_CHECK_LIBS_CONNECT
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Verify if network connect function is already available
|
||||||
|
dnl using current libraries or if another one is required.
|
||||||
|
|
||||||
|
AC_DEFUN([CURL_CHECK_LIBS_CONNECT], [
|
||||||
|
AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
|
||||||
|
AC_MSG_CHECKING([for connect in libraries])
|
||||||
|
tst_connect_save_LIBS="$LIBS"
|
||||||
|
tst_connect_need_LIBS="unknown"
|
||||||
|
for tst_lib in '' '-lsocket' ; do
|
||||||
|
if test "$tst_connect_need_LIBS" = "unknown"; then
|
||||||
|
LIBS="$tst_lib $tst_connect_save_LIBS"
|
||||||
|
AC_LINK_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
$curl_includes_winsock2
|
||||||
|
#ifndef HAVE_WINDOWS_H
|
||||||
|
int connect(int, void*, int);
|
||||||
|
#endif
|
||||||
|
]],[[
|
||||||
|
if(0 != connect(0, 0, 0))
|
||||||
|
return 1;
|
||||||
|
]])
|
||||||
|
],[
|
||||||
|
tst_connect_need_LIBS="$tst_lib"
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
LIBS="$tst_connect_save_LIBS"
|
||||||
|
#
|
||||||
|
case X-"$tst_connect_need_LIBS" in
|
||||||
|
X-unknown)
|
||||||
|
AC_MSG_RESULT([cannot find connect])
|
||||||
|
AC_MSG_ERROR([cannot find connect function in libraries.])
|
||||||
|
;;
|
||||||
|
X-)
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_MSG_RESULT([$tst_connect_need_LIBS])
|
||||||
|
LIBS="$tst_connect_need_LIBS $tst_connect_save_LIBS"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl CURL_DEFINE_UNQUOTED (VARIABLE, [VALUE])
|
dnl CURL_DEFINE_UNQUOTED (VARIABLE, [VALUE])
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
dnl Like AC_DEFINE_UNQUOTED this macro will define a C preprocessor
|
dnl Like AC_DEFINE_UNQUOTED this macro will define a C preprocessor
|
||||||
@@ -3146,14 +3195,23 @@ dnl ------------------------
|
|||||||
dnl search for the pkg-config tool (if not cross-compiling). Set the PKGCONFIG
|
dnl search for the pkg-config tool (if not cross-compiling). Set the PKGCONFIG
|
||||||
dnl variable to hold the path to it, or 'no' if not found/present.
|
dnl variable to hold the path to it, or 'no' if not found/present.
|
||||||
dnl
|
dnl
|
||||||
dnl If pkg-config is present, check that it has info about the $module or return
|
dnl If pkg-config is present, check that it has info about the $module or
|
||||||
dnl "no" anyway!
|
dnl return "no" anyway!
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
AC_DEFUN([CURL_CHECK_PKGCONFIG], [
|
AC_DEFUN([CURL_CHECK_PKGCONFIG], [
|
||||||
if test x$cross_compiling != xyes; then
|
|
||||||
dnl only do pkg-config magic when not cross-compiling
|
PKGCONFIG="no"
|
||||||
AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
|
|
||||||
|
if test x$cross_compiling = xyes; then
|
||||||
|
dnl see if there's a pkg-specific for this host setup
|
||||||
|
AC_PATH_PROG( PKGCONFIG, ${host}-pkg-config, no,
|
||||||
|
$PATH:/usr/bin:/usr/local/bin)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x$PKGCONFIG = xno; then
|
||||||
|
AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
|
||||||
|
fi
|
||||||
|
|
||||||
if test x$PKGCONFIG != xno; then
|
if test x$PKGCONFIG != xno; then
|
||||||
AC_MSG_CHECKING([for $1 options with pkg-config])
|
AC_MSG_CHECKING([for $1 options with pkg-config])
|
||||||
@@ -3168,8 +3226,4 @@ AC_DEFUN([CURL_CHECK_PKGCONFIG], [
|
|||||||
AC_MSG_RESULT([found])
|
AC_MSG_RESULT([found])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
|
||||||
PKGCONFIG="no"
|
|
||||||
fi
|
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
|
*.html
|
||||||
*.lo
|
*.lo
|
||||||
|
*.pdf
|
||||||
.deps
|
.deps
|
||||||
.libs
|
.libs
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
|
acountry
|
||||||
adig
|
adig
|
||||||
ahost
|
ahost
|
||||||
ares_build.h
|
ares_build.h
|
||||||
|
ares_config.h
|
||||||
|
ares_config.h.in
|
||||||
ares_version.h.dist
|
ares_version.h.dist
|
||||||
autom4te.cache
|
autom4te.cache
|
||||||
|
compile
|
||||||
config.guess
|
config.guess
|
||||||
config.h
|
config.h
|
||||||
config.h.in
|
config.h.in
|
||||||
@@ -22,5 +28,6 @@ libcares.la
|
|||||||
libcares.pc
|
libcares.pc
|
||||||
libtool
|
libtool
|
||||||
ltmain.sh
|
ltmain.sh
|
||||||
|
man3
|
||||||
missing
|
missing
|
||||||
stamp-h*
|
stamp-h*
|
||||||
|
|||||||
132
ares/CHANGES
132
ares/CHANGES
@@ -1,9 +1,141 @@
|
|||||||
Changelog for the c-ares project
|
Changelog for the c-ares project
|
||||||
|
|
||||||
|
* November 2, 2009 (Yang Tse)
|
||||||
|
- Renamed c-ares setup.h to ares_setup.h
|
||||||
|
|
||||||
|
* October 31, 2009 (Yang Tse)
|
||||||
|
- Symbol hiding configure options are named now --enable-symbol-hiding
|
||||||
|
and --disable-symbol-hiding in an attempt to make them less ambiguous.
|
||||||
|
|
||||||
|
* October 30, 2009 (Yang Tse)
|
||||||
|
- Many fixes for ares_parse_txt_reply()
|
||||||
|
|
||||||
|
* October 29, 2009 (Daniel Stenberg)
|
||||||
|
- Jakub Hrozek added ares_parse_txt_reply() for TXT parsing
|
||||||
|
|
||||||
|
* October 29, 2009 (Yang Tse)
|
||||||
|
- Updated MSVC 6.0 workspace and project files that allows building
|
||||||
|
dynamic and static c-ares libraries in debug and release flavours.
|
||||||
|
Additionally each of the three sample programs is built against
|
||||||
|
each of the four possible c-ares libraries, generating all this
|
||||||
|
a total number of 12 executables and 4 libraries.
|
||||||
|
|
||||||
|
* October 28, 2009 (Yang Tse)
|
||||||
|
- Initial step towards the ability to reduce c-ares exported symbols
|
||||||
|
when built as a shared library based on the 'visibility' attribute
|
||||||
|
for GNUC and Intel compilers and based on __global for Sun compilers,
|
||||||
|
taking also in account __declspec function decoration for Win32 and
|
||||||
|
Symbian DLL's.
|
||||||
|
|
||||||
|
* October 27, 2009 (Yang Tse)
|
||||||
|
- Fixed Pelles C Win32 target compilation issues.
|
||||||
|
|
||||||
|
* October 23, 2009 (Yang Tse)
|
||||||
|
- John Engelhart noticed an unreleased problem relative to a duplicate
|
||||||
|
ARES_ECANCELLED error code value and missing error code description.
|
||||||
|
|
||||||
|
* October 7, 2009 (Yang Tse)
|
||||||
|
- Overhauled ares__get_hostent() Fixing out of bounds memory overwrite
|
||||||
|
triggered with malformed /etc/hosts file. Improving parsing of /etc/hosts
|
||||||
|
file. Validating requested address family. Ensuring that failures always
|
||||||
|
return a NULL pointer. Adjusting header inclusions.
|
||||||
|
|
||||||
|
* October 6, 2009 (Yang Tse)
|
||||||
|
- Fix ssize_t redefinition errors on WIN64 reported by Alexey Simak.
|
||||||
|
|
||||||
|
* September 29, 2009 (Yang Tse)
|
||||||
|
- Make configure script also check if _REENTRANT definition is required to
|
||||||
|
make errno available as a preprocessor macro.
|
||||||
|
|
||||||
|
* September 7, 2009 (Yang Tse)
|
||||||
|
- Add T_SRV portability check to ares_parse_srv_reply.c
|
||||||
|
|
||||||
|
* 4 Sep 2009 (Daniel Stenberg)
|
||||||
|
- Jakub Hrozek added ares_parse_srv_reply() for SRV parsing
|
||||||
|
|
||||||
|
* 3 Aug 2009 (Daniel Stenberg)
|
||||||
|
- Joshua Kwan fixed the init routine to fill in the defaults for stuff that
|
||||||
|
fails to get inited by other means. This fixes a case of when the c-ares
|
||||||
|
init fails when internet access is fone.
|
||||||
|
|
||||||
|
- Timo Teras changed the reason code used in the resolve callback done when
|
||||||
|
ares_cancel() is used, to be ARES_ECANCELLED instead of ARES_ETIMEOUT to
|
||||||
|
better allow the callback to know what's happening.
|
||||||
|
|
||||||
|
* 14 Jul 2009 (Guenter Knauf)
|
||||||
|
- renamed generated config.h to ares_config.h to avoid any future clashes
|
||||||
|
with config.h from other projects.
|
||||||
|
|
||||||
|
* June 20 2009 (Yang Tse)
|
||||||
|
- Refactor how libraries are checked for connect() function in configure
|
||||||
|
script and check for connect() as it is done for other functions.
|
||||||
|
|
||||||
|
* June 19 2009 (Yang Tse)
|
||||||
|
- Make sclose() function-like macro definition used to close a socket,
|
||||||
|
now solely based on HAVE_CLOSESOCKET and HAVE_CLOSESOCKET_CAMEL
|
||||||
|
config file preprocessor definitions
|
||||||
|
|
||||||
|
* June 18 2009 (Yang Tse)
|
||||||
|
- Add CloseSocket camel case function check for configure script.
|
||||||
|
|
||||||
|
* June 17 2009 (Yang Tse)
|
||||||
|
- Check for socket() and closesocket() as it is done for other functions
|
||||||
|
in configure script.
|
||||||
|
|
||||||
|
* June 11 2009 (Yang Tse)
|
||||||
|
- Modified buildconf so that when automake runs it copies missing files
|
||||||
|
instead of symlinking them.
|
||||||
|
|
||||||
|
* June 8 2009 (Yang Tse)
|
||||||
|
- Removed buildconf.bat from release and daily snapshot archives. This
|
||||||
|
file is only for CVS tree checkout builds.
|
||||||
|
|
||||||
|
* May 26 2009 (Yang Tse)
|
||||||
|
- Added --enable-curldebug configure option to enable and disable building
|
||||||
|
with the low-level curl debug memory tracking 'feature' to allow decoupled
|
||||||
|
setting from --enable-debug, allowing again to build c-ares independently
|
||||||
|
out of the CVS tree.
|
||||||
|
|
||||||
|
For the c-ares library option --enable-debug enables debug build features
|
||||||
|
which are _not_ related with memory tracking. For the c-ares library when
|
||||||
|
--enable-debug is given it does not enable the memory tracking feature. If
|
||||||
|
you wish to enable the curl debug memory tracking you must use configure
|
||||||
|
option --enable-curldebug explicitily to do so.
|
||||||
|
|
||||||
|
Internally, definition of preprocessor symbol DEBUGBUILD restricts code
|
||||||
|
which is only compiled for debug enabled builds. And symbol CURLDEBUG is
|
||||||
|
used to differentiate code which is _only_ used for memory tracking.
|
||||||
|
|
||||||
|
Make ares_init(), ares_dup() and ares_init_options() fail returning
|
||||||
|
ARES_ENOTINITIALIZED if library initialization has not been performed
|
||||||
|
calling ares_library_init().
|
||||||
|
|
||||||
|
* May 20 2009 (Yang Tse)
|
||||||
|
- Added ares_library_init() and ares_library_cleanup() man pages.
|
||||||
|
|
||||||
|
* May 19 2009 (Yang Tse)
|
||||||
|
- Introduced ares_library_init() and ares_library_cleanup() functions.
|
||||||
|
|
||||||
|
This is an API and ABI break for Win32/64 systems. Non-Win32/64 build targets
|
||||||
|
using c-ares 1.6.1 can still survive without calling these functions. Read all
|
||||||
|
the details on ares_library_init(3) and ares_library_cleanup(3) man pages that
|
||||||
|
are included.
|
||||||
|
|
||||||
|
curl/libcurl 7.19.5 is fully compatible with c-ares 1.6.1 on all systems.
|
||||||
|
|
||||||
|
In order to use c-ares 1.6.1 with curl/libcurl on Win32/64 systems it is
|
||||||
|
required that curl/libcurl is 7.19.5 or newer. In other words, it is not
|
||||||
|
possible on Win32/64 to use c-ares 1.6.1 with a curl/libcurl version less
|
||||||
|
than 7.19.5
|
||||||
|
|
||||||
* May 11 2009 (Daniel Stenberg)
|
* May 11 2009 (Daniel Stenberg)
|
||||||
- Gregor Jasny made c-ares link with libtool 's -export-symbols-regex option to
|
- Gregor Jasny made c-ares link with libtool 's -export-symbols-regex option to
|
||||||
only expose functions starting with ares_.
|
only expose functions starting with ares_.
|
||||||
|
|
||||||
|
* May 7 2009 (Yang Tse)
|
||||||
|
- Fix an m4 overquoting triggering a spurious 'AS_TR_CPP' symbol definition
|
||||||
|
attempt in generated config.h
|
||||||
|
|
||||||
* May 2 2009 (Yang Tse)
|
* May 2 2009 (Yang Tse)
|
||||||
- Use a build-time configured ares_socklen_t data type instead of socklen_t.
|
- Use a build-time configured ares_socklen_t data type instead of socklen_t.
|
||||||
|
|
||||||
|
|||||||
7
ares/CVS-INFO
Normal file
7
ares/CVS-INFO
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
CVS-INFO
|
||||||
|
|
||||||
|
This file is only present in the CVS - never in release archives. It is used
|
||||||
|
as a sentinel file in buildconf.bat in order to differentiate a CVS checkout
|
||||||
|
from release and daily snapshot archives.
|
||||||
|
|
||||||
@@ -14,11 +14,17 @@ ACLOCAL_AMFLAGS = -I m4
|
|||||||
# libcurl, but we do this anyway for convenience.
|
# libcurl, but we do this anyway for convenience.
|
||||||
#
|
#
|
||||||
# $(top_builddir)/../include is for libcurl's generated curl/curlbuild.h file
|
# $(top_builddir)/../include is for libcurl's generated curl/curlbuild.h file
|
||||||
# $(top_builddir) is for c-ares's generated config.h file
|
# $(top_srcdir)/../include is for libcurl's external include files
|
||||||
# $(top_srcdir) is for c-ares's lib/setup.h and other "c-ares-private" files
|
# $(top_builddir)/../lib is for libcurl's generated lib/curl_config.h file
|
||||||
|
# $(top_srcdir)/../lib is for libcurl's lib/setup.h and other "private" files
|
||||||
|
# $(top_builddir) is for c-ares's generated ares_config.h file
|
||||||
|
# $(top_srcdir) is for c-ares's ares_setup.h and other "c-ares-private" files
|
||||||
|
|
||||||
if CURLDEBUG
|
if CURLDEBUG
|
||||||
INCLUDES = -I$(top_builddir)/../include \
|
INCLUDES = -I$(top_builddir)/../include \
|
||||||
|
-I$(top_srcdir)/../include \
|
||||||
|
-I$(top_builddir)/../lib \
|
||||||
|
-I$(top_srcdir)/../lib \
|
||||||
-I$(top_builddir) \
|
-I$(top_builddir) \
|
||||||
-I$(top_srcdir)
|
-I$(top_srcdir)
|
||||||
else
|
else
|
||||||
@@ -30,10 +36,10 @@ lib_LTLIBRARIES = libcares.la
|
|||||||
|
|
||||||
man_MANS = $(MANPAGES)
|
man_MANS = $(MANPAGES)
|
||||||
|
|
||||||
MSVCFILES = vc/vc.dsw vc/acountry/acountry.dsp vc/adig/adig.dsp \
|
MSVCFILES = vc/vc6aws.dsw vc/acountry/vc6acountry.dsp vc/adig/vc6adig.dsp \
|
||||||
vc/ahost/ahost.dsp vc/areslib/areslib.dsp vc/areslib/areslib.dsw
|
vc/ahost/vc6ahost.dsp vc/cares/vc6cares.dsp vc/cares/vc6cares.dsw
|
||||||
|
|
||||||
if DEBUGBUILD
|
if CURLDEBUG
|
||||||
PROGS =
|
PROGS =
|
||||||
else
|
else
|
||||||
PROGS = ahost adig acountry
|
PROGS = ahost adig acountry
|
||||||
@@ -46,7 +52,9 @@ noinst_PROGRAMS =$(PROGS)
|
|||||||
EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj \
|
EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj \
|
||||||
Makefile.m32 Makefile.netware Makefile.vc6 $(man_MANS) $(MSVCFILES) \
|
Makefile.m32 Makefile.netware Makefile.vc6 $(man_MANS) $(MSVCFILES) \
|
||||||
config-win32.h RELEASE-NOTES libcares.pc.in buildconf get_ver.awk maketgz \
|
config-win32.h RELEASE-NOTES libcares.pc.in buildconf get_ver.awk maketgz \
|
||||||
TODO ares_build.h.in buildconf.bat
|
TODO ares_build.h.in $(PDFPAGES) cares.rc
|
||||||
|
|
||||||
|
CLEANFILES = $(PDFPAGES) $(HTMLPAGES)
|
||||||
|
|
||||||
DISTCLEANFILES = ares_build.h
|
DISTCLEANFILES = ares_build.h
|
||||||
|
|
||||||
@@ -87,9 +95,7 @@ if NO_UNDEFINED
|
|||||||
UNDEF = -no-undefined
|
UNDEF = -no-undefined
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXPORT_SYMBOLS = -export-symbols-regex '^ares_[[:alnum:]].*'
|
libcares_la_LDFLAGS = $(UNDEF) $(VER)
|
||||||
|
|
||||||
libcares_la_LDFLAGS = $(UNDEF) $(VER) $(EXPORT_SYMBOLS)
|
|
||||||
|
|
||||||
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
@@ -103,13 +109,52 @@ libcares_la_HEADERS = ares.h ares_version.h ares_dns.h \
|
|||||||
ares_build.h ares_rules.h
|
ares_build.h ares_rules.h
|
||||||
|
|
||||||
ahost_SOURCES = ahost.c ares_getopt.c ares_getopt.h
|
ahost_SOURCES = ahost.c ares_getopt.c ares_getopt.h
|
||||||
ahost_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)
|
ahost_LDADD = $(top_builddir)/libcares.la
|
||||||
|
|
||||||
adig_SOURCES = adig.c ares_getopt.c ares_getopt.h
|
adig_SOURCES = adig.c ares_getopt.c ares_getopt.h
|
||||||
adig_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)
|
adig_LDADD = $(top_builddir)/libcares.la
|
||||||
|
|
||||||
acountry_SOURCES = acountry.c ares_getopt.c ares_getopt.h
|
acountry_SOURCES = acountry.c ares_getopt.c ares_getopt.h
|
||||||
acountry_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)
|
acountry_LDADD = $(top_builddir)/libcares.la
|
||||||
|
|
||||||
|
SOURCEDMANDIR = man3
|
||||||
|
SOURCEDMANPAGES = ares_init.3
|
||||||
|
|
||||||
|
clean-local: clean-sourced-manpages
|
||||||
|
|
||||||
|
clean-sourced-manpages:
|
||||||
|
@srcdmandir='$(SOURCEDMANDIR)'; \
|
||||||
|
echo "rm -rf $(top_builddir)/$$srcdmandir"; \
|
||||||
|
rm -rf $(top_builddir)/$$srcdmandir
|
||||||
|
|
||||||
|
sourced-manpages: clean-sourced-manpages
|
||||||
|
@srcdmandir='$(SOURCEDMANDIR)'; \
|
||||||
|
srcdmanfiles='$(SOURCEDMANPAGES)'; \
|
||||||
|
mkdir $(top_builddir)/$$srcdmandir; \
|
||||||
|
for file in $$srcdmanfiles; do \
|
||||||
|
if test -f $(top_srcdir)/$$file; then \
|
||||||
|
echo "cp $(top_srcdir)/$$file $(top_builddir)/$$srcdmandir/$$file"; \
|
||||||
|
cp $(top_srcdir)/$$file $(top_builddir)/$$srcdmandir/$$file; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
|
||||||
|
MAN2HTML = roffit --mandir=. < $< >$@
|
||||||
|
|
||||||
|
SUFFIXES = .3 .html
|
||||||
|
|
||||||
|
html: sourced-manpages $(HTMLPAGES)
|
||||||
|
|
||||||
|
.3.html:
|
||||||
|
$(MAN2HTML)
|
||||||
|
|
||||||
|
pdf: sourced-manpages $(PDFPAGES)
|
||||||
|
|
||||||
|
.3.pdf:
|
||||||
|
@(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
|
||||||
|
groff -Tps -man $< >$$foo.ps; \
|
||||||
|
ps2pdf $$foo.ps $@; \
|
||||||
|
rm $$foo.ps; \
|
||||||
|
echo "converted $< to $@")
|
||||||
|
|
||||||
# Make files named *.dist replace the file without .dist extension
|
# Make files named *.dist replace the file without .dist extension
|
||||||
dist-hook:
|
dist-hook:
|
||||||
|
|||||||
@@ -1,40 +1,22 @@
|
|||||||
#
|
#
|
||||||
# c-ares Makefile for djgpp/gcc/Watt-32.
|
# c-ares Makefile for djgpp/gcc/Watt-32.
|
||||||
# By Gisle Vanem <giva@bgnett.no> 2004.
|
# By Gisle Vanem <gvanem@broadpark.no> 2004.
|
||||||
#
|
#
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
|
|
||||||
TOPDIR = ..
|
TOPDIR = ..
|
||||||
|
|
||||||
include ../packages/DOS/common.dj
|
DEPEND_PREREQ = ares_config.h
|
||||||
|
|
||||||
|
include ../packages/DOS/common.dj
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|
||||||
CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_IOCTLSOCKET \
|
CFLAGS += -DWATT32 -Dselect=select_s
|
||||||
-DHAVE_IOCTLSOCKET_FIONBIO -DHAVE_STRUCT_IN6_ADDR \
|
|
||||||
-DHAVE_SOCKADDR_IN6_SIN6_SCOPE_ID -DHAVE_SYS_TIME_H \
|
|
||||||
-DHAVE_STRUCT_SOCKADDR_IN6 -DHAVE_STRUCT_ADDRINFO \
|
|
||||||
-DHAVE_ARPA_NAMESER_H -DHAVE_ARPA_INET_H -DHAVE_SYS_SOCKET_H \
|
|
||||||
-DHAVE_SYS_UIO_H -DHAVE_NETINET_IN_H -DHAVE_NETINET_TCP_H \
|
|
||||||
-DNS_INADDRSZ=4 -DHAVE_RECV -DHAVE_SEND -DHAVE_GETTIMEOFDAY \
|
|
||||||
-DSEND_TYPE_ARG1='int' -DSEND_QUAL_ARG2='const' \
|
|
||||||
-DSEND_TYPE_ARG2='void*' -DSEND_TYPE_ARG3='int' \
|
|
||||||
-DSEND_TYPE_ARG4='int' -DSEND_TYPE_RETV='int' \
|
|
||||||
-DRECV_TYPE_ARG1='int' -DRECV_TYPE_ARG2='void*' \
|
|
||||||
-DRECV_TYPE_ARG3='int' -DRECV_TYPE_ARG4='int' \
|
|
||||||
-DRECV_TYPE_RETV='int' -DHAVE_STRUCT_TIMEVAL \
|
|
||||||
-Dselect=select_s -UHAVE_CONFIG_H \
|
|
||||||
-DRECVFROM_TYPE_ARG1='int' -DRECVFROM_TYPE_ARG2='void' \
|
|
||||||
-DRECVFROM_TYPE_ARG3='int' -DRECVFROM_TYPE_ARG4='int' \
|
|
||||||
-DRECVFROM_TYPE_ARG6='int' -DRECVFROM_TYPE_RETV='int' \
|
|
||||||
-DRECVFROM_TYPE_ARG5='struct sockaddr' -DHAVE_RECVFROM \
|
|
||||||
-DRECVFROM_TYPE_ARG2_IS_VOID -DHAVE_STRDUP -DHAVE_NETDB_H \
|
|
||||||
-DHAVE_STRCASECMP -DHAVE_STRNCASECMP -DHAVE_GETHOSTNAME \
|
|
||||||
-DHAVE_LIMITS_H
|
|
||||||
|
|
||||||
LDFLAGS = -s
|
LDFLAGS = -s
|
||||||
|
|
||||||
ifeq ($(USE_DEBUG),1)
|
ifeq ($(USE_CURLDEBUG),1)
|
||||||
EX_LIBS = ../lib/libcurl.a
|
EX_LIBS = ../lib/libcurl.a
|
||||||
OBJ_HACK = $(OBJECTS)
|
OBJ_HACK = $(OBJECTS)
|
||||||
else
|
else
|
||||||
@@ -57,12 +39,15 @@ EX_LIBS += $(WATT32_ROOT)/lib/libwatt.a
|
|||||||
|
|
||||||
OBJECTS = $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))
|
OBJECTS = $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))
|
||||||
|
|
||||||
all: $(OBJ_DIR) libcares.a ahost.exe adig.exe acountry.exe
|
all: $(OBJ_DIR) ares_config.h libcares.a ahost.exe adig.exe acountry.exe
|
||||||
@echo Welcome to c-ares.
|
@echo Welcome to c-ares.
|
||||||
|
|
||||||
libcares.a: $(OBJECTS)
|
libcares.a: $(OBJECTS)
|
||||||
ar rs $@ $?
|
ar rs $@ $?
|
||||||
|
|
||||||
|
ares_config.h: config.dos
|
||||||
|
$(COPY) $^ $@
|
||||||
|
|
||||||
ahost.exe: ahost.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
ahost.exe: ahost.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
||||||
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
||||||
|
|
||||||
@@ -72,12 +57,30 @@ adig.exe: adig.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
|||||||
acountry.exe: acountry.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
acountry.exe: acountry.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
||||||
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
||||||
|
|
||||||
clean:
|
# clean generated files
|
||||||
rm -f $(OBJECTS) libcares.a
|
#
|
||||||
|
genclean:
|
||||||
|
- $(DELETE) ares_config.h
|
||||||
|
|
||||||
vclean realclean: clean
|
# clean object files and subdir
|
||||||
rm -f ahost.exe adig.exe acountry.exe depend.dj
|
#
|
||||||
- rmdir $(OBJ_DIR)
|
objclean: genclean
|
||||||
|
- $(DELETE) $(OBJ_DIR)$(DS)*.o
|
||||||
|
- $(RMDIR) $(OBJ_DIR)
|
||||||
|
|
||||||
|
# clean without removing built library and programs
|
||||||
|
#
|
||||||
|
clean: objclean
|
||||||
|
- $(DELETE) depend.dj
|
||||||
|
|
||||||
|
# clean everything
|
||||||
|
#
|
||||||
|
realclean vclean: clean
|
||||||
|
- $(DELETE) libcares.a
|
||||||
|
- $(DELETE) acountry.exe
|
||||||
|
- $(DELETE) adig.exe
|
||||||
|
- $(DELETE) ahost.exe
|
||||||
|
- $(DELETE) libcares.a
|
||||||
|
|
||||||
-include depend.dj
|
-include depend.dj
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,165 @@
|
|||||||
CSOURCES = ares_fds.c ares_getsock.c ares_process.c ares_free_hostent.c \
|
|
||||||
ares_query.c ares__close_sockets.c ares_free_string.c ares_search.c \
|
|
||||||
ares__get_hostent.c ares_gethostbyaddr.c ares_send.c ares__read_line.c \
|
|
||||||
ares_gethostbyname.c ares_strerror.c ares_cancel.c ares_init.c \
|
|
||||||
ares_timeout.c ares_destroy.c ares_mkquery.c ares_version.c \
|
|
||||||
ares_expand_name.c ares_parse_a_reply.c windows_port.c ares_strdup.c \
|
|
||||||
ares_expand_string.c ares_parse_ptr_reply.c ares_parse_aaaa_reply.c \
|
|
||||||
ares_getnameinfo.c inet_net_pton.c bitncmp.c inet_ntop.c ares_writev.c \
|
|
||||||
ares_parse_ns_reply.c ares_llist.c ares__timeval.c ares_strcasecmp.c \
|
|
||||||
ares_library_init.c
|
|
||||||
|
|
||||||
HHEADERS = ares.h ares_private.h setup.h ares_dns.h ares_version.h \
|
CSOURCES = ares__close_sockets.c \
|
||||||
nameser.h inet_net_pton.h inet_ntop.h ares_ipv6.h bitncmp.h setup_once.h \
|
ares__get_hostent.c \
|
||||||
ares_llist.h ares_strdup.h ares_strcasecmp.h ares_writev.h ares_build.h \
|
ares__read_line.c \
|
||||||
ares_rules.h ares_library_init.h
|
ares__timeval.c \
|
||||||
|
ares_cancel.c \
|
||||||
|
ares_destroy.c \
|
||||||
|
ares_expand_name.c \
|
||||||
|
ares_expand_string.c \
|
||||||
|
ares_fds.c \
|
||||||
|
ares_free_hostent.c \
|
||||||
|
ares_free_string.c \
|
||||||
|
ares_gethostbyaddr.c \
|
||||||
|
ares_gethostbyname.c \
|
||||||
|
ares_getnameinfo.c \
|
||||||
|
ares_getsock.c \
|
||||||
|
ares_init.c \
|
||||||
|
ares_library_init.c \
|
||||||
|
ares_llist.c \
|
||||||
|
ares_mkquery.c \
|
||||||
|
ares_parse_a_reply.c \
|
||||||
|
ares_parse_aaaa_reply.c \
|
||||||
|
ares_parse_ns_reply.c \
|
||||||
|
ares_parse_ptr_reply.c \
|
||||||
|
ares_parse_srv_reply.c \
|
||||||
|
ares_parse_txt_reply.c \
|
||||||
|
ares_process.c \
|
||||||
|
ares_query.c \
|
||||||
|
ares_search.c \
|
||||||
|
ares_send.c \
|
||||||
|
ares_strcasecmp.c \
|
||||||
|
ares_strdup.c \
|
||||||
|
ares_strerror.c \
|
||||||
|
ares_timeout.c \
|
||||||
|
ares_version.c \
|
||||||
|
ares_writev.c \
|
||||||
|
bitncmp.c \
|
||||||
|
inet_net_pton.c \
|
||||||
|
inet_ntop.c \
|
||||||
|
windows_port.c
|
||||||
|
|
||||||
|
HHEADERS = ares.h \
|
||||||
|
ares_build.h \
|
||||||
|
ares_dns.h \
|
||||||
|
ares_ipv6.h \
|
||||||
|
ares_library_init.h \
|
||||||
|
ares_llist.h \
|
||||||
|
ares_private.h \
|
||||||
|
ares_rules.h \
|
||||||
|
ares_strcasecmp.h \
|
||||||
|
ares_strdup.h \
|
||||||
|
ares_version.h \
|
||||||
|
ares_writev.h \
|
||||||
|
bitncmp.h \
|
||||||
|
inet_net_pton.h \
|
||||||
|
inet_ntop.h \
|
||||||
|
nameser.h \
|
||||||
|
ares_setup.h \
|
||||||
|
setup_once.h
|
||||||
|
|
||||||
|
MANPAGES = ares_cancel.3 \
|
||||||
|
ares_destroy.3 \
|
||||||
|
ares_destroy_options.3 \
|
||||||
|
ares_dup.3 \
|
||||||
|
ares_expand_name.3 \
|
||||||
|
ares_expand_string.3 \
|
||||||
|
ares_fds.3 \
|
||||||
|
ares_free_hostent.3 \
|
||||||
|
ares_free_string.3 \
|
||||||
|
ares_gethostbyaddr.3 \
|
||||||
|
ares_gethostbyname.3 \
|
||||||
|
ares_gethostbyname_file.3 \
|
||||||
|
ares_getnameinfo.3 \
|
||||||
|
ares_getsock.3 \
|
||||||
|
ares_init.3 \
|
||||||
|
ares_init_options.3 \
|
||||||
|
ares_library_cleanup.3 \
|
||||||
|
ares_library_init.3 \
|
||||||
|
ares_mkquery.3 \
|
||||||
|
ares_parse_a_reply.3 \
|
||||||
|
ares_parse_aaaa_reply.3 \
|
||||||
|
ares_parse_ns_reply.3 \
|
||||||
|
ares_parse_ptr_reply.3 \
|
||||||
|
ares_parse_srv_reply.3 \
|
||||||
|
ares_parse_txt_reply.3 \
|
||||||
|
ares_process.3 \
|
||||||
|
ares_query.3 \
|
||||||
|
ares_save_options.3 \
|
||||||
|
ares_search.3 \
|
||||||
|
ares_send.3 \
|
||||||
|
ares_set_socket_callback.3 \
|
||||||
|
ares_strerror.3 \
|
||||||
|
ares_timeout.3 \
|
||||||
|
ares_version.3
|
||||||
|
|
||||||
|
HTMLPAGES = ares_cancel.html \
|
||||||
|
ares_destroy.html \
|
||||||
|
ares_destroy_options.html \
|
||||||
|
ares_dup.html \
|
||||||
|
ares_expand_name.html \
|
||||||
|
ares_expand_string.html \
|
||||||
|
ares_fds.html \
|
||||||
|
ares_free_hostent.html \
|
||||||
|
ares_free_string.html \
|
||||||
|
ares_gethostbyaddr.html \
|
||||||
|
ares_gethostbyname.html \
|
||||||
|
ares_gethostbyname_file.html \
|
||||||
|
ares_getnameinfo.html \
|
||||||
|
ares_getsock.html \
|
||||||
|
ares_init.html \
|
||||||
|
ares_init_options.html \
|
||||||
|
ares_library_cleanup.html \
|
||||||
|
ares_library_init.html \
|
||||||
|
ares_mkquery.html \
|
||||||
|
ares_parse_a_reply.html \
|
||||||
|
ares_parse_aaaa_reply.html \
|
||||||
|
ares_parse_ns_reply.html \
|
||||||
|
ares_parse_ptr_reply.html \
|
||||||
|
ares_parse_srv_reply.html \
|
||||||
|
ares_parse_txt_reply.html \
|
||||||
|
ares_process.html \
|
||||||
|
ares_query.html \
|
||||||
|
ares_save_options.html \
|
||||||
|
ares_search.html \
|
||||||
|
ares_send.html \
|
||||||
|
ares_set_socket_callback.html \
|
||||||
|
ares_strerror.html \
|
||||||
|
ares_timeout.html \
|
||||||
|
ares_version.html
|
||||||
|
|
||||||
|
PDFPAGES = ares_cancel.pdf \
|
||||||
|
ares_destroy.pdf \
|
||||||
|
ares_destroy_options.pdf \
|
||||||
|
ares_dup.pdf \
|
||||||
|
ares_expand_name.pdf \
|
||||||
|
ares_expand_string.pdf \
|
||||||
|
ares_fds.pdf \
|
||||||
|
ares_free_hostent.pdf \
|
||||||
|
ares_free_string.pdf \
|
||||||
|
ares_gethostbyaddr.pdf \
|
||||||
|
ares_gethostbyname.pdf \
|
||||||
|
ares_gethostbyname_file.pdf \
|
||||||
|
ares_getnameinfo.pdf \
|
||||||
|
ares_getsock.pdf \
|
||||||
|
ares_init.pdf \
|
||||||
|
ares_init_options.pdf \
|
||||||
|
ares_library_cleanup.pdf \
|
||||||
|
ares_library_init.pdf \
|
||||||
|
ares_mkquery.pdf \
|
||||||
|
ares_parse_a_reply.pdf \
|
||||||
|
ares_parse_aaaa_reply.pdf \
|
||||||
|
ares_parse_ns_reply.pdf \
|
||||||
|
ares_parse_ptr_reply.pdf \
|
||||||
|
ares_parse_srv_reply.pdf \
|
||||||
|
ares_parse_txt_reply.pdf \
|
||||||
|
ares_process.pdf \
|
||||||
|
ares_query.pdf \
|
||||||
|
ares_save_options.pdf \
|
||||||
|
ares_search.pdf \
|
||||||
|
ares_send.pdf \
|
||||||
|
ares_set_socket_callback.pdf \
|
||||||
|
ares_strerror.pdf \
|
||||||
|
ares_timeout.pdf \
|
||||||
|
ares_version.pdf
|
||||||
|
|
||||||
MANPAGES= ares_destroy.3 ares_expand_name.3 ares_expand_string.3 ares_fds.3 \
|
|
||||||
ares_free_hostent.3 ares_free_string.3 ares_gethostbyaddr.3 \
|
|
||||||
ares_gethostbyname.3 ares_init.3 ares_init_options.3 ares_mkquery.3 \
|
|
||||||
ares_parse_a_reply.3 ares_parse_ptr_reply.3 ares_process.3 \
|
|
||||||
ares_query.3 ares_search.3 ares_send.3 ares_strerror.3 ares_timeout.3 \
|
|
||||||
ares_version.3 ares_cancel.3 ares_parse_aaaa_reply.3 ares_getnameinfo.3 \
|
|
||||||
ares_getsock.3 ares_parse_ns_reply.3 ares_dup.3 \
|
|
||||||
ares_destroy_options.3 ares_save_options.3 ares_gethostbyname_file.3 \
|
|
||||||
ares_set_socket_callback.3
|
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ lib: prebuild $(LTARGET)
|
|||||||
|
|
||||||
nlm: prebuild $(TARGETS)
|
nlm: prebuild $(TARGETS)
|
||||||
|
|
||||||
prebuild: $(OBJDIR) ares_build.h $(OBJDIR)/version.inc config.h
|
prebuild: $(OBJDIR) ares_build.h $(OBJDIR)/version.inc ares_config.h
|
||||||
|
|
||||||
install: $(INSTDIR) all
|
install: $(INSTDIR) all
|
||||||
@$(CP) *.nlm $(INSTDIR)
|
@$(CP) *.nlm $(INSTDIR)
|
||||||
@@ -170,7 +170,7 @@ install: $(INSTDIR) all
|
|||||||
@$(CP) ../RELEASE-NOTES $(INSTDIR)
|
@$(CP) ../RELEASE-NOTES $(INSTDIR)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-$(RM) $(LTARGET) $(TARGETS) config.h
|
-$(RM) $(LTARGET) $(TARGETS) ares_config.h
|
||||||
-$(RM) -r $(OBJDIR)
|
-$(RM) -r $(OBJDIR)
|
||||||
-$(RM) -r arpa
|
-$(RM) -r arpa
|
||||||
|
|
||||||
@@ -269,7 +269,7 @@ ifeq ($(LD),nlmconv)
|
|||||||
@echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
|
@echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
config.h: Makefile.netware
|
ares_config.h: Makefile.netware
|
||||||
@echo Creating $@
|
@echo Creating $@
|
||||||
@echo $(DL)/* $@ for NetWare target.$(DL) > $@
|
@echo $(DL)/* $@ for NetWare target.$(DL) > $@
|
||||||
@echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
|
@echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
# C-ares makefile for MSVC6+
|
# C-ares makefile for MSVC6+
|
||||||
# G. Vanem <giva@bgnett.no>.
|
# G. Vanem <gvanem@broadpark.no>.
|
||||||
#
|
#
|
||||||
|
|
||||||
CFG_MODEL = MD
|
CFG_MODEL = MD
|
||||||
@@ -12,8 +12,8 @@ USE_WATT32 = 0
|
|||||||
# Configurations:
|
# Configurations:
|
||||||
# -MD - msvcrt.dll, threads, release (normal)
|
# -MD - msvcrt.dll, threads, release (normal)
|
||||||
# -MDd - msvcrtd.dll, threads, debug
|
# -MDd - msvcrtd.dll, threads, debug
|
||||||
# -ML - libc, no threads, release
|
# -ML - libc, no threads, release (not available on VC-2008+)
|
||||||
# -MLd - libc, no threads, debug
|
# -MLd - libc, no threads, debug (not available on VC-2008+)
|
||||||
# -MT - libc, threads, release
|
# -MT - libc, threads, release
|
||||||
# -MTd - libc, threads, debug
|
# -MTd - libc, threads, debug
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ OBJ_DIR = VC6_obj
|
|||||||
DEF_FILE = cares.def
|
DEF_FILE = cares.def
|
||||||
|
|
||||||
!if "$(USE_WATT32)" == "1"
|
!if "$(USE_WATT32)" == "1"
|
||||||
CFLAGS = $(CFLAGS) -UWIN32 -DWATT32 -D_USE_32BIT_TIME_T -I$(WATT_ROOT)\inc
|
CFLAGS = $(CFLAGS) -UWIN32 -DWATT32 -I$(WATT_ROOT)\inc
|
||||||
EX_LIBS = $(WATT_ROOT)\lib\wattcpvc_imp.lib
|
EX_LIBS = $(WATT_ROOT)\lib\wattcpvc_imp.lib
|
||||||
|
|
||||||
!else
|
!else
|
||||||
@@ -35,7 +35,7 @@ EX_LIBS = advapi32.lib ws2_32.lib
|
|||||||
!endif
|
!endif
|
||||||
|
|
||||||
!if "$(DEBUG_MODEL)" == "d"
|
!if "$(DEBUG_MODEL)" == "d"
|
||||||
CFLAGS = $(CFLAGS) -D_DEBUG -GZ
|
CFLAGS = $(CFLAGS) -DDEBUGBUILD -D_DEBUG -GZ
|
||||||
LDFLAGS = $(LDFLAGS) -debug -fixed:no
|
LDFLAGS = $(LDFLAGS) -debug -fixed:no
|
||||||
|
|
||||||
!else
|
!else
|
||||||
@@ -74,6 +74,7 @@ OBJECTS = $(OBJ_DIR)\ares_fds.obj \
|
|||||||
$(OBJ_DIR)\ares_parse_a_reply.obj \
|
$(OBJ_DIR)\ares_parse_a_reply.obj \
|
||||||
$(OBJ_DIR)\ares_parse_aaaa_reply.obj \
|
$(OBJ_DIR)\ares_parse_aaaa_reply.obj \
|
||||||
$(OBJ_DIR)\ares_parse_ns_reply.obj \
|
$(OBJ_DIR)\ares_parse_ns_reply.obj \
|
||||||
|
$(OBJ_DIR)\ares_parse_srv_reply.obj \
|
||||||
$(OBJ_DIR)\windows_port.obj \
|
$(OBJ_DIR)\windows_port.obj \
|
||||||
$(OBJ_DIR)\ares_expand_string.obj \
|
$(OBJ_DIR)\ares_expand_string.obj \
|
||||||
$(OBJ_DIR)\ares_parse_ptr_reply.obj \
|
$(OBJ_DIR)\ares_parse_ptr_reply.obj \
|
||||||
@@ -158,117 +159,117 @@ vclean realclean: clean
|
|||||||
#
|
#
|
||||||
# Copyright "gcc -MM .."
|
# Copyright "gcc -MM .."
|
||||||
#
|
#
|
||||||
$(OBJ_DIR)\ares_fds.obj: ares_fds.c setup.h setup_once.h ares.h ares_private.h \
|
$(OBJ_DIR)\ares_fds.obj: ares_fds.c ares_setup.h setup_once.h ares.h ares_private.h \
|
||||||
ares_ipv6.h ares_build.h ares_rules.h
|
ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_process.obj: ares_process.c setup.h setup_once.h nameser.h \
|
$(OBJ_DIR)\ares_process.obj: ares_process.c ares_setup.h setup_once.h nameser.h \
|
||||||
ares.h ares_dns.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
ares.h ares_dns.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_free_hostent.obj: ares_free_hostent.c setup.h setup_once.h \
|
$(OBJ_DIR)\ares_free_hostent.obj: ares_free_hostent.c ares_setup.h setup_once.h \
|
||||||
ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_query.obj: ares_query.c setup.h setup_once.h nameser.h \
|
$(OBJ_DIR)\ares_query.obj: ares_query.c ares_setup.h setup_once.h nameser.h \
|
||||||
ares.h ares_dns.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
ares.h ares_dns.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares__close_sockets.obj: ares__close_sockets.c setup.h setup_once.h \
|
$(OBJ_DIR)\ares__close_sockets.obj: ares__close_sockets.c ares_setup.h setup_once.h \
|
||||||
ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_free_string.obj: ares_free_string.c setup.h setup_once.h \
|
$(OBJ_DIR)\ares_free_string.obj: ares_free_string.c ares_setup.h setup_once.h \
|
||||||
ares.h ares_build.h ares_rules.h
|
ares.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_search.obj: ares_search.c setup.h setup_once.h nameser.h \
|
$(OBJ_DIR)\ares_search.obj: ares_search.c ares_setup.h setup_once.h nameser.h \
|
||||||
ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares__get_hostent.obj: ares__get_hostent.c setup.h setup_once.h \
|
$(OBJ_DIR)\ares__get_hostent.obj: ares__get_hostent.c ares_setup.h setup_once.h \
|
||||||
ares.h ares_private.h ares_ipv6.h inet_net_pton.h ares_build.h ares_rules.h
|
ares.h ares_private.h ares_ipv6.h inet_net_pton.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_gethostbyaddr.obj: ares_gethostbyaddr.c setup.h setup_once.h \
|
$(OBJ_DIR)\ares_gethostbyaddr.obj: ares_gethostbyaddr.c ares_setup.h setup_once.h \
|
||||||
nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h ares_build.h \
|
nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h ares_build.h \
|
||||||
ares_rules.h
|
ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_send.obj: ares_send.c setup.h setup_once.h nameser.h ares.h \
|
$(OBJ_DIR)\ares_send.obj: ares_send.c ares_setup.h setup_once.h nameser.h ares.h \
|
||||||
ares_dns.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
ares_dns.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares__read_line.obj: ares__read_line.c setup.h setup_once.h ares.h \
|
$(OBJ_DIR)\ares__read_line.obj: ares__read_line.c ares_setup.h setup_once.h ares.h \
|
||||||
ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_gethostbyname.obj: ares_gethostbyname.c setup.h setup_once.h \
|
$(OBJ_DIR)\ares_gethostbyname.obj: ares_gethostbyname.c ares_setup.h setup_once.h \
|
||||||
nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h bitncmp.h \
|
nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h bitncmp.h \
|
||||||
ares_build.h ares_rules.h
|
ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_strcasecmp.obj: ares_strcasecmp.c setup.h setup_once.h ares.h \
|
$(OBJ_DIR)\ares_strcasecmp.obj: ares_strcasecmp.c ares_setup.h setup_once.h ares.h \
|
||||||
ares_build.h ares_rules.h
|
ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_strerror.obj: ares_strerror.c setup.h setup_once.h ares.h \
|
$(OBJ_DIR)\ares_strerror.obj: ares_strerror.c ares_setup.h setup_once.h ares.h \
|
||||||
ares_build.h ares_rules.h
|
ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_cancel.obj: ares_cancel.c setup.h setup_once.h ares.h \
|
$(OBJ_DIR)\ares_cancel.obj: ares_cancel.c ares_setup.h setup_once.h ares.h \
|
||||||
ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_init.obj: ares_init.c setup.h setup_once.h nameser.h ares.h \
|
$(OBJ_DIR)\ares_init.obj: ares_init.c ares_setup.h setup_once.h nameser.h ares.h \
|
||||||
ares_private.h ares_ipv6.h inet_net_pton.h ares_build.h ares_rules.h \
|
ares_private.h ares_ipv6.h inet_net_pton.h ares_build.h ares_rules.h \
|
||||||
ares_library_init.h
|
ares_library_init.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_timeout.obj: ares_timeout.c setup.h setup_once.h ares.h \
|
$(OBJ_DIR)\ares_timeout.obj: ares_timeout.c ares_setup.h setup_once.h ares.h \
|
||||||
ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares__timeval.obj: ares__timeval.c setup.h setup_once.h ares.h \
|
$(OBJ_DIR)\ares__timeval.obj: ares__timeval.c ares_setup.h setup_once.h ares.h \
|
||||||
ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_destroy.obj: ares_destroy.c setup.h setup_once.h ares.h \
|
$(OBJ_DIR)\ares_destroy.obj: ares_destroy.c ares_setup.h setup_once.h ares.h \
|
||||||
ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_mkquery.obj: ares_mkquery.c setup.h setup_once.h nameser.h \
|
$(OBJ_DIR)\ares_mkquery.obj: ares_mkquery.c ares_setup.h setup_once.h nameser.h \
|
||||||
ares.h ares_dns.h ares_build.h ares_rules.h
|
ares.h ares_dns.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_version.obj: ares_version.c setup.h setup_once.h ares.h \
|
$(OBJ_DIR)\ares_version.obj: ares_version.c ares_setup.h setup_once.h ares.h \
|
||||||
ares_version.h ares_build.h ares_rules.h
|
ares_version.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_expand_name.obj: ares_expand_name.c setup.h setup_once.h \
|
$(OBJ_DIR)\ares_expand_name.obj: ares_expand_name.c ares_setup.h setup_once.h \
|
||||||
nameser.h ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
nameser.h ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_parse_a_reply.obj: ares_parse_a_reply.c setup.h setup_once.h \
|
$(OBJ_DIR)\ares_parse_a_reply.obj: ares_parse_a_reply.c ares_setup.h setup_once.h \
|
||||||
nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h ares_build.h \
|
nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h ares_build.h \
|
||||||
ares_rules.h
|
ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\windows_port.obj: windows_port.c setup.h setup_once.h nameser.h \
|
$(OBJ_DIR)\windows_port.obj: windows_port.c ares_setup.h setup_once.h nameser.h \
|
||||||
ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_expand_string.obj: ares_expand_string.c setup.h setup_once.h \
|
$(OBJ_DIR)\ares_expand_string.obj: ares_expand_string.c ares_setup.h setup_once.h \
|
||||||
nameser.h ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
nameser.h ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_parse_ptr_reply.obj: ares_parse_ptr_reply.c setup.h \
|
$(OBJ_DIR)\ares_parse_ptr_reply.obj: ares_parse_ptr_reply.c ares_setup.h \
|
||||||
setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h \
|
setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h \
|
||||||
ares_build.h ares_rules.h
|
ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_parse_aaaa_reply.obj: ares_parse_aaaa_reply.c setup.h \
|
$(OBJ_DIR)\ares_parse_aaaa_reply.obj: ares_parse_aaaa_reply.c ares_setup.h \
|
||||||
setup_once.h nameser.h ares.h ares_dns.h inet_net_pton.h ares_private.h \
|
setup_once.h nameser.h ares.h ares_dns.h inet_net_pton.h ares_private.h \
|
||||||
ares_ipv6.h ares_build.h ares_rules.h
|
ares_ipv6.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_parse_ns_reply.obj: ares_parse_ns_reply.c setup.h \
|
$(OBJ_DIR)\ares_parse_ns_reply.obj: ares_parse_ns_reply.c ares_setup.h \
|
||||||
setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h \
|
setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h \
|
||||||
ares_build.h ares_rules.h
|
ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_getnameinfo.obj: ares_getnameinfo.c setup.h setup_once.h \
|
$(OBJ_DIR)\ares_getnameinfo.obj: ares_getnameinfo.c ares_setup.h setup_once.h \
|
||||||
nameser.h ares.h ares_private.h ares_ipv6.h inet_ntop.h ares_build.h \
|
nameser.h ares.h ares_private.h ares_ipv6.h inet_ntop.h ares_build.h \
|
||||||
ares_rules.h
|
ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\inet_net_pton.obj: inet_net_pton.c setup.h setup_once.h nameser.h \
|
$(OBJ_DIR)\inet_net_pton.obj: inet_net_pton.c ares_setup.h setup_once.h nameser.h \
|
||||||
ares_ipv6.h inet_net_pton.h ares_build.h ares_rules.h
|
ares_ipv6.h inet_net_pton.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\bitncmp.obj: bitncmp.c bitncmp.h ares_build.h ares_rules.h
|
$(OBJ_DIR)\bitncmp.obj: bitncmp.c bitncmp.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\inet_ntop.obj: inet_ntop.c setup.h setup_once.h nameser.h \
|
$(OBJ_DIR)\inet_ntop.obj: inet_ntop.c ares_setup.h setup_once.h nameser.h \
|
||||||
ares_ipv6.h inet_ntop.h ares_build.h ares_rules.h
|
ares_ipv6.h inet_ntop.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_getopt.obj: ares_getopt.c ares_getopt.h ares_build.h \
|
$(OBJ_DIR)\ares_getopt.obj: ares_getopt.c ares_getopt.h ares_build.h \
|
||||||
ares_rules.h
|
ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_library_init.obj: ares_library_init.c setup.h setup_once.h \
|
$(OBJ_DIR)\ares_library_init.obj: ares_library_init.c ares_setup.h setup_once.h \
|
||||||
ares.h ares_private.h ares_library_init.h ares_build.h ares_rules.h
|
ares.h ares_private.h ares_library_init.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_llist.obj: ares_llist.c setup.h setup_once.h ares.h \
|
$(OBJ_DIR)\ares_llist.obj: ares_llist.c ares_setup.h setup_once.h ares.h \
|
||||||
ares_private.h ares_llist.h ares_build.h ares_rules.h
|
ares_private.h ares_llist.h ares_build.h ares_rules.h
|
||||||
|
|
||||||
$(OBJ_DIR)\ares_writev.obj: ares_writev.c setup.h setup_once.h ares.h \
|
$(OBJ_DIR)\ares_writev.obj: ares_writev.c ares_setup.h setup_once.h ares.h \
|
||||||
ares_writev.h ares_build.h ares_rules.h
|
ares_writev.h ares_build.h ares_rules.h
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ The following notes apply to c-ares version 1.6.1 and later.
|
|||||||
the library that you have built. It is _your_ responsability to provide this
|
the library that you have built. It is _your_ responsability to provide this
|
||||||
file. No one at the c-ares project can know how you have built the library.
|
file. No one at the c-ares project can know how you have built the library.
|
||||||
|
|
||||||
* File ares_build.h includes platform and configuration dependant info,
|
* File ares_build.h includes platform and configuration dependent info,
|
||||||
and must not be modified by anyone. Configure script generates it for you.
|
and must not be modified by anyone. Configure script generates it for you.
|
||||||
|
|
||||||
* We cannot assume anything else but very basic compiler features being
|
* We cannot assume anything else but very basic compiler features being
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
This is what's new and changed in the c-ares 1.6.1 release:
|
This is what's new and changed in the c-ares 1.7.0 release:
|
||||||
|
|
||||||
Changed:
|
Changed:
|
||||||
|
|
||||||
@@ -7,15 +7,25 @@ Changed:
|
|||||||
o ares_gethostbyname() now supports 'AF_UNSPEC' as a family for resolving
|
o ares_gethostbyname() now supports 'AF_UNSPEC' as a family for resolving
|
||||||
either AF_INET6 or AF_INET
|
either AF_INET6 or AF_INET
|
||||||
o a build-time configured ares_socklen_t is now used instead of socklen_t
|
o a build-time configured ares_socklen_t is now used instead of socklen_t
|
||||||
|
o new ares_library_init() and ares_library_cleanup() functions
|
||||||
|
o new --enable-curldebug configure option
|
||||||
|
o ARES_ECANCELLED is now sent as reason for ares_cancel()
|
||||||
|
o added ares_parse_srv_reply()
|
||||||
|
o added ares_parse_txt_reply()
|
||||||
|
o new --enable-symbol-hiding configure option
|
||||||
|
|
||||||
Fixed:
|
Fixed:
|
||||||
|
|
||||||
o ares_parse_*_reply() functions now return ARES_EBADRESP instead of
|
o ares_parse_*_reply() functions now return ARES_EBADRESP instead of
|
||||||
ARES_EBADNAME if the name in the response failed to decode
|
ARES_EBADNAME if the name in the response failed to decode
|
||||||
o only expose/export symbols starting with 'ares_'
|
o only expose/export symbols starting with 'ares_'
|
||||||
|
o fix \Device\TCP handle leaks triggered by buggy iphlpapi.dll
|
||||||
|
o init without internet gone no longer fails
|
||||||
|
o out of bounds memory overwrite triggered with malformed /etc/hosts file
|
||||||
|
|
||||||
Thanks go to these friendly people for their efforts and contributions:
|
Thanks go to these friendly people for their efforts and contributions:
|
||||||
|
|
||||||
Phil Blundell, Japheth Cleaver, Yang Tse, Gregor Jasny
|
Phil Blundell, Japheth Cleaver, Yang Tse, Gregor Jasny, Joshua Kwan,
|
||||||
|
Timo Teras, Jakub Hrozek, John Engelhart
|
||||||
|
|
||||||
Have fun!
|
Have fun!
|
||||||
|
|||||||
10
ares/TODO
10
ares/TODO
@@ -6,3 +6,13 @@ ares_gethostbyname
|
|||||||
- When built to support IPv6, it needs to also support PF_UNSPEC or similar,
|
- When built to support IPv6, it needs to also support PF_UNSPEC or similar,
|
||||||
so that an application can ask for any protocol and then c-ares would return
|
so that an application can ask for any protocol and then c-ares would return
|
||||||
all known resolves and not just explicitly IPv4 _or_ IPv6 resolves.
|
all known resolves and not just explicitly IPv4 _or_ IPv6 resolves.
|
||||||
|
|
||||||
|
ares_process
|
||||||
|
|
||||||
|
- Upon next ABI breakage ares_process() should be changed to return 'int'
|
||||||
|
and return ARES_ENOTINITIALIZED if ares_library_init() has not been called.
|
||||||
|
|
||||||
|
ares_process_fd
|
||||||
|
|
||||||
|
- Upon next ABI breakage ares_process_fd() should be changed to return
|
||||||
|
'int' and return ARES_ENOTINITIALIZED if library has not been initialized.
|
||||||
|
|||||||
@@ -1320,7 +1320,7 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
|
|||||||
AC_REQUIRE([AC_HEADER_TIME])dnl
|
AC_REQUIRE([AC_HEADER_TIME])dnl
|
||||||
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl
|
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl
|
||||||
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl
|
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl
|
||||||
AC_CHECK_HEADERS(sys/types.h sys/time.h time.h)
|
AC_CHECK_HEADERS(sys/types.h sys/time.h time.h sys/socket.h)
|
||||||
AC_CACHE_CHECK([for struct timeval], [ac_cv_struct_timeval], [
|
AC_CACHE_CHECK([for struct timeval], [ac_cv_struct_timeval], [
|
||||||
AC_COMPILE_IFELSE([
|
AC_COMPILE_IFELSE([
|
||||||
AC_LANG_PROGRAM([[
|
AC_LANG_PROGRAM([[
|
||||||
@@ -1350,6 +1350,9 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
|
|||||||
#ifdef HAVE_TIME_H
|
#ifdef HAVE_TIME_H
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
]],[[
|
]],[[
|
||||||
struct timeval ts;
|
struct timeval ts;
|
||||||
@@ -1667,6 +1670,52 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CARES_CHECK_LIBS_CONNECT
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Verify if network connect function is already available
|
||||||
|
dnl using current libraries or if another one is required.
|
||||||
|
|
||||||
|
AC_DEFUN([CARES_CHECK_LIBS_CONNECT], [
|
||||||
|
AC_REQUIRE([CARES_INCLUDES_WINSOCK2])dnl
|
||||||
|
AC_MSG_CHECKING([for connect in libraries])
|
||||||
|
tst_connect_save_LIBS="$LIBS"
|
||||||
|
tst_connect_need_LIBS="unknown"
|
||||||
|
for tst_lib in '' '-lsocket' ; do
|
||||||
|
if test "$tst_connect_need_LIBS" = "unknown"; then
|
||||||
|
LIBS="$tst_lib $tst_connect_save_LIBS"
|
||||||
|
AC_LINK_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
$cares_includes_winsock2
|
||||||
|
#ifndef HAVE_WINDOWS_H
|
||||||
|
int connect(int, void*, int);
|
||||||
|
#endif
|
||||||
|
]],[[
|
||||||
|
if(0 != connect(0, 0, 0))
|
||||||
|
return 1;
|
||||||
|
]])
|
||||||
|
],[
|
||||||
|
tst_connect_need_LIBS="$tst_lib"
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
LIBS="$tst_connect_save_LIBS"
|
||||||
|
#
|
||||||
|
case X-"$tst_connect_need_LIBS" in
|
||||||
|
X-unknown)
|
||||||
|
AC_MSG_RESULT([cannot find connect])
|
||||||
|
AC_MSG_ERROR([cannot find connect function in libraries.])
|
||||||
|
;;
|
||||||
|
X-)
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_MSG_RESULT([$tst_connect_need_LIBS])
|
||||||
|
LIBS="$tst_connect_need_LIBS $tst_connect_save_LIBS"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl CARES_DEFINE_UNQUOTED (VARIABLE, [VALUE])
|
dnl CARES_DEFINE_UNQUOTED (VARIABLE, [VALUE])
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
dnl Like AC_DEFINE_UNQUOTED this macro will define a C preprocessor
|
dnl Like AC_DEFINE_UNQUOTED this macro will define a C preprocessor
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
* CNAME = zz<CC>.countries.nerd.dk with address 127.0.x.y (ver 1) or
|
* CNAME = zz<CC>.countries.nerd.dk with address 127.0.x.y (ver 1) or
|
||||||
* CNAME = <a.b.c.d>.zz.countries.nerd.dk with address 127.0.x.y (ver 2)
|
* CNAME = <a.b.c.d>.zz.countries.nerd.dk with address 127.0.x.y (ver 2)
|
||||||
*
|
*
|
||||||
* The 2 letter country code in <CC> and the ISO-3166 country
|
* The 2 letter country code is in <CC> and the ISO-3166 country
|
||||||
* number in x.y (number = x*256 + y). Version 2 of the protocol is missing
|
* number is in x.y (number = x*256 + y). Version 2 of the protocol is missing
|
||||||
* the <CC> number.
|
* the <CC> number.
|
||||||
*
|
*
|
||||||
* Ref: http://countries.nerd.dk/more.html
|
* Ref: http://countries.nerd.dk/more.html
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -612,9 +612,14 @@ static void find_country_from_cname(const char *cname, struct in_addr addr)
|
|||||||
printf("Name for country-number %d not found.\n", cnumber);
|
printf("Name for country-number %d not found.\n", cnumber);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ver_1 && *(unsigned short*)&country->short_name != *(unsigned*)&ccode_A2)
|
if (ver_1)
|
||||||
printf("short-name mismatch; %s vs %s\n", country->short_name, ccode_A2);
|
{
|
||||||
|
if ((country->short_name[0] != ccode_A2[0]) ||
|
||||||
|
(country->short_name[1] != ccode_A2[1]) ||
|
||||||
|
(country->short_name[2] != ccode_A2[2]))
|
||||||
|
printf("short-name mismatch; %s vs %s\n",
|
||||||
|
country->short_name, ccode_A2);
|
||||||
|
}
|
||||||
printf("%s (%s), number %d.\n",
|
printf("%s (%s), number %d.\n",
|
||||||
country->long_name, country->short_name, cnumber);
|
country->long_name, country->short_name, cnumber);
|
||||||
}
|
}
|
||||||
|
|||||||
44
ares/adig.c
44
ares/adig.c
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
@@ -84,6 +84,11 @@
|
|||||||
#define T_SRV 33 /* server selection */
|
#define T_SRV 33 /* server selection */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* AIX portability check */
|
||||||
|
#ifndef T_NAPTR
|
||||||
|
#define T_NAPTR 35 /* naming authority pointer */
|
||||||
|
#endif
|
||||||
|
|
||||||
struct nv {
|
struct nv {
|
||||||
const char *name;
|
const char *name;
|
||||||
int value;
|
int value;
|
||||||
@@ -214,9 +219,10 @@ int main(int argc, char **argv)
|
|||||||
if (strcmp(flags[i].name, optarg) == 0)
|
if (strcmp(flags[i].name, optarg) == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (i == nflags)
|
if (i < nflags)
|
||||||
|
options.flags |= flags[i].value;
|
||||||
|
else
|
||||||
usage();
|
usage();
|
||||||
options.flags |= flags[i].value;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
@@ -251,9 +257,10 @@ int main(int argc, char **argv)
|
|||||||
if (strcasecmp(classes[i].name, optarg) == 0)
|
if (strcasecmp(classes[i].name, optarg) == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (i == nclasses)
|
if (i < nclasses)
|
||||||
|
dnsclass = classes[i].value;
|
||||||
|
else
|
||||||
usage();
|
usage();
|
||||||
dnsclass = classes[i].value;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 't':
|
case 't':
|
||||||
@@ -263,9 +270,10 @@ int main(int argc, char **argv)
|
|||||||
if (strcasecmp(types[i].name, optarg) == 0)
|
if (strcasecmp(types[i].name, optarg) == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (i == ntypes)
|
if (i < ntypes)
|
||||||
|
type = types[i].value;
|
||||||
|
else
|
||||||
usage();
|
usage();
|
||||||
type = types[i].value;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'T':
|
case 'T':
|
||||||
@@ -543,12 +551,20 @@ static const unsigned char *display_rr(const unsigned char *aptr,
|
|||||||
len = *p;
|
len = *p;
|
||||||
if (p + len + 1 > aptr + dlen)
|
if (p + len + 1 > aptr + dlen)
|
||||||
return NULL;
|
return NULL;
|
||||||
printf("\t%.*s", (int)len, p + 1);
|
status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len);
|
||||||
p += len + 1;
|
if (status != ARES_SUCCESS)
|
||||||
|
return NULL;
|
||||||
|
printf("\t%s", name.as_char);
|
||||||
|
ares_free_string(name.as_char);
|
||||||
|
p += len;
|
||||||
len = *p;
|
len = *p;
|
||||||
if (p + len + 1 > aptr + dlen)
|
if (p + len + 1 > aptr + dlen)
|
||||||
return NULL;
|
return NULL;
|
||||||
printf("\t%.*s", (int)len, p + 1);
|
status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len);
|
||||||
|
if (status != ARES_SUCCESS)
|
||||||
|
return NULL;
|
||||||
|
printf("\t%s", name.as_char);
|
||||||
|
ares_free_string(name.as_char);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_MINFO:
|
case T_MINFO:
|
||||||
@@ -615,8 +631,12 @@ static const unsigned char *display_rr(const unsigned char *aptr,
|
|||||||
len = *p;
|
len = *p;
|
||||||
if (p + len + 1 > aptr + dlen)
|
if (p + len + 1 > aptr + dlen)
|
||||||
return NULL;
|
return NULL;
|
||||||
printf("\t%.*s", (int)len, p + 1);
|
status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len);
|
||||||
p += len + 1;
|
if (status != ARES_SUCCESS)
|
||||||
|
return NULL;
|
||||||
|
printf("\t%s", name.as_char);
|
||||||
|
ares_free_string(name.as_char);
|
||||||
|
p += len;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#if !defined(WIN32) || defined(WATT32)
|
#if !defined(WIN32) || defined(WATT32)
|
||||||
#ifdef HAVE_SYS_TIME_H
|
#ifdef HAVE_SYS_TIME_H
|
||||||
|
|||||||
290
ares/ares.h
290
ares/ares.h
@@ -1,6 +1,6 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
/* Copyright 1998, 2009 by the Massachusetts Institute of Technology.
|
||||||
* Copyright (C) 2007-2009 by Daniel Stenberg
|
* Copyright (C) 2007-2009 by Daniel Stenberg
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this
|
* Permission to use, copy, modify, and distribute this
|
||||||
@@ -27,8 +27,9 @@
|
|||||||
* Define WIN32 when build target is Win32 API
|
* Define WIN32 when build target is Win32 API
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
|
#if (defined(_WIN32) || defined(__WIN32__)) && \
|
||||||
#define WIN32
|
!defined(WIN32) && !defined(__SYMBIAN32__)
|
||||||
|
# define WIN32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -45,9 +46,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WATT32)
|
#if defined(WATT32)
|
||||||
#include <netinet/in.h>
|
# include <netinet/in.h>
|
||||||
#include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
#include <tcp.h>
|
# include <tcp.h>
|
||||||
#elif defined(WIN32)
|
#elif defined(WIN32)
|
||||||
# ifndef WIN32_LEAN_AND_MEAN
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
# define WIN32_LEAN_AND_MEAN
|
# define WIN32_LEAN_AND_MEAN
|
||||||
@@ -56,14 +57,37 @@
|
|||||||
# include <winsock2.h>
|
# include <winsock2.h>
|
||||||
# include <ws2tcpip.h>
|
# include <ws2tcpip.h>
|
||||||
#else
|
#else
|
||||||
#include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
# include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
** c-ares external API function linkage decorations.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined(CARES_STATICLIB) && \
|
||||||
|
(defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__))
|
||||||
|
/* __declspec function decoration for Win32 and Symbian DLL's */
|
||||||
|
# if defined(CARES_BUILDING_LIBRARY)
|
||||||
|
# define CARES_EXTERN __declspec(dllexport)
|
||||||
|
# else
|
||||||
|
# define CARES_EXTERN __declspec(dllimport)
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
/* visibility function decoration for other cases */
|
||||||
|
# if !defined(CARES_SYMBOL_HIDING) || \
|
||||||
|
defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)
|
||||||
|
# define CARES_EXTERN
|
||||||
|
# else
|
||||||
|
# define CARES_EXTERN CARES_SYMBOL_SCOPE_EXTERN
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define ARES_SUCCESS 0
|
#define ARES_SUCCESS 0
|
||||||
|
|
||||||
/* Server error codes (ARES_ENODATA indicates no relevant answer) */
|
/* Server error codes (ARES_ENODATA indicates no relevant answer) */
|
||||||
@@ -94,10 +118,15 @@ extern "C" {
|
|||||||
#define ARES_ENONAME 19
|
#define ARES_ENONAME 19
|
||||||
#define ARES_EBADHINTS 20
|
#define ARES_EBADHINTS 20
|
||||||
|
|
||||||
|
/* Uninitialized library error code */
|
||||||
|
#define ARES_ENOTINITIALIZED 21 /* introduced in 1.6.1 */
|
||||||
|
|
||||||
/* ares_library_init error codes */
|
/* ares_library_init error codes */
|
||||||
#define ARES_ELOADIPHLPAPI 21
|
#define ARES_ELOADIPHLPAPI 22 /* introduced in 1.6.1 */
|
||||||
#define ARES_ELOADADVAPI32 22
|
#define ARES_EADDRGETNETWORKPARAMS 23 /* introduced in 1.6.1 */
|
||||||
#define ARES_EADDRGetNetworkParams 23
|
|
||||||
|
/* More error codes */
|
||||||
|
#define ARES_ECANCELLED 24 /* introduced in 1.6.1 */
|
||||||
|
|
||||||
/* Flag values */
|
/* Flag values */
|
||||||
#define ARES_FLAG_USEVC (1 << 0)
|
#define ARES_FLAG_USEVC (1 << 0)
|
||||||
@@ -236,62 +265,143 @@ struct hostent;
|
|||||||
struct timeval;
|
struct timeval;
|
||||||
struct sockaddr;
|
struct sockaddr;
|
||||||
struct ares_channeldata;
|
struct ares_channeldata;
|
||||||
|
|
||||||
typedef struct ares_channeldata *ares_channel;
|
typedef struct ares_channeldata *ares_channel;
|
||||||
typedef void (*ares_callback)(void *arg, int status, int timeouts,
|
|
||||||
unsigned char *abuf, int alen);
|
typedef void (*ares_callback)(void *arg,
|
||||||
typedef void (*ares_host_callback)(void *arg, int status, int timeouts,
|
int status,
|
||||||
|
int timeouts,
|
||||||
|
unsigned char *abuf,
|
||||||
|
int alen);
|
||||||
|
|
||||||
|
typedef void (*ares_host_callback)(void *arg,
|
||||||
|
int status,
|
||||||
|
int timeouts,
|
||||||
struct hostent *hostent);
|
struct hostent *hostent);
|
||||||
typedef void (*ares_nameinfo_callback)(void *arg, int status, int timeouts,
|
|
||||||
char *node, char *service);
|
typedef void (*ares_nameinfo_callback)(void *arg,
|
||||||
|
int status,
|
||||||
|
int timeouts,
|
||||||
|
char *node,
|
||||||
|
char *service);
|
||||||
|
|
||||||
typedef int (*ares_sock_create_callback)(ares_socket_t socket_fd,
|
typedef int (*ares_sock_create_callback)(ares_socket_t socket_fd,
|
||||||
int type, void *data);
|
int type,
|
||||||
|
void *data);
|
||||||
|
|
||||||
int ares_library_init(int flags);
|
CARES_EXTERN int ares_library_init(int flags);
|
||||||
void ares_library_cleanup(void);
|
|
||||||
const char *ares_version(int *version);
|
CARES_EXTERN void ares_library_cleanup(void);
|
||||||
|
|
||||||
|
CARES_EXTERN const char *ares_version(int *version);
|
||||||
|
|
||||||
|
CARES_EXTERN int ares_init(ares_channel *channelptr);
|
||||||
|
|
||||||
|
CARES_EXTERN int ares_init_options(ares_channel *channelptr,
|
||||||
|
struct ares_options *options,
|
||||||
|
int optmask);
|
||||||
|
|
||||||
|
CARES_EXTERN int ares_save_options(ares_channel channel,
|
||||||
|
struct ares_options *options,
|
||||||
|
int *optmask);
|
||||||
|
|
||||||
|
CARES_EXTERN void ares_destroy_options(struct ares_options *options);
|
||||||
|
|
||||||
|
CARES_EXTERN int ares_dup(ares_channel *dest,
|
||||||
|
ares_channel src);
|
||||||
|
|
||||||
|
CARES_EXTERN void ares_destroy(ares_channel channel);
|
||||||
|
|
||||||
|
CARES_EXTERN void ares_cancel(ares_channel channel);
|
||||||
|
|
||||||
int ares_init(ares_channel *channelptr);
|
|
||||||
int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
|
||||||
int optmask);
|
|
||||||
int ares_save_options(ares_channel channel, struct ares_options *options,
|
|
||||||
int *optmask);
|
|
||||||
void ares_destroy_options(struct ares_options *options);
|
|
||||||
int ares_dup(ares_channel *dest, ares_channel src);
|
|
||||||
void ares_destroy(ares_channel channel);
|
|
||||||
void ares_cancel(ares_channel channel);
|
|
||||||
void ares_set_socket_callback(ares_channel channel,
|
void ares_set_socket_callback(ares_channel channel,
|
||||||
ares_sock_create_callback callback,
|
ares_sock_create_callback callback,
|
||||||
void *user_data);
|
void *user_data);
|
||||||
void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
|
|
||||||
ares_callback callback, void *arg);
|
|
||||||
void ares_query(ares_channel channel, const char *name, int dnsclass,
|
|
||||||
int type, ares_callback callback, void *arg);
|
|
||||||
void ares_search(ares_channel channel, const char *name, int dnsclass,
|
|
||||||
int type, ares_callback callback, void *arg);
|
|
||||||
void ares_gethostbyname(ares_channel channel, const char *name, int family,
|
|
||||||
ares_host_callback callback, void *arg);
|
|
||||||
int ares_gethostbyname_file(ares_channel channel, const char *name,
|
|
||||||
int family, struct hostent **host);
|
|
||||||
void ares_gethostbyaddr(ares_channel channel, const void *addr, int addrlen,
|
|
||||||
int family, ares_host_callback callback, void *arg);
|
|
||||||
void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
|
|
||||||
ares_socklen_t salen, int flags,
|
|
||||||
ares_nameinfo_callback callback,
|
|
||||||
void *arg);
|
|
||||||
int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds);
|
|
||||||
int ares_getsock(ares_channel channel, int *socks, int numsocks);
|
|
||||||
struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
|
|
||||||
struct timeval *tv);
|
|
||||||
void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds);
|
|
||||||
void ares_process_fd(ares_channel channel, ares_socket_t read_fd,
|
|
||||||
ares_socket_t write_fd);
|
|
||||||
|
|
||||||
int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id,
|
CARES_EXTERN void ares_send(ares_channel channel,
|
||||||
int rd, unsigned char **buf, int *buflen);
|
const unsigned char *qbuf,
|
||||||
int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf,
|
int qlen,
|
||||||
int alen, char **s, long *enclen);
|
ares_callback callback,
|
||||||
int ares_expand_string(const unsigned char *encoded, const unsigned char *abuf,
|
void *arg);
|
||||||
int alen, unsigned char **s, long *enclen);
|
|
||||||
|
CARES_EXTERN void ares_query(ares_channel channel,
|
||||||
|
const char *name,
|
||||||
|
int dnsclass,
|
||||||
|
int type,
|
||||||
|
ares_callback callback,
|
||||||
|
void *arg);
|
||||||
|
|
||||||
|
CARES_EXTERN void ares_search(ares_channel channel,
|
||||||
|
const char *name,
|
||||||
|
int dnsclass,
|
||||||
|
int type,
|
||||||
|
ares_callback callback,
|
||||||
|
void *arg);
|
||||||
|
|
||||||
|
CARES_EXTERN void ares_gethostbyname(ares_channel channel,
|
||||||
|
const char *name,
|
||||||
|
int family,
|
||||||
|
ares_host_callback callback,
|
||||||
|
void *arg);
|
||||||
|
|
||||||
|
CARES_EXTERN int ares_gethostbyname_file(ares_channel channel,
|
||||||
|
const char *name,
|
||||||
|
int family,
|
||||||
|
struct hostent **host);
|
||||||
|
|
||||||
|
CARES_EXTERN void ares_gethostbyaddr(ares_channel channel,
|
||||||
|
const void *addr,
|
||||||
|
int addrlen,
|
||||||
|
int family,
|
||||||
|
ares_host_callback callback,
|
||||||
|
void *arg);
|
||||||
|
|
||||||
|
CARES_EXTERN void ares_getnameinfo(ares_channel channel,
|
||||||
|
const struct sockaddr *sa,
|
||||||
|
ares_socklen_t salen,
|
||||||
|
int flags,
|
||||||
|
ares_nameinfo_callback callback,
|
||||||
|
void *arg);
|
||||||
|
|
||||||
|
CARES_EXTERN int ares_fds(ares_channel channel,
|
||||||
|
fd_set *read_fds,
|
||||||
|
fd_set *write_fds);
|
||||||
|
|
||||||
|
CARES_EXTERN int ares_getsock(ares_channel channel,
|
||||||
|
int *socks,
|
||||||
|
int numsocks);
|
||||||
|
|
||||||
|
CARES_EXTERN struct timeval *ares_timeout(ares_channel channel,
|
||||||
|
struct timeval *maxtv,
|
||||||
|
struct timeval *tv);
|
||||||
|
|
||||||
|
CARES_EXTERN void ares_process(ares_channel channel,
|
||||||
|
fd_set *read_fds,
|
||||||
|
fd_set *write_fds);
|
||||||
|
|
||||||
|
CARES_EXTERN void ares_process_fd(ares_channel channel,
|
||||||
|
ares_socket_t read_fd,
|
||||||
|
ares_socket_t write_fd);
|
||||||
|
|
||||||
|
CARES_EXTERN int ares_mkquery(const char *name,
|
||||||
|
int dnsclass,
|
||||||
|
int type,
|
||||||
|
unsigned short id,
|
||||||
|
int rd,
|
||||||
|
unsigned char **buf,
|
||||||
|
int *buflen);
|
||||||
|
|
||||||
|
CARES_EXTERN int ares_expand_name(const unsigned char *encoded,
|
||||||
|
const unsigned char *abuf,
|
||||||
|
int alen,
|
||||||
|
char **s,
|
||||||
|
long *enclen);
|
||||||
|
|
||||||
|
CARES_EXTERN int ares_expand_string(const unsigned char *encoded,
|
||||||
|
const unsigned char *abuf,
|
||||||
|
int alen,
|
||||||
|
unsigned char **s,
|
||||||
|
long *enclen);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NOTE: before c-ares 1.6.1 we would most often use the system in6_addr
|
* NOTE: before c-ares 1.6.1 we would most often use the system in6_addr
|
||||||
@@ -319,6 +429,18 @@ struct addr6ttl {
|
|||||||
int ttl;
|
int ttl;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct ares_srv_reply {
|
||||||
|
unsigned short weight;
|
||||||
|
unsigned short priority;
|
||||||
|
unsigned short port;
|
||||||
|
char *host;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ares_txt_reply {
|
||||||
|
size_t length; /* length excludes null termination */
|
||||||
|
unsigned char *txt;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Parse the buffer, starting at *abuf and of length alen bytes, previously
|
** Parse the buffer, starting at *abuf and of length alen bytes, previously
|
||||||
** obtained from an ares_search call. Put the results in *host, if nonnull.
|
** obtained from an ares_search call. Put the results in *host, if nonnull.
|
||||||
@@ -326,19 +448,45 @@ struct addr6ttl {
|
|||||||
** their TTLs in that array, and set *naddrttls to the number of addresses
|
** their TTLs in that array, and set *naddrttls to the number of addresses
|
||||||
** so written.
|
** so written.
|
||||||
*/
|
*/
|
||||||
int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
|
||||||
struct hostent **host,
|
CARES_EXTERN int ares_parse_a_reply(const unsigned char *abuf,
|
||||||
struct addrttl *addrttls, int *naddrttls);
|
int alen,
|
||||||
int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
|
struct hostent **host,
|
||||||
struct hostent **host,
|
struct addrttl *addrttls,
|
||||||
struct addr6ttl *addrttls, int *naddrttls);
|
int *naddrttls);
|
||||||
int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
|
||||||
int addrlen, int family, struct hostent **host);
|
CARES_EXTERN int ares_parse_aaaa_reply(const unsigned char *abuf,
|
||||||
int ares_parse_ns_reply(const unsigned char *abuf, int alen,
|
int alen,
|
||||||
struct hostent **host);
|
struct hostent **host,
|
||||||
void ares_free_string(void *str);
|
struct addr6ttl *addrttls,
|
||||||
void ares_free_hostent(struct hostent *host);
|
int *naddrttls);
|
||||||
const char *ares_strerror(int code);
|
|
||||||
|
CARES_EXTERN int ares_parse_ptr_reply(const unsigned char *abuf,
|
||||||
|
int alen,
|
||||||
|
const void *addr,
|
||||||
|
int addrlen,
|
||||||
|
int family,
|
||||||
|
struct hostent **host);
|
||||||
|
|
||||||
|
CARES_EXTERN int ares_parse_ns_reply(const unsigned char *abuf,
|
||||||
|
int alen,
|
||||||
|
struct hostent **host);
|
||||||
|
|
||||||
|
CARES_EXTERN int ares_parse_srv_reply(const unsigned char* abuf,
|
||||||
|
int alen,
|
||||||
|
struct ares_srv_reply** srv_out,
|
||||||
|
int *nsrvreply);
|
||||||
|
|
||||||
|
CARES_EXTERN int ares_parse_txt_reply(const unsigned char* abuf,
|
||||||
|
int alen,
|
||||||
|
struct ares_txt_reply** txt_out,
|
||||||
|
int *nsrvreply);
|
||||||
|
|
||||||
|
CARES_EXTERN void ares_free_string(void *str);
|
||||||
|
|
||||||
|
CARES_EXTERN void ares_free_hostent(struct hostent *host);
|
||||||
|
|
||||||
|
CARES_EXTERN const char *ares_strerror(int code);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
@@ -54,14 +54,14 @@ void ares__close_sockets(ares_channel channel, struct server_state *server)
|
|||||||
if (server->tcp_socket != ARES_SOCKET_BAD)
|
if (server->tcp_socket != ARES_SOCKET_BAD)
|
||||||
{
|
{
|
||||||
SOCK_STATE_CALLBACK(channel, server->tcp_socket, 0, 0);
|
SOCK_STATE_CALLBACK(channel, server->tcp_socket, 0, 0);
|
||||||
closesocket(server->tcp_socket);
|
sclose(server->tcp_socket);
|
||||||
server->tcp_socket = ARES_SOCKET_BAD;
|
server->tcp_socket = ARES_SOCKET_BAD;
|
||||||
server->tcp_connection_generation = ++channel->tcp_connection_generation;
|
server->tcp_connection_generation = ++channel->tcp_connection_generation;
|
||||||
}
|
}
|
||||||
if (server->udp_socket != ARES_SOCKET_BAD)
|
if (server->udp_socket != ARES_SOCKET_BAD)
|
||||||
{
|
{
|
||||||
SOCK_STATE_CALLBACK(channel, server->udp_socket, 0, 0);
|
SOCK_STATE_CALLBACK(channel, server->udp_socket, 0, 0);
|
||||||
closesocket(server->udp_socket);
|
sclose(server->udp_socket);
|
||||||
server->udp_socket = ARES_SOCKET_BAD;
|
server->udp_socket = ARES_SOCKET_BAD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
/* Copyright 1998, 2009 by the Massachusetts Institute of Technology.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this
|
* Permission to use, copy, modify, and distribute this
|
||||||
* software and its documentation for any purpose and without
|
* software and its documentation for any purpose and without
|
||||||
@@ -15,27 +15,20 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#if !defined(WIN32) || defined(WATT32)
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
# include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_NETDB_H
|
#ifdef HAVE_NETDB_H
|
||||||
#include <netdb.h>
|
# include <netdb.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_ARPA_INET_H
|
#ifdef HAVE_ARPA_INET_H
|
||||||
#include <arpa/inet.h>
|
# include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
#include "ares.h"
|
#include "ares.h"
|
||||||
#include "inet_net_pton.h"
|
#include "inet_net_pton.h"
|
||||||
@@ -43,136 +36,204 @@
|
|||||||
|
|
||||||
int ares__get_hostent(FILE *fp, int family, struct hostent **host)
|
int ares__get_hostent(FILE *fp, int family, struct hostent **host)
|
||||||
{
|
{
|
||||||
char *line = NULL, *p, *q, *canonical, **alias;
|
char *line = NULL, *p, *q, **alias;
|
||||||
int status, linesize, end_at_hostname, naliases;
|
char *txtaddr, *txthost, *txtalias;
|
||||||
struct in_addr addr;
|
int status;
|
||||||
struct in6_addr addr6;
|
size_t addrlen, linesize, naliases;
|
||||||
size_t addrlen = sizeof(struct in_addr);
|
struct ares_addr addr;
|
||||||
struct hostent *hostent = NULL;
|
struct hostent *hostent = NULL;
|
||||||
|
|
||||||
|
*host = NULL; /* Assume failure */
|
||||||
|
|
||||||
|
/* Validate family */
|
||||||
|
switch (family) {
|
||||||
|
case AF_INET:
|
||||||
|
case AF_INET6:
|
||||||
|
case AF_UNSPEC:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return ARES_EBADFAMILY;
|
||||||
|
}
|
||||||
|
|
||||||
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
|
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
|
||||||
{
|
{
|
||||||
/* Skip comment lines; terminate line at comment character. */
|
|
||||||
if (*line == '#' || !*line)
|
|
||||||
continue;
|
|
||||||
p = strchr(line, '#');
|
|
||||||
if (p)
|
|
||||||
*p = 0;
|
|
||||||
|
|
||||||
/* Get the address part. */
|
/* Trim line comment. */
|
||||||
p = line;
|
p = line;
|
||||||
|
while (*p && (*p != '#'))
|
||||||
|
p++;
|
||||||
|
*p = '\0';
|
||||||
|
|
||||||
|
/* Trim trailing whitespace. */
|
||||||
|
q = p - 1;
|
||||||
|
while ((q >= line) && ISSPACE(*q))
|
||||||
|
q--;
|
||||||
|
*++q = '\0';
|
||||||
|
|
||||||
|
/* Skip leading whitespace. */
|
||||||
|
p = line;
|
||||||
|
while (*p && ISSPACE(*p))
|
||||||
|
p++;
|
||||||
|
if (!*p)
|
||||||
|
/* Ignore line if empty. */
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/* Pointer to start of IPv4 or IPv6 address part. */
|
||||||
|
txtaddr = p;
|
||||||
|
|
||||||
|
/* Advance past address part. */
|
||||||
while (*p && !ISSPACE(*p))
|
while (*p && !ISSPACE(*p))
|
||||||
p++;
|
p++;
|
||||||
if (!*p)
|
if (!*p)
|
||||||
continue;
|
/* Ignore line if reached end of line. */
|
||||||
*p = 0;
|
|
||||||
addr.s_addr = inet_addr(line);
|
|
||||||
if (addr.s_addr == INADDR_NONE)
|
|
||||||
{
|
|
||||||
/* It wasn't an AF_INET dotted address, then AF_UNSPEC and AF_INET6
|
|
||||||
families are subject for this further check */
|
|
||||||
if ((family != AF_INET) &&
|
|
||||||
(ares_inet_pton(AF_INET6, line, &addr6) > 0)) {
|
|
||||||
addrlen = sizeof(struct in6_addr);
|
|
||||||
family = AF_INET6;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (family == AF_UNSPEC)
|
|
||||||
family = AF_INET; /* now confirmed! */
|
|
||||||
else if (family != AF_INET)
|
|
||||||
/* unknown, keep moving */
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Get the canonical hostname. */
|
/* Null terminate address part. */
|
||||||
|
*p = '\0';
|
||||||
|
|
||||||
|
/* Advance to host name */
|
||||||
p++;
|
p++;
|
||||||
while (ISSPACE(*p))
|
while (*p && ISSPACE(*p))
|
||||||
p++;
|
p++;
|
||||||
if (!*p)
|
if (!*p)
|
||||||
|
/* Ignore line if reached end of line. */
|
||||||
continue;
|
continue;
|
||||||
q = p;
|
|
||||||
while (*q && !ISSPACE(*q))
|
|
||||||
q++;
|
|
||||||
end_at_hostname = (*q == 0);
|
|
||||||
*q = 0;
|
|
||||||
canonical = p;
|
|
||||||
|
|
||||||
naliases = 0;
|
/* Pointer to start of host name. */
|
||||||
if (!end_at_hostname)
|
txthost = p;
|
||||||
|
|
||||||
|
/* Advance past host name. */
|
||||||
|
while (*p && !ISSPACE(*p))
|
||||||
|
p++;
|
||||||
|
|
||||||
|
/* Pointer to start of first alias. */
|
||||||
|
txtalias = NULL;
|
||||||
|
if (*p)
|
||||||
{
|
{
|
||||||
/* Count the aliases. */
|
q = p + 1;
|
||||||
p = q + 1;
|
while (*q && ISSPACE(*q))
|
||||||
while (ISSPACE(*p))
|
q++;
|
||||||
p++;
|
if (*q)
|
||||||
|
txtalias = q;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Null terminate host name. */
|
||||||
|
*p = '\0';
|
||||||
|
|
||||||
|
/* find out number of aliases. */
|
||||||
|
naliases = 0;
|
||||||
|
if (txtalias)
|
||||||
|
{
|
||||||
|
p = txtalias;
|
||||||
while (*p)
|
while (*p)
|
||||||
{
|
{
|
||||||
while (*p && !ISSPACE(*p))
|
while (*p && !ISSPACE(*p))
|
||||||
p++;
|
p++;
|
||||||
while (ISSPACE(*p))
|
while (*p && ISSPACE(*p))
|
||||||
p++;
|
p++;
|
||||||
naliases++;
|
naliases++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate memory for the host structure. */
|
/* Convert address string to network address for the requested family. */
|
||||||
|
addrlen = 0;
|
||||||
|
addr.family = AF_UNSPEC;
|
||||||
|
addr.addrV4.s_addr = INADDR_NONE;
|
||||||
|
if ((family == AF_INET) || (family == AF_UNSPEC))
|
||||||
|
{
|
||||||
|
addr.addrV4.s_addr = inet_addr(txtaddr);
|
||||||
|
if (addr.addrV4.s_addr != INADDR_NONE)
|
||||||
|
{
|
||||||
|
/* Actual network address family and length. */
|
||||||
|
addr.family = AF_INET;
|
||||||
|
addrlen = sizeof(struct in_addr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((family == AF_INET6) || ((family == AF_UNSPEC) && (!addrlen)))
|
||||||
|
{
|
||||||
|
if (ares_inet_pton(AF_INET6, txtaddr, &addr.addrV6) > 0)
|
||||||
|
{
|
||||||
|
/* Actual network address family and length. */
|
||||||
|
addr.family = AF_INET6;
|
||||||
|
addrlen = sizeof(struct in6_addr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!addrlen)
|
||||||
|
/* Ignore line if invalid address string for the requested family. */
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Actual address family possible values are AF_INET and AF_INET6 only.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Allocate memory for the hostent structure. */
|
||||||
hostent = malloc(sizeof(struct hostent));
|
hostent = malloc(sizeof(struct hostent));
|
||||||
if (!hostent)
|
if (!hostent)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* Initialize fields for out of memory condition. */
|
||||||
hostent->h_aliases = NULL;
|
hostent->h_aliases = NULL;
|
||||||
hostent->h_addr_list = NULL;
|
hostent->h_addr_list = NULL;
|
||||||
hostent->h_name = strdup(canonical);
|
|
||||||
|
/* Copy official host name. */
|
||||||
|
hostent->h_name = strdup(txthost);
|
||||||
if (!hostent->h_name)
|
if (!hostent->h_name)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* Copy network address. */
|
||||||
hostent->h_addr_list = malloc(2 * sizeof(char *));
|
hostent->h_addr_list = malloc(2 * sizeof(char *));
|
||||||
if (!hostent->h_addr_list)
|
if (!hostent->h_addr_list)
|
||||||
break;
|
break;
|
||||||
|
hostent->h_addr_list[1] = NULL;
|
||||||
hostent->h_addr_list[0] = malloc(addrlen);
|
hostent->h_addr_list[0] = malloc(addrlen);
|
||||||
if (!hostent->h_addr_list[0])
|
if (!hostent->h_addr_list[0])
|
||||||
break;
|
break;
|
||||||
|
if (addr.family == AF_INET)
|
||||||
|
memcpy(hostent->h_addr_list[0], &addr.addrV4, sizeof(struct in_addr));
|
||||||
|
else
|
||||||
|
memcpy(hostent->h_addr_list[0], &addr.addrV6, sizeof(struct in6_addr));
|
||||||
|
|
||||||
|
/* Copy aliases. */
|
||||||
hostent->h_aliases = malloc((naliases + 1) * sizeof(char *));
|
hostent->h_aliases = malloc((naliases + 1) * sizeof(char *));
|
||||||
if (!hostent->h_aliases)
|
if (!hostent->h_aliases)
|
||||||
break;
|
break;
|
||||||
|
alias = hostent->h_aliases;
|
||||||
/* Copy in aliases. */
|
while (naliases)
|
||||||
naliases = 0;
|
*(alias + naliases--) = NULL;
|
||||||
if (!end_at_hostname)
|
*alias = NULL;
|
||||||
|
while (txtalias)
|
||||||
{
|
{
|
||||||
p = canonical + strlen(canonical) + 1;
|
p = txtalias;
|
||||||
while (ISSPACE(*p))
|
while (*p && !ISSPACE(*p))
|
||||||
p++;
|
p++;
|
||||||
while (*p)
|
q = p;
|
||||||
{
|
while (*q && ISSPACE(*q))
|
||||||
q = p;
|
q++;
|
||||||
while (*q && !ISSPACE(*q))
|
*p = '\0';
|
||||||
q++;
|
if ((*alias = strdup(txtalias)) == NULL)
|
||||||
hostent->h_aliases[naliases] = malloc(q - p + 1);
|
|
||||||
if (hostent->h_aliases[naliases] == NULL)
|
|
||||||
break;
|
|
||||||
memcpy(hostent->h_aliases[naliases], p, q - p);
|
|
||||||
hostent->h_aliases[naliases][q - p] = 0;
|
|
||||||
p = q;
|
|
||||||
while (ISSPACE(*p))
|
|
||||||
p++;
|
|
||||||
naliases++;
|
|
||||||
}
|
|
||||||
if (*p)
|
|
||||||
break;
|
break;
|
||||||
|
alias++;
|
||||||
|
txtalias = *q ? q : NULL;
|
||||||
}
|
}
|
||||||
hostent->h_aliases[naliases] = NULL;
|
if (txtalias)
|
||||||
|
/* Alias memory allocation failure. */
|
||||||
|
break;
|
||||||
|
|
||||||
hostent->h_addrtype = family;
|
/* Copy actual network address family and length. */
|
||||||
|
hostent->h_addrtype = addr.family;
|
||||||
hostent->h_length = (int)addrlen;
|
hostent->h_length = (int)addrlen;
|
||||||
if (family == AF_INET)
|
|
||||||
memcpy(hostent->h_addr_list[0], &addr, addrlen);
|
/* Free line buffer. */
|
||||||
else if (family == AF_INET6)
|
|
||||||
memcpy(hostent->h_addr_list[0], &addr6, addrlen);
|
|
||||||
hostent->h_addr_list[1] = NULL;
|
|
||||||
*host = hostent;
|
|
||||||
free(line);
|
free(line);
|
||||||
|
|
||||||
|
/* Return hostent successfully */
|
||||||
|
*host = hostent;
|
||||||
return ARES_SUCCESS;
|
return ARES_SUCCESS;
|
||||||
|
|
||||||
}
|
}
|
||||||
if(line)
|
|
||||||
|
/* If allocated, free line buffer. */
|
||||||
|
if (line)
|
||||||
free(line);
|
free(line);
|
||||||
|
|
||||||
if (status == ARES_SUCCESS)
|
if (status == ARES_SUCCESS)
|
||||||
@@ -180,22 +241,22 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
|
|||||||
/* Memory allocation failure; clean up. */
|
/* Memory allocation failure; clean up. */
|
||||||
if (hostent)
|
if (hostent)
|
||||||
{
|
{
|
||||||
if(hostent->h_name)
|
if (hostent->h_name)
|
||||||
free((char *) hostent->h_name);
|
free((char *) hostent->h_name);
|
||||||
if (hostent->h_aliases)
|
if (hostent->h_aliases)
|
||||||
{
|
{
|
||||||
for (alias = hostent->h_aliases; *alias; alias++)
|
for (alias = hostent->h_aliases; *alias; alias++)
|
||||||
free(*alias);
|
free(*alias);
|
||||||
|
free(hostent->h_aliases);
|
||||||
|
}
|
||||||
|
if (hostent->h_addr_list)
|
||||||
|
{
|
||||||
|
if (hostent->h_addr_list[0])
|
||||||
|
free(hostent->h_addr_list[0]);
|
||||||
|
free(hostent->h_addr_list);
|
||||||
}
|
}
|
||||||
if(hostent->h_aliases)
|
|
||||||
free(hostent->h_aliases);
|
|
||||||
if (hostent->h_addr_list && hostent->h_addr_list[0])
|
|
||||||
free(hostent->h_addr_list[0]);
|
|
||||||
if(hostent->h_addr_list)
|
|
||||||
free(hostent->h_addr_list);
|
|
||||||
free(hostent);
|
free(hostent);
|
||||||
}
|
}
|
||||||
*host = NULL;
|
|
||||||
return ARES_ENOMEM;
|
return ARES_ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
* appropriate. The initial value of *buf should be NULL. After the
|
* appropriate. The initial value of *buf should be NULL. After the
|
||||||
* calling routine is done reading lines, it should free *buf.
|
* calling routine is done reading lines, it should free *buf.
|
||||||
*/
|
*/
|
||||||
int ares__read_line(FILE *fp, char **buf, int *bufsize)
|
int ares__read_line(FILE *fp, char **buf, size_t *bufsize)
|
||||||
{
|
{
|
||||||
char *newbuf;
|
char *newbuf;
|
||||||
size_t offset = 0;
|
size_t offset = 0;
|
||||||
@@ -46,7 +46,7 @@ int ares__read_line(FILE *fp, char **buf, int *bufsize)
|
|||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
if (!fgets(*buf + offset, *bufsize - (int)offset, fp))
|
if (!fgets(*buf + offset, (int)(*bufsize - offset), fp))
|
||||||
return (offset != 0) ? 0 : (ferror(fp)) ? ARES_EFILE : ARES_EOF;
|
return (offset != 0) ? 0 : (ferror(fp)) ? ARES_EFILE : ARES_EOF;
|
||||||
len = offset + strlen(*buf + offset);
|
len = offset + strlen(*buf + offset);
|
||||||
if ((*buf)[len - 1] == '\n')
|
if ((*buf)[len - 1] == '\n')
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
#include "ares.h"
|
#include "ares.h"
|
||||||
#include "ares_private.h"
|
#include "ares_private.h"
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ ares_cancel \- Cancel a resolve
|
|||||||
The \fBares_cancel\fP function cancels all lookups/requests made on the the
|
The \fBares_cancel\fP function cancels all lookups/requests made on the the
|
||||||
name service channel identified by \fIchannel\fP. \fBares_cancel\fP invokes
|
name service channel identified by \fIchannel\fP. \fBares_cancel\fP invokes
|
||||||
the callbacks for each pending query on the channel, passing a status of
|
the callbacks for each pending query on the channel, passing a status of
|
||||||
.BR ARES_ETIMEOUT .
|
.BR ARES_ECANCELLED .
|
||||||
These calls give the callbacks a chance to clean up any state which
|
These calls give the callbacks a chance to clean up any state which
|
||||||
might have been stored in their arguments.
|
might have been stored in their arguments.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
@@ -35,5 +35,10 @@ might have been stored in their arguments.
|
|||||||
.BR ares_destroy (3)
|
.BR ares_destroy (3)
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
This function was added in c-ares 1.2.0
|
This function was added in c-ares 1.2.0
|
||||||
|
|
||||||
|
c-ares 1.6.0 and earlier pass a status of
|
||||||
|
.BR ARES_ETIMEOUT
|
||||||
|
instead of
|
||||||
|
.BR ARES_ECANCELLED .
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Dirk Manske
|
Dirk Manske
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "ares.h"
|
#include "ares.h"
|
||||||
@@ -36,7 +36,7 @@ void ares_cancel(ares_channel channel)
|
|||||||
{
|
{
|
||||||
query = list_node->data;
|
query = list_node->data;
|
||||||
list_node = list_node->next; /* since we're deleting the query */
|
list_node = list_node->next; /* since we're deleting the query */
|
||||||
query->callback(query->arg, ARES_ETIMEOUT, 0, NULL, 0);
|
query->callback(query->arg, ARES_ECANCELLED, 0, NULL, 0);
|
||||||
ares__free_query(query);
|
ares__free_query(query);
|
||||||
}
|
}
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "ares.h"
|
#include "ares.h"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.\" $Id$
|
.\" $Id$
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (C) 2007-2008 by Daniel Stenberg
|
.\" Copyright (C) 2004-2009 by Daniel Stenberg
|
||||||
.\"
|
.\"
|
||||||
.\" Permission to use, copy, modify, and distribute this
|
.\" Permission to use, copy, modify, and distribute this
|
||||||
.\" software and its documentation for any purpose and without
|
.\" software and its documentation for any purpose and without
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
.\" this software for any purpose. It is provided "as is"
|
.\" this software for any purpose. It is provided "as is"
|
||||||
.\" without express or implied warranty.
|
.\" without express or implied warranty.
|
||||||
.\"
|
.\"
|
||||||
.TH ARES_DUP 3 "2 Dec 2008"
|
.TH ARES_DUP 3 "26 May 2009"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
ares_dup \- Duplicate a resolver channel
|
ares_dup \- Duplicate a resolver channel
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -35,7 +35,8 @@ with additional options set exactly as the \fIsource\fP channel has them
|
|||||||
configured.
|
configured.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR ares_destroy(3),
|
.BR ares_destroy(3),
|
||||||
.BR ares_init(3)
|
.BR ares_init(3),
|
||||||
|
.BR ares_library_init(3)
|
||||||
.SH AVAILABILITY
|
.SH AVAILABILITY
|
||||||
ares_dup(3) was added in c-ares 1.6.0
|
ares_dup(3) was added in c-ares 1.6.0
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
@@ -71,10 +71,10 @@ int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf,
|
|||||||
const unsigned char *p;
|
const unsigned char *p;
|
||||||
|
|
||||||
len = name_length(encoded, abuf, alen);
|
len = name_length(encoded, abuf, alen);
|
||||||
if (len == -1)
|
if (len < 0)
|
||||||
return ARES_EBADNAME;
|
return ARES_EBADNAME;
|
||||||
|
|
||||||
*s = malloc(len + 1);
|
*s = malloc(((size_t)len) + 1);
|
||||||
if (!*s)
|
if (!*s)
|
||||||
return ARES_ENOMEM;
|
return ARES_ENOMEM;
|
||||||
q = *s;
|
q = *s;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_TIME_H
|
#ifdef HAVE_SYS_TIME_H
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#if !defined(WIN32) || defined(WATT32)
|
#if !defined(WIN32) || defined(WATT32)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "ares.h"
|
#include "ares.h"
|
||||||
#include "ares_private.h"
|
#include "ares_private.h"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* this software for any purpose. It is provided "as is"
|
* this software for any purpose. It is provided "as is"
|
||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
@@ -245,15 +245,16 @@ static int fake_hostent(const char *name, int family, ares_host_callback callbac
|
|||||||
struct in_addr in;
|
struct in_addr in;
|
||||||
struct in6_addr in6;
|
struct in6_addr in6;
|
||||||
|
|
||||||
if (family == AF_INET)
|
if (family == AF_INET || family == AF_INET6)
|
||||||
{
|
{
|
||||||
/* It only looks like an IP address if it's all numbers and dots. */
|
/* It only looks like an IP address if it's all numbers and dots. */
|
||||||
int numdots = 0;
|
int numdots = 0, valid = 1;
|
||||||
const char *p;
|
const char *p;
|
||||||
for (p = name; *p; p++)
|
for (p = name; *p; p++)
|
||||||
{
|
{
|
||||||
if (!ISDIGIT(*p) && *p != '.') {
|
if (!ISDIGIT(*p) && *p != '.') {
|
||||||
return 0;
|
valid = 0;
|
||||||
|
break;
|
||||||
} else if (*p == '.') {
|
} else if (*p == '.') {
|
||||||
numdots++;
|
numdots++;
|
||||||
}
|
}
|
||||||
@@ -262,12 +263,15 @@ static int fake_hostent(const char *name, int family, ares_host_callback callbac
|
|||||||
/* if we don't have 3 dots, it is illegal
|
/* if we don't have 3 dots, it is illegal
|
||||||
* (although inet_addr doesn't think so).
|
* (although inet_addr doesn't think so).
|
||||||
*/
|
*/
|
||||||
if (numdots != 3)
|
if (numdots != 3 || !valid)
|
||||||
result = 0;
|
result = 0;
|
||||||
else
|
else
|
||||||
result = ((in.s_addr = inet_addr(name)) == INADDR_NONE ? 0 : 1);
|
result = ((in.s_addr = inet_addr(name)) == INADDR_NONE ? 0 : 1);
|
||||||
|
|
||||||
|
if (result)
|
||||||
|
family = AF_INET;
|
||||||
}
|
}
|
||||||
else if (family == AF_INET6)
|
if (family == AF_INET6)
|
||||||
result = (ares_inet_pton(AF_INET6, name, &in6) < 1 ? 0 : 1);
|
result = (ares_inet_pton(AF_INET6, name, &in6) < 1 ? 0 : 1);
|
||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* this software for any purpose. It is provided "as is"
|
* this software for any purpose. It is provided "as is"
|
||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_GETSERVBYPORT_R
|
#ifdef HAVE_GETSERVBYPORT_R
|
||||||
# if !defined(GETSERVBYPORT_R_ARGS) || \
|
# if !defined(GETSERVBYPORT_R_ARGS) || \
|
||||||
@@ -99,12 +99,19 @@ void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
|
|||||||
struct sockaddr_in *addr = NULL;
|
struct sockaddr_in *addr = NULL;
|
||||||
struct sockaddr_in6 *addr6 = NULL;
|
struct sockaddr_in6 *addr6 = NULL;
|
||||||
struct nameinfo_query *niquery;
|
struct nameinfo_query *niquery;
|
||||||
|
unsigned int port = 0;
|
||||||
|
|
||||||
/* Verify the buffer size */
|
/* Verify the buffer size */
|
||||||
if (salen == sizeof(struct sockaddr_in))
|
if (salen == sizeof(struct sockaddr_in))
|
||||||
addr = (struct sockaddr_in *)sa;
|
{
|
||||||
|
addr = (struct sockaddr_in *)sa;
|
||||||
|
port = addr->sin_port;
|
||||||
|
}
|
||||||
else if (salen == sizeof(struct sockaddr_in6))
|
else if (salen == sizeof(struct sockaddr_in6))
|
||||||
addr6 = (struct sockaddr_in6 *)sa;
|
{
|
||||||
|
addr6 = (struct sockaddr_in6 *)sa;
|
||||||
|
port = addr6->sin6_port;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
callback(arg, ARES_ENOTIMP, 0, NULL, NULL);
|
callback(arg, ARES_ENOTIMP, 0, NULL, NULL);
|
||||||
@@ -119,12 +126,7 @@ void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
|
|||||||
if ((flags & ARES_NI_LOOKUPSERVICE) && !(flags & ARES_NI_LOOKUPHOST))
|
if ((flags & ARES_NI_LOOKUPSERVICE) && !(flags & ARES_NI_LOOKUPHOST))
|
||||||
{
|
{
|
||||||
char buf[33], *service;
|
char buf[33], *service;
|
||||||
unsigned int port = 0;
|
|
||||||
|
|
||||||
if (salen == sizeof(struct sockaddr_in))
|
|
||||||
port = addr->sin_port;
|
|
||||||
else
|
|
||||||
port = addr6->sin6_port;
|
|
||||||
service = lookup_service((unsigned short)(port & 0xffff),
|
service = lookup_service((unsigned short)(port & 0xffff),
|
||||||
flags, buf, sizeof(buf));
|
flags, buf, sizeof(buf));
|
||||||
callback(arg, ARES_SUCCESS, 0, NULL, service);
|
callback(arg, ARES_SUCCESS, 0, NULL, service);
|
||||||
@@ -137,7 +139,6 @@ void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
|
|||||||
/* A numeric host can be handled without DNS */
|
/* A numeric host can be handled without DNS */
|
||||||
if ((flags & ARES_NI_NUMERICHOST))
|
if ((flags & ARES_NI_NUMERICHOST))
|
||||||
{
|
{
|
||||||
unsigned int port = 0;
|
|
||||||
char ipbuf[IPBUFSIZ];
|
char ipbuf[IPBUFSIZ];
|
||||||
char srvbuf[33];
|
char srvbuf[33];
|
||||||
char *service = NULL;
|
char *service = NULL;
|
||||||
@@ -154,7 +155,6 @@ void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
|
|||||||
if (salen == sizeof(struct sockaddr_in6))
|
if (salen == sizeof(struct sockaddr_in6))
|
||||||
{
|
{
|
||||||
ares_inet_ntop(AF_INET6, &addr6->sin6_addr, ipbuf, IPBUFSIZ);
|
ares_inet_ntop(AF_INET6, &addr6->sin6_addr, ipbuf, IPBUFSIZ);
|
||||||
port = addr6->sin6_port;
|
|
||||||
/* If the system supports scope IDs, use it */
|
/* If the system supports scope IDs, use it */
|
||||||
#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
|
#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
|
||||||
append_scopeid(addr6, flags, ipbuf, sizeof(ipbuf));
|
append_scopeid(addr6, flags, ipbuf, sizeof(ipbuf));
|
||||||
@@ -163,7 +163,6 @@ void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
ares_inet_ntop(AF_INET, &addr->sin_addr, ipbuf, IPBUFSIZ);
|
ares_inet_ntop(AF_INET, &addr->sin_addr, ipbuf, IPBUFSIZ);
|
||||||
port = addr->sin_port;
|
|
||||||
}
|
}
|
||||||
/* They also want a service */
|
/* They also want a service */
|
||||||
if (flags & ARES_NI_LOOKUPSERVICE)
|
if (flags & ARES_NI_LOOKUPSERVICE)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_TIME_H
|
#ifdef HAVE_SYS_TIME_H
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.\" $Id$
|
.\" $Id$
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
.\" Copyright (C) 2007-2008 by Daniel Stenberg
|
.\" Copyright (C) 2004-2009 by Daniel Stenberg
|
||||||
.\"
|
.\"
|
||||||
.\" Permission to use, copy, modify, and distribute this
|
.\" Permission to use, copy, modify, and distribute this
|
||||||
.\" software and its documentation for any purpose and without
|
.\" software and its documentation for any purpose and without
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
.\" this software for any purpose. It is provided "as is"
|
.\" this software for any purpose. It is provided "as is"
|
||||||
.\" without express or implied warranty.
|
.\" without express or implied warranty.
|
||||||
.\"
|
.\"
|
||||||
.TH ARES_INIT 3 "13 May 2008"
|
.TH ARES_INIT 3 "26 May 2009"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
ares_init, ares_init_options \- Initialize a resolver channel
|
ares_init, ares_init_options \- Initialize a resolver channel
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -184,10 +184,16 @@ A configuration file could not be read.
|
|||||||
.TP 14
|
.TP 14
|
||||||
.B ARES_ENOMEM
|
.B ARES_ENOMEM
|
||||||
The process's available memory was exhausted.
|
The process's available memory was exhausted.
|
||||||
|
.TP 14
|
||||||
|
.B ARES_ENOTINITIALIZED
|
||||||
|
c-ares library initialization not yet performed.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR ares_destroy(3),
|
.BR ares_destroy(3),
|
||||||
.BR ares_dup(3)
|
.BR ares_dup(3),
|
||||||
|
.BR ares_library_init(3)
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
Greg Hudson, MIT Information Systems
|
Greg Hudson, MIT Information Systems
|
||||||
.br
|
.br
|
||||||
Copyright 1998 by the Massachusetts Institute of Technology.
|
Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
.br
|
||||||
|
Copyright (C) 2004-2009 by Daniel Stenberg.
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(WATT32)
|
#if defined(WIN32) && !defined(WATT32)
|
||||||
#include <iphlpapi.h>
|
#include <iphlpapi.h>
|
||||||
@@ -80,14 +80,16 @@ static int init_by_environment(ares_channel channel);
|
|||||||
static int init_by_resolv_conf(ares_channel channel);
|
static int init_by_resolv_conf(ares_channel channel);
|
||||||
static int init_by_defaults(ares_channel channel);
|
static int init_by_defaults(ares_channel channel);
|
||||||
|
|
||||||
|
#ifndef WATT32
|
||||||
static int config_nameserver(struct server_state **servers, int *nservers,
|
static int config_nameserver(struct server_state **servers, int *nservers,
|
||||||
char *str);
|
char *str);
|
||||||
|
#endif
|
||||||
static int set_search(ares_channel channel, const char *str);
|
static int set_search(ares_channel channel, const char *str);
|
||||||
static int set_options(ares_channel channel, const char *str);
|
static int set_options(ares_channel channel, const char *str);
|
||||||
static const char *try_option(const char *p, const char *q, const char *opt);
|
static const char *try_option(const char *p, const char *q, const char *opt);
|
||||||
static int init_id_key(rc4_key* key,int key_data_len);
|
static int init_id_key(rc4_key* key,int key_data_len);
|
||||||
|
|
||||||
#ifndef WIN32
|
#if !defined(WIN32) && !defined(WATT32)
|
||||||
static int sortlist_alloc(struct apattern **sortlist, int *nsort, struct apattern *pat);
|
static int sortlist_alloc(struct apattern **sortlist, int *nsort, struct apattern *pat);
|
||||||
static int ip_addr(const char *s, int len, struct in_addr *addr);
|
static int ip_addr(const char *s, int len, struct in_addr *addr);
|
||||||
static void natural_mask(struct apattern *pat);
|
static void natural_mask(struct apattern *pat);
|
||||||
@@ -129,6 +131,9 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
|||||||
curl_memlimit(atoi(env));
|
curl_memlimit(atoi(env));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (ares_library_initialized() != ARES_SUCCESS)
|
||||||
|
return ARES_ENOTINITIALIZED;
|
||||||
|
|
||||||
channel = malloc(sizeof(struct ares_channeldata));
|
channel = malloc(sizeof(struct ares_channeldata));
|
||||||
if (!channel) {
|
if (!channel) {
|
||||||
*channelptr = NULL;
|
*channelptr = NULL;
|
||||||
@@ -198,12 +203,15 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
|||||||
DEBUGF(fprintf(stderr, "Error: init_by_resolv_conf failed: %s\n",
|
DEBUGF(fprintf(stderr, "Error: init_by_resolv_conf failed: %s\n",
|
||||||
ares_strerror(status)));
|
ares_strerror(status)));
|
||||||
}
|
}
|
||||||
if (status == ARES_SUCCESS) {
|
|
||||||
status = init_by_defaults(channel);
|
/*
|
||||||
if (status != ARES_SUCCESS)
|
* No matter what failed or succeeded, seed defaults to provide
|
||||||
DEBUGF(fprintf(stderr, "Error: init_by_defaults failed: %s\n",
|
* useful behavior for things that we missed.
|
||||||
ares_strerror(status)));
|
*/
|
||||||
}
|
status = init_by_defaults(channel);
|
||||||
|
if (status != ARES_SUCCESS)
|
||||||
|
DEBUGF(fprintf(stderr, "Error: init_by_defaults failed: %s\n",
|
||||||
|
ares_strerror(status)));
|
||||||
|
|
||||||
/* Generate random key */
|
/* Generate random key */
|
||||||
|
|
||||||
@@ -629,7 +637,9 @@ quit:
|
|||||||
|
|
||||||
static int init_by_resolv_conf(ares_channel channel)
|
static int init_by_resolv_conf(ares_channel channel)
|
||||||
{
|
{
|
||||||
|
#ifndef WATT32
|
||||||
char *line = NULL;
|
char *line = NULL;
|
||||||
|
#endif
|
||||||
int status = -1, nservers = 0, nsort = 0;
|
int status = -1, nservers = 0, nsort = 0;
|
||||||
struct server_state *servers = NULL;
|
struct server_state *servers = NULL;
|
||||||
struct apattern *sortlist = NULL;
|
struct apattern *sortlist = NULL;
|
||||||
@@ -799,7 +809,7 @@ DhcpNameServer
|
|||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
int linesize;
|
size_t linesize;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
/* Don't read resolv.conf and friends if we don't have to */
|
/* Don't read resolv.conf and friends if we don't have to */
|
||||||
@@ -965,6 +975,9 @@ static int init_by_defaults(ares_channel channel)
|
|||||||
{
|
{
|
||||||
char *hostname = NULL;
|
char *hostname = NULL;
|
||||||
int rc = ARES_SUCCESS;
|
int rc = ARES_SUCCESS;
|
||||||
|
#ifdef HAVE_GETHOSTNAME
|
||||||
|
char *dot;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (channel->flags == -1)
|
if (channel->flags == -1)
|
||||||
channel->flags = 0;
|
channel->flags = 0;
|
||||||
@@ -1034,15 +1047,15 @@ static int init_by_defaults(ares_channel channel)
|
|||||||
|
|
||||||
} while(0);
|
} while(0);
|
||||||
|
|
||||||
if (strchr(hostname, '.')) {
|
dot = strchr(hostname, '.');
|
||||||
|
if (dot) {
|
||||||
/* a dot was found */
|
/* a dot was found */
|
||||||
|
|
||||||
channel->domains = malloc(sizeof(char *));
|
channel->domains = malloc(sizeof(char *));
|
||||||
if (!channel->domains) {
|
if (!channel->domains) {
|
||||||
rc = ARES_ENOMEM;
|
rc = ARES_ENOMEM;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
channel->domains[0] = strdup(strchr(hostname, '.') + 1);
|
channel->domains[0] = strdup(dot + 1);
|
||||||
if (!channel->domains[0]) {
|
if (!channel->domains[0]) {
|
||||||
rc = ARES_ENOMEM;
|
rc = ARES_ENOMEM;
|
||||||
goto error;
|
goto error;
|
||||||
@@ -1082,7 +1095,7 @@ static int init_by_defaults(ares_channel channel)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WIN32
|
#if !defined(WIN32) && !defined(WATT32)
|
||||||
static int config_domain(ares_channel channel, char *str)
|
static int config_domain(ares_channel channel, char *str)
|
||||||
{
|
{
|
||||||
char *q;
|
char *q;
|
||||||
@@ -1122,9 +1135,9 @@ static int config_lookup(ares_channel channel, const char *str,
|
|||||||
channel->lookups = strdup(lookups);
|
channel->lookups = strdup(lookups);
|
||||||
return (channel->lookups) ? ARES_SUCCESS : ARES_ENOMEM;
|
return (channel->lookups) ? ARES_SUCCESS : ARES_ENOMEM;
|
||||||
}
|
}
|
||||||
|
#endif /* !WIN32 & !WATT32 */
|
||||||
|
|
||||||
#endif
|
#ifndef WATT32
|
||||||
|
|
||||||
static int config_nameserver(struct server_state **servers, int *nservers,
|
static int config_nameserver(struct server_state **servers, int *nservers,
|
||||||
char *str)
|
char *str)
|
||||||
{
|
{
|
||||||
@@ -1267,7 +1280,8 @@ static int config_sortlist(struct apattern **sortlist, int *nsort,
|
|||||||
|
|
||||||
return ARES_SUCCESS;
|
return ARES_SUCCESS;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* !WIN32 */
|
||||||
|
#endif /* !WATT32 */
|
||||||
|
|
||||||
static int set_search(ares_channel channel, const char *str)
|
static int set_search(ares_channel channel, const char *str)
|
||||||
{
|
{
|
||||||
@@ -1359,29 +1373,39 @@ static int set_options(ares_channel channel, const char *str)
|
|||||||
return ARES_SUCCESS;
|
return ARES_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WIN32
|
static const char *try_option(const char *p, const char *q, const char *opt)
|
||||||
|
{
|
||||||
|
size_t len = strlen(opt);
|
||||||
|
return ((size_t)(q - p) >= len && !strncmp(p, opt, len)) ? &p[len] : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !defined(WIN32) && !defined(WATT32)
|
||||||
static char *try_config(char *s, const char *opt)
|
static char *try_config(char *s, const char *opt)
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
ssize_t i;
|
|
||||||
ssize_t j;
|
|
||||||
char *p;
|
char *p;
|
||||||
|
char *q;
|
||||||
|
|
||||||
if (!s || !opt)
|
if (!s || !opt)
|
||||||
/* no line or no option */
|
/* no line or no option */
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* trim line comment */
|
/* trim line comment */
|
||||||
for (i = 0; s[i] && s[i] != '#'; ++i);
|
p = s;
|
||||||
s[i] = '\0';
|
while (*p && (*p != '#'))
|
||||||
|
p++;
|
||||||
|
*p = '\0';
|
||||||
|
|
||||||
/* trim trailing whitespace */
|
/* trim trailing whitespace */
|
||||||
for (j = i-1; j >= 0 && ISSPACE(s[j]); --j);
|
q = p - 1;
|
||||||
s[++j] = '\0';
|
while ((q >= s) && ISSPACE(*q))
|
||||||
|
q--;
|
||||||
|
*++q = '\0';
|
||||||
|
|
||||||
/* skip leading whitespace */
|
/* skip leading whitespace */
|
||||||
for (i = 0; s[i] && ISSPACE(s[i]); ++i);
|
p = s;
|
||||||
p = &s[i];
|
while (*p && ISSPACE(*p))
|
||||||
|
p++;
|
||||||
|
|
||||||
if (!*p)
|
if (!*p)
|
||||||
/* empty line */
|
/* empty line */
|
||||||
@@ -1418,15 +1442,7 @@ static char *try_config(char *s, const char *opt)
|
|||||||
/* return pointer to option value */
|
/* return pointer to option value */
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static const char *try_option(const char *p, const char *q, const char *opt)
|
|
||||||
{
|
|
||||||
size_t len = strlen(opt);
|
|
||||||
return ((size_t)(q - p) >= len && !strncmp(p, opt, len)) ? &p[len] : NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef WIN32
|
|
||||||
static int sortlist_alloc(struct apattern **sortlist, int *nsort,
|
static int sortlist_alloc(struct apattern **sortlist, int *nsort,
|
||||||
struct apattern *pat)
|
struct apattern *pat)
|
||||||
{
|
{
|
||||||
@@ -1472,7 +1488,8 @@ static void natural_mask(struct apattern *pat)
|
|||||||
else
|
else
|
||||||
pat->mask.addr4.s_addr = htonl(IN_CLASSC_NET);
|
pat->mask.addr4.s_addr = htonl(IN_CLASSC_NET);
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* !WIN32 && !WATT32 */
|
||||||
|
|
||||||
/* initialize an rc4 key. If possible a cryptographically secure random key
|
/* initialize an rc4 key. If possible a cryptographically secure random key
|
||||||
is generated using a suitable function (for example win32's RtlGenRandom as
|
is generated using a suitable function (for example win32's RtlGenRandom as
|
||||||
described in
|
described in
|
||||||
|
|||||||
74
ares/ares_library_cleanup.3
Normal file
74
ares/ares_library_cleanup.3
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
.\" $Id$
|
||||||
|
.\"
|
||||||
|
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
.\" Copyright (C) 2004-2009 by Daniel Stenberg
|
||||||
|
.\"
|
||||||
|
.\" Permission to use, copy, modify, and distribute this
|
||||||
|
.\" software and its documentation for any purpose and without
|
||||||
|
.\" fee is hereby granted, provided that the above copyright
|
||||||
|
.\" notice appear in all copies and that both that copyright
|
||||||
|
.\" notice and this permission notice appear in supporting
|
||||||
|
.\" documentation, and that the name of M.I.T. not be used in
|
||||||
|
.\" advertising or publicity pertaining to distribution of the
|
||||||
|
.\" software without specific, written prior permission.
|
||||||
|
.\" M.I.T. makes no representations about the suitability of
|
||||||
|
.\" this software for any purpose. It is provided "as is"
|
||||||
|
.\" without express or implied warranty.
|
||||||
|
.\"
|
||||||
|
.TH ARES_LIBRARY_CLEANUP 3 "19 May 2009"
|
||||||
|
.SH NAME
|
||||||
|
ares_library_cleanup \- c-ares library deinitialization
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.nf
|
||||||
|
.B #include <ares.h>
|
||||||
|
.PP
|
||||||
|
.B void ares_library_cleanup(void)
|
||||||
|
.PP
|
||||||
|
.B cc file.c -lcares
|
||||||
|
.fi
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.PP
|
||||||
|
The
|
||||||
|
.B ares_library_cleanup
|
||||||
|
function uninitializes the c-ares library, freeing all resources
|
||||||
|
previously aquired by \fIares_library_init(3)\fP when the library
|
||||||
|
was initialized.
|
||||||
|
.PP
|
||||||
|
This function must be called when the program using c-ares will
|
||||||
|
no longer need any c-ares function. Once the program has called
|
||||||
|
\fIares_library_cleanup(3)\fP it shall not make any further call to any
|
||||||
|
c-ares function.
|
||||||
|
.PP
|
||||||
|
This function does not cancel any pending c-ares lookups or requests
|
||||||
|
previously done. Program must use \fIares_cancel(3)\fP for this purpose.
|
||||||
|
.PP
|
||||||
|
.B This function is not thread safe.
|
||||||
|
You have to call it once the program is about to terminate, but this call must
|
||||||
|
be done once the program has terminated every single thread that it could have
|
||||||
|
initiated. This is required to avoid potential race conditions in library
|
||||||
|
deinitialization, and also due to the fact that \fIares_library_cleanup(3)\fP
|
||||||
|
might call functions from other libraries that are thread unsafe, and could
|
||||||
|
conflict with any other thread that is already using these other libraries.
|
||||||
|
.PP
|
||||||
|
Win32/64 application DLLs shall not call \fIares_library_cleanup(3)\fP from
|
||||||
|
the DllMain function. Doing so will produce deadlocks and other problems.
|
||||||
|
.SH AVAILABILITY
|
||||||
|
This function was first introduced in c-ares version 1.6.1 along with the
|
||||||
|
definition of preprocessor symbol \fICARES_HAVE_ARES_LIBRARY_CLEANUP\fP as an
|
||||||
|
indication of the availability of this function.
|
||||||
|
.PP
|
||||||
|
Since the introduction of this function, it is absolutely mandatory to call it
|
||||||
|
for any Win32/64 program using c-ares.
|
||||||
|
.PP
|
||||||
|
Non-Win32/64 systems can still use c-ares version 1.6.1 without calling
|
||||||
|
\fIares_library_cleanup(3)\fP due to the fact that it is nearly a do-nothing
|
||||||
|
function on non-Win32/64 platforms.
|
||||||
|
.SH SEE ALSO
|
||||||
|
.BR ares_library_init(3),
|
||||||
|
.BR ares_cancel(3)
|
||||||
|
.SH AUTHOR
|
||||||
|
Yang Tse
|
||||||
|
.PP
|
||||||
|
Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
.br
|
||||||
|
Copyright (C) 2004-2009 by Daniel Stenberg.
|
||||||
97
ares/ares_library_init.3
Normal file
97
ares/ares_library_init.3
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
.\" $Id$
|
||||||
|
.\"
|
||||||
|
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
.\" Copyright (C) 2004-2009 by Daniel Stenberg
|
||||||
|
.\"
|
||||||
|
.\" Permission to use, copy, modify, and distribute this
|
||||||
|
.\" software and its documentation for any purpose and without
|
||||||
|
.\" fee is hereby granted, provided that the above copyright
|
||||||
|
.\" notice appear in all copies and that both that copyright
|
||||||
|
.\" notice and this permission notice appear in supporting
|
||||||
|
.\" documentation, and that the name of M.I.T. not be used in
|
||||||
|
.\" advertising or publicity pertaining to distribution of the
|
||||||
|
.\" software without specific, written prior permission.
|
||||||
|
.\" M.I.T. makes no representations about the suitability of
|
||||||
|
.\" this software for any purpose. It is provided "as is"
|
||||||
|
.\" without express or implied warranty.
|
||||||
|
.\"
|
||||||
|
.TH ARES_LIBRARY_INIT 3 "19 May 2009"
|
||||||
|
.SH NAME
|
||||||
|
ares_library_init \- c-ares library initialization
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.nf
|
||||||
|
.B #include <ares.h>
|
||||||
|
.PP
|
||||||
|
.B int ares_library_init(int \fIflags\fP)
|
||||||
|
.PP
|
||||||
|
.B cc file.c -lcares
|
||||||
|
.fi
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.PP
|
||||||
|
The
|
||||||
|
.B ares_library_init
|
||||||
|
function performs initializations internally required by the c-ares
|
||||||
|
library that must take place before any other function provided by
|
||||||
|
c-ares can be used in a program.
|
||||||
|
.PP
|
||||||
|
This function must be called one time within the life of a program,
|
||||||
|
before the program actually executes any other c-ares library function.
|
||||||
|
Initializations done by this function remain effective until a
|
||||||
|
call to \fIares_library_cleanup(3)\fP is performed.
|
||||||
|
.PP
|
||||||
|
Successive calls to this function do nothing, only the first call done
|
||||||
|
when c-ares is in an uninitialized state is actually effective.
|
||||||
|
.PP
|
||||||
|
The
|
||||||
|
.I flags
|
||||||
|
parameter is a bit pattern that tells c-ares exactly which features
|
||||||
|
should be initialized, as described below. Set the desired bits by
|
||||||
|
ORing the values together. In normal operation you should specify
|
||||||
|
\fIARES_LIB_INIT_ALL\fP. Don't use any other value unless you are
|
||||||
|
familiar with it and trying to control some internal c-ares feature.
|
||||||
|
.PP
|
||||||
|
.B This function is not thread safe.
|
||||||
|
You have to call it once the program has started, but this call must be done
|
||||||
|
before the program starts any other thread. This is required to avoid
|
||||||
|
potential race conditions in library initialization, and also due to the fact
|
||||||
|
that \fIares_library_init(3)\fP might call functions from other libraries that
|
||||||
|
are thread unsafe, and could conflict with any other thread that is already
|
||||||
|
using these other libraries.
|
||||||
|
.PP
|
||||||
|
Win32/64 application DLLs shall not call \fIares_library_init(3)\fP from the
|
||||||
|
DllMain function. Doing so will produce deadlocks and other problems.
|
||||||
|
.SH FLAGS
|
||||||
|
.TP 5
|
||||||
|
.B ARES_LIB_INIT_ALL
|
||||||
|
Initialize everything possible. This sets all known bits.
|
||||||
|
.TP
|
||||||
|
.B ARES_LIB_INIT_WIN32
|
||||||
|
Initialize Win32/64 specific libraries.
|
||||||
|
.TP
|
||||||
|
.B ARES_LIB_INIT_NONE
|
||||||
|
Initialize nothing extra. This sets no bit.
|
||||||
|
.SH RETURN VALUE
|
||||||
|
Upon successful completion, ares_library_init() will return 0. Otherwise, a
|
||||||
|
non-zero error number will be returned to indicate the error. Except for
|
||||||
|
\fIares_strerror(3)\fP, you shall not call any other c-ares function upon
|
||||||
|
\fIares_library_init(3)\fP failure.
|
||||||
|
.SH AVAILABILITY
|
||||||
|
This function was first introduced in c-ares version 1.6.1 along with the
|
||||||
|
definition of preprocessor symbol \fICARES_HAVE_ARES_LIBRARY_INIT\fP as an
|
||||||
|
indication of the availability of this function.
|
||||||
|
.PP
|
||||||
|
Since the introduction of this function it is absolutely mandatory to
|
||||||
|
call it for any Win32/64 program using c-ares.
|
||||||
|
.PP
|
||||||
|
Non-Win32/64 systems can still use c-ares version 1.6.1 without calling
|
||||||
|
\fIares_library_init(3)\fP due to the fact that it is nearly a do-nothing
|
||||||
|
function on non-Win32/64 platforms at this point.
|
||||||
|
.SH SEE ALSO
|
||||||
|
.BR ares_library_cleanup(3),
|
||||||
|
.BR ares_strerror(3)
|
||||||
|
.SH AUTHOR
|
||||||
|
Yang Tse
|
||||||
|
.PP
|
||||||
|
Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
.br
|
||||||
|
Copyright (C) 2004-2009 by Daniel Stenberg.
|
||||||
@@ -1,6 +1,22 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
#include "setup.h"
|
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
* Copyright (C) 2004-2009 by Daniel Stenberg
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this
|
||||||
|
* software and its documentation for any purpose and without
|
||||||
|
* fee is hereby granted, provided that the above copyright
|
||||||
|
* notice appear in all copies and that both that copyright
|
||||||
|
* notice and this permission notice appear in supporting
|
||||||
|
* documentation, and that the name of M.I.T. not be used in
|
||||||
|
* advertising or publicity pertaining to distribution of the
|
||||||
|
* software without specific, written prior permission.
|
||||||
|
* M.I.T. makes no representations about the suitability of
|
||||||
|
* this software for any purpose. It is provided "as is"
|
||||||
|
* without express or implied warranty.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#include "ares.h"
|
#include "ares.h"
|
||||||
#include "ares_library_init.h"
|
#include "ares_library_init.h"
|
||||||
@@ -38,26 +54,23 @@ static int ares_win32_init(void)
|
|||||||
if (!fpGetNetworkParams)
|
if (!fpGetNetworkParams)
|
||||||
{
|
{
|
||||||
FreeLibrary(hnd_iphlpapi);
|
FreeLibrary(hnd_iphlpapi);
|
||||||
return ARES_EADDRGetNetworkParams;
|
return ARES_EADDRGETNETWORKPARAMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When advapi32.dll is unavailable or advapi32.dll has no SystemFunction036,
|
||||||
|
* also known as RtlGenRandom, which is the case for Windows versions prior
|
||||||
|
* to WinXP then c-ares uses portable rand() function. Then don't error here.
|
||||||
|
*/
|
||||||
|
|
||||||
hnd_advapi32 = 0;
|
hnd_advapi32 = 0;
|
||||||
hnd_advapi32 = LoadLibrary("advapi32.dll");
|
hnd_advapi32 = LoadLibrary("advapi32.dll");
|
||||||
if (!hnd_advapi32)
|
if (hnd_advapi32)
|
||||||
{
|
{
|
||||||
FreeLibrary(hnd_iphlpapi);
|
fpSystemFunction036 = (fpSystemFunction036_t)
|
||||||
return ARES_ELOADADVAPI32;
|
GetProcAddress(hnd_advapi32, "SystemFunction036");
|
||||||
}
|
}
|
||||||
|
|
||||||
fpSystemFunction036 = (fpSystemFunction036_t)
|
|
||||||
GetProcAddress(hnd_advapi32, "SystemFunction036");
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Intentionally avoid checking if the address of SystemFunction036, a.k.a.
|
|
||||||
* RtlGenRandom, has been located or not. This function is only available on
|
|
||||||
* WinXP and later. When unavailable c-ares uses portable rand() function.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
return ARES_SUCCESS;
|
return ARES_SUCCESS;
|
||||||
}
|
}
|
||||||
@@ -107,3 +120,14 @@ void ares_library_cleanup(void)
|
|||||||
ares_init_flags = ARES_LIB_INIT_NONE;
|
ares_init_flags = ARES_LIB_INIT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int ares_library_initialized(void)
|
||||||
|
{
|
||||||
|
#ifdef WIN32
|
||||||
|
if (!ares_initialized)
|
||||||
|
return ARES_ENOTINITIALIZED;
|
||||||
|
#endif
|
||||||
|
return ARES_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,23 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
#include "setup.h"
|
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
* Copyright (C) 2004-2009 by Daniel Stenberg
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this
|
||||||
|
* software and its documentation for any purpose and without
|
||||||
|
* fee is hereby granted, provided that the above copyright
|
||||||
|
* notice appear in all copies and that both that copyright
|
||||||
|
* notice and this permission notice appear in supporting
|
||||||
|
* documentation, and that the name of M.I.T. not be used in
|
||||||
|
* advertising or publicity pertaining to distribution of the
|
||||||
|
* software without specific, written prior permission.
|
||||||
|
* M.I.T. makes no representations about the suitability of
|
||||||
|
* this software for any purpose. It is provided "as is"
|
||||||
|
* without express or implied warranty.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#include "ares.h"
|
#include "ares.h"
|
||||||
#include "ares_private.h"
|
#include "ares_private.h"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.TH ARES_PARSE_A_REPLY 3 "25 July 1998"
|
.TH ARES_PARSE_A_REPLY 3 "25 July 1998"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
ares_parse_a_reply \- Parse a reply to a DNS query of type A into a hostent
|
ares_parse_a_reply \- Parse a reply to a DNS query of type A
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
.B #include <ares.h>
|
.B #include <ares.h>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.TH ARES_PARSE_AAAA_REPLY 3 "10 March 2005"
|
.TH ARES_PARSE_AAAA_REPLY 3 "10 March 2005"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
ares_parse_aaaa_reply \- Parse a reply to a DNS query of type AAAA into a hostent
|
ares_parse_aaaa_reply \- Parse a reply to a DNS query of type AAAA
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
.B #include <ares.h>
|
.B #include <ares.h>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright 2005 Dominick Meglio
|
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
* Copyright 2005 Dominick Meglio
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this
|
* Permission to use, copy, modify, and distribute this
|
||||||
* software and its documentation for any purpose and without
|
* software and its documentation for any purpose and without
|
||||||
@@ -15,7 +16,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
|
/* $Id */
|
||||||
|
|
||||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this
|
* Permission to use, copy, modify, and distribute this
|
||||||
* software and its documentation for any purpose and without
|
* software and its documentation for any purpose and without
|
||||||
* fee is hereby granted, provided that the above copyright
|
* fee is hereby granted, provided that the above copyright
|
||||||
* notice appear in all copies and that both that copyright
|
* notice appear in all copies and that both that copyright
|
||||||
* notice and this permission notice appear in supporting
|
* notice and this permission notice appear in supporting
|
||||||
* documentation, and that the name of M.I.T. not be used in
|
* documentation, and that the name of M.I.T. not be used in
|
||||||
* advertising or publicity pertaining to distribution of the
|
* advertising or publicity pertaining to distribution of the
|
||||||
* software without specific, written prior permission.
|
* software without specific, written prior permission.
|
||||||
* M.I.T. makes no representations about the suitability of
|
* M.I.T. makes no representations about the suitability of
|
||||||
* this software for any purpose. It is provided "as is"
|
* this software for any purpose. It is provided "as is"
|
||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
@@ -18,7 +20,7 @@
|
|||||||
* on behalf of AVIRA Gmbh - http://www.avira.com
|
* on behalf of AVIRA Gmbh - http://www.avira.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
|
|||||||
77
ares/ares_parse_srv_reply.3
Normal file
77
ares/ares_parse_srv_reply.3
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
.\"
|
||||||
|
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
.\"
|
||||||
|
.\" Permission to use, copy, modify, and distribute this
|
||||||
|
.\" software and its documentation for any purpose and without
|
||||||
|
.\" fee is hereby granted, provided that the above copyright
|
||||||
|
.\" notice appear in all copies and that both that copyright
|
||||||
|
.\" notice and this permission notice appear in supporting
|
||||||
|
.\" documentation, and that the name of M.I.T. not be used in
|
||||||
|
.\" advertising or publicity pertaining to distribution of the
|
||||||
|
.\" software without specific, written prior permission.
|
||||||
|
.\" M.I.T. makes no representations about the suitability of
|
||||||
|
.\" this software for any purpose. It is provided "as is"
|
||||||
|
.\" without express or implied warranty.
|
||||||
|
.\"
|
||||||
|
.TH ARES_PARSE_SRV_REPLY 3 "4 August 2009"
|
||||||
|
.SH NAME
|
||||||
|
ares_parse_srv_reply \- Parse a reply to a DNS query of type SRV
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.nf
|
||||||
|
.B #include <ares.h>
|
||||||
|
.PP
|
||||||
|
.B int ares_parse_srv_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP,
|
||||||
|
.B struct ares_srv_reply** \fIsrv_out\fP, int *\fInsrvreply\fP);
|
||||||
|
.fi
|
||||||
|
.SH DESCRIPTION
|
||||||
|
The
|
||||||
|
.B ares_parse_srv_reply
|
||||||
|
function parses the response to a query of type SRV into a
|
||||||
|
.I struct ares_srv_reply
|
||||||
|
The parameters
|
||||||
|
.I abuf
|
||||||
|
and
|
||||||
|
.I alen
|
||||||
|
give the contents of the response. The result is stored in allocated
|
||||||
|
memory and a pointer to it stored into the variable pointed to by
|
||||||
|
.IR srv_out .
|
||||||
|
The number of responses is stored into the variable pointed to by
|
||||||
|
.IR nsrvreply .
|
||||||
|
It is the caller's responsibility to free the resulting
|
||||||
|
.IR srv_out
|
||||||
|
structure when it is no longer needed.
|
||||||
|
.PP
|
||||||
|
The structure
|
||||||
|
.I ares_srv_reply
|
||||||
|
contains the following fields:
|
||||||
|
.sp
|
||||||
|
.in +4n
|
||||||
|
.nf
|
||||||
|
struct ares_srv_reply {
|
||||||
|
unsigned short weight;
|
||||||
|
unsigned short priority;
|
||||||
|
unsigned short port;
|
||||||
|
char *host;
|
||||||
|
};
|
||||||
|
.fi
|
||||||
|
.in
|
||||||
|
.PP
|
||||||
|
.SH RETURN VALUES
|
||||||
|
.B ares_parse_srv_reply
|
||||||
|
can return any of the following values:
|
||||||
|
.TP 15
|
||||||
|
.B ARES_SUCCESS
|
||||||
|
The response was successfully parsed.
|
||||||
|
.TP 15
|
||||||
|
.B ARES_EBADRESP
|
||||||
|
The response was malformatted.
|
||||||
|
.TP 15
|
||||||
|
.B ARES_ENODATA
|
||||||
|
The response did not contain an answer to the query.
|
||||||
|
.TP 15
|
||||||
|
.B ARES_ENOMEM
|
||||||
|
Memory was exhausted.
|
||||||
|
.SH SEE ALSO
|
||||||
|
.BR ares_query (3)
|
||||||
|
.SH AUTHOR
|
||||||
|
Written by Jakub Hrozek <jhrozek@redhat.com>, on behalf of Red Hat, Inc http://www.redhat.com
|
||||||
173
ares/ares_parse_srv_reply.c
Normal file
173
ares/ares_parse_srv_reply.c
Normal file
@@ -0,0 +1,173 @@
|
|||||||
|
/* Id$ */
|
||||||
|
|
||||||
|
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this
|
||||||
|
* software and its documentation for any purpose and without
|
||||||
|
* fee is hereby granted, provided that the above copyright
|
||||||
|
* notice appear in all copies and that both that copyright
|
||||||
|
* notice and this permission notice appear in supporting
|
||||||
|
* documentation, and that the name of M.I.T. not be used in
|
||||||
|
* advertising or publicity pertaining to distribution of the
|
||||||
|
* software without specific, written prior permission.
|
||||||
|
* M.I.T. makes no representations about the suitability of
|
||||||
|
* this software for any purpose. It is provided "as is"
|
||||||
|
* without express or implied warranty.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ares_parse_srv_reply created by Jakub Hrozek <jhrozek@redhat.com>
|
||||||
|
* on behalf of Red Hat - http://www.redhat.com
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ares_setup.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
# include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_NETINET_IN_H
|
||||||
|
# include <netinet/in.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_NETDB_H
|
||||||
|
# include <netdb.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_ARPA_INET_H
|
||||||
|
# include <arpa/inet.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_ARPA_NAMESER_H
|
||||||
|
# include <arpa/nameser.h>
|
||||||
|
#else
|
||||||
|
# include "nameser.h"
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||||
|
# include <arpa/nameser_compat.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "ares.h"
|
||||||
|
#include "ares_dns.h"
|
||||||
|
#include "ares_private.h"
|
||||||
|
|
||||||
|
/* AIX portability check */
|
||||||
|
#ifndef T_SRV
|
||||||
|
# define T_SRV 33 /* server selection */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
ares_parse_srv_reply (const unsigned char *abuf, int alen,
|
||||||
|
struct ares_srv_reply **srv_out, int *nsrvreply)
|
||||||
|
{
|
||||||
|
unsigned int qdcount, ancount;
|
||||||
|
const unsigned char *aptr;
|
||||||
|
int status, i, rr_type, rr_class, rr_len;
|
||||||
|
long len;
|
||||||
|
char *hostname = NULL, *rr_name = NULL;
|
||||||
|
struct ares_srv_reply *srv = NULL;
|
||||||
|
|
||||||
|
/* Set *srv_out to NULL for all failure cases. */
|
||||||
|
*srv_out = NULL;
|
||||||
|
|
||||||
|
/* Same with *nsrvreply. */
|
||||||
|
*nsrvreply = 0;
|
||||||
|
|
||||||
|
/* Give up if abuf doesn't have room for a header. */
|
||||||
|
if (alen < HFIXEDSZ)
|
||||||
|
return ARES_EBADRESP;
|
||||||
|
|
||||||
|
/* Fetch the question and answer count from the header. */
|
||||||
|
qdcount = DNS_HEADER_QDCOUNT (abuf);
|
||||||
|
ancount = DNS_HEADER_ANCOUNT (abuf);
|
||||||
|
if (qdcount != 1)
|
||||||
|
return ARES_EBADRESP;
|
||||||
|
if (ancount == 0)
|
||||||
|
return ARES_ENODATA;
|
||||||
|
|
||||||
|
/* Expand the name from the question, and skip past the question. */
|
||||||
|
aptr = abuf + HFIXEDSZ;
|
||||||
|
status = ares_expand_name (aptr, abuf, alen, &hostname, &len);
|
||||||
|
if (status != ARES_SUCCESS)
|
||||||
|
return status;
|
||||||
|
|
||||||
|
if (aptr + len + QFIXEDSZ > abuf + alen)
|
||||||
|
{
|
||||||
|
free (hostname);
|
||||||
|
return ARES_EBADRESP;
|
||||||
|
}
|
||||||
|
aptr += len + QFIXEDSZ;
|
||||||
|
|
||||||
|
/* Allocate ares_srv_reply array; ancount gives an upper bound */
|
||||||
|
srv = malloc ((ancount) * sizeof (struct ares_srv_reply));
|
||||||
|
if (!srv)
|
||||||
|
{
|
||||||
|
free (hostname);
|
||||||
|
return ARES_ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Examine each answer resource record (RR) in turn. */
|
||||||
|
for (i = 0; i < (int) ancount; i++)
|
||||||
|
{
|
||||||
|
/* Decode the RR up to the data field. */
|
||||||
|
status = ares_expand_name (aptr, abuf, alen, &rr_name, &len);
|
||||||
|
if (status != ARES_SUCCESS)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
aptr += len;
|
||||||
|
if (aptr + RRFIXEDSZ > abuf + alen)
|
||||||
|
{
|
||||||
|
status = ARES_EBADRESP;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
rr_type = DNS_RR_TYPE (aptr);
|
||||||
|
rr_class = DNS_RR_CLASS (aptr);
|
||||||
|
rr_len = DNS_RR_LEN (aptr);
|
||||||
|
aptr += RRFIXEDSZ;
|
||||||
|
|
||||||
|
/* Check if we are really looking at a SRV record */
|
||||||
|
if (rr_class == C_IN && rr_type == T_SRV)
|
||||||
|
{
|
||||||
|
/* parse the SRV record itself */
|
||||||
|
if (rr_len < 6)
|
||||||
|
{
|
||||||
|
status = ARES_EBADRESP;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
srv[i].priority = ntohs (*((unsigned short *)aptr));
|
||||||
|
aptr += sizeof(unsigned short);
|
||||||
|
srv[i].weight = ntohs (*((unsigned short *)aptr));
|
||||||
|
aptr += sizeof(unsigned short);
|
||||||
|
srv[i].port = ntohs (*((unsigned short *)aptr));
|
||||||
|
aptr += sizeof(unsigned short);
|
||||||
|
|
||||||
|
status = ares_expand_name (aptr, abuf, alen, &srv[i].host, &len);
|
||||||
|
if (status != ARES_SUCCESS)
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* Move on to the next record */
|
||||||
|
aptr += len;
|
||||||
|
|
||||||
|
/* Don't lose memory in the next iteration */
|
||||||
|
free (rr_name);
|
||||||
|
rr_name = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* clean up on error */
|
||||||
|
if (status != ARES_SUCCESS)
|
||||||
|
{
|
||||||
|
free (srv);
|
||||||
|
free (hostname);
|
||||||
|
free (rr_name);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* everything looks fine, return the data */
|
||||||
|
*srv_out = srv;
|
||||||
|
*nsrvreply = ancount;
|
||||||
|
|
||||||
|
free (hostname);
|
||||||
|
free (rr_name);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
76
ares/ares_parse_txt_reply.3
Normal file
76
ares/ares_parse_txt_reply.3
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
.\"
|
||||||
|
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
.\"
|
||||||
|
.\" Permission to use, copy, modify, and distribute this
|
||||||
|
.\" software and its documentation for any purpose and without
|
||||||
|
.\" fee is hereby granted, provided that the above copyright
|
||||||
|
.\" notice appear in all copies and that both that copyright
|
||||||
|
.\" notice and this permission notice appear in supporting
|
||||||
|
.\" documentation, and that the name of M.I.T. not be used in
|
||||||
|
.\" advertising or publicity pertaining to distribution of the
|
||||||
|
.\" software without specific, written prior permission.
|
||||||
|
.\" M.I.T. makes no representations about the suitability of
|
||||||
|
.\" this software for any purpose. It is provided "as is"
|
||||||
|
.\" without express or implied warranty.
|
||||||
|
.\"
|
||||||
|
.TH ARES_PARSE_TXT_REPLY 3 "27 October 2009"
|
||||||
|
.SH NAME
|
||||||
|
ares_parse_txt_reply \- Parse a reply to a DNS query of type TXT
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.nf
|
||||||
|
.B #include <ares.h>
|
||||||
|
.PP
|
||||||
|
.B int ares_parse_txt_reply(const unsigned char* \fIabuf\fP, int \fIalen\fP,
|
||||||
|
.B struct ares_txt_reply **\fItxt_out\fP, int *\fIntxtreply\fP);
|
||||||
|
.fi
|
||||||
|
.SH DESCRIPTION
|
||||||
|
The
|
||||||
|
.B ares_parse_txt_reply
|
||||||
|
function parses the response to a query of type TXT into a
|
||||||
|
.I struct ares_txt_reply
|
||||||
|
The parameters
|
||||||
|
.I abuf
|
||||||
|
and
|
||||||
|
.I alen
|
||||||
|
give the contents of the response. The result is stored in allocated
|
||||||
|
memory and a pointer to it stored into the variable pointed to by
|
||||||
|
.IR txt_out .
|
||||||
|
The number of responses is stored into the variable pointed to by
|
||||||
|
.IR ntxtreply .
|
||||||
|
It is the caller's responsibility to free the resulting
|
||||||
|
.IR txt_out
|
||||||
|
structure when it is no longer needed.
|
||||||
|
.PP
|
||||||
|
The structure
|
||||||
|
.I ares_txt_reply
|
||||||
|
contains the following fields:
|
||||||
|
.sp
|
||||||
|
.in +4n
|
||||||
|
.nf
|
||||||
|
struct ares_txt_reply {
|
||||||
|
unsigned int length;
|
||||||
|
unsigned char *txt;
|
||||||
|
};
|
||||||
|
.fi
|
||||||
|
.in
|
||||||
|
.PP
|
||||||
|
.SH RETURN VALUES
|
||||||
|
.B ares_parse_txt_reply
|
||||||
|
can return any of the following values:
|
||||||
|
.TP 15
|
||||||
|
.B ARES_SUCCESS
|
||||||
|
The response was successfully parsed.
|
||||||
|
.TP 15
|
||||||
|
.B ARES_EBADRESP
|
||||||
|
The response was malformatted.
|
||||||
|
.TP 15
|
||||||
|
.B ARES_ENODATA
|
||||||
|
The response did not contain an answer to the query.
|
||||||
|
.TP 15
|
||||||
|
.B ARES_ENOMEM
|
||||||
|
Memory was exhausted.
|
||||||
|
.SH SEE ALSO
|
||||||
|
.BR ares_query (3)
|
||||||
|
.SH AUTHOR
|
||||||
|
Written by Jakub Hrozek <jhrozek@redhat.com>, on behalf of Red Hat, Inc http://www.redhat.com
|
||||||
|
|
||||||
205
ares/ares_parse_txt_reply.c
Normal file
205
ares/ares_parse_txt_reply.c
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
|
* Copyright (C) 2009 Jakub Hrozek <jhrozek@redhat.com>
|
||||||
|
* Copyright (C) 2009 Yang Tse <yangsita@gmail.com>
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this
|
||||||
|
* software and its documentation for any purpose and without
|
||||||
|
* fee is hereby granted, provided that the above copyright
|
||||||
|
* notice appear in all copies and that both that copyright
|
||||||
|
* notice and this permission notice appear in supporting
|
||||||
|
* documentation, and that the name of M.I.T. not be used in
|
||||||
|
* advertising or publicity pertaining to distribution of the
|
||||||
|
* software without specific, written prior permission.
|
||||||
|
* M.I.T. makes no representations about the suitability of
|
||||||
|
* this software for any purpose. It is provided "as is"
|
||||||
|
* without express or implied warranty.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ares_setup.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
# include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_NETINET_IN_H
|
||||||
|
# include <netinet/in.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_NETDB_H
|
||||||
|
# include <netdb.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_ARPA_INET_H
|
||||||
|
# include <arpa/inet.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_ARPA_NAMESER_H
|
||||||
|
# include <arpa/nameser.h>
|
||||||
|
#else
|
||||||
|
# include "nameser.h"
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||||
|
# include <arpa/nameser_compat.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_STRINGS_H
|
||||||
|
# include <strings.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "ares.h"
|
||||||
|
#include "ares_dns.h"
|
||||||
|
#include "ares_private.h"
|
||||||
|
|
||||||
|
int
|
||||||
|
ares_parse_txt_reply (const unsigned char *abuf, int alen,
|
||||||
|
struct ares_txt_reply **txt_out, int *ntxtreply)
|
||||||
|
{
|
||||||
|
size_t substr_len, str_len;
|
||||||
|
unsigned int qdcount, ancount, i;
|
||||||
|
const unsigned char *aptr;
|
||||||
|
const unsigned char *strptr;
|
||||||
|
int status, rr_type, rr_class, rr_len;
|
||||||
|
long len;
|
||||||
|
char *hostname = NULL, *rr_name = NULL;
|
||||||
|
struct ares_txt_reply *txt = NULL;
|
||||||
|
|
||||||
|
/* Set *txt_out to NULL for all failure cases. */
|
||||||
|
*txt_out = NULL;
|
||||||
|
|
||||||
|
/* Same with *ntxtreply. */
|
||||||
|
*ntxtreply = 0;
|
||||||
|
|
||||||
|
/* Give up if abuf doesn't have room for a header. */
|
||||||
|
if (alen < HFIXEDSZ)
|
||||||
|
return ARES_EBADRESP;
|
||||||
|
|
||||||
|
/* Fetch the question and answer count from the header. */
|
||||||
|
qdcount = DNS_HEADER_QDCOUNT (abuf);
|
||||||
|
ancount = DNS_HEADER_ANCOUNT (abuf);
|
||||||
|
if (qdcount != 1)
|
||||||
|
return ARES_EBADRESP;
|
||||||
|
if (ancount == 0)
|
||||||
|
return ARES_ENODATA;
|
||||||
|
|
||||||
|
/* Expand the name from the question, and skip past the question. */
|
||||||
|
aptr = abuf + HFIXEDSZ;
|
||||||
|
status = ares_expand_name (aptr, abuf, alen, &hostname, &len);
|
||||||
|
if (status != ARES_SUCCESS)
|
||||||
|
return status;
|
||||||
|
|
||||||
|
if (aptr + len + QFIXEDSZ > abuf + alen)
|
||||||
|
{
|
||||||
|
free (hostname);
|
||||||
|
return ARES_EBADRESP;
|
||||||
|
}
|
||||||
|
aptr += len + QFIXEDSZ;
|
||||||
|
|
||||||
|
/* Allocate ares_txt_reply array; ancount gives an upper bound */
|
||||||
|
txt = malloc ((ancount) * sizeof (struct ares_txt_reply));
|
||||||
|
if (!txt)
|
||||||
|
{
|
||||||
|
free (hostname);
|
||||||
|
return ARES_ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize ares_txt_reply array */
|
||||||
|
for (i = 0; i < ancount; i++)
|
||||||
|
{
|
||||||
|
txt[i].txt = NULL;
|
||||||
|
txt[i].length = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Examine each answer resource record (RR) in turn. */
|
||||||
|
for (i = 0; i < ancount; i++)
|
||||||
|
{
|
||||||
|
/* Decode the RR up to the data field. */
|
||||||
|
status = ares_expand_name (aptr, abuf, alen, &rr_name, &len);
|
||||||
|
if (status != ARES_SUCCESS)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
aptr += len;
|
||||||
|
if (aptr + RRFIXEDSZ > abuf + alen)
|
||||||
|
{
|
||||||
|
status = ARES_EBADRESP;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
rr_type = DNS_RR_TYPE (aptr);
|
||||||
|
rr_class = DNS_RR_CLASS (aptr);
|
||||||
|
rr_len = DNS_RR_LEN (aptr);
|
||||||
|
aptr += RRFIXEDSZ;
|
||||||
|
|
||||||
|
/* Check if we are really looking at a TXT record */
|
||||||
|
if (rr_class == C_IN && rr_type == T_TXT)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* There may be multiple substrings in a single TXT record. Each
|
||||||
|
* substring may be up to 255 characters in length, with a
|
||||||
|
* "length byte" indicating the size of the substring payload.
|
||||||
|
* RDATA contains both the length-bytes and payloads of all
|
||||||
|
* substrings contained therein.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Compute total length to allow a single memory allocation */
|
||||||
|
strptr = aptr;
|
||||||
|
while (strptr < (aptr + rr_len))
|
||||||
|
{
|
||||||
|
substr_len = (unsigned char)*strptr;
|
||||||
|
txt[i].length += substr_len;
|
||||||
|
strptr += substr_len + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Including null byte */
|
||||||
|
txt[i].txt = malloc (txt[i].length + 1);
|
||||||
|
if (txt[i].txt == NULL)
|
||||||
|
{
|
||||||
|
status = ARES_ENOMEM;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Step through the list of substrings, concatenating them */
|
||||||
|
str_len = 0;
|
||||||
|
strptr = aptr;
|
||||||
|
while (strptr < (aptr + rr_len))
|
||||||
|
{
|
||||||
|
substr_len = (unsigned char)*strptr;
|
||||||
|
strptr++;
|
||||||
|
memcpy ((char *) txt[i].txt + str_len, strptr, substr_len);
|
||||||
|
str_len += substr_len;
|
||||||
|
strptr += substr_len;
|
||||||
|
}
|
||||||
|
/* Make sure we NULL-terminate */
|
||||||
|
txt[i].txt[txt[i].length] = '\0';
|
||||||
|
|
||||||
|
/* Move on to the next record */
|
||||||
|
aptr += rr_len;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Don't lose memory in the next iteration */
|
||||||
|
free (rr_name);
|
||||||
|
rr_name = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hostname)
|
||||||
|
free (hostname);
|
||||||
|
if (rr_name)
|
||||||
|
free (rr_name);
|
||||||
|
|
||||||
|
/* clean up on error */
|
||||||
|
if (status != ARES_SUCCESS)
|
||||||
|
{
|
||||||
|
for (i = 0; i < ancount; i++)
|
||||||
|
{
|
||||||
|
if (txt[i].txt)
|
||||||
|
free (txt[i].txt);
|
||||||
|
}
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* everything looks fine, return the data */
|
||||||
|
*txt_out = txt;
|
||||||
|
*ntxtreply = ancount;
|
||||||
|
|
||||||
|
return ARES_SUCCESS;
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||||
* Copyright (C) 2004-2008 by Daniel Stenberg
|
* Copyright (C) 2004-2009 by Daniel Stenberg
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this
|
* Permission to use, copy, modify, and distribute this
|
||||||
* software and its documentation for any purpose and without
|
* software and its documentation for any purpose and without
|
||||||
@@ -32,16 +32,11 @@
|
|||||||
|
|
||||||
#if !defined(WIN32) || defined(WATT32)
|
#if !defined(WIN32) || defined(WATT32)
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
/* We define closesocket() here so that we can use this function all over
|
|
||||||
the source code for closing sockets. */
|
|
||||||
#define closesocket(x) close(x)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WATT32
|
#ifdef WATT32
|
||||||
#include <tcp.h>
|
#include <tcp.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#undef closesocket
|
|
||||||
#define closesocket(s) close_s(s)
|
|
||||||
#define writev(s,v,c) writev_s(s,v,c)
|
#define writev(s,v,c) writev_s(s,v,c)
|
||||||
#define HAVE_WRITEV 1
|
#define HAVE_WRITEV 1
|
||||||
#endif
|
#endif
|
||||||
@@ -310,12 +305,14 @@ int ares__timeadd(struct timeval *now,
|
|||||||
/* return time offset between now and (future) check, in milliseconds */
|
/* return time offset between now and (future) check, in milliseconds */
|
||||||
long ares__timeoffset(struct timeval *now,
|
long ares__timeoffset(struct timeval *now,
|
||||||
struct timeval *check);
|
struct timeval *check);
|
||||||
|
/* returns ARES_SUCCESS if library has been initialized */
|
||||||
|
int ares_library_initialized(void);
|
||||||
void ares__rc4(rc4_key* key,unsigned char *buffer_ptr, int buffer_len);
|
void ares__rc4(rc4_key* key,unsigned char *buffer_ptr, int buffer_len);
|
||||||
void ares__send_query(ares_channel channel, struct query *query,
|
void ares__send_query(ares_channel channel, struct query *query,
|
||||||
struct timeval *now);
|
struct timeval *now);
|
||||||
void ares__close_sockets(ares_channel channel, struct server_state *server);
|
void ares__close_sockets(ares_channel channel, struct server_state *server);
|
||||||
int ares__get_hostent(FILE *fp, int family, struct hostent **host);
|
int ares__get_hostent(FILE *fp, int family, struct hostent **host);
|
||||||
int ares__read_line(FILE *fp, char **buf, int *bufsize);
|
int ares__read_line(FILE *fp, char **buf, size_t *bufsize);
|
||||||
void ares__free_query(struct query *query);
|
void ares__free_query(struct query *query);
|
||||||
unsigned short ares__generate_new_id(rc4_key* key);
|
unsigned short ares__generate_new_id(rc4_key* key);
|
||||||
struct timeval ares__tvnow(void);
|
struct timeval ares__tvnow(void);
|
||||||
@@ -338,8 +335,8 @@ long ares__tvdiff(struct timeval t1, struct timeval t2);
|
|||||||
#ifdef CURLDEBUG
|
#ifdef CURLDEBUG
|
||||||
/* This is low-level hard-hacking memory leak tracking and similar. Using the
|
/* This is low-level hard-hacking memory leak tracking and similar. Using the
|
||||||
libcurl lowlevel code from within library is ugly and only works when
|
libcurl lowlevel code from within library is ugly and only works when
|
||||||
c-ares is built and linked with a similarly debug-build libcurl, but we do
|
c-ares is built and linked with a similarly curldebug-enabled libcurl,
|
||||||
this anyway for convenience. */
|
but we do this anyway for convenience. */
|
||||||
#include "../lib/memdebug.h"
|
#include "../lib/memdebug.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
@@ -896,7 +896,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
|||||||
/* Configure it. */
|
/* Configure it. */
|
||||||
if (configure_socket(s, channel) < 0)
|
if (configure_socket(s, channel) < 0)
|
||||||
{
|
{
|
||||||
closesocket(s);
|
sclose(s);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -911,7 +911,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
|||||||
if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY,
|
if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY,
|
||||||
(void *)&opt, sizeof(opt)) == -1)
|
(void *)&opt, sizeof(opt)) == -1)
|
||||||
{
|
{
|
||||||
closesocket(s);
|
sclose(s);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -927,7 +927,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
|||||||
|
|
||||||
if (err != EINPROGRESS && err != EWOULDBLOCK)
|
if (err != EINPROGRESS && err != EWOULDBLOCK)
|
||||||
{
|
{
|
||||||
closesocket(s);
|
sclose(s);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -938,7 +938,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
|||||||
channel->sock_create_cb_data);
|
channel->sock_create_cb_data);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
{
|
{
|
||||||
closesocket(s);
|
sclose(s);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -963,7 +963,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server)
|
|||||||
/* Set the socket non-blocking. */
|
/* Set the socket non-blocking. */
|
||||||
if (configure_socket(s, channel) < 0)
|
if (configure_socket(s, channel) < 0)
|
||||||
{
|
{
|
||||||
closesocket(s);
|
sclose(s);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -978,7 +978,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server)
|
|||||||
|
|
||||||
if (err != EINPROGRESS && err != EWOULDBLOCK)
|
if (err != EINPROGRESS && err != EWOULDBLOCK)
|
||||||
{
|
{
|
||||||
closesocket(s);
|
sclose(s);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -989,7 +989,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server)
|
|||||||
channel->sock_create_cb_data);
|
channel->sock_create_cb_data);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
{
|
{
|
||||||
closesocket(s);
|
sclose(s);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
* that the dimension of a constant array can not be a negative one.
|
* that the dimension of a constant array can not be a negative one.
|
||||||
* In this way if the compile time verification fails, the compilation
|
* In this way if the compile time verification fails, the compilation
|
||||||
* will fail issuing an error. The error description wording is compiler
|
* will fail issuing an error. The error description wording is compiler
|
||||||
* dependant but it will be quite similar to one of the following:
|
* dependent but it will be quite similar to one of the following:
|
||||||
*
|
*
|
||||||
* "negative subscript or subscript is too large"
|
* "negative subscript or subscript is too large"
|
||||||
* "array must have at least one element"
|
* "array must have at least one element"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -238,7 +238,8 @@ static int single_domain(ares_channel channel, const char *name, char **s)
|
|||||||
const char *hostaliases;
|
const char *hostaliases;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
char *line = NULL;
|
char *line = NULL;
|
||||||
int linesize, status;
|
int status;
|
||||||
|
size_t linesize;
|
||||||
const char *p, *q;
|
const char *p, *q;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef __ARES_SETUP_H
|
#ifndef HEADER_CARES_SETUP_H
|
||||||
#define __ARES_SETUP_H
|
#define HEADER_CARES_SETUP_H
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "ares_config.h"
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
@@ -78,16 +78,16 @@
|
|||||||
|
|
||||||
#include <ares_rules.h>
|
#include <ares_rules.h>
|
||||||
|
|
||||||
/* ================================================================ */
|
/* ================================================================= */
|
||||||
/* No system header file shall be included in this file before this */
|
/* No system header file shall be included in this file before this */
|
||||||
/* point. The only allowed ones are those included from curlbuild.h */
|
/* point. The only allowed ones are those included from ares_build.h */
|
||||||
/* ================================================================ */
|
/* ================================================================= */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Include header files for windows builds before redefining anything.
|
* Include header files for windows builds before redefining anything.
|
||||||
* Use this preproessor block only to include or exclude windows.h,
|
* Use this preproessor block only to include or exclude windows.h,
|
||||||
* winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
|
* winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
|
||||||
* to any other further and independant block. Under Cygwin things work
|
* to any other further and independent block. Under Cygwin things work
|
||||||
* just as under linux (e.g. <sys/socket.h>) and the winsock headers should
|
* just as under linux (e.g. <sys/socket.h>) and the winsock headers should
|
||||||
* never be included when __CYGWIN__ is defined. configure script takes
|
* never be included when __CYGWIN__ is defined. configure script takes
|
||||||
* care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK_H, HAVE_WINSOCK2_H,
|
* care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK_H, HAVE_WINSOCK2_H,
|
||||||
@@ -133,12 +133,6 @@
|
|||||||
|
|
||||||
#ifndef HAVE_CONFIG_H
|
#ifndef HAVE_CONFIG_H
|
||||||
|
|
||||||
#if defined(__DJGPP__) || (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
|
|
||||||
defined(__POCC__)
|
|
||||||
#else
|
|
||||||
#define ssize_t int
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER) && !defined(__WATCOMC__)
|
#if !defined(HAVE_SYS_TIME_H) && !defined(_MSC_VER) && !defined(__WATCOMC__)
|
||||||
#define HAVE_SYS_TIME_H
|
#define HAVE_SYS_TIME_H
|
||||||
#endif
|
#endif
|
||||||
@@ -153,8 +147,14 @@
|
|||||||
|
|
||||||
#endif /* HAVE_CONFIG_H */
|
#endif /* HAVE_CONFIG_H */
|
||||||
|
|
||||||
|
#ifdef __POCC__
|
||||||
|
# include <sys/types.h>
|
||||||
|
# include <unistd.h>
|
||||||
|
# define ESRCH 3
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recent autoconf versions define these symbols in config.h. We don't
|
* Recent autoconf versions define these symbols in ares_config.h. We don't
|
||||||
* want them (since they collide with the libcurl ones when we build
|
* want them (since they collide with the libcurl ones when we build
|
||||||
* --enable-debug) so we undef them again here.
|
* --enable-debug) so we undef them again here.
|
||||||
*/
|
*/
|
||||||
@@ -184,4 +184,4 @@
|
|||||||
#include "setup_once.h"
|
#include "setup_once.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __ARES_SETUP_H */
|
#endif /* HEADER_CARES_SETUP_H */
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
#include "ares_strcasecmp.h"
|
#include "ares_strcasecmp.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRCASECMP
|
#ifndef HAVE_STRCASECMP
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRCASECMP
|
#ifndef HAVE_STRCASECMP
|
||||||
extern int ares_strcasecmp(const char *a, const char *b);
|
extern int ares_strcasecmp(const char *a, const char *b);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
#include "ares_strdup.h"
|
#include "ares_strdup.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRDUP
|
#ifndef HAVE_STRDUP
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRDUP
|
#ifndef HAVE_STRDUP
|
||||||
extern char *ares_strdup(const char *s1);
|
extern char *ares_strdup(const char *s1);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include "ares.h"
|
#include "ares.h"
|
||||||
|
|
||||||
@@ -44,9 +44,10 @@ const char *ares_strerror(int code)
|
|||||||
"Illegal flags specified",
|
"Illegal flags specified",
|
||||||
"Given hostname is not numeric",
|
"Given hostname is not numeric",
|
||||||
"Illegal hints flags specified",
|
"Illegal hints flags specified",
|
||||||
|
"c-ares library initialization not yet performed",
|
||||||
"Error loading iphlpapi.dll",
|
"Error loading iphlpapi.dll",
|
||||||
"Error loading advapi32.dll",
|
"Could not find GetNetworkParams function",
|
||||||
"Could not find GetNetworkParams function"
|
"DNS query cancelled"
|
||||||
};
|
};
|
||||||
|
|
||||||
if(code >= 0 && code < (int)(sizeof(errtext) / sizeof(*errtext)))
|
if(code >= 0 && code < (int)(sizeof(errtext) / sizeof(*errtext)))
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_TIME_H
|
#ifdef HAVE_SYS_TIME_H
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
#include "ares.h"
|
#include "ares.h"
|
||||||
|
|
||||||
const char *ares_version(int *version)
|
const char *ares_version(int *version)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_LIMITS_H
|
#ifdef HAVE_LIMITS_H
|
||||||
# include <limits.h>
|
# include <limits.h>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
* without express or implied warranty.
|
* without express or implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
#include "ares.h"
|
#include "ares.h"
|
||||||
|
|
||||||
#ifndef HAVE_WRITEV
|
#ifndef HAVE_WRITEV
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#ifndef HAVE_BITNCMP
|
#ifndef HAVE_BITNCMP
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
#include "bitncmp.h"
|
#include "bitncmp.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -41,7 +41,7 @@ ares_bitncmp(const void *l, const void *r, int n) {
|
|||||||
|
|
||||||
b = n / 8;
|
b = n / 8;
|
||||||
x = memcmp(l, r, b);
|
x = memcmp(l, r, b);
|
||||||
if (x)
|
if (x || (n % 8) == 0)
|
||||||
return (x);
|
return (x);
|
||||||
|
|
||||||
lb = ((const unsigned char *)l)[b];
|
lb = ((const unsigned char *)l)[b];
|
||||||
|
|||||||
@@ -42,4 +42,4 @@ ${libtoolize} --copy --automake --force
|
|||||||
${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS
|
${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS
|
||||||
${AUTOHEADER:-autoheader}
|
${AUTOHEADER:-autoheader}
|
||||||
${AUTOCONF:-autoconf}
|
${AUTOCONF:-autoconf}
|
||||||
${AUTOMAKE:-automake} --add-missing
|
${AUTOMAKE:-automake} --add-missing --copy
|
||||||
|
|||||||
@@ -1,8 +1,21 @@
|
|||||||
@echo off
|
@echo off
|
||||||
REM set up a CVS tree to build when there's no autotools
|
REM
|
||||||
REM $Revision$
|
REM $Id$
|
||||||
REM $Date$
|
REM
|
||||||
|
REM This batch file must be used to set up a CVS tree to build on
|
||||||
|
REM systems where there is no autotools support (i.e. Microsoft).
|
||||||
|
REM
|
||||||
|
REM This file is not included nor needed for c-ares' release
|
||||||
|
REM archives, neither for c-ares' daily snapshot archives.
|
||||||
|
|
||||||
REM create ares_build.h
|
if exist CVS-INFO goto start_doing
|
||||||
|
ECHO ERROR: This file shall only be used with a c-ares CVS tree checkout.
|
||||||
|
goto end_all
|
||||||
|
:start_doing
|
||||||
|
|
||||||
|
if not exist ares_build.h.dist goto end_ares_build_h
|
||||||
copy /Y ares_build.h.dist ares_build.h
|
copy /Y ares_build.h.dist ares_build.h
|
||||||
|
:end_ares_build_h
|
||||||
|
|
||||||
|
:end_all
|
||||||
|
|
||||||
|
|||||||
59
ares/cares.rc
Normal file
59
ares/cares.rc
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 2009 by Daniel Stenberg
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this
|
||||||
|
* software and its documentation for any purpose and without
|
||||||
|
* fee is hereby granted, provided that the above copyright
|
||||||
|
* notice appear in all copies and that both that copyright
|
||||||
|
* notice and this permission notice appear in supporting
|
||||||
|
* documentation, and that the name of M.I.T. not be used in
|
||||||
|
* advertising or publicity pertaining to distribution of the
|
||||||
|
* software without specific, written prior permission.
|
||||||
|
* M.I.T. makes no representations about the suitability of
|
||||||
|
* this software for any purpose. It is provided "as is"
|
||||||
|
* without express or implied warranty.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <winver.h>
|
||||||
|
#include "ares_version.h"
|
||||||
|
|
||||||
|
LANGUAGE 0x09,0x01
|
||||||
|
|
||||||
|
#define RC_VERSION ARES_VERSION_MAJOR, ARES_VERSION_MINOR, ARES_VERSION_PATCH, 0
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION RC_VERSION
|
||||||
|
PRODUCTVERSION RC_VERSION
|
||||||
|
FILEFLAGSMASK 0x3fL
|
||||||
|
#if defined(DEBUGBUILD) || defined(_DEBUG)
|
||||||
|
FILEFLAGS 1
|
||||||
|
#else
|
||||||
|
FILEFLAGS 0
|
||||||
|
#endif
|
||||||
|
FILEOS VOS__WINDOWS32
|
||||||
|
FILETYPE VFT_DLL
|
||||||
|
FILESUBTYPE 0x0L
|
||||||
|
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904b0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", "The c-ares library, http://c-ares.haxx.se/\0"
|
||||||
|
VALUE "FileDescription", "c-ares Shared Library\0"
|
||||||
|
VALUE "FileVersion", ARES_VERSION_STR "\0"
|
||||||
|
VALUE "InternalName", "c-ares\0"
|
||||||
|
VALUE "OriginalFilename", "cares.dll\0"
|
||||||
|
VALUE "ProductName", "The c-ares library\0"
|
||||||
|
VALUE "ProductVersion", ARES_VERSION_STR "\0"
|
||||||
|
VALUE "LegalCopyright", "<22> 2004 - 2009 Daniel Stenberg, <daniel@haxx.se>.\0"
|
||||||
|
VALUE "License", "http://c-ares.haxx.se/license.html\0"
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
@@ -25,13 +25,18 @@
|
|||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
|
|
||||||
/* Define if you have the <getopt.h> header file. */
|
/* Define if you have the <getopt.h> header file. */
|
||||||
#if defined(__MINGW32__)
|
#if defined(__MINGW32__) || defined(__POCC__)
|
||||||
#define HAVE_GETOPT_H 1
|
#define HAVE_GETOPT_H 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
/* Define if you have the <limits.h> header file. */
|
||||||
#define HAVE_LIMITS_H 1
|
#define HAVE_LIMITS_H 1
|
||||||
|
|
||||||
|
/* Define if you have the <process.h> header file. */
|
||||||
|
#ifndef __SALFORDC__
|
||||||
|
#define HAVE_PROCESS_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define if you have the <signal.h> header file. */
|
/* Define if you have the <signal.h> header file. */
|
||||||
#define HAVE_SIGNAL_H 1
|
#define HAVE_SIGNAL_H 1
|
||||||
|
|
||||||
@@ -41,9 +46,6 @@
|
|||||||
/* Define if you have the <time.h> header file. */
|
/* Define if you have the <time.h> header file. */
|
||||||
#define HAVE_TIME_H 1
|
#define HAVE_TIME_H 1
|
||||||
|
|
||||||
/* Define if you have the <process.h> header file. */
|
|
||||||
#define HAVE_PROCESS_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <unistd.h> header file. */
|
/* Define if you have the <unistd.h> header file. */
|
||||||
#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
|
#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
|
||||||
defined(__POCC__)
|
defined(__POCC__)
|
||||||
@@ -57,10 +59,14 @@
|
|||||||
#define HAVE_WINSOCK_H 1
|
#define HAVE_WINSOCK_H 1
|
||||||
|
|
||||||
/* Define if you have the <winsock2.h> header file. */
|
/* Define if you have the <winsock2.h> header file. */
|
||||||
|
#ifndef __SALFORDC__
|
||||||
#define HAVE_WINSOCK2_H 1
|
#define HAVE_WINSOCK2_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define if you have the <ws2tcpip.h> header file. */
|
/* Define if you have the <ws2tcpip.h> header file. */
|
||||||
|
#ifndef __SALFORDC__
|
||||||
#define HAVE_WS2TCPIP_H 1
|
#define HAVE_WS2TCPIP_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
/* OTHER HEADER INFO */
|
/* OTHER HEADER INFO */
|
||||||
@@ -79,6 +85,9 @@
|
|||||||
/* FUNCTIONS */
|
/* FUNCTIONS */
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/* Define if you have the gethostname function. */
|
||||||
|
#define HAVE_GETHOSTNAME 1
|
||||||
|
|
||||||
/* Define if you have the ioctlsocket function. */
|
/* Define if you have the ioctlsocket function. */
|
||||||
#define HAVE_IOCTLSOCKET 1
|
#define HAVE_IOCTLSOCKET 1
|
||||||
|
|
||||||
@@ -100,9 +109,6 @@
|
|||||||
/* Define if you have the strnicmp function. */
|
/* Define if you have the strnicmp function. */
|
||||||
#define HAVE_STRNICMP 1
|
#define HAVE_STRNICMP 1
|
||||||
|
|
||||||
/* Define if you have the gethostname function. */
|
|
||||||
#define HAVE_GETHOSTNAME 1
|
|
||||||
|
|
||||||
/* Define if you have the recv function. */
|
/* Define if you have the recv function. */
|
||||||
#define HAVE_RECV 1
|
#define HAVE_RECV 1
|
||||||
|
|
||||||
@@ -196,11 +202,17 @@
|
|||||||
#define RETSIGTYPE void
|
#define RETSIGTYPE void
|
||||||
|
|
||||||
/* Define ssize_t if it is not an available 'typedefed' type */
|
/* Define ssize_t if it is not an available 'typedefed' type */
|
||||||
#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__)
|
#ifndef _SSIZE_T_DEFINED
|
||||||
#elif defined(_WIN64)
|
# if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
|
||||||
#define ssize_t __int64
|
defined(__POCC__) || \
|
||||||
#else
|
defined(__MINGW32__)
|
||||||
#define ssize_t int
|
# elif defined(_WIN64)
|
||||||
|
# define _SSIZE_T_DEFINED
|
||||||
|
# define ssize_t __int64
|
||||||
|
# else
|
||||||
|
# define _SSIZE_T_DEFINED
|
||||||
|
# define ssize_t int
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
@@ -211,7 +223,9 @@
|
|||||||
#define HAVE_STRUCT_ADDRINFO 1
|
#define HAVE_STRUCT_ADDRINFO 1
|
||||||
|
|
||||||
/* Define this if you have struct sockaddr_storage */
|
/* Define this if you have struct sockaddr_storage */
|
||||||
|
#ifndef __SALFORDC__
|
||||||
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
|
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define this if you have struct timeval */
|
/* Define this if you have struct timeval */
|
||||||
#define HAVE_STRUCT_TIMEVAL 1
|
#define HAVE_STRUCT_TIMEVAL 1
|
||||||
@@ -256,10 +270,25 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is quite */
|
/* When no build target is specified Pelles C 5.00 and later default build
|
||||||
/* convoluted, compiler dependant and in some cases even build target dependat. */
|
target is Windows Vista. We override default target to be Windows 2000. */
|
||||||
|
#if defined(__POCC__) && (__POCC__ >= 500)
|
||||||
|
# ifndef _WIN32_WINNT
|
||||||
|
# define _WIN32_WINNT 0x0500
|
||||||
|
# endif
|
||||||
|
# ifndef WINVER
|
||||||
|
# define WINVER 0x0500
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
|
||||||
|
quite convoluted, compiler dependent and even build target dependent. */
|
||||||
#if defined(HAVE_WS2TCPIP_H)
|
#if defined(HAVE_WS2TCPIP_H)
|
||||||
# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
|
# if defined(__POCC__)
|
||||||
|
# define HAVE_FREEADDRINFO 1
|
||||||
|
# define HAVE_GETADDRINFO 1
|
||||||
|
# define HAVE_GETNAMEINFO 1
|
||||||
|
# elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
|
||||||
# define HAVE_FREEADDRINFO 1
|
# define HAVE_FREEADDRINFO 1
|
||||||
# define HAVE_GETADDRINFO 1
|
# define HAVE_GETADDRINFO 1
|
||||||
# define HAVE_GETNAMEINFO 1
|
# define HAVE_GETNAMEINFO 1
|
||||||
@@ -270,6 +299,15 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__POCC__)
|
||||||
|
# ifndef _MSC_VER
|
||||||
|
# error Microsoft extensions /Ze compiler option is required
|
||||||
|
# endif
|
||||||
|
# ifndef __POCC__OLDNAMES
|
||||||
|
# error Compatibility names /Go compiler option is required
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
/* IPV6 COMPATIBILITY */
|
/* IPV6 COMPATIBILITY */
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
|
|||||||
112
ares/config.dos
Normal file
112
ares/config.dos
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
#ifndef HEADER_CONFIG_DOS_H
|
||||||
|
#define HEADER_CONFIG_DOS_H
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* ================================================================ */
|
||||||
|
/* ares/config.dos - Hand crafted config file for DOS */
|
||||||
|
/* ================================================================ */
|
||||||
|
|
||||||
|
#define PACKAGE "c-ares"
|
||||||
|
|
||||||
|
#define HAVE_GETTIMEOFDAY 1
|
||||||
|
#define HAVE_IOCTLSOCKET 1
|
||||||
|
#define HAVE_IOCTLSOCKET_FIONBIO 1
|
||||||
|
#define HAVE_LIMITS_H 1
|
||||||
|
#define HAVE_NET_IF_H 1
|
||||||
|
#define HAVE_RECV 1
|
||||||
|
#define HAVE_RECVFROM 1
|
||||||
|
#define HAVE_SEND 1
|
||||||
|
#define HAVE_STRDUP 1
|
||||||
|
#define HAVE_STRICMP 1
|
||||||
|
#define HAVE_STRUCT_IN6_ADDR 1
|
||||||
|
#define HAVE_STRUCT_TIMEVAL 1
|
||||||
|
#define HAVE_SYS_IOCTL_H 1
|
||||||
|
#define HAVE_SYS_SOCKET_H 1
|
||||||
|
#define HAVE_SYS_STAT_H 1
|
||||||
|
#define HAVE_SYS_TYPES_H 1
|
||||||
|
#define HAVE_TIME_H 1
|
||||||
|
#define HAVE_UNISTD_H 1
|
||||||
|
|
||||||
|
#define NEED_MALLOC_H 1
|
||||||
|
|
||||||
|
#define RETSIGTYPE void
|
||||||
|
#define TIME_WITH_SYS_TIME 1
|
||||||
|
|
||||||
|
/* Qualifiers for send(), recv(), recvfrom() and getnameinfo(). */
|
||||||
|
|
||||||
|
#define SEND_TYPE_ARG1 int
|
||||||
|
#define SEND_QUAL_ARG2 const
|
||||||
|
#define SEND_TYPE_ARG2 void *
|
||||||
|
#define SEND_TYPE_ARG3 int
|
||||||
|
#define SEND_TYPE_ARG4 int
|
||||||
|
#define SEND_TYPE_RETV int
|
||||||
|
|
||||||
|
#define RECV_TYPE_ARG1 int
|
||||||
|
#define RECV_TYPE_ARG2 void *
|
||||||
|
#define RECV_TYPE_ARG3 int
|
||||||
|
#define RECV_TYPE_ARG4 int
|
||||||
|
#define RECV_TYPE_RETV int
|
||||||
|
|
||||||
|
#define RECVFROM_TYPE_ARG1 int
|
||||||
|
#define RECVFROM_TYPE_ARG2 void
|
||||||
|
#define RECVFROM_TYPE_ARG3 int
|
||||||
|
#define RECVFROM_TYPE_ARG4 int
|
||||||
|
#define RECVFROM_TYPE_ARG5 struct sockaddr
|
||||||
|
#define RECVFROM_TYPE_ARG6 int
|
||||||
|
#define RECVFROM_TYPE_RETV int
|
||||||
|
#define RECVFROM_TYPE_ARG2_IS_VOID 1
|
||||||
|
|
||||||
|
#define BSD
|
||||||
|
|
||||||
|
#if defined(__HIGHC__) || \
|
||||||
|
(defined(__GNUC__) && (__GNUC__ < 4))
|
||||||
|
#define ssize_t int
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Target HAVE_x section */
|
||||||
|
|
||||||
|
#if defined(DJGPP)
|
||||||
|
#define HAVE_STRCASECMP 1
|
||||||
|
#define HAVE_STRNCASECMP 1
|
||||||
|
#define HAVE_SYS_TIME_H 1
|
||||||
|
#define HAVE_VARIADIC_MACROS_GCC 1
|
||||||
|
|
||||||
|
/* Because djgpp <= 2.03 doesn't have snprintf() etc. */
|
||||||
|
#if (DJGPP_MINOR < 4)
|
||||||
|
#define _MPRINTF_REPLACE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#elif defined(__WATCOMC__)
|
||||||
|
#define HAVE_STRCASECMP 1
|
||||||
|
|
||||||
|
#elif defined(__HIGHC__)
|
||||||
|
#define HAVE_SYS_TIME_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef WATT32
|
||||||
|
#define HAVE_AF_INET6 1
|
||||||
|
#define HAVE_ARPA_INET_H 1
|
||||||
|
#define HAVE_ARPA_NAMESER_H 1
|
||||||
|
#define HAVE_CLOSESOCKET_CAMEL 1
|
||||||
|
#define HAVE_GETHOSTNAME 1
|
||||||
|
#define HAVE_NETDB_H 1
|
||||||
|
#define HAVE_NETINET_IN_H 1
|
||||||
|
#define HAVE_NETINET_TCP_H 1
|
||||||
|
#define HAVE_PF_INET6 1
|
||||||
|
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
|
||||||
|
#define HAVE_STRUCT_ADDRINFO 1
|
||||||
|
#define HAVE_STRUCT_IN6_ADDR 1
|
||||||
|
#define HAVE_STRUCT_SOCKADDR_IN6 1
|
||||||
|
#define HAVE_SYS_SOCKET_H 1
|
||||||
|
#define HAVE_SYS_UIO_H 1
|
||||||
|
#define NS_INADDRSZ 4
|
||||||
|
#define HAVE_STRUCT_SOCKADDR_IN6 1
|
||||||
|
#define CloseSocket(s) close_s((s))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef word
|
||||||
|
#undef byte
|
||||||
|
|
||||||
|
#endif /* HEADER_CONFIG_DOS_H */
|
||||||
|
|
||||||
@@ -7,14 +7,16 @@ AC_INIT([c-ares], [-],
|
|||||||
CARES_OVERRIDE_AUTOCONF
|
CARES_OVERRIDE_AUTOCONF
|
||||||
|
|
||||||
AC_CONFIG_SRCDIR([ares_ipv6.h])
|
AC_CONFIG_SRCDIR([ares_ipv6.h])
|
||||||
AM_CONFIG_HEADER([config.h ares_build.h])
|
AM_CONFIG_HEADER([ares_config.h ares_build.h])
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
CARES_CHECK_OPTION_DEBUG
|
CARES_CHECK_OPTION_DEBUG
|
||||||
CARES_CHECK_OPTION_OPTIMIZE
|
CARES_CHECK_OPTION_OPTIMIZE
|
||||||
CARES_CHECK_OPTION_WARNINGS
|
CARES_CHECK_OPTION_WARNINGS
|
||||||
|
CARES_CHECK_OPTION_CURLDEBUG
|
||||||
|
CARES_CHECK_OPTION_SYMBOL_HIDING
|
||||||
|
|
||||||
CARES_CHECK_PATH_SEPARATOR
|
CARES_CHECK_PATH_SEPARATOR_REQUIRED
|
||||||
|
|
||||||
dnl SED is mandatory for configure process and libtool.
|
dnl SED is mandatory for configure process and libtool.
|
||||||
dnl Set it now, allowing it to be changed later.
|
dnl Set it now, allowing it to be changed later.
|
||||||
@@ -50,7 +52,7 @@ fi
|
|||||||
AC_SUBST([EGREP])
|
AC_SUBST([EGREP])
|
||||||
|
|
||||||
dnl AR is mandatory for configure process and libtool.
|
dnl AR is mandatory for configure process and libtool.
|
||||||
dnl This is target dependant, so check it as a tool.
|
dnl This is target dependent, so check it as a tool.
|
||||||
AC_PATH_TOOL([AR], [ar], [not_found],
|
AC_PATH_TOOL([AR], [ar], [not_found],
|
||||||
[$PATH:/usr/bin:/usr/local/bin])
|
[$PATH:/usr/bin:/usr/local/bin])
|
||||||
if test -z "$AR" || test "$AR" = "not_found"; then
|
if test -z "$AR" || test "$AR" = "not_found"; then
|
||||||
@@ -94,11 +96,6 @@ esac
|
|||||||
dnl support building of Windows DLLs
|
dnl support building of Windows DLLs
|
||||||
AC_LIBTOOL_WIN32_DLL
|
AC_LIBTOOL_WIN32_DLL
|
||||||
|
|
||||||
CARES_PROCESS_DEBUG_BUILD_OPTS
|
|
||||||
|
|
||||||
AM_CONDITIONAL(DEBUGBUILD, test x$want_debug = xyes)
|
|
||||||
AM_CONDITIONAL(CURLDEBUG, test x$want_debug = xyes)
|
|
||||||
|
|
||||||
dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD
|
dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD
|
||||||
AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)])
|
AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)])
|
||||||
case $host in
|
case $host in
|
||||||
@@ -114,17 +111,24 @@ esac
|
|||||||
dnl libtool setup
|
dnl libtool setup
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
AC_MSG_CHECKING([if we need -no-undefined])
|
AC_MSG_CHECKING([if we need CARES_BUILDING_LIBRARY])
|
||||||
case $host in
|
case $host in
|
||||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
*-*-mingw*)
|
||||||
need_no_undefined=yes
|
AC_DEFINE(CARES_BUILDING_LIBRARY, 1, [when building c-ares library])
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_MSG_CHECKING([if we need CARES_STATICLIB])
|
||||||
|
if test "X$enable_shared" = "Xno"
|
||||||
|
then
|
||||||
|
AC_DEFINE(CARES_STATICLIB, 1, [when not building a shared library])
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
need_no_undefined=no
|
AC_MSG_RESULT(no)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
AC_MSG_RESULT($need_no_undefined)
|
|
||||||
AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
|
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
dnl platform/compiler/architecture specific checks/flags
|
dnl platform/compiler/architecture specific checks/flags
|
||||||
@@ -160,6 +164,13 @@ esac
|
|||||||
|
|
||||||
CARES_CHECK_COMPILER_HALT_ON_ERROR
|
CARES_CHECK_COMPILER_HALT_ON_ERROR
|
||||||
CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||||
|
CARES_CHECK_COMPILER_SYMBOL_HIDING
|
||||||
|
|
||||||
|
CARES_CHECK_NO_UNDEFINED
|
||||||
|
AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
|
||||||
|
|
||||||
|
CARES_CHECK_CURLDEBUG
|
||||||
|
AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
dnl Compilation based checks should not be done before this point.
|
dnl Compilation based checks should not be done before this point.
|
||||||
@@ -347,8 +358,7 @@ if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
|
|||||||
fi
|
fi
|
||||||
ac_cv_func_strcasecmp="no"
|
ac_cv_func_strcasecmp="no"
|
||||||
|
|
||||||
dnl socket lib?
|
CARES_CHECK_LIBS_CONNECT
|
||||||
AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ])
|
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
dnl In case that function clock_gettime with monotonic timer is available,
|
dnl In case that function clock_gettime with monotonic timer is available,
|
||||||
@@ -448,6 +458,7 @@ AC_CHECK_HEADERS(
|
|||||||
netinet/tcp.h \
|
netinet/tcp.h \
|
||||||
net/if.h \
|
net/if.h \
|
||||||
errno.h \
|
errno.h \
|
||||||
|
socket.h \
|
||||||
strings.h \
|
strings.h \
|
||||||
stdbool.h \
|
stdbool.h \
|
||||||
time.h \
|
time.h \
|
||||||
@@ -544,6 +555,9 @@ CURL_CHECK_FUNC_RECVFROM
|
|||||||
CURL_CHECK_FUNC_SEND
|
CURL_CHECK_FUNC_SEND
|
||||||
CURL_CHECK_MSG_NOSIGNAL
|
CURL_CHECK_MSG_NOSIGNAL
|
||||||
|
|
||||||
|
CARES_CHECK_FUNC_CLOSESOCKET
|
||||||
|
CARES_CHECK_FUNC_CLOSESOCKET_CAMEL
|
||||||
|
CARES_CHECK_FUNC_CONNECT
|
||||||
CARES_CHECK_FUNC_FCNTL
|
CARES_CHECK_FUNC_FCNTL
|
||||||
CARES_CHECK_FUNC_FREEADDRINFO
|
CARES_CHECK_FUNC_FREEADDRINFO
|
||||||
CARES_CHECK_FUNC_GETADDRINFO
|
CARES_CHECK_FUNC_GETADDRINFO
|
||||||
@@ -557,6 +571,7 @@ CARES_CHECK_FUNC_IOCTL
|
|||||||
CARES_CHECK_FUNC_IOCTLSOCKET
|
CARES_CHECK_FUNC_IOCTLSOCKET
|
||||||
CARES_CHECK_FUNC_IOCTLSOCKET_CAMEL
|
CARES_CHECK_FUNC_IOCTLSOCKET_CAMEL
|
||||||
CARES_CHECK_FUNC_SETSOCKOPT
|
CARES_CHECK_FUNC_SETSOCKOPT
|
||||||
|
CARES_CHECK_FUNC_SOCKET
|
||||||
CARES_CHECK_FUNC_STRCASECMP
|
CARES_CHECK_FUNC_STRCASECMP
|
||||||
CARES_CHECK_FUNC_STRCMPI
|
CARES_CHECK_FUNC_STRCMPI
|
||||||
CARES_CHECK_FUNC_STRDUP
|
CARES_CHECK_FUNC_STRDUP
|
||||||
@@ -882,6 +897,8 @@ fi
|
|||||||
CARES_CHECK_OPTION_NONBLOCKING
|
CARES_CHECK_OPTION_NONBLOCKING
|
||||||
CARES_CHECK_NONBLOCKING_SOCKET
|
CARES_CHECK_NONBLOCKING_SOCKET
|
||||||
|
|
||||||
|
CARES_CONFIGURE_SYMBOL_HIDING
|
||||||
|
|
||||||
CARES_PRIVATE_LIBS="$LIBS"
|
CARES_PRIVATE_LIBS="$LIBS"
|
||||||
AC_SUBST(CARES_PRIVATE_LIBS)
|
AC_SUBST(CARES_PRIVATE_LIBS)
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
@@ -81,7 +81,7 @@ inet_net_pton_ipv4(const char *src, unsigned char *dst, size_t size)
|
|||||||
if (ch == '0' && (src[0] == 'x' || src[0] == 'X')
|
if (ch == '0' && (src[0] == 'x' || src[0] == 'X')
|
||||||
&& ISXDIGIT(src[1])) {
|
&& ISXDIGIT(src[1])) {
|
||||||
/* Hexadecimal: Eat nybble string. */
|
/* Hexadecimal: Eat nybble string. */
|
||||||
if (size <= 0U)
|
if (!size)
|
||||||
goto emsgsize;
|
goto emsgsize;
|
||||||
dirty = 0;
|
dirty = 0;
|
||||||
src++; /* skip x or X. */
|
src++; /* skip x or X. */
|
||||||
@@ -94,14 +94,14 @@ inet_net_pton_ipv4(const char *src, unsigned char *dst, size_t size)
|
|||||||
else
|
else
|
||||||
tmp = (tmp << 4) | n;
|
tmp = (tmp << 4) | n;
|
||||||
if (++dirty == 2) {
|
if (++dirty == 2) {
|
||||||
if (size-- <= 0U)
|
if (!size--)
|
||||||
goto emsgsize;
|
goto emsgsize;
|
||||||
*dst++ = (unsigned char) tmp;
|
*dst++ = (unsigned char) tmp;
|
||||||
dirty = 0;
|
dirty = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dirty) { /* Odd trailing nybble? */
|
if (dirty) { /* Odd trailing nybble? */
|
||||||
if (size-- <= 0U)
|
if (!size--)
|
||||||
goto emsgsize;
|
goto emsgsize;
|
||||||
*dst++ = (unsigned char) (tmp << 4);
|
*dst++ = (unsigned char) (tmp << 4);
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@ inet_net_pton_ipv4(const char *src, unsigned char *dst, size_t size)
|
|||||||
goto enoent;
|
goto enoent;
|
||||||
} while ((ch = *src++) != '\0' &&
|
} while ((ch = *src++) != '\0' &&
|
||||||
ISDIGIT(ch));
|
ISDIGIT(ch));
|
||||||
if (size-- <= 0U)
|
if (!size--)
|
||||||
goto emsgsize;
|
goto emsgsize;
|
||||||
*dst++ = (unsigned char) tmp;
|
*dst++ = (unsigned char) tmp;
|
||||||
if (ch == '\0' || ch == '/')
|
if (ch == '\0' || ch == '/')
|
||||||
@@ -179,7 +179,7 @@ inet_net_pton_ipv4(const char *src, unsigned char *dst, size_t size)
|
|||||||
}
|
}
|
||||||
/* Extend network to cover the actual mask. */
|
/* Extend network to cover the actual mask. */
|
||||||
while (bits > ((dst - odst) * 8)) {
|
while (bits > ((dst - odst) * 8)) {
|
||||||
if (size-- <= 0U)
|
if (!size--)
|
||||||
goto emsgsize;
|
goto emsgsize;
|
||||||
*dst++ = '\0';
|
*dst++ = '\0';
|
||||||
}
|
}
|
||||||
@@ -426,7 +426,8 @@ ares_inet_net_pton(int af, const char *src, void *dst, size_t size)
|
|||||||
#ifndef HAVE_INET_PTON
|
#ifndef HAVE_INET_PTON
|
||||||
int ares_inet_pton(int af, const char *src, void *dst)
|
int ares_inet_pton(int af, const char *src, void *dst)
|
||||||
{
|
{
|
||||||
int size, result;
|
int result;
|
||||||
|
size_t size;
|
||||||
|
|
||||||
if (af == AF_INET)
|
if (af == AF_INET)
|
||||||
size = sizeof(struct in_addr);
|
size = sizeof(struct in_addr);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "setup.h"
|
#include "ares_setup.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
# include <sys/socket.h>
|
# include <sys/socket.h>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#***************************************************************************
|
#***************************************************************************
|
||||||
|
|
||||||
# File version for 'aclocal' use. Keep it a single number.
|
# File version for 'aclocal' use. Keep it a single number.
|
||||||
# serial 51
|
# serial 61
|
||||||
|
|
||||||
|
|
||||||
dnl CARES_CHECK_COMPILER
|
dnl CARES_CHECK_COMPILER
|
||||||
@@ -24,6 +24,7 @@ dnl -------------------------------------------------
|
|||||||
dnl Verify if the C compiler being used is known.
|
dnl Verify if the C compiler being used is known.
|
||||||
|
|
||||||
AC_DEFUN([CARES_CHECK_COMPILER], [
|
AC_DEFUN([CARES_CHECK_COMPILER], [
|
||||||
|
AC_BEFORE([$0],[CARES_CHECK_NO_UNDEFINED])dnl
|
||||||
#
|
#
|
||||||
compiler_id="unknown"
|
compiler_id="unknown"
|
||||||
compiler_num="0"
|
compiler_num="0"
|
||||||
@@ -1070,36 +1071,119 @@ squeeze() {
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl CARES_PROCESS_DEBUG_BUILD_OPTS
|
dnl CARES_CHECK_CURLDEBUG
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
dnl Settings which depend on configure's debug given
|
dnl Settings which depend on configure's curldebug given
|
||||||
dnl option, and further configure the build process.
|
dnl option, and other additional configure pre-requisites.
|
||||||
dnl Don't use this macro for compiler dependant stuff.
|
dnl Using the curl debug memory tracking feature in c-ares
|
||||||
|
dnl is a hack that actually can only be used/enabled when
|
||||||
|
dnl c-ares is built directly in curl's CVS tree, as a static
|
||||||
|
dnl library or as a shared one on those systems on which
|
||||||
|
dnl shared libraries support undefined symbols, along with
|
||||||
|
dnl an equally configured libcurl.
|
||||||
|
|
||||||
AC_DEFUN([CARES_PROCESS_DEBUG_BUILD_OPTS], [
|
AC_DEFUN([CARES_CHECK_CURLDEBUG], [
|
||||||
AC_REQUIRE([CARES_CHECK_OPTION_DEBUG])dnl
|
|
||||||
AC_REQUIRE([CARES_SHFUNC_SQUEEZE])dnl
|
AC_REQUIRE([CARES_SHFUNC_SQUEEZE])dnl
|
||||||
AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
|
cares_builddir=`pwd`
|
||||||
|
supports_curldebug="unknown"
|
||||||
|
if test "$want_curldebug" = "yes"; then
|
||||||
|
if test "x$enable_shared" != "xno" &&
|
||||||
|
test "x$enable_shared" != "xyes"; then
|
||||||
|
AC_MSG_WARN([unknown enable_shared setting.])
|
||||||
|
supports_curldebug="no"
|
||||||
|
fi
|
||||||
|
if test "x$enable_static" != "xno" &&
|
||||||
|
test "x$enable_static" != "xyes"; then
|
||||||
|
AC_MSG_WARN([unknown enable_static setting.])
|
||||||
|
supports_curldebug="no"
|
||||||
|
fi
|
||||||
|
if test "$supports_curldebug" != "no"; then
|
||||||
|
if test "$enable_shared" = "yes" &&
|
||||||
|
test "$need_no_undefined" = "yes"; then
|
||||||
|
supports_curldebug="no"
|
||||||
|
AC_MSG_WARN([shared library does not support undefined symbols.])
|
||||||
|
fi
|
||||||
|
if test ! -f "$srcdir/../include/curl/curlbuild.h.dist"; then
|
||||||
|
AC_MSG_WARN([c-ares source not embedded in curl's CVS tree.])
|
||||||
|
supports_curldebug="no"
|
||||||
|
elif test ! -f "$srcdir/../include/curl/Makefile.in"; then
|
||||||
|
AC_MSG_WARN([curl's buildconf has not been run.])
|
||||||
|
supports_curldebug="no"
|
||||||
|
elif test ! -f "$cares_builddir/../libcurl.pc" ||
|
||||||
|
test ! -f "$cares_builddir/../include/curl/curlbuild.h"; then
|
||||||
|
AC_MSG_WARN([curl's configure has not been run.])
|
||||||
|
supports_curldebug="no"
|
||||||
|
elif test ! -f "$cares_builddir/../lib/curl_config.h"; then
|
||||||
|
AC_MSG_WARN([libcurl's curl_config.h is missing.])
|
||||||
|
supports_curldebug="no"
|
||||||
|
elif test ! -f "$cares_builddir/../config.status"; then
|
||||||
|
AC_MSG_WARN([curl's config.status is missing.])
|
||||||
|
supports_curldebug="no"
|
||||||
|
fi
|
||||||
|
if test "$supports_curldebug" != "no"; then
|
||||||
|
grep '^#define USE_ARES' "$cares_builddir/../lib/curl_config.h" >/dev/null
|
||||||
|
if test "$?" -ne "0"; then
|
||||||
|
AC_MSG_WARN([libcurl configured without c-ares support.])
|
||||||
|
supports_curldebug="no"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "$supports_curldebug" != "no"; then
|
||||||
|
grep 'CPPFLAGS.*CURLDEBUG' "$cares_builddir/../config.status" >/dev/null
|
||||||
|
if test "$?" -ne "0"; then
|
||||||
|
AC_MSG_WARN([libcurl configured without curldebug support.])
|
||||||
|
supports_curldebug="no"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
#
|
#
|
||||||
if test "$want_debug" = "yes"; then
|
if test "$want_curldebug" = "yes"; then
|
||||||
|
AC_MSG_CHECKING([if curl debug memory tracking can be enabled])
|
||||||
dnl when doing the debug stuff, use static library only
|
test "$supports_curldebug" = "no" || supports_curldebug="yes"
|
||||||
AC_DISABLE_SHARED
|
AC_MSG_RESULT([$supports_curldebug])
|
||||||
|
if test "$supports_curldebug" = "no"; then
|
||||||
debugbuild="yes"
|
AC_MSG_WARN([cannot enable curl debug memory tracking.])
|
||||||
|
want_curldebug="no"
|
||||||
dnl the entire --enable-debug is a hack that lives and runs on top of
|
fi
|
||||||
dnl libcurl stuff so this BUILDING_LIBCURL is not THAT much uglier
|
fi
|
||||||
|
#
|
||||||
|
if test "$want_curldebug" = "yes"; then
|
||||||
|
dnl TODO: Verify if the BUILDING_LIBCURL definition is still required.
|
||||||
AC_DEFINE(BUILDING_LIBCURL, 1, [when building as static part of libcurl])
|
AC_DEFINE(BUILDING_LIBCURL, 1, [when building as static part of libcurl])
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS -DCURLDEBUG"
|
CPPFLAGS="$CPPFLAGS -DCURLDEBUG"
|
||||||
|
|
||||||
dnl CHECKME: Do we still need so specify this include path here?
|
|
||||||
CPPFLAGS="$CPPFLAGS -I$srcdir/../include"
|
|
||||||
|
|
||||||
squeeze CPPFLAGS
|
squeeze CPPFLAGS
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
|
if test "$want_debug" = "yes"; then
|
||||||
|
CPPFLAGS="$CPPFLAGS -DDEBUGBUILD"
|
||||||
|
squeeze CPPFLAGS
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CARES_CHECK_NO_UNDEFINED
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Checks if the -no-undefined flag must be used when
|
||||||
|
dnl building shared libraries. This is required on all
|
||||||
|
dnl systems on which shared libraries should not have
|
||||||
|
dnl references to undefined symbols. This check should
|
||||||
|
dnl not be done before AC-PROG-LIBTOOL.
|
||||||
|
|
||||||
|
AC_DEFUN([CARES_CHECK_NO_UNDEFINED], [
|
||||||
|
AC_BEFORE([$0],[CARES_CHECK_CURLDEBUG])dnl
|
||||||
|
AC_MSG_CHECKING([if shared libraries need -no-undefined])
|
||||||
|
need_no_undefined="no"
|
||||||
|
case $host in
|
||||||
|
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc* | *-*-aix*)
|
||||||
|
need_no_undefined="yes"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if test "x$allow_undefined" = "xno"; then
|
||||||
|
need_no_undefined="yes"
|
||||||
|
elif test "x$allow_undefined_flag" = "xunsupported"; then
|
||||||
|
need_no_undefined="yes"
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT($need_no_undefined)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
@@ -1226,6 +1310,91 @@ AC_DEFUN([CARES_CHECK_COMPILER_STRUCT_MEMBER_SIZE], [
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CARES_CHECK_COMPILER_SYMBOL_HIDING
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Verify if compiler supports hiding library internal symbols, setting
|
||||||
|
dnl shell variable supports_symbol_hiding value as appropriate, as well as
|
||||||
|
dnl variables symbol_hiding_CFLAGS and symbol_hiding_EXTERN when supported.
|
||||||
|
|
||||||
|
AC_DEFUN([CARES_CHECK_COMPILER_SYMBOL_HIDING], [
|
||||||
|
AC_REQUIRE([CARES_CHECK_COMPILER])dnl
|
||||||
|
AC_BEFORE([$0],[CARES_CONFIGURE_SYMBOL_HIDING])dnl
|
||||||
|
AC_MSG_CHECKING([if compiler supports hiding library internal symbols])
|
||||||
|
supports_symbol_hiding="no"
|
||||||
|
symbol_hiding_CFLAGS=""
|
||||||
|
symbol_hiding_EXTERN=""
|
||||||
|
tmp_CFLAGS=""
|
||||||
|
tmp_EXTERN=""
|
||||||
|
case "$compiler_id" in
|
||||||
|
GNU_C)
|
||||||
|
dnl Only gcc 3.4 or later
|
||||||
|
if test "$compiler_num" -ge "304"; then
|
||||||
|
if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
|
||||||
|
tmp_EXTERN="__attribute__ ((visibility (\"default\")))"
|
||||||
|
tmp_CFLAGS="-fvisibility=hidden"
|
||||||
|
supports_symbol_hiding="yes"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
INTEL_UNIX_C)
|
||||||
|
dnl Only icc 9.0 or later
|
||||||
|
if test "$compiler_num" -ge "900"; then
|
||||||
|
if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then
|
||||||
|
tmp_EXTERN="__attribute__ ((visibility (\"default\")))"
|
||||||
|
tmp_CFLAGS="-fvisibility=hidden"
|
||||||
|
supports_symbol_hiding="yes"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
SUNPRO_C)
|
||||||
|
if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then
|
||||||
|
tmp_EXTERN="__global"
|
||||||
|
tmp_CFLAGS="-xldscope=hidden"
|
||||||
|
supports_symbol_hiding="yes"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if test "$supports_symbol_hiding" = "yes"; then
|
||||||
|
tmp_save_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS"
|
||||||
|
squeeze CFLAGS
|
||||||
|
AC_COMPILE_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
$tmp_EXTERN char *dummy(char *buff);
|
||||||
|
char *dummy(char *buff)
|
||||||
|
{
|
||||||
|
if(buff)
|
||||||
|
return ++buff;
|
||||||
|
else
|
||||||
|
return buff;
|
||||||
|
}
|
||||||
|
]],[[
|
||||||
|
char b[16];
|
||||||
|
char *r = dummy(&b);
|
||||||
|
if(r)
|
||||||
|
return (int)*r;
|
||||||
|
]])
|
||||||
|
],[
|
||||||
|
supports_symbol_hiding="yes"
|
||||||
|
],[
|
||||||
|
supports_symbol_hiding="no"
|
||||||
|
echo " " >&6
|
||||||
|
sed 's/^/cc-src: /' conftest.$ac_ext >&6
|
||||||
|
sed 's/^/cc-err: /' conftest.err >&6
|
||||||
|
echo " " >&6
|
||||||
|
])
|
||||||
|
CFLAGS="$tmp_save_CFLAGS"
|
||||||
|
fi
|
||||||
|
if test "$supports_symbol_hiding" = "yes"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
symbol_hiding_CFLAGS="$tmp_CFLAGS"
|
||||||
|
symbol_hiding_EXTERN="$tmp_EXTERN"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl CARES_VAR_MATCH (VARNAME, VALUE)
|
dnl CARES_VAR_MATCH (VARNAME, VALUE)
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
dnl Verifies if shell variable VARNAME contains VALUE.
|
dnl Verifies if shell variable VARNAME contains VALUE.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#***************************************************************************
|
#***************************************************************************
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008 by Daniel Stenberg et al
|
# Copyright (C) 2008 - 2009 by Daniel Stenberg et al
|
||||||
#
|
#
|
||||||
# Permission to use, copy, modify, and distribute this software and its
|
# Permission to use, copy, modify, and distribute this software and its
|
||||||
# documentation for any purpose and without fee is hereby granted, provided
|
# documentation for any purpose and without fee is hereby granted, provided
|
||||||
@@ -16,7 +16,46 @@
|
|||||||
#***************************************************************************
|
#***************************************************************************
|
||||||
|
|
||||||
# File version for 'aclocal' use. Keep it a single number.
|
# File version for 'aclocal' use. Keep it a single number.
|
||||||
# serial 3
|
# serial 8
|
||||||
|
|
||||||
|
|
||||||
|
dnl CARES_CHECK_OPTION_CURLDEBUG
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Verify if configure has been invoked with option
|
||||||
|
dnl --enable-curldebug or --disable-curldebug, and set
|
||||||
|
dnl shell variable want_curldebug value as appropriate.
|
||||||
|
|
||||||
|
AC_DEFUN([CARES_CHECK_OPTION_CURLDEBUG], [
|
||||||
|
AC_BEFORE([$0],[CARES_CHECK_CURLDEBUG])dnl
|
||||||
|
AC_MSG_CHECKING([whether to enable curl debug memory tracking])
|
||||||
|
OPT_CURLDEBUG_BUILD="default"
|
||||||
|
AC_ARG_ENABLE(curldebug,
|
||||||
|
AC_HELP_STRING([--enable-curldebug],[Enable curl debug memory tracking])
|
||||||
|
AC_HELP_STRING([--disable-curldebug],[Disable curl debug memory tracking]),
|
||||||
|
OPT_CURLDEBUG_BUILD=$enableval)
|
||||||
|
case "$OPT_CURLDEBUG_BUILD" in
|
||||||
|
no)
|
||||||
|
dnl --disable-curldebug option used
|
||||||
|
want_curldebug="no"
|
||||||
|
;;
|
||||||
|
default)
|
||||||
|
dnl configure option not specified
|
||||||
|
want_curldebug="no"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
dnl --enable-curldebug option used.
|
||||||
|
dnl The use of this option value is a request to enable curl's
|
||||||
|
dnl debug memory tracking for the c-ares library. This is a big
|
||||||
|
dnl hack that can only be done when a whole bunch of requisites
|
||||||
|
dnl are simultaneously satisfied. Later on, these requisites are
|
||||||
|
dnl verified and if they are not fully satisfied the option will
|
||||||
|
dnl be ignored and act as if --disable-curldebug had been given
|
||||||
|
dnl setting shell variable want_curldebug to 'no'.
|
||||||
|
want_curldebug="yes"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
AC_MSG_RESULT([$want_curldebug])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl CARES_CHECK_OPTION_DEBUG
|
dnl CARES_CHECK_OPTION_DEBUG
|
||||||
@@ -27,6 +66,7 @@ dnl variable want_debug value as appropriate.
|
|||||||
|
|
||||||
AC_DEFUN([CARES_CHECK_OPTION_DEBUG], [
|
AC_DEFUN([CARES_CHECK_OPTION_DEBUG], [
|
||||||
AC_BEFORE([$0],[CARES_CHECK_OPTION_WARNINGS])dnl
|
AC_BEFORE([$0],[CARES_CHECK_OPTION_WARNINGS])dnl
|
||||||
|
AC_BEFORE([$0],[CARES_CHECK_OPTION_CURLDEBUG])dnl
|
||||||
AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl
|
AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl
|
||||||
AC_MSG_CHECKING([whether to enable debug build options])
|
AC_MSG_CHECKING([whether to enable debug build options])
|
||||||
OPT_DEBUG_BUILD="default"
|
OPT_DEBUG_BUILD="default"
|
||||||
@@ -140,6 +180,46 @@ AC_HELP_STRING([--disable-optimize],[Disable compiler optimizations]),
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CARES_CHECK_OPTION_SYMBOL_HIDING
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Verify if configure has been invoked with option
|
||||||
|
dnl --enable-symbol-hiding or --disable-symbol-hiding,
|
||||||
|
dnl setting shell variable want_symbol_hiding value.
|
||||||
|
|
||||||
|
AC_DEFUN([CARES_CHECK_OPTION_SYMBOL_HIDING], [
|
||||||
|
AC_BEFORE([$0],[CARES_CHECK_COMPILER_SYMBOL_HIDING])dnl
|
||||||
|
AC_MSG_CHECKING([whether to enable hiding of library internal symbols])
|
||||||
|
OPT_SYMBOL_HIDING="default"
|
||||||
|
AC_ARG_ENABLE(symbol-hiding,
|
||||||
|
AC_HELP_STRING([--enable-symbol-hiding],[Enable hiding of library internal symbols])
|
||||||
|
AC_HELP_STRING([--disable-symbol-hiding],[Disable hiding of library internal symbols]),
|
||||||
|
OPT_SYMBOL_HIDING=$enableval)
|
||||||
|
case "$OPT_SYMBOL_HIDING" in
|
||||||
|
no)
|
||||||
|
dnl --disable-symbol-hiding option used.
|
||||||
|
dnl This is an indication to not attempt hiding of library internal
|
||||||
|
dnl symbols. Default symbol visibility will be used, which normally
|
||||||
|
dnl exposes all library internal symbols.
|
||||||
|
want_symbol_hiding="no"
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
;;
|
||||||
|
default)
|
||||||
|
dnl configure's symbol-hiding option not specified.
|
||||||
|
dnl Handle this as if --enable-symbol-hiding option was given.
|
||||||
|
want_symbol_hiding="yes"
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
dnl --enable-symbol-hiding option used.
|
||||||
|
dnl This is an indication to attempt hiding of library internal
|
||||||
|
dnl symbols. This is only supported on some compilers/linkers.
|
||||||
|
want_symbol_hiding="yes"
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl CARES_CHECK_OPTION_WARNINGS
|
dnl CARES_CHECK_OPTION_WARNINGS
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
dnl Verify if configure has been invoked with option
|
dnl Verify if configure has been invoked with option
|
||||||
@@ -212,3 +292,29 @@ AC_DEFUN([CARES_CHECK_NONBLOCKING_SOCKET], [
|
|||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CARES_CONFIGURE_SYMBOL_HIDING
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Depending on --enable-symbol-hiding or --disable-symbol-hiding
|
||||||
|
dnl configure option, and compiler capability to actually honor such
|
||||||
|
dnl option, this will modify compiler flags as appropriate and also
|
||||||
|
dnl provide needed definitions for configuration file.
|
||||||
|
dnl This macro should not be used until all compilation tests have
|
||||||
|
dnl been done to prevent interferences on other tests.
|
||||||
|
|
||||||
|
AC_DEFUN([CARES_CONFIGURE_SYMBOL_HIDING], [
|
||||||
|
AC_MSG_CHECKING([whether hiding of library internal symbols will actually happen])
|
||||||
|
if test x"$ac_cv_native_windows" != "xyes" &&
|
||||||
|
test "$want_symbol_hiding" = "yes" &&
|
||||||
|
test "$supports_symbol_hiding" = "yes"; then
|
||||||
|
CFLAGS="$CFLAGS $symbol_hiding_CFLAGS"
|
||||||
|
AC_DEFINE_UNQUOTED(CARES_SYMBOL_HIDING, 1,
|
||||||
|
[Define to 1 to enable hiding of library internal symbols.])
|
||||||
|
AC_DEFINE_UNQUOTED(CARES_SYMBOL_SCOPE_EXTERN, $symbol_hiding_EXTERN,
|
||||||
|
[Definition to make a library symbol externally visible.])
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#***************************************************************************
|
#***************************************************************************
|
||||||
|
|
||||||
# File version for 'aclocal' use. Keep it a single number.
|
# File version for 'aclocal' use. Keep it a single number.
|
||||||
# serial 29
|
# serial 32
|
||||||
|
|
||||||
|
|
||||||
dnl CARES_INCLUDES_ARPA_INET
|
dnl CARES_INCLUDES_ARPA_INET
|
||||||
@@ -91,6 +91,27 @@ cares_includes_netdb="\
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CARES_INCLUDES_SOCKET
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Set up variable with list of headers that must be
|
||||||
|
dnl included when socket.h is to be included.
|
||||||
|
|
||||||
|
AC_DEFUN([CARES_INCLUDES_SOCKET], [
|
||||||
|
cares_includes_socket="\
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SOCKET_H
|
||||||
|
# include <socket.h>
|
||||||
|
#endif
|
||||||
|
/* includes end */"
|
||||||
|
AC_CHECK_HEADERS(
|
||||||
|
sys/types.h socket.h,
|
||||||
|
[], [], [$cares_includes_socket])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl CARES_INCLUDES_STDLIB
|
dnl CARES_INCLUDES_STDLIB
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
dnl Set up variable with list of headers that must be
|
dnl Set up variable with list of headers that must be
|
||||||
@@ -319,6 +340,288 @@ cares_preprocess_callconv="\
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CARES_CHECK_FUNC_CLOSESOCKET
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Verify if closesocket is available, prototyped, and
|
||||||
|
dnl can be compiled. If all of these are true, and
|
||||||
|
dnl usage has not been previously disallowed with
|
||||||
|
dnl shell variable cares_disallow_closesocket, then
|
||||||
|
dnl HAVE_CLOSESOCKET will be defined.
|
||||||
|
|
||||||
|
AC_DEFUN([CARES_CHECK_FUNC_CLOSESOCKET], [
|
||||||
|
AC_REQUIRE([CARES_INCLUDES_WINSOCK2])dnl
|
||||||
|
AC_REQUIRE([CARES_INCLUDES_SOCKET])dnl
|
||||||
|
#
|
||||||
|
tst_links_closesocket="unknown"
|
||||||
|
tst_proto_closesocket="unknown"
|
||||||
|
tst_compi_closesocket="unknown"
|
||||||
|
tst_allow_closesocket="unknown"
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([if closesocket can be linked])
|
||||||
|
AC_LINK_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
$cares_includes_winsock2
|
||||||
|
$cares_includes_socket
|
||||||
|
]],[[
|
||||||
|
if(0 != closesocket(0))
|
||||||
|
return 1;
|
||||||
|
]])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_links_closesocket="yes"
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_links_closesocket="no"
|
||||||
|
])
|
||||||
|
#
|
||||||
|
if test "$tst_links_closesocket" = "yes"; then
|
||||||
|
AC_MSG_CHECKING([if closesocket is prototyped])
|
||||||
|
AC_EGREP_CPP([closesocket],[
|
||||||
|
$cares_includes_winsock2
|
||||||
|
$cares_includes_socket
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_proto_closesocket="yes"
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_proto_closesocket="no"
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
if test "$tst_proto_closesocket" = "yes"; then
|
||||||
|
AC_MSG_CHECKING([if closesocket is compilable])
|
||||||
|
AC_COMPILE_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
$cares_includes_winsock2
|
||||||
|
$cares_includes_socket
|
||||||
|
]],[[
|
||||||
|
if(0 != closesocket(0))
|
||||||
|
return 1;
|
||||||
|
]])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_compi_closesocket="yes"
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_compi_closesocket="no"
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
if test "$tst_compi_closesocket" = "yes"; then
|
||||||
|
AC_MSG_CHECKING([if closesocket usage allowed])
|
||||||
|
if test "x$cares_disallow_closesocket" != "xyes"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_allow_closesocket="yes"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_allow_closesocket="no"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([if closesocket might be used])
|
||||||
|
if test "$tst_links_closesocket" = "yes" &&
|
||||||
|
test "$tst_proto_closesocket" = "yes" &&
|
||||||
|
test "$tst_compi_closesocket" = "yes" &&
|
||||||
|
test "$tst_allow_closesocket" = "yes"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE_UNQUOTED(HAVE_CLOSESOCKET, 1,
|
||||||
|
[Define to 1 if you have the closesocket function.])
|
||||||
|
ac_cv_func_closesocket="yes"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
ac_cv_func_closesocket="no"
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CARES_CHECK_FUNC_CLOSESOCKET_CAMEL
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Verify if CloseSocket is available, prototyped, and
|
||||||
|
dnl can be compiled. If all of these are true, and
|
||||||
|
dnl usage has not been previously disallowed with
|
||||||
|
dnl shell variable cares_disallow_closesocket_camel,
|
||||||
|
dnl then HAVE_CLOSESOCKET_CAMEL will be defined.
|
||||||
|
|
||||||
|
AC_DEFUN([CARES_CHECK_FUNC_CLOSESOCKET_CAMEL], [
|
||||||
|
AC_REQUIRE([CARES_INCLUDES_SYS_SOCKET])dnl
|
||||||
|
#
|
||||||
|
tst_links_closesocket_camel="unknown"
|
||||||
|
tst_proto_closesocket_camel="unknown"
|
||||||
|
tst_compi_closesocket_camel="unknown"
|
||||||
|
tst_allow_closesocket_camel="unknown"
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([if CloseSocket can be linked])
|
||||||
|
AC_LINK_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
$cares_includes_sys_socket
|
||||||
|
]],[[
|
||||||
|
if(0 != CloseSocket(0))
|
||||||
|
return 1;
|
||||||
|
]])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_links_closesocket_camel="yes"
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_links_closesocket_camel="no"
|
||||||
|
])
|
||||||
|
#
|
||||||
|
if test "$tst_links_closesocket_camel" = "yes"; then
|
||||||
|
AC_MSG_CHECKING([if CloseSocket is prototyped])
|
||||||
|
AC_EGREP_CPP([CloseSocket],[
|
||||||
|
$cares_includes_sys_socket
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_proto_closesocket_camel="yes"
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_proto_closesocket_camel="no"
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
if test "$tst_proto_closesocket_camel" = "yes"; then
|
||||||
|
AC_MSG_CHECKING([if CloseSocket is compilable])
|
||||||
|
AC_COMPILE_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
$cares_includes_sys_socket
|
||||||
|
]],[[
|
||||||
|
if(0 != CloseSocket(0))
|
||||||
|
return 1;
|
||||||
|
]])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_compi_closesocket_camel="yes"
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_compi_closesocket_camel="no"
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
if test "$tst_compi_closesocket_camel" = "yes"; then
|
||||||
|
AC_MSG_CHECKING([if CloseSocket usage allowed])
|
||||||
|
if test "x$cares_disallow_closesocket_camel" != "xyes"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_allow_closesocket_camel="yes"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_allow_closesocket_camel="no"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([if CloseSocket might be used])
|
||||||
|
if test "$tst_links_closesocket_camel" = "yes" &&
|
||||||
|
test "$tst_proto_closesocket_camel" = "yes" &&
|
||||||
|
test "$tst_compi_closesocket_camel" = "yes" &&
|
||||||
|
test "$tst_allow_closesocket_camel" = "yes"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE_UNQUOTED(HAVE_CLOSESOCKET_CAMEL, 1,
|
||||||
|
[Define to 1 if you have the CloseSocket camel case function.])
|
||||||
|
ac_cv_func_closesocket_camel="yes"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
ac_cv_func_closesocket_camel="no"
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CARES_CHECK_FUNC_CONNECT
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Verify if connect is available, prototyped, and
|
||||||
|
dnl can be compiled. If all of these are true, and
|
||||||
|
dnl usage has not been previously disallowed with
|
||||||
|
dnl shell variable cares_disallow_connect, then
|
||||||
|
dnl HAVE_CONNECT will be defined.
|
||||||
|
|
||||||
|
AC_DEFUN([CARES_CHECK_FUNC_CONNECT], [
|
||||||
|
AC_REQUIRE([CARES_INCLUDES_WINSOCK2])dnl
|
||||||
|
AC_REQUIRE([CARES_INCLUDES_SYS_SOCKET])dnl
|
||||||
|
AC_REQUIRE([CARES_INCLUDES_SOCKET])dnl
|
||||||
|
#
|
||||||
|
tst_links_connect="unknown"
|
||||||
|
tst_proto_connect="unknown"
|
||||||
|
tst_compi_connect="unknown"
|
||||||
|
tst_allow_connect="unknown"
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([if connect can be linked])
|
||||||
|
AC_LINK_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
$cares_includes_winsock2
|
||||||
|
$cares_includes_sys_socket
|
||||||
|
$cares_includes_socket
|
||||||
|
]],[[
|
||||||
|
if(0 != connect(0, 0, 0))
|
||||||
|
return 1;
|
||||||
|
]])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_links_connect="yes"
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_links_connect="no"
|
||||||
|
])
|
||||||
|
#
|
||||||
|
if test "$tst_links_connect" = "yes"; then
|
||||||
|
AC_MSG_CHECKING([if connect is prototyped])
|
||||||
|
AC_EGREP_CPP([connect],[
|
||||||
|
$cares_includes_winsock2
|
||||||
|
$cares_includes_sys_socket
|
||||||
|
$cares_includes_socket
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_proto_connect="yes"
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_proto_connect="no"
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
if test "$tst_proto_connect" = "yes"; then
|
||||||
|
AC_MSG_CHECKING([if connect is compilable])
|
||||||
|
AC_COMPILE_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
$cares_includes_winsock2
|
||||||
|
$cares_includes_sys_socket
|
||||||
|
$cares_includes_socket
|
||||||
|
]],[[
|
||||||
|
if(0 != connect(0, 0, 0))
|
||||||
|
return 1;
|
||||||
|
]])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_compi_connect="yes"
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_compi_connect="no"
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
if test "$tst_compi_connect" = "yes"; then
|
||||||
|
AC_MSG_CHECKING([if connect usage allowed])
|
||||||
|
if test "x$cares_disallow_connect" != "xyes"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_allow_connect="yes"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_allow_connect="no"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([if connect might be used])
|
||||||
|
if test "$tst_links_connect" = "yes" &&
|
||||||
|
test "$tst_proto_connect" = "yes" &&
|
||||||
|
test "$tst_compi_connect" = "yes" &&
|
||||||
|
test "$tst_allow_connect" = "yes"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE_UNQUOTED(HAVE_CONNECT, 1,
|
||||||
|
[Define to 1 if you have the connect function.])
|
||||||
|
ac_cv_func_connect="yes"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
ac_cv_func_connect="no"
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl CARES_CHECK_FUNC_FCNTL
|
dnl CARES_CHECK_FUNC_FCNTL
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
dnl Verify if fcntl is available, prototyped, and
|
dnl Verify if fcntl is available, prototyped, and
|
||||||
@@ -2074,6 +2377,104 @@ AC_DEFUN([CARES_CHECK_FUNC_SETSOCKOPT_SO_NONBLOCK], [
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CARES_CHECK_FUNC_SOCKET
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Verify if socket is available, prototyped, and
|
||||||
|
dnl can be compiled. If all of these are true, and
|
||||||
|
dnl usage has not been previously disallowed with
|
||||||
|
dnl shell variable cares_disallow_socket, then
|
||||||
|
dnl HAVE_SOCKET will be defined.
|
||||||
|
|
||||||
|
AC_DEFUN([CARES_CHECK_FUNC_SOCKET], [
|
||||||
|
AC_REQUIRE([CARES_INCLUDES_WINSOCK2])dnl
|
||||||
|
AC_REQUIRE([CARES_INCLUDES_SYS_SOCKET])dnl
|
||||||
|
AC_REQUIRE([CARES_INCLUDES_SOCKET])dnl
|
||||||
|
#
|
||||||
|
tst_links_socket="unknown"
|
||||||
|
tst_proto_socket="unknown"
|
||||||
|
tst_compi_socket="unknown"
|
||||||
|
tst_allow_socket="unknown"
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([if socket can be linked])
|
||||||
|
AC_LINK_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
$cares_includes_winsock2
|
||||||
|
$cares_includes_sys_socket
|
||||||
|
$cares_includes_socket
|
||||||
|
]],[[
|
||||||
|
if(0 != socket(0, 0, 0))
|
||||||
|
return 1;
|
||||||
|
]])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_links_socket="yes"
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_links_socket="no"
|
||||||
|
])
|
||||||
|
#
|
||||||
|
if test "$tst_links_socket" = "yes"; then
|
||||||
|
AC_MSG_CHECKING([if socket is prototyped])
|
||||||
|
AC_EGREP_CPP([socket],[
|
||||||
|
$cares_includes_winsock2
|
||||||
|
$cares_includes_sys_socket
|
||||||
|
$cares_includes_socket
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_proto_socket="yes"
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_proto_socket="no"
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
if test "$tst_proto_socket" = "yes"; then
|
||||||
|
AC_MSG_CHECKING([if socket is compilable])
|
||||||
|
AC_COMPILE_IFELSE([
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
$cares_includes_winsock2
|
||||||
|
$cares_includes_sys_socket
|
||||||
|
$cares_includes_socket
|
||||||
|
]],[[
|
||||||
|
if(0 != socket(0, 0, 0))
|
||||||
|
return 1;
|
||||||
|
]])
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_compi_socket="yes"
|
||||||
|
],[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_compi_socket="no"
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
if test "$tst_compi_socket" = "yes"; then
|
||||||
|
AC_MSG_CHECKING([if socket usage allowed])
|
||||||
|
if test "x$cares_disallow_socket" != "xyes"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
tst_allow_socket="yes"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
tst_allow_socket="no"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
AC_MSG_CHECKING([if socket might be used])
|
||||||
|
if test "$tst_links_socket" = "yes" &&
|
||||||
|
test "$tst_proto_socket" = "yes" &&
|
||||||
|
test "$tst_compi_socket" = "yes" &&
|
||||||
|
test "$tst_allow_socket" = "yes"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE_UNQUOTED(HAVE_SOCKET, 1,
|
||||||
|
[Define to 1 if you have the socket function.])
|
||||||
|
ac_cv_func_socket="yes"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
ac_cv_func_socket="no"
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl CARES_CHECK_FUNC_STRCASECMP
|
dnl CARES_CHECK_FUNC_STRCASECMP
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
dnl Verify if strcasecmp is available, prototyped, and
|
dnl Verify if strcasecmp is available, prototyped, and
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#***************************************************************************
|
#***************************************************************************
|
||||||
|
|
||||||
# File version for 'aclocal' use. Keep it a single number.
|
# File version for 'aclocal' use. Keep it a single number.
|
||||||
# serial 2
|
# serial 3
|
||||||
|
|
||||||
dnl CARES_OVERRIDE_AUTOCONF
|
dnl CARES_OVERRIDE_AUTOCONF
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
@@ -92,12 +92,11 @@ dnl used across different Autoconf versions and to
|
|||||||
dnl allow us to use this macro early enough in the
|
dnl allow us to use this macro early enough in the
|
||||||
dnl configure script.
|
dnl configure script.
|
||||||
|
|
||||||
m4_define([_AS_PATH_SEPARATOR_PREPARE],
|
m4_defun([_AS_PATH_SEPARATOR_PREPARE],
|
||||||
[CARES_CHECK_PATH_SEPARATOR
|
[CARES_CHECK_PATH_SEPARATOR
|
||||||
m4_define([$0],[])])
|
m4_define([$0],[])])
|
||||||
|
|
||||||
m4_define([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
|
m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
|
||||||
[CARES_CHECK_PATH_SEPARATOR
|
[CARES_CHECK_PATH_SEPARATOR
|
||||||
m4_define([$0],[])])
|
m4_define([$0],[])])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user