Compare commits
658 Commits
curl-7_19_
...
curl-7_19_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
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 | ||
![]() |
1b6c683ca6 | ||
![]() |
501e72c3de | ||
![]() |
a450efb483 | ||
![]() |
0cf8d4f8e8 | ||
![]() |
084447e414 | ||
![]() |
4c9c9f0b89 | ||
![]() |
13db2916de | ||
![]() |
2d64cd55a1 | ||
![]() |
60a6af7498 | ||
![]() |
3cb06eb2b2 | ||
![]() |
b8e73495a5 | ||
![]() |
187cfc1594 | ||
![]() |
90cd2a4753 | ||
![]() |
f3e6a582d4 | ||
![]() |
3ae470eedf | ||
![]() |
6595592a71 | ||
![]() |
199389c94a | ||
![]() |
c31438b2f2 | ||
![]() |
843f73ecaa | ||
![]() |
86f043a66c | ||
![]() |
80d2df7789 | ||
![]() |
f882a63cba | ||
![]() |
611b3584d6 | ||
![]() |
a1f13dd31b | ||
![]() |
966e7d0e36 | ||
![]() |
44103abdb7 | ||
![]() |
8f9d4b2b50 | ||
![]() |
78c674a685 | ||
![]() |
197830a57d | ||
![]() |
3d024d5fce | ||
![]() |
5763743614 | ||
![]() |
54da964a99 | ||
![]() |
e25cff9328 | ||
![]() |
36b397be9f | ||
![]() |
468019e947 | ||
![]() |
7e941baa26 | ||
![]() |
63270b0665 | ||
![]() |
bcdbba05d3 | ||
![]() |
51d1f309cd | ||
![]() |
f04720afb8 | ||
![]() |
e6e6c6e635 | ||
![]() |
1f340a262f | ||
![]() |
242a17b9e0 | ||
![]() |
6e1632c606 | ||
![]() |
56dab605f1 | ||
![]() |
3aa3d7e629 | ||
![]() |
75585f771a | ||
![]() |
9a9f35039e | ||
![]() |
e6f84b8cc8 | ||
![]() |
72f15da2ed | ||
![]() |
effbd99384 | ||
![]() |
d1ba4324de | ||
![]() |
c0b5d378dc | ||
![]() |
b8c438f22d | ||
![]() |
a85271ce0a | ||
![]() |
fd5e69f769 | ||
![]() |
ddb0b8d8b8 | ||
![]() |
1345226bc9 | ||
![]() |
fb202e9de7 | ||
![]() |
5dcb5fa862 | ||
![]() |
f77f2709a9 | ||
![]() |
bc852bca48 | ||
![]() |
9314e9e853 | ||
![]() |
838ddf8f55 | ||
![]() |
619869c639 | ||
![]() |
31baaf72b4 | ||
![]() |
c92b996942 | ||
![]() |
e84c7db049 | ||
![]() |
9ef7b6afe2 | ||
![]() |
c5c03ac556 | ||
![]() |
6ca321ca75 | ||
![]() |
9c788a529b | ||
![]() |
6159c356c9 | ||
![]() |
ac9d92587e | ||
![]() |
f32dc6b828 | ||
![]() |
7a928b40f3 | ||
![]() |
172501e10c | ||
![]() |
317e030de0 | ||
![]() |
cfda3e6a48 | ||
![]() |
4d522b8f31 | ||
![]() |
e93c81196f | ||
![]() |
7bdd14a994 | ||
![]() |
afe06b48d6 | ||
![]() |
63c5ed3798 | ||
![]() |
77bb536542 | ||
![]() |
7c6e0d5981 | ||
![]() |
a1708730c3 | ||
![]() |
d33ca87e4c | ||
![]() |
3c509c5f68 | ||
![]() |
a840cc700a | ||
![]() |
b40b989523 | ||
![]() |
5eba93c4e7 | ||
![]() |
915dfb494e | ||
![]() |
a16cca7680 | ||
![]() |
644482fc99 | ||
![]() |
8c08ecfcbf | ||
![]() |
b9920bdd0e | ||
![]() |
bdf71e2685 | ||
![]() |
bd4fd9c28c | ||
![]() |
ff3e574187 | ||
![]() |
4422f80ae7 | ||
![]() |
cc8c2efff2 | ||
![]() |
cdaca293d9 | ||
![]() |
4dbc7850bd | ||
![]() |
8119379d4f | ||
![]() |
9b4253fe67 | ||
![]() |
b5c599c80c | ||
![]() |
9137e717b0 | ||
![]() |
80186aa7f4 | ||
![]() |
6ac739630f | ||
![]() |
80a61616b1 | ||
![]() |
589d2ee7b5 | ||
![]() |
0a294db912 | ||
![]() |
2788aa366c | ||
![]() |
0f29fdaf17 | ||
![]() |
2912d993c2 | ||
![]() |
62ceb118ee | ||
![]() |
0569c9c1be | ||
![]() |
5a91746b80 | ||
![]() |
fdc091a857 | ||
![]() |
8469db016d | ||
![]() |
f6312b16f1 | ||
![]() |
c76e538231 | ||
![]() |
96ea49870c | ||
![]() |
6e8c73fd38 | ||
![]() |
56981a2aaf | ||
![]() |
ec16121fb3 | ||
![]() |
7bd9988c8e | ||
![]() |
068312ecb8 | ||
![]() |
d36a86a12c | ||
![]() |
c174b13f8b | ||
![]() |
6b95c4e358 | ||
![]() |
22e2ecb003 | ||
![]() |
e08296f70c | ||
![]() |
dd50e5bdf2 | ||
![]() |
504ecd5f7a | ||
![]() |
7d1bb21c19 | ||
![]() |
63dc2a843f | ||
![]() |
296baeb096 | ||
![]() |
01dabb774a | ||
![]() |
d0fe4071a9 | ||
![]() |
3d491c470b | ||
![]() |
06462e8a92 | ||
![]() |
dbf371344b | ||
![]() |
e2c6e00570 | ||
![]() |
e4a0001fc6 | ||
![]() |
49400b0c7f | ||
![]() |
5957498c6f | ||
![]() |
b6282b99cb | ||
![]() |
a8483841b5 | ||
![]() |
d068001102 | ||
![]() |
d576be58dc | ||
![]() |
1a2b88964f | ||
![]() |
f7a188a642 | ||
![]() |
befbf2a206 | ||
![]() |
e01b7c1ede | ||
![]() |
dd8d472318 | ||
![]() |
256489639c | ||
![]() |
e323abe5d9 | ||
![]() |
afc00b08d7 | ||
![]() |
af41fb79b5 | ||
![]() |
535b7c5e0f | ||
![]() |
217f7a7ea7 | ||
![]() |
317d351423 | ||
![]() |
d27519c0ca | ||
![]() |
255dc45dc9 | ||
![]() |
f4d8728df9 | ||
![]() |
8611631f5e | ||
![]() |
1e5ed4fa33 | ||
![]() |
0daeab3b8d | ||
![]() |
bd27401311 | ||
![]() |
14df44dd3f | ||
![]() |
1272621ebc | ||
![]() |
0e83482e47 | ||
![]() |
c0d929bed9 | ||
![]() |
828a26286d | ||
![]() |
082b0d822c | ||
![]() |
651b4b9efa | ||
![]() |
ab1e54375f | ||
![]() |
70e2db51e1 | ||
![]() |
0145919a9e | ||
![]() |
2236a247d9 | ||
![]() |
7291f50e8d | ||
![]() |
bc5677a47b | ||
![]() |
137ef36757 | ||
![]() |
33a3753c3f | ||
![]() |
9770899a4b | ||
![]() |
fe8eeb5641 | ||
![]() |
8cd1f1f7f9 | ||
![]() |
b84876ba69 | ||
![]() |
0f1ca2939a | ||
![]() |
4882078469 | ||
![]() |
991b120eee | ||
![]() |
f278d177f9 | ||
![]() |
53b2ff4b04 | ||
![]() |
0c89d71aee | ||
![]() |
b746bf7814 | ||
![]() |
f11969015a | ||
![]() |
f1b820e5fc | ||
![]() |
7356ff0b18 | ||
![]() |
30f7a2ff20 | ||
![]() |
f6b55fae79 | ||
![]() |
8aa88f4d36 | ||
![]() |
ce7b565595 | ||
![]() |
41fd08bb0d | ||
![]() |
d0a930cd44 | ||
![]() |
9bb1854398 | ||
![]() |
f7400212fc | ||
![]() |
6434b42481 | ||
![]() |
dd0b38b32f | ||
![]() |
7816db8e8a | ||
![]() |
9cc6ab3922 | ||
![]() |
2c27e24bb4 | ||
![]() |
c382c550e7 | ||
![]() |
c663494c69 | ||
![]() |
97f27ea585 | ||
![]() |
379bfa5a36 | ||
![]() |
235c0077b8 | ||
![]() |
c621546bd6 | ||
![]() |
aa330b8240 | ||
![]() |
e43606eb4d | ||
![]() |
6a378a28b4 | ||
![]() |
95368d9cb4 | ||
![]() |
74f9c570ea | ||
![]() |
eed4a13b3b | ||
![]() |
7e9f7659b3 | ||
![]() |
4d396169c8 | ||
![]() |
4cd950900b | ||
![]() |
2b96c3f5ce | ||
![]() |
63fad159e8 | ||
![]() |
e5f1480a38 | ||
![]() |
020955ebc2 | ||
![]() |
3733fa02ee | ||
![]() |
7037e4a4b1 | ||
![]() |
0e98f938c4 | ||
![]() |
55d0c29f4a | ||
![]() |
59997ecad5 | ||
![]() |
6e2f0833ad | ||
![]() |
25f626cc52 | ||
![]() |
ece891d6db | ||
![]() |
702355da47 | ||
![]() |
c4fba310d2 | ||
![]() |
e9dd099870 | ||
![]() |
070d89a561 | ||
![]() |
28cc9dd331 | ||
![]() |
7c1fecc94a | ||
![]() |
7a9fab52be | ||
![]() |
8cb8371011 | ||
![]() |
875c55d86b | ||
![]() |
b85154f13f | ||
![]() |
06047d9103 | ||
![]() |
2362637e90 | ||
![]() |
edd02607e2 | ||
![]() |
0211e420ed | ||
![]() |
9a184e0bb1 | ||
![]() |
168fb3a8d8 | ||
![]() |
4c5307b456 | ||
![]() |
626f9bd8c2 | ||
![]() |
a06b36dee0 | ||
![]() |
18e1bee8d5 | ||
![]() |
41f76801eb | ||
![]() |
31a7bfc47f | ||
![]() |
1b6d18fcb0 | ||
![]() |
57c32b709d | ||
![]() |
5f19822e37 | ||
![]() |
9a0c9cd6e1 | ||
![]() |
0ac8e1d80b | ||
![]() |
744e55ec74 | ||
![]() |
74ba4d7950 | ||
![]() |
fa96436661 | ||
![]() |
d15b8273d6 | ||
![]() |
0a5cf3a928 | ||
![]() |
6173e38fdc | ||
![]() |
34cd99d1d9 | ||
![]() |
0922a0fc3f | ||
![]() |
dd53b356ff | ||
![]() |
f1db505778 | ||
![]() |
662727ca3e | ||
![]() |
bdec6f2b20 | ||
![]() |
c86c294f55 | ||
![]() |
a9a03b9708 | ||
![]() |
f4e8c406bb | ||
![]() |
12bfcb501c | ||
![]() |
0fc1782dd4 | ||
![]() |
9274d31690 | ||
![]() |
983a539503 | ||
![]() |
94bb7fe5cb | ||
![]() |
b98e0aa09b | ||
![]() |
49c6d7e32d | ||
![]() |
ee73fc361b | ||
![]() |
e84dbd28db | ||
![]() |
02449d9aa5 | ||
![]() |
2876329f16 | ||
![]() |
a1f455551f | ||
![]() |
042cc1f69e | ||
![]() |
90b804d3fa | ||
![]() |
4bc603a0cc | ||
![]() |
6c3f74b946 | ||
![]() |
8d78a33e60 | ||
![]() |
df07537ccf | ||
![]() |
de25ed3f37 | ||
![]() |
40edf25866 | ||
![]() |
7b7db23633 | ||
![]() |
794b4da840 | ||
![]() |
e9ea3ba4a2 | ||
![]() |
d207ea1652 | ||
![]() |
625d06ac79 | ||
![]() |
3460225590 | ||
![]() |
ea6531cf32 | ||
![]() |
2afb88e2ce | ||
![]() |
6c9f37d263 | ||
![]() |
735955282b | ||
![]() |
dd056e54e2 | ||
![]() |
f5548973ab | ||
![]() |
07dc741e18 | ||
![]() |
8b66981ce0 | ||
![]() |
3a7e8c9f5f | ||
![]() |
fb90b43432 | ||
![]() |
0302c21253 | ||
![]() |
9182a46233 | ||
![]() |
51b46f451f | ||
![]() |
11f3690201 | ||
![]() |
5784a37f91 | ||
![]() |
af91ff0e06 | ||
![]() |
be3a78f583 | ||
![]() |
7f22da5230 | ||
![]() |
5af0629ba5 | ||
![]() |
a776e5ad31 | ||
![]() |
6e422c447a | ||
![]() |
4608d0157e | ||
![]() |
a24fe59ee4 | ||
![]() |
4ad296c60b | ||
![]() |
0517fa153c | ||
![]() |
8f81fd6be5 | ||
![]() |
1472be4d3e | ||
![]() |
8925527fef | ||
![]() |
8cdc220bc0 | ||
![]() |
d315d41a12 | ||
![]() |
4f7687895d | ||
![]() |
07d46886df | ||
![]() |
b79c8f527f | ||
![]() |
0cf10ae4d7 | ||
![]() |
debe0b561d | ||
![]() |
9ddc7ad038 | ||
![]() |
9a4c887c4a | ||
![]() |
de41c6ef43 | ||
![]() |
002cf105c6 | ||
![]() |
fb8fdf9273 | ||
![]() |
517b8ed057 | ||
![]() |
d3d7ed1766 | ||
![]() |
77fd094090 | ||
![]() |
c65f9acdc7 | ||
![]() |
5c4cdcb2d5 | ||
![]() |
b1233c7e4d | ||
![]() |
4ebe4b907b | ||
![]() |
bf44d0f640 | ||
![]() |
73cf99c052 | ||
![]() |
44c02227e9 | ||
![]() |
77da9a0087 | ||
![]() |
42d2353e74 | ||
![]() |
4b441ebac5 | ||
![]() |
01140217f5 | ||
![]() |
71f3877f3a | ||
![]() |
83d135f990 | ||
![]() |
d4ac3d53fc | ||
![]() |
f0332c0b58 | ||
![]() |
bdd4294e79 | ||
![]() |
dcf92bffd2 | ||
![]() |
a2256e899b | ||
![]() |
8b6805572a | ||
![]() |
607253c2d0 | ||
![]() |
09f4a1c5e5 | ||
![]() |
5c9fff9c6e | ||
![]() |
99b4912688 | ||
![]() |
0a6312d66f | ||
![]() |
a97f52db20 | ||
![]() |
5267be57f7 | ||
![]() |
e813bf31d7 | ||
![]() |
1bd0be0361 | ||
![]() |
996c8ca7c2 | ||
![]() |
fec65fbff6 | ||
![]() |
de4610a55f | ||
![]() |
6e34c2d59a | ||
![]() |
34b09398d5 | ||
![]() |
0516ce7786 | ||
![]() |
bb86462ed7 | ||
![]() |
8fa8df95fb | ||
![]() |
82ca52713b | ||
![]() |
f29e383575 | ||
![]() |
5aeef9c1c8 | ||
![]() |
ddd3fe5948 | ||
![]() |
5591550167 | ||
![]() |
6bb9ef8de4 | ||
![]() |
14a6788535 | ||
![]() |
6f86826516 | ||
![]() |
0e6ed13454 | ||
![]() |
b914f45e9e | ||
![]() |
3ed66094e8 | ||
![]() |
718004d9b5 |
23
.cvsignore
23
.cvsignore
@@ -1,17 +1,22 @@
|
||||
compile
|
||||
config.log
|
||||
Makefile
|
||||
libtool
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
aclocal.m4.bak
|
||||
configure
|
||||
config.h
|
||||
config.status
|
||||
curl-config
|
||||
autom4te.cache
|
||||
depcomp
|
||||
compile
|
||||
config.guess
|
||||
curl_config.h
|
||||
config.log
|
||||
config.lt
|
||||
config.status
|
||||
config.sub
|
||||
ltmain.sh
|
||||
configure
|
||||
curl-config
|
||||
depcomp
|
||||
libcurl.pc
|
||||
libtool
|
||||
ltmain.sh
|
||||
vc6curl.ncb
|
||||
vc6curl.opt
|
||||
vc6curl.sln
|
||||
vc6curl.suo
|
||||
|
65
Android.mk
Normal file
65
Android.mk
Normal file
@@ -0,0 +1,65 @@
|
||||
# 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.
|
||||
#
|
||||
# Note: you must first create a curl_config.h file by running configure in the
|
||||
# Android environment. I haven't found an easy way to do this yet. If there is
|
||||
# no easy way, a static config-android.h may need to be created and checked in
|
||||
# to the libcurl source tree.
|
||||
#
|
||||
# Dan Fandrich
|
||||
# July 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)
|
||||
|
2
CMake/CMakeConfigurableFile.in
Normal file
2
CMake/CMakeConfigurableFile.in
Normal file
@@ -0,0 +1,2 @@
|
||||
@CMAKE_CONFIGURABLE_FILE_CONTENT@
|
||||
|
41
CMake/CheckTypeSize.c.in
Normal file
41
CMake/CheckTypeSize.c.in
Normal file
@@ -0,0 +1,41 @@
|
||||
#cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@
|
||||
#ifdef CHECK_TYPE_SIZE_TYPE
|
||||
|
||||
@CHECK_TYPE_SIZE_PREINCLUDE@
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif /* HAVE_SYS_TYPES_H */
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif /* HAVE_STDINT_H */
|
||||
|
||||
#ifdef HAVE_STDDEF_H
|
||||
# include <stddef.h>
|
||||
#endif /* HAVE_STDDEF_H */
|
||||
|
||||
@CHECK_TYPE_SIZE_PREMAIN@
|
||||
|
||||
#ifdef __CLASSIC_C__
|
||||
int main(){
|
||||
int ac;
|
||||
char*av[];
|
||||
#else
|
||||
int main(int ac, char*av[]){
|
||||
#endif
|
||||
if(ac > 1000){return *av[0];}
|
||||
return sizeof(CHECK_TYPE_SIZE_TYPE);
|
||||
}
|
||||
|
||||
#else /* CHECK_TYPE_SIZE_TYPE */
|
||||
|
||||
# error "CHECK_TYPE_SIZE_TYPE has to specify the type"
|
||||
|
||||
#endif /* CHECK_TYPE_SIZE_TYPE */
|
56
CMake/CheckTypeSize.cmake
Normal file
56
CMake/CheckTypeSize.cmake
Normal file
@@ -0,0 +1,56 @@
|
||||
# - Check sizeof a type
|
||||
# CHECK_TYPE_SIZE(TYPE VARIABLE)
|
||||
# Check if the type exists and determine size of type. if the type
|
||||
# exists, the size will be stored to the variable.
|
||||
#
|
||||
# VARIABLE - variable to store size if the type exists.
|
||||
# HAVE_${VARIABLE} - does the variable exists or not
|
||||
|
||||
macro(CHECK_TYPE_SIZE TYPE VARIABLE)
|
||||
set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
|
||||
if(NOT DEFINED ${VARIABLE})
|
||||
if("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
||||
set(CHECK_TYPE_SIZE_TYPE "${TYPE}")
|
||||
set(MACRO_CHECK_TYPE_SIZE_FLAGS
|
||||
"${CMAKE_REQUIRED_FLAGS}")
|
||||
foreach(def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H)
|
||||
if("${def}")
|
||||
set(MACRO_CHECK_TYPE_SIZE_FLAGS
|
||||
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
|
||||
endif("${def}")
|
||||
endforeach(def)
|
||||
set(CHECK_TYPE_SIZE_PREMAIN)
|
||||
foreach(def ${CMAKE_EXTRA_INCLUDE_FILES})
|
||||
set(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
||||
endforeach(def)
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
||||
IMMEDIATE @ONLY)
|
||||
file(READ
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
||||
CHECK_TYPE_SIZE_FILE_CONTENT)
|
||||
message(STATUS "Check size of ${TYPE}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CHECK_TYPE_SIZE_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||
try_run(${VARIABLE} HAVE_${VARIABLE}
|
||||
${CMAKE_BINARY_DIR}
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
|
||||
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
if(HAVE_${VARIABLE})
|
||||
message(STATUS "Check size of ${TYPE} - done")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
|
||||
else(HAVE_${VARIABLE})
|
||||
message(STATUS "Check size of ${TYPE} - failed")
|
||||
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")
|
||||
endif(HAVE_${VARIABLE})
|
||||
endif("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
||||
endif(NOT DEFINED ${VARIABLE})
|
||||
set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS )
|
||||
endmacro(CHECK_TYPE_SIZE)
|
75
CMake/CurlCheckCSourceCompiles.cmake
Normal file
75
CMake/CurlCheckCSourceCompiles.cmake
Normal file
@@ -0,0 +1,75 @@
|
||||
# - Check if the source code provided in the SOURCE argument compiles.
|
||||
# CURL_CHECK_C_SOURCE_COMPILES(SOURCE VAR)
|
||||
# - macro which checks if the source code compiles
|
||||
# SOURCE - source code to try to compile
|
||||
# VAR - variable to store whether the source code compiled
|
||||
#
|
||||
# The following variables may be set before calling this macro to
|
||||
# modify the way the check is run:
|
||||
#
|
||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
||||
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
||||
|
||||
macro(CURL_CHECK_C_SOURCE_COMPILES SOURCE VAR)
|
||||
if("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
||||
set(message "${VAR}")
|
||||
# If the number of arguments is greater than 2 (SOURCE VAR)
|
||||
if(${ARGC} GREATER 2)
|
||||
# then add the third argument as a message
|
||||
set(message "${ARGV2} (${VAR})")
|
||||
endif(${ARGC} GREATER 2)
|
||||
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
else(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
|
||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||
if(CMAKE_REQUIRED_INCLUDES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
|
||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
||||
else(CMAKE_REQUIRED_INCLUDES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
|
||||
endif(CMAKE_REQUIRED_INCLUDES)
|
||||
set(src "")
|
||||
foreach(def ${EXTRA_DEFINES})
|
||||
set(src "${src}#define ${def} 1\n")
|
||||
endforeach(def)
|
||||
foreach(inc ${HEADER_INCLUDES})
|
||||
set(src "${src}#include <${inc}>\n")
|
||||
endforeach(inc)
|
||||
|
||||
set(src "${src}\nint main() { ${SOURCE} ; return 0; }")
|
||||
set(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
|
||||
IMMEDIATE)
|
||||
message(STATUS "Performing Test ${message}")
|
||||
try_compile(${VAR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
|
||||
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
if(${VAR})
|
||||
set(${VAR} 1 CACHE INTERNAL "Test ${message}")
|
||||
message(STATUS "Performing Test ${message} - Success")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Performing C SOURCE FILE Test ${message} succeded with the following output:\n"
|
||||
"${OUTPUT}\n"
|
||||
"Source file was:\n${src}\n")
|
||||
else(${VAR})
|
||||
message(STATUS "Performing Test ${message} - Failed")
|
||||
set(${VAR} "" CACHE INTERNAL "Test ${message}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Performing C SOURCE FILE Test ${message} failed with the following output:\n"
|
||||
"${OUTPUT}\n"
|
||||
"Source file was:\n${src}\n")
|
||||
endif(${VAR})
|
||||
endif("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
||||
endmacro(CURL_CHECK_C_SOURCE_COMPILES)
|
83
CMake/CurlCheckCSourceRuns.cmake
Normal file
83
CMake/CurlCheckCSourceRuns.cmake
Normal file
@@ -0,0 +1,83 @@
|
||||
# - Check if the source code provided in the SOURCE argument compiles and runs.
|
||||
# CURL_CHECK_C_SOURCE_RUNS(SOURCE VAR)
|
||||
# - macro which checks if the source code runs
|
||||
# SOURCE - source code to try to compile
|
||||
# VAR - variable to store size if the type exists.
|
||||
#
|
||||
# The following variables may be set before calling this macro to
|
||||
# modify the way the check is run:
|
||||
#
|
||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
||||
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
||||
|
||||
macro(CURL_CHECK_C_SOURCE_RUNS SOURCE VAR)
|
||||
if("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
||||
set(message "${VAR}")
|
||||
# If the number of arguments is greater than 2 (SOURCE VAR)
|
||||
if(${ARGC} GREATER 2)
|
||||
# then add the third argument as a message
|
||||
set(message "${ARGV2} (${VAR})")
|
||||
endif(${ARGC} GREATER 2)
|
||||
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
else(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
|
||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||
if(CMAKE_REQUIRED_INCLUDES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
|
||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
||||
else(CMAKE_REQUIRED_INCLUDES)
|
||||
set(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
|
||||
endif(CMAKE_REQUIRED_INCLUDES)
|
||||
set(src "")
|
||||
foreach(def ${EXTRA_DEFINES})
|
||||
set(src "${src}#define ${def} 1\n")
|
||||
endforeach(def)
|
||||
foreach(inc ${HEADER_INCLUDES})
|
||||
set(src "${src}#include <${inc}>\n")
|
||||
endforeach(inc)
|
||||
|
||||
set(src "${src}\nint main() { ${SOURCE} ; return 0; }")
|
||||
set(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
|
||||
IMMEDIATE)
|
||||
message(STATUS "Performing Test ${message}")
|
||||
try_run(${VAR} ${VAR}_COMPILED
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
|
||||
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
# if it did not compile make the return value fail code of 1
|
||||
if(NOT ${VAR}_COMPILED)
|
||||
set(${VAR} 1)
|
||||
endif(NOT ${VAR}_COMPILED)
|
||||
# if the return value was 0 then it worked
|
||||
set(result_var ${${VAR}})
|
||||
if("${result_var}" EQUAL 0)
|
||||
set(${VAR} 1 CACHE INTERNAL "Test ${message}")
|
||||
message(STATUS "Performing Test ${message} - Success")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Performing C SOURCE FILE Test ${message} succeded with the following output:\n"
|
||||
"${OUTPUT}\n"
|
||||
"Return value: ${${VAR}}\n"
|
||||
"Source file was:\n${src}\n")
|
||||
else("${result_var}" EQUAL 0)
|
||||
message(STATUS "Performing Test ${message} - Failed")
|
||||
set(${VAR} "" CACHE INTERNAL "Test ${message}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Performing C SOURCE FILE Test ${message} failed with the following output:\n"
|
||||
"${OUTPUT}\n"
|
||||
"Return value: ${result_var}\n"
|
||||
"Source file was:\n${src}\n")
|
||||
endif("${result_var}" EQUAL 0)
|
||||
endif("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
||||
endmacro(CURL_CHECK_C_SOURCE_RUNS)
|
690
CMake/CurlTests.c
Normal file
690
CMake/CurlTests.c
Normal file
@@ -0,0 +1,690 @@
|
||||
#ifdef TIME_WITH_SYS_TIME
|
||||
/* Time with sys/time test */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if ((struct tm *) 0)
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FCNTL_O_NONBLOCK
|
||||
|
||||
/* headers for FCNTL_O_NONBLOCK test */
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
/* */
|
||||
#if defined(sun) || defined(__sun__) || \
|
||||
defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
# if defined(__SVR4) || defined(__srv4__)
|
||||
# define PLATFORM_SOLARIS
|
||||
# else
|
||||
# define PLATFORM_SUNOS4
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX41)
|
||||
# define PLATFORM_AIX_V3
|
||||
#endif
|
||||
/* */
|
||||
#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__)
|
||||
#error "O_NONBLOCK does not work on this platform"
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
/* O_NONBLOCK source test */
|
||||
int flags = 0;
|
||||
if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETHOSTBYADDR_R_5
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
char * address;
|
||||
int length;
|
||||
int type;
|
||||
struct hostent h;
|
||||
struct hostent_data hdata;
|
||||
int rc;
|
||||
#ifndef gethostbyaddr_r
|
||||
(void)gethostbyaddr_r;
|
||||
#endif
|
||||
rc = gethostbyaddr_r(address, length, type, &h, &hdata);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYADDR_R_5_REENTRANT
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
char * address;
|
||||
int length;q
|
||||
int type;
|
||||
struct hostent h;
|
||||
struct hostent_data hdata;
|
||||
int rc;
|
||||
#ifndef gethostbyaddr_r
|
||||
(void)gethostbyaddr_r;
|
||||
#endif
|
||||
rc = gethostbyaddr_r(address, length, type, &h, &hdata);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYADDR_R_7
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
char * address;
|
||||
int length;
|
||||
int type;
|
||||
struct hostent h;
|
||||
char buffer[8192];
|
||||
int h_errnop;
|
||||
struct hostent * hp;
|
||||
|
||||
#ifndef gethostbyaddr_r
|
||||
(void)gethostbyaddr_r;
|
||||
#endif
|
||||
hp = gethostbyaddr_r(address, length, type, &h,
|
||||
buffer, 8192, &h_errnop);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYADDR_R_7_REENTRANT
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
char * address;
|
||||
int length;
|
||||
int type;
|
||||
struct hostent h;
|
||||
char buffer[8192];
|
||||
int h_errnop;
|
||||
struct hostent * hp;
|
||||
|
||||
#ifndef gethostbyaddr_r
|
||||
(void)gethostbyaddr_r;
|
||||
#endif
|
||||
hp = gethostbyaddr_r(address, length, type, &h,
|
||||
buffer, 8192, &h_errnop);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYADDR_R_8
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
char * address;
|
||||
int length;
|
||||
int type;
|
||||
struct hostent h;
|
||||
char buffer[8192];
|
||||
int h_errnop;
|
||||
struct hostent * hp;
|
||||
int rc;
|
||||
|
||||
#ifndef gethostbyaddr_r
|
||||
(void)gethostbyaddr_r;
|
||||
#endif
|
||||
rc = gethostbyaddr_r(address, length, type, &h,
|
||||
buffer, 8192, &hp, &h_errnop);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYADDR_R_8_REENTRANT
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
char * address;
|
||||
int length;
|
||||
int type;
|
||||
struct hostent h;
|
||||
char buffer[8192];
|
||||
int h_errnop;
|
||||
struct hostent * hp;
|
||||
int rc;
|
||||
|
||||
#ifndef gethostbyaddr_r
|
||||
(void)gethostbyaddr_r;
|
||||
#endif
|
||||
rc = gethostbyaddr_r(address, length, type, &h,
|
||||
buffer, 8192, &hp, &h_errnop);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYNAME_R_3
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
struct hostent_data data;
|
||||
#ifndef gethostbyname_r
|
||||
(void)gethostbyname_r;
|
||||
#endif
|
||||
gethostbyname_r(NULL, NULL, NULL);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYNAME_R_3_REENTRANT
|
||||
#define _REENTRANT
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
struct hostent_data data;
|
||||
#ifndef gethostbyname_r
|
||||
(void)gethostbyname_r;
|
||||
#endif
|
||||
gethostbyname_r(NULL, NULL, NULL);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYNAME_R_5
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#ifndef gethostbyname_r
|
||||
(void)gethostbyname_r;
|
||||
#endif
|
||||
gethostbyname_r(NULL, NULL, NULL, 0, NULL);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYNAME_R_5_REENTRANT
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
#ifndef gethostbyname_r
|
||||
(void)gethostbyname_r;
|
||||
#endif
|
||||
gethostbyname_r(NULL, NULL, NULL, 0, NULL);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYNAME_R_6
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
#ifndef gethostbyname_r
|
||||
(void)gethostbyname_r;
|
||||
#endif
|
||||
gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETHOSTBYNAME_R_6_REENTRANT
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
#ifndef gethostbyname_r
|
||||
(void)gethostbyname_r;
|
||||
#endif
|
||||
gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_SOCKLEN_T
|
||||
#ifdef _WIN32
|
||||
#include <ws2tcpip.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if ((socklen_t *) 0)
|
||||
return 0;
|
||||
if (sizeof (socklen_t))
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_IN_ADDR_T
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if ((in_addr_t *) 0)
|
||||
return 0;
|
||||
if (sizeof (in_addr_t))
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BOOL_T
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDBOOL_H
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if (sizeof (bool *) )
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <float.h>
|
||||
int main() { return 0; }
|
||||
#endif
|
||||
#ifdef RETSIGTYPE_TEST
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#ifdef signal
|
||||
# undef signal
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" void (*signal (int, void (*)(int)))(int);
|
||||
#else
|
||||
void (*signal ()) ();
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_INET_NTOA_R_DECL
|
||||
#include <arpa/inet.h>
|
||||
|
||||
typedef void (*func_type)();
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef inet_ntoa_r
|
||||
func_type func;
|
||||
func = (func_type)inet_ntoa_r;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_INET_NTOA_R_DECL_REENTRANT
|
||||
#define _REENTRANT
|
||||
#include <arpa/inet.h>
|
||||
|
||||
typedef void (*func_type)();
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef inet_ntoa_r
|
||||
func_type func;
|
||||
func = (func_type)&inet_ntoa_r;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETADDRINFO
|
||||
#include <netdb.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
int main(void) {
|
||||
struct addrinfo hints, *ai;
|
||||
int error;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
#ifndef getaddrinfo
|
||||
(void)getaddrinfo;
|
||||
#endif
|
||||
error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
|
||||
if (error) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_FILE_OFFSET_BITS
|
||||
#ifdef _FILE_OFFSET_BITS
|
||||
#undef _FILE_OFFSET_BITS
|
||||
#endif
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#include <sys/types.h>
|
||||
/* Check that off_t can represent 2**63 - 1 correctly.
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
int main () { ; return 0; }
|
||||
#endif
|
||||
#ifdef HAVE_IOCTLSOCKET
|
||||
/* includes start */
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# ifdef HAVE_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
# else
|
||||
# ifdef HAVE_WINSOCK_H
|
||||
# include <winsock.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
/* ioctlsocket source code */
|
||||
int socket;
|
||||
unsigned long flags = ioctlsocket(socket, FIONBIO, &flags);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef HAVE_IOCTLSOCKET_CAMEL
|
||||
/* includes start */
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# ifdef HAVE_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
# else
|
||||
# ifdef HAVE_WINSOCK_H
|
||||
# include <winsock.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
/* IoctlSocket source code */
|
||||
if(0 != IoctlSocket(0, 0, 0))
|
||||
return 1;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_IOCTLSOCKET_CAMEL_FIONBIO
|
||||
/* includes start */
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# ifdef HAVE_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
# else
|
||||
# ifdef HAVE_WINSOCK_H
|
||||
# include <winsock.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
/* IoctlSocket source code */
|
||||
long flags = 0;
|
||||
if(0 != ioctlsocket(0, FIONBIO, &flags))
|
||||
return 1;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_IOCTLSOCKET_FIONBIO
|
||||
/* includes start */
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# ifdef HAVE_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
# else
|
||||
# ifdef HAVE_WINSOCK_H
|
||||
# include <winsock.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
int flags = 0;
|
||||
if(0 != ioctlsocket(0, FIONBIO, &flags))
|
||||
return 1;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_IOCTL_FIONBIO
|
||||
/* headers for FIONBIO test */
|
||||
/* includes start */
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
#ifdef HAVE_STROPTS_H
|
||||
# include <stropts.h>
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
int flags = 0;
|
||||
if(0 != ioctl(0, FIONBIO, &flags))
|
||||
return 1;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_IOCTL_SIOCGIFADDR
|
||||
/* headers for FIONBIO test */
|
||||
/* includes start */
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
#ifdef HAVE_STROPTS_H
|
||||
# include <stropts.h>
|
||||
#endif
|
||||
#include <net/if.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
struct ifreq ifr;
|
||||
if(0 != ioctl(0, SIOCGIFADDR, &ifr))
|
||||
return 1;
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_SETSOCKOPT_SO_NONBLOCK
|
||||
/* includes start */
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# ifdef HAVE_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
# else
|
||||
# ifdef HAVE_WINSOCK_H
|
||||
# include <winsock.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
/* includes start */
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
/* includes end */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
if(0 != setsockopt(0, SOL_SOCKET, SO_NONBLOCK, 0, 0))
|
||||
return 1;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GLIBC_STRERROR_R
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
int
|
||||
main () {
|
||||
char buffer[1024]; /* big enough to play with */
|
||||
char *string =
|
||||
strerror_r(EACCES, buffer, sizeof(buffer));
|
||||
/* this should've returned a string */
|
||||
if(!string || !string[0])
|
||||
return 99;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_POSIX_STRERROR_R
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
int
|
||||
main () {
|
||||
char buffer[1024]; /* big enough to play with */
|
||||
int error =
|
||||
strerror_r(EACCES, buffer, sizeof(buffer));
|
||||
/* This should've returned zero, and written an error string in the
|
||||
buffer.*/
|
||||
if(!buffer[0] || error)
|
||||
return 99;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
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
|
||||
)
|
19
CMake/FindOpenSSL.cmake
Normal file
19
CMake/FindOpenSSL.cmake
Normal file
@@ -0,0 +1,19 @@
|
||||
# Extension of the standard FindOpenSSL.cmake
|
||||
# Adds OPENSSL_INCLUDE_DIRS and libeay32
|
||||
include("${CMAKE_ROOT}/Modules/FindOpenSSL.cmake")
|
||||
|
||||
# Bill Hoffman told that libeay32 is necessary for him:
|
||||
find_library(SSL_LIBEAY NAMES libeay32)
|
||||
|
||||
if(OPENSSL_FOUND)
|
||||
if(SSL_LIBEAY)
|
||||
list(APPEND OPENSSL_LIBRARIES ${SSL_LIBEAY})
|
||||
else()
|
||||
set(OPENSSL_FOUND FALSE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
if(OPENSSL_FOUND)
|
||||
set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
|
||||
endif()
|
8
CMake/FindZLIB.cmake
Normal file
8
CMake/FindZLIB.cmake
Normal file
@@ -0,0 +1,8 @@
|
||||
# Locate zlib
|
||||
include("${CMAKE_ROOT}/Modules/FindZLIB.cmake")
|
||||
|
||||
find_library(ZLIB_LIBRARY_DEBUG NAMES zd zlibd zdlld zlib1d )
|
||||
|
||||
if(ZLIB_FOUND AND ZLIB_LIBRARY_DEBUG)
|
||||
set( ZLIB_LIBRARIES optimized "${ZLIB_LIBRARY}" debug ${ZLIB_LIBRARY_DEBUG})
|
||||
endif()
|
250
CMake/OtherTests.cmake
Normal file
250
CMake/OtherTests.cmake
Normal file
@@ -0,0 +1,250 @@
|
||||
include(CurlCheckCSourceCompiles)
|
||||
set(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
|
||||
set(HEADER_INCLUDES)
|
||||
set(headers_hack)
|
||||
|
||||
macro(add_header_include check header)
|
||||
if(${check})
|
||||
set(headers_hack
|
||||
"${headers_hack}\n#include <${header}>")
|
||||
#SET(HEADER_INCLUDES
|
||||
# ${HEADER_INCLUDES}
|
||||
# "${header}")
|
||||
endif(${check})
|
||||
endmacro(add_header_include)
|
||||
|
||||
set(signature_call_conv)
|
||||
if(HAVE_WINDOWS_H)
|
||||
add_header_include(HAVE_WINDOWS_H "windows.h")
|
||||
add_header_include(HAVE_WINSOCK2_H "winsock2.h")
|
||||
add_header_include(HAVE_WINSOCK_H "winsock.h")
|
||||
set(EXTRA_DEFINES ${EXTRA_DEFINES}
|
||||
"__unused7\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#define __unused3")
|
||||
set(signature_call_conv "PASCAL")
|
||||
else(HAVE_WINDOWS_H)
|
||||
add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
|
||||
add_header_include(HAVE_SYS_SOCKET_H "sys/socket.h")
|
||||
endif(HAVE_WINDOWS_H)
|
||||
|
||||
set(EXTRA_DEFINES_BACKUP "${EXTRA_DEFINES}")
|
||||
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)
|
||||
if(curl_cv_recv)
|
||||
# AC_CACHE_CHECK([types of arguments and return type for recv],
|
||||
#[curl_cv_func_recv_args], [
|
||||
#SET(curl_cv_func_recv_args "unknown")
|
||||
#for recv_retv in 'int' 'ssize_t'; do
|
||||
if(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
|
||||
foreach(recv_retv "int" "ssize_t" )
|
||||
foreach(recv_arg1 "int" "ssize_t" "SOCKET")
|
||||
foreach(recv_arg2 "void *" "char *")
|
||||
foreach(recv_arg3 "size_t" "int" "socklen_t" "unsigned int")
|
||||
foreach(recv_arg4 "int" "unsigned int")
|
||||
if(NOT curl_cv_func_recv_done)
|
||||
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(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
|
||||
curl_check_c_source_compiles("
|
||||
${recv_arg1} s=0;
|
||||
${recv_arg2} buf=0;
|
||||
${recv_arg3} len=0;
|
||||
${recv_arg4} flags=0;
|
||||
${recv_retv} res = recv(s, buf, len, flags)"
|
||||
curl_cv_func_recv_test
|
||||
"${recv_retv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})")
|
||||
if(curl_cv_func_recv_test)
|
||||
set(curl_cv_func_recv_args
|
||||
"${recv_arg1},${recv_arg2},${recv_arg3},${recv_arg4},${recv_retv}")
|
||||
set(RECV_TYPE_ARG1 "${recv_arg1}")
|
||||
set(RECV_TYPE_ARG2 "${recv_arg2}")
|
||||
set(RECV_TYPE_ARG3 "${recv_arg3}")
|
||||
set(RECV_TYPE_ARG4 "${recv_arg4}")
|
||||
set(RECV_TYPE_RETV "${recv_retv}")
|
||||
set(HAVE_RECV 1)
|
||||
set(curl_cv_func_recv_done 1)
|
||||
endif(curl_cv_func_recv_test)
|
||||
endif(NOT curl_cv_func_recv_done)
|
||||
endforeach(recv_arg4)
|
||||
endforeach(recv_arg3)
|
||||
endforeach(recv_arg2)
|
||||
endforeach(recv_arg1)
|
||||
endforeach(recv_retv)
|
||||
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_ARG2 "${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_RETV "${curl_cv_func_recv_args}")
|
||||
#MESSAGE("RECV_TYPE_ARG1 ${RECV_TYPE_ARG1}")
|
||||
#MESSAGE("RECV_TYPE_ARG2 ${RECV_TYPE_ARG2}")
|
||||
#MESSAGE("RECV_TYPE_ARG3 ${RECV_TYPE_ARG3}")
|
||||
#MESSAGE("RECV_TYPE_ARG4 ${RECV_TYPE_ARG4}")
|
||||
#MESSAGE("RECV_TYPE_RETV ${RECV_TYPE_RETV}")
|
||||
endif(NOT DEFINED curl_cv_func_recv_args OR "${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")
|
||||
endif("${curl_cv_func_recv_args}" STREQUAL "unknown")
|
||||
else(curl_cv_recv)
|
||||
message(FATAL_ERROR "Unable to link function recv")
|
||||
endif(curl_cv_recv)
|
||||
set(curl_cv_func_recv_args "${curl_cv_func_recv_args}" CACHE INTERNAL "Arguments for recv")
|
||||
set(HAVE_RECV 1)
|
||||
|
||||
curl_check_c_source_compiles("send(0, 0, 0, 0)" curl_cv_send)
|
||||
if(curl_cv_send)
|
||||
# AC_CACHE_CHECK([types of arguments and return type for send],
|
||||
#[curl_cv_func_send_args], [
|
||||
#SET(curl_cv_func_send_args "unknown")
|
||||
#for send_retv in 'int' 'ssize_t'; do
|
||||
if(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||
foreach(send_retv "int" "ssize_t" )
|
||||
foreach(send_arg1 "int" "ssize_t" "SOCKET")
|
||||
foreach(send_arg2 "const void *" "void *" "char *" "const char *")
|
||||
foreach(send_arg3 "size_t" "int" "socklen_t" "unsigned int")
|
||||
foreach(send_arg4 "int" "unsigned int")
|
||||
if(NOT curl_cv_func_send_done)
|
||||
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(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
|
||||
curl_check_c_source_compiles("
|
||||
${send_arg1} s=0;
|
||||
${send_arg2} buf=0;
|
||||
${send_arg3} len=0;
|
||||
${send_arg4} flags=0;
|
||||
${send_retv} res = send(s, buf, len, flags)"
|
||||
curl_cv_func_send_test
|
||||
"${send_retv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})")
|
||||
if(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_arg2 "${send_arg2}")
|
||||
set(curl_cv_func_send_args
|
||||
"${send_arg1},${send_arg2},${send_arg3},${send_arg4},${send_retv},${send_qual_arg2}")
|
||||
set(SEND_TYPE_ARG1 "${send_arg1}")
|
||||
set(SEND_TYPE_ARG2 "${send_arg2}")
|
||||
set(SEND_TYPE_ARG3 "${send_arg3}")
|
||||
set(SEND_TYPE_ARG4 "${send_arg4}")
|
||||
set(SEND_TYPE_RETV "${send_retv}")
|
||||
set(HAVE_SEND 1)
|
||||
set(curl_cv_func_send_done 1)
|
||||
endif(curl_cv_func_send_test)
|
||||
endif(NOT curl_cv_func_send_done)
|
||||
endforeach(send_arg4)
|
||||
endforeach(send_arg3)
|
||||
endforeach(send_arg2)
|
||||
endforeach(send_arg1)
|
||||
endforeach(send_retv)
|
||||
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_ARG2 "${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_RETV "${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_ARG2 ${SEND_TYPE_ARG2}")
|
||||
#MESSAGE("SEND_TYPE_ARG3 ${SEND_TYPE_ARG3}")
|
||||
#MESSAGE("SEND_TYPE_ARG4 ${SEND_TYPE_ARG4}")
|
||||
#MESSAGE("SEND_TYPE_RETV ${SEND_TYPE_RETV}")
|
||||
#MESSAGE("SEND_QUAL_ARG2 ${SEND_QUAL_ARG2}")
|
||||
endif(NOT DEFINED curl_cv_func_send_args OR "${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")
|
||||
endif("${curl_cv_func_send_args}" STREQUAL "unknown")
|
||||
set(SEND_QUAL_ARG2 "const")
|
||||
else(curl_cv_send)
|
||||
message(FATAL_ERROR "Unable to link function send")
|
||||
endif(curl_cv_send)
|
||||
set(curl_cv_func_send_args "${curl_cv_func_send_args}" CACHE INTERNAL "Arguments for send")
|
||||
set(HAVE_SEND 1)
|
||||
|
||||
set(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5")
|
||||
curl_check_c_source_compiles("int flag = MSG_NOSIGNAL" HAVE_MSG_NOSIGNAL)
|
||||
|
||||
set(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
|
||||
set(HEADER_INCLUDES)
|
||||
set(headers_hack)
|
||||
|
||||
macro(add_header_include check header)
|
||||
if(${check})
|
||||
set(headers_hack
|
||||
"${headers_hack}\n#include <${header}>")
|
||||
#SET(HEADER_INCLUDES
|
||||
# ${HEADER_INCLUDES}
|
||||
# "${header}")
|
||||
endif(${check})
|
||||
endmacro(add_header_include header)
|
||||
|
||||
if(HAVE_WINDOWS_H)
|
||||
set(EXTRA_DEFINES ${EXTRA_DEFINES}
|
||||
"__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_WINSOCK2_H "winsock2.h")
|
||||
add_header_include(HAVE_WINSOCK_H "winsock.h")
|
||||
else(HAVE_WINDOWS_H)
|
||||
add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
|
||||
add_header_include(HAVE_SYS_TIME_H "sys/time.h")
|
||||
add_header_include(TIME_WITH_SYS_TIME "time.h")
|
||||
add_header_include(HAVE_TIME_H "time.h")
|
||||
endif(HAVE_WINDOWS_H)
|
||||
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)
|
||||
|
||||
|
||||
include(CurlCheckCSourceRuns)
|
||||
set(EXTRA_DEFINES)
|
||||
set(HEADER_INCLUDES)
|
||||
if(HAVE_SYS_POLL_H)
|
||||
set(HEADER_INCLUDES "sys/poll.h")
|
||||
endif(HAVE_SYS_POLL_H)
|
||||
curl_check_c_source_runs("return poll((void *)0, 0, 10 /*ms*/)" HAVE_POLL_FINE)
|
||||
|
||||
set(HAVE_SIG_ATOMIC_T 1)
|
||||
set(EXTRA_DEFINES)
|
||||
set(HEADER_INCLUDES)
|
||||
if(HAVE_SIGNAL_H)
|
||||
set(HEADER_INCLUDES "signal.h")
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES "signal.h")
|
||||
endif(HAVE_SIGNAL_H)
|
||||
check_type_size("sig_atomic_t" 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)
|
||||
if(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
||||
set(HAVE_SIG_ATOMIC_T_VOLATILE 1)
|
||||
endif(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
|
||||
endif(HAVE_SIZEOF_SIG_ATOMIC_T)
|
||||
|
||||
set(CHECK_TYPE_SIZE_PREINCLUDE
|
||||
"#undef inline")
|
||||
|
||||
if(HAVE_WINDOWS_H)
|
||||
set(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <windows.h>")
|
||||
if(HAVE_WINSOCK2_H)
|
||||
set(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}\n#include <winsock2.h>")
|
||||
endif(HAVE_WINSOCK2_H)
|
||||
else(HAVE_WINDOWS_H)
|
||||
if(HAVE_SYS_SOCKET_H)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
|
||||
"sys/socket.h")
|
||||
endif(HAVE_SYS_SOCKET_H)
|
||||
if(HAVE_NETINET_IN_H)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
|
||||
"netinet/in.h")
|
||||
endif(HAVE_NETINET_IN_H)
|
||||
if(HAVE_ARPA_INET_H)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
|
||||
"arpa/inet.h")
|
||||
endif(HAVE_ARPA_INET_H)
|
||||
endif(HAVE_WINDOWS_H)
|
||||
|
||||
check_type_size("struct sockaddr_storage" SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||
if(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||
set(HAVE_STRUCT_SOCKADDR_STORAGE 1)
|
||||
endif(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||
|
121
CMake/Platforms/WindowsCache.cmake
Normal file
121
CMake/Platforms/WindowsCache.cmake
Normal file
@@ -0,0 +1,121 @@
|
||||
if(NOT UNIX)
|
||||
if(WIN32)
|
||||
set(HAVE_LIBDL 0)
|
||||
set(HAVE_LIBUCB 0)
|
||||
set(HAVE_LIBSOCKET 0)
|
||||
set(NOT_NEED_LIBNSL 0)
|
||||
set(HAVE_LIBNSL 0)
|
||||
set(HAVE_LIBZ 0)
|
||||
set(HAVE_LIBCRYPTO 0)
|
||||
|
||||
set(HAVE_DLOPEN 0)
|
||||
|
||||
set(HAVE_ALLOCA_H 0)
|
||||
set(HAVE_ARPA_INET_H 0)
|
||||
set(HAVE_DLFCN_H 0)
|
||||
set(HAVE_FCNTL_H 1)
|
||||
set(HAVE_FEATURES_H 0)
|
||||
set(HAVE_INTTYPES_H 0)
|
||||
set(HAVE_IO_H 1)
|
||||
set(HAVE_MALLOC_H 1)
|
||||
set(HAVE_MEMORY_H 1)
|
||||
set(HAVE_NETDB_H 0)
|
||||
set(HAVE_NETINET_IF_ETHER_H 0)
|
||||
set(HAVE_NETINET_IN_H 0)
|
||||
set(HAVE_NET_IF_H 0)
|
||||
set(HAVE_PROCESS_H 1)
|
||||
set(HAVE_PWD_H 0)
|
||||
set(HAVE_SETJMP_H 1)
|
||||
set(HAVE_SGTTY_H 0)
|
||||
set(HAVE_SIGNAL_H 1)
|
||||
set(HAVE_SOCKIO_H 0)
|
||||
set(HAVE_STDINT_H 0)
|
||||
set(HAVE_STDLIB_H 1)
|
||||
set(HAVE_STRINGS_H 0)
|
||||
set(HAVE_STRING_H 1)
|
||||
set(HAVE_SYS_PARAM_H 0)
|
||||
set(HAVE_SYS_POLL_H 0)
|
||||
set(HAVE_SYS_SELECT_H 0)
|
||||
set(HAVE_SYS_SOCKET_H 0)
|
||||
set(HAVE_SYS_SOCKIO_H 0)
|
||||
set(HAVE_SYS_STAT_H 1)
|
||||
set(HAVE_SYS_TIME_H 0)
|
||||
set(HAVE_SYS_TYPES_H 1)
|
||||
set(HAVE_SYS_UTIME_H 1)
|
||||
set(HAVE_TERMIOS_H 0)
|
||||
set(HAVE_TERMIO_H 0)
|
||||
set(HAVE_TIME_H 1)
|
||||
set(HAVE_UNISTD_H 0)
|
||||
set(HAVE_UTIME_H 0)
|
||||
set(HAVE_X509_H 0)
|
||||
set(HAVE_ZLIB_H 0)
|
||||
|
||||
set(HAVE_SIZEOF_LONG_DOUBLE 1)
|
||||
set(SIZEOF_LONG_DOUBLE 8)
|
||||
|
||||
set(HAVE_SOCKET 1)
|
||||
set(HAVE_POLL 0)
|
||||
set(HAVE_SELECT 1)
|
||||
set(HAVE_STRDUP 1)
|
||||
set(HAVE_STRSTR 1)
|
||||
set(HAVE_STRTOK_R 0)
|
||||
set(HAVE_STRFTIME 1)
|
||||
set(HAVE_UNAME 0)
|
||||
set(HAVE_STRCASECMP 0)
|
||||
set(HAVE_STRICMP 1)
|
||||
set(HAVE_STRCMPI 1)
|
||||
set(HAVE_GETHOSTBYADDR 1)
|
||||
set(HAVE_GETTIMEOFDAY 0)
|
||||
set(HAVE_INET_ADDR 1)
|
||||
set(HAVE_INET_NTOA 1)
|
||||
set(HAVE_INET_NTOA_R 0)
|
||||
set(HAVE_TCGETATTR 0)
|
||||
set(HAVE_TCSETATTR 0)
|
||||
set(HAVE_PERROR 1)
|
||||
set(HAVE_CLOSESOCKET 1)
|
||||
set(HAVE_SETVBUF 0)
|
||||
set(HAVE_SIGSETJMP 0)
|
||||
set(HAVE_GETPASS_R 0)
|
||||
set(HAVE_STRLCAT 0)
|
||||
set(HAVE_GETPWUID 0)
|
||||
set(HAVE_GETEUID 0)
|
||||
set(HAVE_UTIME 1)
|
||||
set(HAVE_RAND_EGD 0)
|
||||
set(HAVE_RAND_SCREEN 0)
|
||||
set(HAVE_RAND_STATUS 0)
|
||||
set(HAVE_GMTIME_R 0)
|
||||
set(HAVE_LOCALTIME_R 0)
|
||||
set(HAVE_GETHOSTBYADDR_R 0)
|
||||
set(HAVE_GETHOSTBYNAME_R 0)
|
||||
set(HAVE_SIGNAL_FUNC 1)
|
||||
set(HAVE_SIGNAL_MACRO 0)
|
||||
|
||||
set(HAVE_GETHOSTBYADDR_R_5 0)
|
||||
set(HAVE_GETHOSTBYADDR_R_5_REENTRANT 0)
|
||||
set(HAVE_GETHOSTBYADDR_R_7 0)
|
||||
set(HAVE_GETHOSTBYADDR_R_7_REENTRANT 0)
|
||||
set(HAVE_GETHOSTBYADDR_R_8 0)
|
||||
set(HAVE_GETHOSTBYADDR_R_8_REENTRANT 0)
|
||||
set(HAVE_GETHOSTBYNAME_R_3 0)
|
||||
set(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)
|
||||
set(HAVE_GETHOSTBYNAME_R_5 0)
|
||||
set(HAVE_GETHOSTBYNAME_R_5_REENTRANT 0)
|
||||
set(HAVE_GETHOSTBYNAME_R_6 0)
|
||||
set(HAVE_GETHOSTBYNAME_R_6_REENTRANT 0)
|
||||
|
||||
set(TIME_WITH_SYS_TIME 0)
|
||||
set(HAVE_O_NONBLOCK 0)
|
||||
set(HAVE_IN_ADDR_T 0)
|
||||
set(HAVE_INET_NTOA_R_DECL 0)
|
||||
set(HAVE_INET_NTOA_R_DECL_REENTRANT 0)
|
||||
set(HAVE_GETADDRINFO 0)
|
||||
set(STDC_HEADERS 1)
|
||||
set(RETSIGTYPE_TEST 1)
|
||||
|
||||
set(HAVE_SIGACTION 0)
|
||||
set(HAVE_MACRO_SIGSETJMP 0)
|
||||
else(WIN32)
|
||||
message("This file should be included on Windows platform only")
|
||||
endif(WIN32)
|
||||
endif(NOT UNIX)
|
||||
|
31
CMake/Utilities.cmake
Normal file
31
CMake/Utilities.cmake
Normal file
@@ -0,0 +1,31 @@
|
||||
# File containing various utilities
|
||||
|
||||
# Converts a CMake list to a string containing elements separated by spaces
|
||||
function(TO_LIST_SPACES _LIST_NAME OUTPUT_VAR)
|
||||
set(NEW_LIST_SPACE)
|
||||
foreach(ITEM ${${_LIST_NAME}})
|
||||
set(NEW_LIST_SPACE "${NEW_LIST_SPACE} ${ITEM}")
|
||||
endforeach()
|
||||
string(STRIP ${NEW_LIST_SPACE} NEW_LIST_SPACE)
|
||||
set(${OUTPUT_VAR} "${NEW_LIST_SPACE}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# 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)
|
||||
string(REPLACE " " ";" _LIST ${${LIST_NAME}})
|
||||
list(APPEND _LIST ${ARGN})
|
||||
list(REMOVE_DUPLICATES _LIST)
|
||||
to_list_spaces(_LIST NEW_LIST_SPACE)
|
||||
set(${LIST_NAME} "${NEW_LIST_SPACE}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# 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)
|
||||
function(IN_STR_LIST LIST_NAME ITEM_SEARCHED RETVAL)
|
||||
list(FIND ${LIST_NAME} ${ITEM_SEARCHED} FIND_POS)
|
||||
if(${FIND_POS} EQUAL -1)
|
||||
set(${RETVAL} FALSE PARENT_SCOPE)
|
||||
else()
|
||||
set(${RETVAL} TRUE PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
884
CMakeLists.txt
Normal file
884
CMakeLists.txt
Normal file
@@ -0,0 +1,884 @@
|
||||
# cURL/libcurl CMake script
|
||||
# by Tetetest and Sukender (Benoit Neil)
|
||||
|
||||
# TODO:
|
||||
# The output .so file lacks the soname number which we currently have within the lib/Makefile.am file
|
||||
# Add full (4 or 5 libs) SSL support
|
||||
# Add INSTALL target (EXTRA_DIST variables in Makefile.am may be moved to Makefile.inc so that CMake/CPack is aware of what's to include).
|
||||
# Add CTests(?)
|
||||
# Check on all possible platforms
|
||||
# Test with as many configurations possible (With or without any option)
|
||||
# Create scripts that help keeping the CMake build system up to date (to reduce maintenance). According to Tetetest:
|
||||
# - lists of headers that 'configure' checks for;
|
||||
# - curl-specific tests (the ones that are in m4/curl-*.m4 files);
|
||||
# - (most obvious thing:) curl version numbers.
|
||||
# Add documentation subproject
|
||||
#
|
||||
# To check:
|
||||
# (From Daniel Stenberg) The cmake build selected to run gcc with -fPIC on my box while the plain configure script did not.
|
||||
# (From Daniel Stenberg) The gcc command line use neither -g nor any -O options. As a developer, I also treasure our configure scripts's --enable-debug option that sets a long range of "picky" compiler options.
|
||||
cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
|
||||
include(Utilities)
|
||||
|
||||
project( CURL C )
|
||||
|
||||
|
||||
file (READ ${CURL_SOURCE_DIR}/include/curl/curlver.h CURL_VERSION_H_CONTENTS)
|
||||
string (REGEX MATCH "LIBCURL_VERSION_MAJOR[ \t]+([0-9]+)"
|
||||
LIBCURL_VERSION_MJ ${CURL_VERSION_H_CONTENTS})
|
||||
string (REGEX MATCH "([0-9]+)"
|
||||
LIBCURL_VERSION_MJ ${LIBCURL_VERSION_MJ})
|
||||
string (REGEX MATCH
|
||||
"LIBCURL_VERSION_MINOR[ \t]+([0-9]+)"
|
||||
LIBCURL_VERSION_MI ${CURL_VERSION_H_CONTENTS})
|
||||
string (REGEX MATCH "([0-9]+)" LIBCURL_VERSION_MI ${LIBCURL_VERSION_MI})
|
||||
string (REGEX MATCH
|
||||
"LIBCURL_VERSION_PATCH[ \t]+([0-9]+)"
|
||||
LIBCURL_VERSION_PT ${CURL_VERSION_H_CONTENTS})
|
||||
string (REGEX MATCH "([0-9]+)" LIBCURL_VERSION_PT ${LIBCURL_VERSION_PT})
|
||||
set (CURL_MAJOR_VERSION ${LIBCURL_VERSION_MJ})
|
||||
set (CURL_MINOR_VERSION ${LIBCURL_VERSION_MI})
|
||||
set (CURL_PATCH_VERSION ${LIBCURL_VERSION_PT})
|
||||
|
||||
include_regular_expression("^.*$") # Sukender: Is it necessary?
|
||||
|
||||
# Setup package meta-data
|
||||
# SET(PACKAGE "curl")
|
||||
set(CURL_VERSION ${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION})
|
||||
message(STATUS "curl version=[${CURL_VERSION}]")
|
||||
# SET(PACKAGE_TARNAME "curl")
|
||||
# SET(PACKAGE_NAME "curl")
|
||||
# SET(PACKAGE_VERSION "-")
|
||||
# SET(PACKAGE_STRING "curl-")
|
||||
# SET(PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/")
|
||||
set(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}")
|
||||
set(OS "\"${CMAKE_SYSTEM_NAME}\"")
|
||||
|
||||
# Make the base headers visible to everything
|
||||
# IF(NOT ${PROJECT_BINARY_DIR} EQUAL ${PROJECT_SOURCE_DIR})
|
||||
# INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include)
|
||||
# ENDIF()
|
||||
include_directories( ${CURL_SOURCE_DIR}/include )
|
||||
|
||||
if(WIN32)
|
||||
set(NATIVE_WINDOWS ON)
|
||||
endif()
|
||||
|
||||
option(BUILD_CURL_EXE "Set to ON to build cURL executable." ON)
|
||||
option(BUILD_CURL_TESTS "Set to ON to build cURL tests." ON)
|
||||
option(CURL_STATICLIB "Set to ON to build libcurl with static linking." OFF)
|
||||
option(CURL_USE_ARES "Set to ON to enable c-ares support" OFF)
|
||||
# initialize CURL_LIBS
|
||||
set(CURL_LIBS "")
|
||||
|
||||
if(CURL_USE_ARES)
|
||||
set(USE_ARES ${CURL_USE_ARES})
|
||||
find_package(CARES REQUIRED)
|
||||
list(APPEND CURL_LIBS ${CARES_LIBRARY} )
|
||||
set(CURL_LIBS ${CURL_LIBS} ${CARES_LIBRARY})
|
||||
endif()
|
||||
|
||||
option(BUILD_DASHBOARD_REPORTS "Set to ON to activate reporting of cURL builds here http://www.cdash.org/CDashPublic/index.php?project=CURL" OFF)
|
||||
if(BUILD_DASHBOARD_REPORTS)
|
||||
#INCLUDE(Dart)
|
||||
include(CTest)
|
||||
endif(BUILD_DASHBOARD_REPORTS)
|
||||
|
||||
if(MSVC)
|
||||
option(BUILD_RELEASE_DEBUG_DIRS "Set OFF to build each configuration to a separate directory" OFF)
|
||||
mark_as_advanced(BUILD_RELEASE_DEBUG_DIRS)
|
||||
endif()
|
||||
|
||||
option(CURL_HIDDEN_SYMBOLS "Set to ON to hide libcurl internal symbols (=hide all symbols that aren't officially external)." ON)
|
||||
mark_as_advanced(CURL_HIDDEN_SYMBOLS)
|
||||
|
||||
# IF(WIN32)
|
||||
# OPTION(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without openssl" ON)
|
||||
# MARK_AS_ADVANCED(CURL_WINDOWS_SSPI)
|
||||
# ENDIF()
|
||||
|
||||
option(HTTP_ONLY "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)" OFF)
|
||||
mark_as_advanced(HTTP_ONLY)
|
||||
option(CURL_DISABLE_FTP "disables FTP" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_FTP)
|
||||
option(CURL_DISABLE_LDAP "disables LDAP" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_LDAP)
|
||||
option(CURL_DISABLE_TELNET "disables Telnet" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_TELNET)
|
||||
option(CURL_DISABLE_DICT "disables DICT" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_DICT)
|
||||
option(CURL_DISABLE_FILE "disables FILE" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_FILE)
|
||||
option(CURL_DISABLE_TFTP "disables TFTP" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_TFTP)
|
||||
option(CURL_DISABLE_HTTP "disables HTTP" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_HTTP)
|
||||
|
||||
option(CURL_DISABLE_LDAPS "to disable LDAPS" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_LDAPS)
|
||||
if(WIN32)
|
||||
set(CURL_DEFAULT_DISABLE_LDAP OFF)
|
||||
# some windows compilers do not have wldap32
|
||||
if( NOT HAVE_WLDAP32)
|
||||
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
|
||||
message(STATUS "wldap32 not found CURL_DISABLE_LDAP set ON")
|
||||
option(CURL_LDAP_WIN "Use W$ LDAP implementation" OFF)
|
||||
else()
|
||||
option(CURL_LDAP_WIN "Use W$ LDAP implementation" ON)
|
||||
endif()
|
||||
mark_as_advanced(CURL_LDAP_WIN)
|
||||
set(CURL_LDAP_HYBRID OFF)
|
||||
else()
|
||||
option(CURL_LDAP_HYBRID "W$ LDAP with non-W$ compiler" OFF)
|
||||
mark_as_advanced(CURL_LDAP_HYBRID)
|
||||
set(CURL_LDAP_WIN OFF)
|
||||
endif()
|
||||
|
||||
if(HTTP_ONLY)
|
||||
set(CURL_DISABLE_FTP ON)
|
||||
set(CURL_DISABLE_LDAP ON)
|
||||
set(CURL_DISABLE_TELNET ON)
|
||||
set(CURL_DISABLE_DICT ON)
|
||||
set(CURL_DISABLE_FILE ON)
|
||||
set(CURL_DISABLE_TFTP ON)
|
||||
endif()
|
||||
|
||||
option(CURL_DISABLE_COOKIES "to disable cookies support" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_COOKIES)
|
||||
|
||||
option(CURL_DISABLE_CRYPTO_AUTH "to disable cryptographic authentication" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_CRYPTO_AUTH)
|
||||
option(CURL_DISABLE_VERBOSE_STRINGS "to disable verbose strings" OFF)
|
||||
mark_as_advanced(CURL_DISABLE_VERBOSE_STRINGS)
|
||||
option(DISABLED_THREADSAFE "Set to explicitly specify we don't want to use thread-safe functions" OFF)
|
||||
mark_as_advanced(DISABLED_THREADSAFE)
|
||||
option(ENABLE_IPV6 "Define if you want to enable IPv6 support" OFF)
|
||||
mark_as_advanced(ENABLE_IPV6)
|
||||
|
||||
if(WIN32)
|
||||
list_spaces_append_once(CMAKE_C_STANDARD_LIBRARIES wsock32.lib ws2_32.lib) # bufferoverflowu.lib
|
||||
if(CURL_DISABLE_LDAP)
|
||||
# Remove wldap32.lib from space-separated list
|
||||
string(REPLACE " " ";" _LIST ${CMAKE_C_STANDARD_LIBRARIES})
|
||||
list(REMOVE_ITEM _LIST "wldap32.lib")
|
||||
to_list_spaces(_LIST CMAKE_C_STANDARD_LIBRARIES)
|
||||
else()
|
||||
# Append wldap32.lib
|
||||
list_spaces_append_once(CMAKE_C_STANDARD_LIBRARIES wldap32.lib)
|
||||
endif()
|
||||
set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
|
||||
|
||||
# We need ansi c-flags, especially on HP
|
||||
set(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
|
||||
|
||||
# Disable warnings on Borland to avoid changing 3rd party code.
|
||||
if(BORLAND)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
|
||||
endif(BORLAND)
|
||||
|
||||
# If we are on AIX, do the _ALL_SOURCE magic
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES AIX)
|
||||
set(_ALL_SOURCE 1)
|
||||
endif(${CMAKE_SYSTEM_NAME} MATCHES AIX)
|
||||
|
||||
# Include all the necessary files for macros
|
||||
include (CheckFunctionExists)
|
||||
include (CheckIncludeFile)
|
||||
include (CheckIncludeFiles)
|
||||
include (CheckLibraryExists)
|
||||
include (CheckSymbolExists)
|
||||
# if crosscompiling is on, the CHECK_TYPE_SIZE macro coming with cmake uses
|
||||
# TRY_COMPILE instead of TRY_RUN which makes crosscompiling easier, Alex
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
include ("${CMAKE_MODULE_PATH}/CheckTypeSize.cmake")
|
||||
else(CMAKE_CROSSCOMPILING)
|
||||
include (CheckTypeSize)
|
||||
endif(CMAKE_CROSSCOMPILING)
|
||||
|
||||
# On windows preload settings
|
||||
if(WIN32)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Platforms/WindowsCache.cmake)
|
||||
endif(WIN32)
|
||||
|
||||
# This macro checks if the symbol exists in the library and if it
|
||||
# does, it appends library to the list.
|
||||
macro(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
|
||||
check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} ""
|
||||
${VARIABLE})
|
||||
if(${VARIABLE})
|
||||
set(CURL_LIBS ${CURL_LIBS} ${LIBRARY})
|
||||
endif(${VARIABLE})
|
||||
endmacro(CHECK_LIBRARY_EXISTS_CONCAT)
|
||||
|
||||
# Check for all needed libraries
|
||||
check_library_exists_concat("dl" dlopen HAVE_LIBDL)
|
||||
#CHECK_LIBRARY_EXISTS_CONCAT("ucb" gethostname HAVE_LIBUCB)
|
||||
check_library_exists_concat("socket" connect HAVE_LIBSOCKET)
|
||||
check_library_exists("c" gethostbyname "" NOT_NEED_LIBNSL)
|
||||
|
||||
# Yellowtab Zeta needs different libraries than BeOS 5.
|
||||
if(BEOS)
|
||||
set(NOT_NEED_LIBNSL 1)
|
||||
check_library_exists_concat("bind" gethostbyname HAVE_LIBBIND)
|
||||
check_library_exists_concat("bnetapi" closesocket HAVE_LIBBNETAPI)
|
||||
endif(BEOS)
|
||||
|
||||
if(NOT NOT_NEED_LIBNSL)
|
||||
check_library_exists_concat("nsl" gethostbyname HAVE_LIBNSL)
|
||||
endif(NOT NOT_NEED_LIBNSL)
|
||||
|
||||
check_library_exists_concat("ws2_32" getch HAVE_LIBWS2_32)
|
||||
check_library_exists_concat("winmm" getch HAVE_LIBWINMM)
|
||||
check_library_exists("wldap32" cldap_open "" HAVE_WLDAP32)
|
||||
|
||||
# IF(NOT CURL_SPECIAL_LIBZ)
|
||||
# CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ)
|
||||
# ENDIF(NOT CURL_SPECIAL_LIBZ)
|
||||
|
||||
option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON)
|
||||
mark_as_advanced(CMAKE_USE_OPENSSL)
|
||||
if(CMAKE_USE_OPENSSL)
|
||||
if(WIN32)
|
||||
find_package(OpenSSL)
|
||||
if(OPENSSL_FOUND)
|
||||
set(USE_SSLEAY TRUE)
|
||||
set(USE_OPENSSL TRUE)
|
||||
list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES} )
|
||||
endif()
|
||||
#FIND_LIBRARY(LIBEAY NAMES libeay32)
|
||||
#LIST(APPEND CURL_LIBS ${LIBEAY} )
|
||||
else(WIN32)
|
||||
check_library_exists_concat("crypto" CRYPTO_lock HAVE_LIBCRYPTO)
|
||||
check_library_exists_concat("ssl" SSL_connect HAVE_LIBSSL)
|
||||
endif(WIN32)
|
||||
endif(CMAKE_USE_OPENSSL)
|
||||
|
||||
# Check for idn
|
||||
check_library_exists_concat("idn" idna_to_ascii_lz HAVE_LIBIDN)
|
||||
|
||||
# Check for LDAP
|
||||
check_library_exists_concat("ldap" ldap_init HAVE_LIBLDAP)
|
||||
# if(NOT HAVE_LIBLDAP)
|
||||
# SET(CURL_DISABLE_LDAP ON)
|
||||
# endif(NOT HAVE_LIBLDAP)
|
||||
|
||||
# Check for symbol dlopen (same as HAVE_LIBDL)
|
||||
check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN)
|
||||
|
||||
# For other tests to use the same libraries
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBS})
|
||||
|
||||
option(CURL_ZLIB "Set to ON to enable building cURL with zlib support." ON)
|
||||
set(HAVE_LIBZ OFF)
|
||||
set(HAVE_ZLIB_H OFF)
|
||||
set(HAVE_ZLIB OFF)
|
||||
if(CURL_ZLIB) # AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE
|
||||
find_package(ZLIB QUIET)
|
||||
if(ZLIB_FOUND)
|
||||
set(HAVE_ZLIB_H ON)
|
||||
set(HAVE_ZLIB ON)
|
||||
set(HAVE_LIBZ ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# If we have features.h, then do the _BSD_SOURCE magic
|
||||
check_include_file("features.h" HAVE_FEATURES_H)
|
||||
|
||||
# Check if header file exists and add it to the list.
|
||||
macro(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
|
||||
check_include_files("${CURL_INCLUDES};${FILE}" ${VARIABLE})
|
||||
if(${VARIABLE})
|
||||
set(CURL_INCLUDES ${CURL_INCLUDES} ${FILE})
|
||||
set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -D${VARIABLE}")
|
||||
endif(${VARIABLE})
|
||||
endmacro(CHECK_INCLUDE_FILE_CONCAT)
|
||||
|
||||
|
||||
# Check for header files
|
||||
if(NOT UNIX)
|
||||
check_include_file_concat("ws2tcpip.h" HAVE_WS2TCPIP_H)
|
||||
check_include_file_concat("winsock2.h" HAVE_WINSOCK2_H)
|
||||
endif(NOT UNIX)
|
||||
check_include_file_concat("stdio.h" HAVE_STDIO_H)
|
||||
if(NOT UNIX)
|
||||
check_include_file_concat("windows.h" HAVE_WINDOWS_H)
|
||||
check_include_file_concat("winsock.h" HAVE_WINSOCK_H)
|
||||
endif(NOT UNIX)
|
||||
|
||||
check_include_file_concat("inttypes.h" HAVE_INTTYPES_H)
|
||||
check_include_file_concat("sys/filio.h" HAVE_SYS_FILIO_H)
|
||||
check_include_file_concat("sys/ioctl.h" HAVE_SYS_IOCTL_H)
|
||||
check_include_file_concat("sys/param.h" HAVE_SYS_PARAM_H)
|
||||
check_include_file_concat("sys/poll.h" HAVE_SYS_POLL_H)
|
||||
check_include_file_concat("sys/resource.h" HAVE_SYS_RESOURCE_H)
|
||||
check_include_file_concat("sys/select.h" HAVE_SYS_SELECT_H)
|
||||
check_include_file_concat("sys/socket.h" HAVE_SYS_SOCKET_H)
|
||||
check_include_file_concat("sys/sockio.h" HAVE_SYS_SOCKIO_H)
|
||||
check_include_file_concat("sys/stat.h" HAVE_SYS_STAT_H)
|
||||
check_include_file_concat("sys/time.h" HAVE_SYS_TIME_H)
|
||||
check_include_file_concat("sys/types.h" HAVE_SYS_TYPES_H)
|
||||
check_include_file_concat("sys/uio.h" HAVE_SYS_UIO_H)
|
||||
check_include_file_concat("sys/un.h" HAVE_SYS_UN_H)
|
||||
check_include_file_concat("sys/utime.h" HAVE_SYS_UTIME_H)
|
||||
check_include_file_concat("alloca.h" HAVE_ALLOCA_H)
|
||||
check_include_file_concat("arpa/inet.h" HAVE_ARPA_INET_H)
|
||||
check_include_file_concat("arpa/tftp.h" HAVE_ARPA_TFTP_H)
|
||||
check_include_file_concat("assert.h" HAVE_ASSERT_H)
|
||||
check_include_file_concat("crypto.h" HAVE_CRYPTO_H)
|
||||
check_include_file_concat("des.h" HAVE_DES_H)
|
||||
check_include_file_concat("err.h" HAVE_ERR_H)
|
||||
check_include_file_concat("errno.h" HAVE_ERRNO_H)
|
||||
check_include_file_concat("fcntl.h" HAVE_FCNTL_H)
|
||||
check_include_file_concat("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H)
|
||||
check_include_file_concat("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H)
|
||||
check_include_file_concat("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H)
|
||||
check_include_file_concat("idn-free.h" HAVE_IDN_FREE_H)
|
||||
check_include_file_concat("ifaddrs.h" HAVE_IFADDRS_H)
|
||||
check_include_file_concat("io.h" HAVE_IO_H)
|
||||
check_include_file_concat("krb.h" HAVE_KRB_H)
|
||||
check_include_file_concat("libgen.h" HAVE_LIBGEN_H)
|
||||
check_include_file_concat("libssh2.h" HAVE_LIBSSH2_H)
|
||||
check_include_file_concat("limits.h" HAVE_LIMITS_H)
|
||||
check_include_file_concat("locale.h" HAVE_LOCALE_H)
|
||||
check_include_file_concat("net/if.h" HAVE_NET_IF_H)
|
||||
check_include_file_concat("netdb.h" HAVE_NETDB_H)
|
||||
check_include_file_concat("netinet/in.h" HAVE_NETINET_IN_H)
|
||||
check_include_file_concat("netinet/tcp.h" HAVE_NETINET_TCP_H)
|
||||
check_include_file_concat("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H)
|
||||
check_include_file_concat("openssl/engine.h" HAVE_OPENSSL_ENGINE_H)
|
||||
check_include_file_concat("openssl/err.h" HAVE_OPENSSL_ERR_H)
|
||||
check_include_file_concat("openssl/pem.h" HAVE_OPENSSL_PEM_H)
|
||||
check_include_file_concat("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H)
|
||||
check_include_file_concat("openssl/rsa.h" HAVE_OPENSSL_RSA_H)
|
||||
check_include_file_concat("openssl/ssl.h" HAVE_OPENSSL_SSL_H)
|
||||
check_include_file_concat("openssl/x509.h" HAVE_OPENSSL_X509_H)
|
||||
check_include_file_concat("pem.h" HAVE_PEM_H)
|
||||
check_include_file_concat("poll.h" HAVE_POLL_H)
|
||||
check_include_file_concat("pwd.h" HAVE_PWD_H)
|
||||
check_include_file_concat("rsa.h" HAVE_RSA_H)
|
||||
check_include_file_concat("setjmp.h" HAVE_SETJMP_H)
|
||||
check_include_file_concat("sgtty.h" HAVE_SGTTY_H)
|
||||
check_include_file_concat("signal.h" HAVE_SIGNAL_H)
|
||||
check_include_file_concat("ssl.h" HAVE_SSL_H)
|
||||
check_include_file_concat("stdbool.h" HAVE_STDBOOL_H)
|
||||
check_include_file_concat("stdint.h" HAVE_STDINT_H)
|
||||
check_include_file_concat("stdio.h" HAVE_STDIO_H)
|
||||
check_include_file_concat("stdlib.h" HAVE_STDLIB_H)
|
||||
check_include_file_concat("string.h" HAVE_STRING_H)
|
||||
check_include_file_concat("strings.h" HAVE_STRINGS_H)
|
||||
check_include_file_concat("stropts.h" HAVE_STROPTS_H)
|
||||
check_include_file_concat("termio.h" HAVE_TERMIO_H)
|
||||
check_include_file_concat("termios.h" HAVE_TERMIOS_H)
|
||||
check_include_file_concat("time.h" HAVE_TIME_H)
|
||||
check_include_file_concat("tld.h" HAVE_TLD_H)
|
||||
check_include_file_concat("unistd.h" HAVE_UNISTD_H)
|
||||
check_include_file_concat("utime.h" HAVE_UTIME_H)
|
||||
check_include_file_concat("x509.h" HAVE_X509_H)
|
||||
|
||||
check_include_file_concat("process.h" HAVE_PROCESS_H)
|
||||
check_include_file_concat("stddef.h" HAVE_STDDEF_H)
|
||||
check_include_file_concat("dlfcn.h" HAVE_DLFCN_H)
|
||||
check_include_file_concat("malloc.h" HAVE_MALLOC_H)
|
||||
check_include_file_concat("memory.h" HAVE_MEMORY_H)
|
||||
check_include_file_concat("ldap.h" HAVE_LDAP_H)
|
||||
check_include_file_concat("netinet/if_ether.h" HAVE_NETINET_IF_ETHER_H)
|
||||
check_include_file_concat("stdint.h" HAVE_STDINT_H)
|
||||
check_include_file_concat("sockio.h" HAVE_SOCKIO_H)
|
||||
check_include_file_concat("sys/utsname.h" HAVE_SYS_UTSNAME_H)
|
||||
check_include_file_concat("idna.h" HAVE_IDNA_H)
|
||||
|
||||
if(CMAKE_USE_OPENSSL)
|
||||
check_include_file_concat("openssl/rand.h" HAVE_OPENSSL_RAND_H)
|
||||
endif(CMAKE_USE_OPENSSL)
|
||||
|
||||
|
||||
check_type_size(size_t SIZEOF_SIZE_T)
|
||||
check_type_size(ssize_t SIZEOF_SSIZE_T)
|
||||
check_type_size("long long" SIZEOF_LONG_LONG)
|
||||
check_type_size("long" SIZEOF_LONG)
|
||||
check_type_size("int" SIZEOF_INT)
|
||||
check_type_size("__int64" SIZEOF___INT64)
|
||||
check_type_size("long double" SIZEOF_LONG_DOUBLE)
|
||||
check_type_size("time_t" SIZEOF_TIME_T)
|
||||
if(NOT HAVE_SIZEOF_SSIZE_T)
|
||||
if(SIZEOF_LONG EQUAL SIZEOF_SIZE_T)
|
||||
set(ssize_t long)
|
||||
endif(SIZEOF_LONG EQUAL SIZEOF_SIZE_T)
|
||||
if(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T)
|
||||
set(ssize_t __int64)
|
||||
endif(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T)
|
||||
endif(NOT HAVE_SIZEOF_SSIZE_T)
|
||||
|
||||
# Different sizeofs, etc.
|
||||
|
||||
# define CURL_SIZEOF_LONG 4
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_FORMAT_OFF_T "%lld"
|
||||
# define CURL_SIZEOF_CURL_OFF_T 8
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
|
||||
set(CURL_SIZEOF_LONG ${SIZEOF_LONG})
|
||||
|
||||
if(SIZEOF_LONG EQUAL 8)
|
||||
set(CURL_TYPEOF_CURL_OFF_T long)
|
||||
set(CURL_SIZEOF_CURL_OFF_T 8)
|
||||
set(CURL_FORMAT_CURL_OFF_T "ld")
|
||||
set(CURL_FORMAT_CURL_OFF_TU "lu")
|
||||
set(CURL_FORMAT_OFF_T "%ld")
|
||||
set(CURL_SUFFIX_CURL_OFF_T L)
|
||||
set(CURL_SUFFIX_CURL_OFF_TU LU)
|
||||
endif(SIZEOF_LONG EQUAL 8)
|
||||
|
||||
if(SIZEOF_LONG_LONG EQUAL 8)
|
||||
set(CURL_TYPEOF_CURL_OFF_T "long long")
|
||||
set(CURL_SIZEOF_CURL_OFF_T 8)
|
||||
set(CURL_FORMAT_CURL_OFF_T "lld")
|
||||
set(CURL_FORMAT_CURL_OFF_TU "llu")
|
||||
set(CURL_FORMAT_OFF_T "%lld")
|
||||
set(CURL_SUFFIX_CURL_OFF_T LL)
|
||||
set(CURL_SUFFIX_CURL_OFF_TU LLU)
|
||||
endif(SIZEOF_LONG_LONG EQUAL 8)
|
||||
|
||||
if(NOT CURL_TYPEOF_CURL_OFF_T)
|
||||
set(CURL_TYPEOF_CURL_OFF_T ${ssize_t})
|
||||
set(CURL_SIZEOF_CURL_OFF_T ${SIZEOF_SSIZE_T})
|
||||
# TODO: need adjustment here.
|
||||
set(CURL_FORMAT_CURL_OFF_T "ld")
|
||||
set(CURL_FORMAT_CURL_OFF_TU "lu")
|
||||
set(CURL_FORMAT_OFF_T "%ld")
|
||||
set(CURL_SUFFIX_CURL_OFF_T L)
|
||||
set(CURL_SUFFIX_CURL_OFF_TU LU)
|
||||
endif(NOT CURL_TYPEOF_CURL_OFF_T)
|
||||
|
||||
if(HAVE_SIZEOF_LONG_LONG)
|
||||
set(HAVE_LONGLONG 1)
|
||||
set(HAVE_LL 1)
|
||||
endif(HAVE_SIZEOF_LONG_LONG)
|
||||
|
||||
find_file(RANDOM_FILE urandom /dev)
|
||||
mark_as_advanced(RANDOM_FILE)
|
||||
|
||||
# Check for some functions that are used
|
||||
check_symbol_exists(basename "${CURL_INCLUDES}" HAVE_BASENAME)
|
||||
check_symbol_exists(socket "${CURL_INCLUDES}" HAVE_SOCKET)
|
||||
check_symbol_exists(poll "${CURL_INCLUDES}" HAVE_POLL)
|
||||
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
|
||||
check_symbol_exists(strdup "${CURL_INCLUDES}" HAVE_STRDUP)
|
||||
check_symbol_exists(strstr "${CURL_INCLUDES}" HAVE_STRSTR)
|
||||
check_symbol_exists(strtok_r "${CURL_INCLUDES}" HAVE_STRTOK_R)
|
||||
check_symbol_exists(strftime "${CURL_INCLUDES}" HAVE_STRFTIME)
|
||||
check_symbol_exists(uname "${CURL_INCLUDES}" HAVE_UNAME)
|
||||
check_symbol_exists(strcasecmp "${CURL_INCLUDES}" HAVE_STRCASECMP)
|
||||
check_symbol_exists(stricmp "${CURL_INCLUDES}" HAVE_STRICMP)
|
||||
check_symbol_exists(strcmpi "${CURL_INCLUDES}" HAVE_STRCMPI)
|
||||
check_symbol_exists(strncmpi "${CURL_INCLUDES}" HAVE_STRNCMPI)
|
||||
check_symbol_exists(alarm "${CURL_INCLUDES}" HAVE_ALARM)
|
||||
if(NOT HAVE_STRNCMPI)
|
||||
set(HAVE_STRCMPI)
|
||||
endif(NOT HAVE_STRNCMPI)
|
||||
check_symbol_exists(gethostbyaddr "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR)
|
||||
check_symbol_exists(gethostbyaddr_r "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR_R)
|
||||
check_symbol_exists(gettimeofday "${CURL_INCLUDES}" HAVE_GETTIMEOFDAY)
|
||||
check_symbol_exists(inet_addr "${CURL_INCLUDES}" HAVE_INET_ADDR)
|
||||
check_symbol_exists(inet_ntoa "${CURL_INCLUDES}" HAVE_INET_NTOA)
|
||||
check_symbol_exists(inet_ntoa_r "${CURL_INCLUDES}" HAVE_INET_NTOA_R)
|
||||
check_symbol_exists(tcsetattr "${CURL_INCLUDES}" HAVE_TCSETATTR)
|
||||
check_symbol_exists(tcgetattr "${CURL_INCLUDES}" HAVE_TCGETATTR)
|
||||
check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR)
|
||||
check_symbol_exists(closesocket "${CURL_INCLUDES}" HAVE_CLOSESOCKET)
|
||||
check_symbol_exists(setvbuf "${CURL_INCLUDES}" HAVE_SETVBUF)
|
||||
check_symbol_exists(sigsetjmp "${CURL_INCLUDES}" HAVE_SIGSETJMP)
|
||||
check_symbol_exists(getpass_r "${CURL_INCLUDES}" HAVE_GETPASS_R)
|
||||
check_symbol_exists(strlcat "${CURL_INCLUDES}" HAVE_STRLCAT)
|
||||
check_symbol_exists(getpwuid "${CURL_INCLUDES}" HAVE_GETPWUID)
|
||||
check_symbol_exists(geteuid "${CURL_INCLUDES}" HAVE_GETEUID)
|
||||
check_symbol_exists(utime "${CURL_INCLUDES}" HAVE_UTIME)
|
||||
if(CMAKE_USE_OPENSSL)
|
||||
check_symbol_exists(RAND_status "${CURL_INCLUDES}" HAVE_RAND_STATUS)
|
||||
check_symbol_exists(RAND_screen "${CURL_INCLUDES}" HAVE_RAND_SCREEN)
|
||||
check_symbol_exists(RAND_egd "${CURL_INCLUDES}" HAVE_RAND_EGD)
|
||||
check_symbol_exists(CRYPTO_cleanup_all_ex_data "${CURL_INCLUDES}"
|
||||
HAVE_CRYPTO_CLEANUP_ALL_EX_DATA)
|
||||
if(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
|
||||
set(USE_OPENSSL 1)
|
||||
set(USE_SSLEAY 1)
|
||||
endif(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
|
||||
endif(CMAKE_USE_OPENSSL)
|
||||
check_symbol_exists(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R)
|
||||
check_symbol_exists(localtime_r "${CURL_INCLUDES}" HAVE_LOCALTIME_R)
|
||||
|
||||
check_symbol_exists(gethostbyname "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME)
|
||||
check_symbol_exists(gethostbyname_r "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME_R)
|
||||
|
||||
check_symbol_exists(signal "${CURL_INCLUDES}" HAVE_SIGNAL_FUNC)
|
||||
check_symbol_exists(SIGALRM "${CURL_INCLUDES}" HAVE_SIGNAL_MACRO)
|
||||
if(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO)
|
||||
set(HAVE_SIGNAL 1)
|
||||
endif(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO)
|
||||
check_symbol_exists(uname "${CURL_INCLUDES}" HAVE_UNAME)
|
||||
check_symbol_exists(strtoll "${CURL_INCLUDES}" HAVE_STRTOLL)
|
||||
check_symbol_exists(_strtoi64 "${CURL_INCLUDES}" HAVE__STRTOI64)
|
||||
check_symbol_exists(strerror_r "${CURL_INCLUDES}" HAVE_STRERROR_R)
|
||||
check_symbol_exists(siginterrupt "${CURL_INCLUDES}" HAVE_SIGINTERRUPT)
|
||||
check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR)
|
||||
check_symbol_exists(fork "${CURL_INCLUDES}" HAVE_FORK)
|
||||
check_symbol_exists(freeaddrinfo "${CURL_INCLUDES}" HAVE_FREEADDRINFO)
|
||||
check_symbol_exists(freeifaddrs "${CURL_INCLUDES}" HAVE_FREEIFADDRS)
|
||||
check_symbol_exists(pipe "${CURL_INCLUDES}" HAVE_PIPE)
|
||||
check_symbol_exists(ftruncate "${CURL_INCLUDES}" HAVE_FTRUNCATE)
|
||||
check_symbol_exists(getprotobyname "${CURL_INCLUDES}" HAVE_GETPROTOBYNAME)
|
||||
check_symbol_exists(getrlimit "${CURL_INCLUDES}" HAVE_GETRLIMIT)
|
||||
check_symbol_exists(idn_free "${CURL_INCLUDES}" HAVE_IDN_FREE)
|
||||
check_symbol_exists(idna_strerror "${CURL_INCLUDES}" HAVE_IDNA_STRERROR)
|
||||
check_symbol_exists(tld_strerror "${CURL_INCLUDES}" HAVE_TLD_STRERROR)
|
||||
check_symbol_exists(setlocale "${CURL_INCLUDES}" HAVE_SETLOCALE)
|
||||
check_symbol_exists(setrlimit "${CURL_INCLUDES}" HAVE_SETRLIMIT)
|
||||
check_symbol_exists(fcntl "${CURL_INCLUDES}" HAVE_FCNTL)
|
||||
check_symbol_exists(ioctl "${CURL_INCLUDES}" HAVE_IOCTL)
|
||||
check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT)
|
||||
|
||||
# symbol exists in win32, but function does not.
|
||||
check_function_exists(inet_pton HAVE_INET_PTON)
|
||||
|
||||
# sigaction and sigsetjmp are special. Use special mechanism for
|
||||
# detecting those, but only if previous attempt failed.
|
||||
if(HAVE_SIGNAL_H)
|
||||
check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
|
||||
endif(HAVE_SIGNAL_H)
|
||||
|
||||
if(NOT HAVE_SIGSETJMP)
|
||||
if(HAVE_SETJMP_H)
|
||||
check_symbol_exists(sigsetjmp "setjmp.h" HAVE_MACRO_SIGSETJMP)
|
||||
if(HAVE_MACRO_SIGSETJMP)
|
||||
set(HAVE_SIGSETJMP 1)
|
||||
endif(HAVE_MACRO_SIGSETJMP)
|
||||
endif(HAVE_SETJMP_H)
|
||||
endif(NOT HAVE_SIGSETJMP)
|
||||
|
||||
# If there is no stricmp(), do not allow LDAP to parse URLs
|
||||
if(NOT HAVE_STRICMP)
|
||||
set(HAVE_LDAP_URL_PARSE 1)
|
||||
endif(NOT HAVE_STRICMP)
|
||||
|
||||
# For other curl specific tests, use this macro.
|
||||
macro(CURL_INTERNAL_TEST CURL_TEST)
|
||||
if("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
|
||||
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||
"-D${CURL_TEST} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_TEST_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST}")
|
||||
try_compile(${CURL_TEST}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||
"${CURL_TEST_ADD_LIBRARIES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
if(${CURL_TEST})
|
||||
set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Success")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Performing Curl Test ${CURL_TEST} passed with the following output:\n"
|
||||
"${OUTPUT}\n")
|
||||
else(${CURL_TEST})
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
|
||||
set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
||||
"${OUTPUT}\n")
|
||||
endif(${CURL_TEST})
|
||||
endif("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
|
||||
endmacro(CURL_INTERNAL_TEST)
|
||||
|
||||
macro(CURL_INTERNAL_TEST_RUN CURL_TEST)
|
||||
if("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
|
||||
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||
"-D${CURL_TEST} ${CMAKE_REQUIRED_FLAGS}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CURL_TEST_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST}")
|
||||
try_run(${CURL_TEST} ${CURL_TEST}_COMPILE
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||
"${CURL_TEST_ADD_LIBRARIES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
if(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
|
||||
set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Success")
|
||||
else(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
|
||||
message(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
|
||||
set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||
file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
|
||||
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
||||
"${OUTPUT}")
|
||||
if(${CURL_TEST}_COMPILE)
|
||||
file(APPEND
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
|
||||
"There was a problem running this test\n")
|
||||
endif(${CURL_TEST}_COMPILE)
|
||||
file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
|
||||
"\n\n")
|
||||
endif(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
|
||||
endif("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
|
||||
endmacro(CURL_INTERNAL_TEST_RUN)
|
||||
|
||||
# Do curl specific tests
|
||||
foreach(CURL_TEST
|
||||
HAVE_FCNTL_O_NONBLOCK
|
||||
HAVE_IOCTLSOCKET
|
||||
HAVE_IOCTLSOCKET_CAMEL
|
||||
HAVE_IOCTLSOCKET_CAMEL_FIONBIO
|
||||
HAVE_IOCTLSOCKET_FIONBIO
|
||||
HAVE_IOCTL_FIONBIO
|
||||
HAVE_IOCTL_SIOCGIFADDR
|
||||
HAVE_SETSOCKOPT_SO_NONBLOCK
|
||||
HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
|
||||
TIME_WITH_SYS_TIME
|
||||
HAVE_O_NONBLOCK
|
||||
HAVE_GETHOSTBYADDR_R_5
|
||||
HAVE_GETHOSTBYADDR_R_7
|
||||
HAVE_GETHOSTBYADDR_R_8
|
||||
HAVE_GETHOSTBYADDR_R_5_REENTRANT
|
||||
HAVE_GETHOSTBYADDR_R_7_REENTRANT
|
||||
HAVE_GETHOSTBYADDR_R_8_REENTRANT
|
||||
HAVE_GETHOSTBYNAME_R_3
|
||||
HAVE_GETHOSTBYNAME_R_5
|
||||
HAVE_GETHOSTBYNAME_R_6
|
||||
HAVE_GETHOSTBYNAME_R_3_REENTRANT
|
||||
HAVE_GETHOSTBYNAME_R_5_REENTRANT
|
||||
HAVE_GETHOSTBYNAME_R_6_REENTRANT
|
||||
HAVE_SOCKLEN_T
|
||||
HAVE_IN_ADDR_T
|
||||
HAVE_BOOL_T
|
||||
STDC_HEADERS
|
||||
RETSIGTYPE_TEST
|
||||
HAVE_INET_NTOA_R_DECL
|
||||
HAVE_INET_NTOA_R_DECL_REENTRANT
|
||||
HAVE_GETADDRINFO
|
||||
HAVE_FILE_OFFSET_BITS
|
||||
)
|
||||
curl_internal_test(${CURL_TEST})
|
||||
endforeach(CURL_TEST)
|
||||
if(HAVE_FILE_OFFSET_BITS)
|
||||
set(_FILE_OFFSET_BITS 64)
|
||||
endif(HAVE_FILE_OFFSET_BITS)
|
||||
foreach(CURL_TEST
|
||||
HAVE_GLIBC_STRERROR_R
|
||||
HAVE_POSIX_STRERROR_R
|
||||
)
|
||||
curl_internal_test_run(${CURL_TEST})
|
||||
endforeach(CURL_TEST)
|
||||
|
||||
# Check for reentrant
|
||||
foreach(CURL_TEST
|
||||
HAVE_GETHOSTBYADDR_R_5
|
||||
HAVE_GETHOSTBYADDR_R_7
|
||||
HAVE_GETHOSTBYADDR_R_8
|
||||
HAVE_GETHOSTBYNAME_R_3
|
||||
HAVE_GETHOSTBYNAME_R_5
|
||||
HAVE_GETHOSTBYNAME_R_6
|
||||
HAVE_INET_NTOA_R_DECL_REENTRANT)
|
||||
if(NOT ${CURL_TEST})
|
||||
if(${CURL_TEST}_REENTRANT)
|
||||
set(NEED_REENTRANT 1)
|
||||
endif(${CURL_TEST}_REENTRANT)
|
||||
endif(NOT ${CURL_TEST})
|
||||
endforeach(CURL_TEST)
|
||||
|
||||
if(NEED_REENTRANT)
|
||||
foreach(CURL_TEST
|
||||
HAVE_GETHOSTBYADDR_R_5
|
||||
HAVE_GETHOSTBYADDR_R_7
|
||||
HAVE_GETHOSTBYADDR_R_8
|
||||
HAVE_GETHOSTBYNAME_R_3
|
||||
HAVE_GETHOSTBYNAME_R_5
|
||||
HAVE_GETHOSTBYNAME_R_6)
|
||||
set(${CURL_TEST} 0)
|
||||
if(${CURL_TEST}_REENTRANT)
|
||||
set(${CURL_TEST} 1)
|
||||
endif(${CURL_TEST}_REENTRANT)
|
||||
endforeach(CURL_TEST)
|
||||
endif(NEED_REENTRANT)
|
||||
|
||||
if(HAVE_INET_NTOA_R_DECL_REENTRANT)
|
||||
set(HAVE_INET_NTOA_R_DECL 1)
|
||||
set(NEED_REENTRANT 1)
|
||||
endif(HAVE_INET_NTOA_R_DECL_REENTRANT)
|
||||
|
||||
# Some other minor tests
|
||||
|
||||
if(NOT HAVE_IN_ADDR_T)
|
||||
set(in_addr_t "unsigned long")
|
||||
endif(NOT HAVE_IN_ADDR_T)
|
||||
|
||||
# Fix libz / zlib.h
|
||||
|
||||
if(NOT CURL_SPECIAL_LIBZ)
|
||||
if(NOT HAVE_LIBZ)
|
||||
set(HAVE_ZLIB_H 0)
|
||||
endif(NOT HAVE_LIBZ)
|
||||
|
||||
if(NOT HAVE_ZLIB_H)
|
||||
set(HAVE_LIBZ 0)
|
||||
endif(NOT HAVE_ZLIB_H)
|
||||
endif(NOT CURL_SPECIAL_LIBZ)
|
||||
|
||||
if(_FILE_OFFSET_BITS)
|
||||
set(_FILE_OFFSET_BITS 64)
|
||||
endif(_FILE_OFFSET_BITS)
|
||||
set(CMAKE_REQUIRED_FLAGS "-D_FILE_OFFSET_BITS=64")
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/curl/curl.h")
|
||||
check_type_size("curl_off_t" SIZEOF_CURL_OFF_T)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES)
|
||||
set(CMAKE_REQUIRED_FLAGS)
|
||||
|
||||
|
||||
# Check for nonblocking
|
||||
set(HAVE_DISABLED_NONBLOCKING 1)
|
||||
if(HAVE_FIONBIO OR
|
||||
HAVE_IOCTLSOCKET OR
|
||||
HAVE_IOCTLSOCKET_CASE OR
|
||||
HAVE_O_NONBLOCK)
|
||||
set(HAVE_DISABLED_NONBLOCKING)
|
||||
endif(HAVE_FIONBIO OR
|
||||
HAVE_IOCTLSOCKET OR
|
||||
HAVE_IOCTLSOCKET_CASE OR
|
||||
HAVE_O_NONBLOCK)
|
||||
|
||||
if(RETSIGTYPE_TEST)
|
||||
set(RETSIGTYPE void)
|
||||
else(RETSIGTYPE_TEST)
|
||||
set(RETSIGTYPE int)
|
||||
endif(RETSIGTYPE_TEST)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC AND APPLE)
|
||||
include(CheckCCompilerFlag)
|
||||
check_c_compiler_flag(-Wno-long-double HAVE_C_FLAG_Wno_long_double)
|
||||
if(HAVE_C_FLAG_Wno_long_double)
|
||||
# The Mac version of GCC warns about use of long double. Disable it.
|
||||
get_source_file_property(MPRINTF_COMPILE_FLAGS mprintf.c COMPILE_FLAGS)
|
||||
if(MPRINTF_COMPILE_FLAGS)
|
||||
set(MPRINTF_COMPILE_FLAGS "${MPRINTF_COMPILE_FLAGS} -Wno-long-double")
|
||||
else(MPRINTF_COMPILE_FLAGS)
|
||||
set(MPRINTF_COMPILE_FLAGS "-Wno-long-double")
|
||||
endif(MPRINTF_COMPILE_FLAGS)
|
||||
set_source_files_properties(mprintf.c PROPERTIES
|
||||
COMPILE_FLAGS ${MPRINTF_COMPILE_FLAGS})
|
||||
endif(HAVE_C_FLAG_Wno_long_double)
|
||||
endif(CMAKE_COMPILER_IS_GNUCC AND APPLE)
|
||||
|
||||
if(HAVE_SOCKLEN_T)
|
||||
set(CURL_TYPEOF_CURL_SOCKLEN_T "socklen_t")
|
||||
check_type_size("socklen_t" CURL_SIZEOF_CURL_SOCKLEN_T)
|
||||
else()
|
||||
set(CURL_TYPEOF_CURL_SOCKLEN_T int)
|
||||
set(CURL_SIZEOF_CURL_SOCKLEN_T ${SIZEOF_INT})
|
||||
endif()
|
||||
|
||||
include(CMake/OtherTests.cmake)
|
||||
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
# For windows, do not allow the compiler to use default target (Vista).
|
||||
if(WIN32)
|
||||
add_definitions(-D_WIN32_WINNT=0x0501)
|
||||
endif(WIN32)
|
||||
|
||||
if(MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
endif(MSVC)
|
||||
|
||||
# Sets up the dependencies (zlib, OpenSSL, etc.) of a cURL subproject according to options.
|
||||
# TODO This is far to be complete!
|
||||
function(SETUP_CURL_DEPENDENCIES TARGET_NAME)
|
||||
if(CURL_ZLIB AND ZLIB_FOUND)
|
||||
include_directories(${ZLIB_INCLUDE_DIR})
|
||||
endif()
|
||||
if(CURL_ZLIB AND ZLIB_FOUND)
|
||||
target_link_libraries(${TARGET_NAME} ${ZLIB_LIBRARIES})
|
||||
#ADD_DEFINITIONS( -DHAVE_ZLIB_H -DHAVE_ZLIB -DHAVE_LIBZ )
|
||||
endif()
|
||||
|
||||
if(CMAKE_USE_OPENSSL AND OPENSSL_FOUND)
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
endif()
|
||||
if(CMAKE_USE_OPENSSL AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
|
||||
target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES})
|
||||
#ADD_DEFINITIONS( -DUSE_SSLEAY )
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Ugly (but functional) way to include "Makefile.inc" by transforming it (= regenerate it).
|
||||
function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE)
|
||||
file(READ ${INPUT_FILE} MAKEFILE_INC_TEXT)
|
||||
string(REPLACE "$(top_srcdir)" "\${CURL_SOURCE_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
string(REPLACE "$(top_builddir)" "\${CURL_BINARY_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
|
||||
string(REGEX REPLACE "\\\\\n" "<22>!<21>" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
string(REGEX REPLACE "([a-zA-Z_][a-zA-Z0-9_]*)[\t ]*=[\t ]*([^\n]*\n)" "SET(\\1 \\2)\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
string(REPLACE "<22>!<21>" "\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
|
||||
string(REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace $() with ${}
|
||||
string(REGEX REPLACE "@([a-zA-Z_][a-zA-Z0-9_]*)@" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace @@ with ${}, even if that may not be read by CMake scripts.
|
||||
file(WRITE ${OUTPUT_FILE} ${MAKEFILE_INC_TEXT})
|
||||
|
||||
### BUGGY METHOD 1
|
||||
# FILE(STRINGS Makefile.inc MAKEFILE_INC_TEXT)
|
||||
# STRING(REPLACE "# ./lib/Makefile.inc" "" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
# STRING(REPLACE " " " " MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace tabs with spaces
|
||||
|
||||
# #STRING(REGEX MATCH "CSOURCES *=" AAA ${MAKEFILE_INC_TEXT})
|
||||
# #MESSAGE(STATUS ${AAA})
|
||||
|
||||
# STRING(REPLACE "CSOURCES =" "" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
# STRING(REPLACE "HHEADERS =" "" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
|
||||
# STRING(REGEX REPLACE "[^ ]+\\.c" "" ${HEADERS_VAR} ${MAKEFILE_INC_TEXT}) # Remove source files and store into headers var
|
||||
# STRING(REGEX REPLACE " +" " " ${HEADERS_VAR} ${${HEADERS_VAR}})
|
||||
# STRING(REGEX REPLACE " " ";" ${HEADERS_VAR} ${${HEADERS_VAR}})
|
||||
|
||||
# STRING(REGEX REPLACE "[^ ]+\\.h" "" ${SOURCES_VAR} ${MAKEFILE_INC_TEXT}) # Remove headers and store into source files var
|
||||
# STRING(REGEX REPLACE " +" " " ${SOURCES_VAR} ${${SOURCES_VAR}})
|
||||
# STRING(REGEX REPLACE " " ";" ${SOURCES_VAR} ${${SOURCES_VAR}})
|
||||
|
||||
# SET(${HEADERS_VAR} ${${HEADERS_VAR}} PARENT_SCOPE)
|
||||
# SET(${SOURCES_VAR} ${${SOURCES_VAR}} PARENT_SCOPE)
|
||||
|
||||
### BUGGY METHOD 2
|
||||
# FILE(READ Makefile.inc MAKEFILE_INC_TEXT)
|
||||
# #STRING(REPLACE "\t" " " MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace tabs with spaces
|
||||
# #STRING(REGEX REPLACE "\n+" "\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Remove empty lines (allow a simplification in the script)
|
||||
# STRING(REGEX REPLACE "([A-Z]+)[\t ]*=[\t ]*" "SET(\\1 " MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
# #STRING(REGEX REPLACE "^(.*)[\t ]*[^\\]$" ")" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
# STRING(REGEX REPLACE "([^\\])\n" "\\1)\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
# # STRING(REGEX REPLACE "CSOURCES *=" "SET(libCurl_SRCS " MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
# # STRING(REGEX REPLACE "HHEADERS *=" "SET(libCurl_HEADERS " MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
# FILE(WRITE Makefile.inc.cmake ${MAKEFILE_INC_TEXT})
|
||||
endfunction()
|
||||
|
||||
add_subdirectory(lib)
|
||||
if(BUILD_CURL_EXE)
|
||||
add_subdirectory(src)
|
||||
endif()
|
||||
if(BUILD_CURL_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
# This needs to be run very last so other parts of the scripts can take advantage of this.
|
||||
if(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
|
||||
set(CURL_CONFIG_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before")
|
||||
endif()
|
13
CTestConfig.cmake
Normal file
13
CTestConfig.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
## This file should be placed in the root directory of your project.
|
||||
## Then modify the CMakeLists.txt file in the root directory of your
|
||||
## project to incorporate the testing dashboard.
|
||||
## # The following are required to uses Dart and the Cdash dashboard
|
||||
## ENABLE_TESTING()
|
||||
## INCLUDE(Dart)
|
||||
set(CTEST_PROJECT_NAME "CURL")
|
||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
set(CTEST_DROP_SITE "my.cdash.org")
|
||||
set(CTEST_DROP_LOCATION "/submit.php?project=CURL")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
78
MacOSX-Framework
Executable file
78
MacOSX-Framework
Executable file
@@ -0,0 +1,78 @@
|
||||
#!/bin/bash
|
||||
# This script performs all of the steps needed to build a
|
||||
# universal binary libcurl.framework for Mac OS X 10.4 or greater.
|
||||
|
||||
VERSION=`/usr/bin/sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' include/curl/curlver.h`
|
||||
|
||||
SDK32='/Developer/SDKs/MacOSX10.4u.sdk'
|
||||
|
||||
MINVER32='-mmacosx-version-min=10.4'
|
||||
|
||||
ARCHES32='-arch ppc -arch i386'
|
||||
|
||||
SDK64='/Developer/SDKs/MacOSX10.5.sdk'
|
||||
|
||||
MINVER64='-mmacosx-version-min=10.5'
|
||||
|
||||
ARCHES64='-arch ppc64 -arch x86_64'
|
||||
|
||||
if test -d $SDK32; then
|
||||
echo "----Configuring libcurl for 32 bit universal framework..."
|
||||
./configure --disable-dependency-tracking --disable-static --with-gssapi \
|
||||
CFLAGS="-Os -isysroot $SDK32 $ARCHES32 $MINVER32" \
|
||||
LDFLAGS="-Wl,-syslibroot,$SDK32 $ARCHES32 $MINVER32 -Wl,-headerpad_max_install_names" \
|
||||
CC=$CC
|
||||
|
||||
echo "----Building 32 bit libcurl..."
|
||||
make
|
||||
|
||||
echo "----Creating 32 bit framework..."
|
||||
rm -r libcurl.framework
|
||||
mkdir -p libcurl.framework/Versions/A/Resources
|
||||
cp lib/.libs/libcurl.dylib libcurl.framework/Versions/A/libcurl
|
||||
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/Versions/A/libcurl libcurl.framework/Versions/A/libcurl
|
||||
/usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/Versions/A/Resources/Info.plist
|
||||
mkdir -p libcurl.framework/Versions/A/Headers/curl
|
||||
cp include/curl/*.h libcurl.framework/Versions/A/Headers/curl
|
||||
pushd libcurl.framework
|
||||
ln -fs Versions/A/libcurl libcurl
|
||||
ln -fs Versions/A/Resources Resources
|
||||
ln -fs Versions/A/Headers Headers
|
||||
cd Versions
|
||||
ln -fs A Current
|
||||
|
||||
if test -d $SDK64; then
|
||||
popd
|
||||
make clean
|
||||
echo "----Configuring libcurl for 64 bit universal framework..."
|
||||
./configure --disable-dependency-tracking --disable-static --with-gssapi \
|
||||
CFLAGS="-Os -isysroot $SDK64 $ARCHES64 $MINVER64" \
|
||||
LDFLAGS="-Wl,-syslibroot,$SDK64 $ARCHES64 $MINVER64 -Wl,-headerpad_max_install_names" \
|
||||
CC=$CC
|
||||
|
||||
echo "----Building 64 bit libcurl..."
|
||||
make
|
||||
|
||||
echo "----Appending 64 bit framework to 32 bit framework..."
|
||||
cp lib/.libs/libcurl.dylib libcurl.framework/Versions/A/libcurl64
|
||||
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/Versions/A/libcurl libcurl.framework/Versions/A/libcurl64
|
||||
cp libcurl.framework/Versions/A/libcurl libcurl.framework/Versions/A/libcurl32
|
||||
lipo libcurl.framework/Versions/A/libcurl32 libcurl.framework/Versions/A/libcurl64 -create -output libcurl.framework/Versions/A/libcurl
|
||||
rm libcurl.framework/Versions/A/libcurl32 libcurl.framework/Versions/A/libcurl64
|
||||
cp libcurl.framework/Versions/A/Headers/curl/curlbuild.h libcurl.framework/Versions/A/Headers/curl/curlbuild32.h
|
||||
cp include/curl/curlbuild.h libcurl.framework/Versions/A/Headers/curl/curlbuild64.h
|
||||
cat >libcurl.framework/Versions/A/Headers/curl/curlbuild.h <<EOF
|
||||
#ifdef __LP64__
|
||||
#include "curl/curlbuild64.h"
|
||||
#else
|
||||
#include "curl/curlbuild32.h"
|
||||
#endif
|
||||
EOF
|
||||
fi
|
||||
|
||||
lipo -info libcurl.framework/Versions/A/libcurl
|
||||
echo "libcurl.framework is built and can now be included in other projects."
|
||||
echo "Copy libcurl.framework to your bundle's Contents/Frameworks folder, ~/Library/Frameworks or /Library/Frameworks."
|
||||
else
|
||||
echo "Building libcurl.framework requires Mac OS X 10.4 or later with the MacOSX10.4u SDK installed."
|
||||
fi
|
12
Makefile.am
12
Makefile.am
@@ -25,9 +25,15 @@ AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
|
||||
curl-style.el sample.emacs RELEASE-NOTES buildconf buildconf.bat \
|
||||
libcurl.pc.in vc6curl.dsw
|
||||
CMAKE_DIST = CMakeLists.txt CMake/CheckTypeSize.c.in CMake/CheckTypeSize.cmake \
|
||||
CMake/CMakeConfigurableFile.in CMake/CurlCheckCSourceCompiles.cmake \
|
||||
CMake/CurlCheckCSourceRuns.cmake CMake/CurlTests.c CMake/FindOpenSSL.cmake \
|
||||
CMake/FindZLIB.cmake CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \
|
||||
CMake/Utilities.cmake include/curl/curlbuild.h.cmake
|
||||
|
||||
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
|
||||
curl-style.el sample.emacs RELEASE-NOTES buildconf \
|
||||
libcurl.pc.in vc6curl.dsw MacOSX-Framework Android.mk $(CMAKE_DIST)
|
||||
|
||||
bin_SCRIPTS = curl-config
|
||||
|
||||
|
@@ -1,54 +1,50 @@
|
||||
Curl and libcurl 7.19.3
|
||||
Curl and libcurl 7.19.6
|
||||
|
||||
Public curl releases: 109
|
||||
Command line options: 128
|
||||
curl_easy_setopt() options: 158
|
||||
Public curl releases: 112
|
||||
Command line options: 132
|
||||
curl_easy_setopt() options: 163
|
||||
Public functions in libcurl: 58
|
||||
Known libcurl bindings: 37
|
||||
Contributors: 683
|
||||
Known libcurl bindings: 38
|
||||
Contributors: 715
|
||||
|
||||
This release includes the following changes:
|
||||
|
||||
o CURLAUTH_DIGEST_IE bit added for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH
|
||||
o VC9 Makefiles were added to the release package
|
||||
o CURLOPT_FTPPORT (and curl's -P/--ftpport) support port ranges
|
||||
o Added CURLOPT_SSH_KNOWNHOSTS, CURLOPT_SSH_KEYFUNCTION, CURLOPT_SSH_KEYDATA
|
||||
o CURLOPT_QUOTE, CURLOPT_POSTQUOTE and CURLOPT_PREQUOTE can be told to ignore
|
||||
error responses when used with FTP
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
o build failure when disabling FTP but enabling GSS
|
||||
o fixed several calls to memory functions that didn't check return codes
|
||||
o memory leak for SSL connects with libcurl/NSS when CURLOPT_ISSUERCERT was
|
||||
used
|
||||
o re-use of connections with the multi interface when multiple handles used
|
||||
the same server
|
||||
o memory leak with HTTP GSS/kerberos authentication
|
||||
o removed the default use of "Pragma: no-cache"
|
||||
o fix SCP/SFTP busyloop by using a new libssh2 1.0 function
|
||||
o bad fclose() after a fatal error in cookie code
|
||||
o curl_multi_remove_handle() when the handle was in use in a HTTP pipeline
|
||||
o GSS authentication infinite loop problem
|
||||
o 550 response from SIZE no longer treated as missing file
|
||||
o ftps:// control connections now use explicit protection level
|
||||
o dotted IPv6 addresses longer than 39 bytes failed
|
||||
o curl_easy_duphandle() doesn't try to duplicate the connection cache pointer
|
||||
o build failure on OS/400 when enabling IPv6
|
||||
o better detection of SFTP failures
|
||||
o improved connection re-use for subsequent SCP and SFTP transfers
|
||||
o multi interface does less busy-loops for SCP and SFTP transfers with libssh2
|
||||
1.0 or later
|
||||
o curl_multi_timeout() no longer returns timeout 0 when there's still more
|
||||
than 0 but less than 999 microseconds left
|
||||
o the multi_socket API and HTTP pipelining now work a lot better when combined
|
||||
o SFTP seek/resume beyond 32bit file sizes
|
||||
o fixed breakage with --with-ssl --disable-verbose
|
||||
o TTL "leak" in the DNS cache
|
||||
o improved NSS initing
|
||||
o curl_easy_reset now resets more options
|
||||
o rare Location: follow bug with the multi interface
|
||||
o the configure script can now detect gnutls with pkg-config
|
||||
o curlbuild.h was adjusted for SunPro compilers
|
||||
o CURLOPT_COOKIELIST set to "SESS" on an easy handle with no cookies data
|
||||
o fixed timeouts for TFTP
|
||||
o fixed PPC builds
|
||||
o crash on bad socket close with FTP
|
||||
o leaking cookie memory when duplicate domains or paths were used
|
||||
o build fix for Symbian
|
||||
o CURLOPT_USERPWD set to NULL clears auth credentials
|
||||
o libcurl-NSS build fixes
|
||||
o configure script fixed for VMS
|
||||
o set Content-Length: with POST and PUT failed with NTLM auth
|
||||
o allow building libcurl for VxWorks
|
||||
o curl tool exit codes fixed for VMS
|
||||
o --no-buffer treated correctly
|
||||
o djgpp build fix
|
||||
o configure detection of GnuTLS now based on pkg-config as well
|
||||
o libcurl-NSS client cert handling segfaults
|
||||
o curl uploading from stdin/pipes now works in non-blocking way so that it
|
||||
continues the downloading even when the read stalls
|
||||
o ftp credentials are added to the url if needed for http proxies
|
||||
o curl -o - sends data to stdout using binary mode on windows
|
||||
o fixed the separators for "array" style string that CURLINFO_CERTINFO returns
|
||||
o auth problem over several hosts with re-used connection
|
||||
o improved the support for client certificates in libcurl+NSS
|
||||
o fix leak in gtls code
|
||||
o missing algorithms in libcurl+OpenSSL
|
||||
o with noproxy set you could still get a proxy if a proxy env was set
|
||||
o rand seeding on libcurl on windows built with OpenSSL was not thread-safe
|
||||
o fixed the zero byte inserted in cert name flaw in libcurl+OpenSSL
|
||||
o don't try SNI with SSLv2 or SSLv3 (OpenSSL and GnuTLS builds)
|
||||
o libcurl+OpenSSL would wrongly acknowledge a cert if CN matched but
|
||||
subjectAltName didn't
|
||||
o TFTP upload sent illegal TSIZE packets
|
||||
|
||||
This release includes the following known bugs:
|
||||
|
||||
@@ -57,11 +53,12 @@ This release includes the following known bugs:
|
||||
This release would not have looked like this without help, code, reports and
|
||||
advice from friends like these:
|
||||
|
||||
Yang Tse, Daniel Fandrich, Jim Meyering, Christian Krause, Andreas Wurf,
|
||||
Markus Koetter, Josef Wolf, Vlad Grachov, Pawel Kierski, Igor Novoseltsev,
|
||||
Fred Machado, Ken Hirsch, Keshav Krity, Patrick Monnerat, Mark Karpeles,
|
||||
Anthony Bryan, Peter Korsgaard, Phil Lisiecki, Bas Mevissen, Rob Crittenden,
|
||||
Emil Romanus, Karl Moerder, Daniel Black, Stefan Teleman, Michael Wallner,
|
||||
Grant Erickson, Tim Ansell, Andrew de los Reyes
|
||||
Yang Tse, Daniel Fandrich, Kamil Dudka, Caolan McNamara, Frank McGeough,
|
||||
Andre Guibert de Bruet, Mike Crowe, Claes Jakobsson, John E. Malmberg,
|
||||
Aaron Oneal, Igor Novoseltsev, Eric Wong, Bill Hoffman, Daniel Steinberg,
|
||||
Fabian Keil, Michal Marek, Reuven Wachtfogel, Markus Koetter,
|
||||
Constantine Sapuntzakis, David Binderman, Johan van Selst, Alexander Beedie,
|
||||
Tanguy Fautre, Scott Cantor, Curt Bogmine, Peter Sylvester, Benbuck Nason,
|
||||
Carsten Lange
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
||||
|
30
TODO-RELEASE
30
TODO-RELEASE
@@ -1,19 +1,31 @@
|
||||
To be addressed in 7.19.3 (planned release: January 2009)
|
||||
To be addressed in 7.19.7 (planned release: October 2009)
|
||||
=========================
|
||||
|
||||
248 - "Pausing pipeline problems."
|
||||
http://curl.haxx.se/mail/lib-2009-07/0214.html
|
||||
|
||||
To be addressed in 7.19.4 (planned release: March 2009)
|
||||
=========================
|
||||
251 - TFTP block size / better integration in transfer
|
||||
http://curl.haxx.se/mail/lib-2009-08/0028.html
|
||||
|
||||
205 - A. Craig West's CURLOPT_NOPROXY option
|
||||
254 - Problem re-using easy handle after call to curl_multi_remove_handle
|
||||
http://curl.haxx.se/mail/lib-2009-07/0249.html
|
||||
|
||||
206 - A. Craig West's CURLOPT_HTTP_VERSION change for CONNECT
|
||||
255 - debugging a crash in Curl_pgrsTime/checkPendPipeline?
|
||||
http://curl.haxx.se/mail/lib-2009-08/0066.html
|
||||
|
||||
208 - Patch to allow GSSAPI authentication to a socks5 server
|
||||
256 - "More questions about ares behavior"
|
||||
http://curl.haxx.se/mail/lib-2009-08/0012.html
|
||||
|
||||
214 - progress bar prefix, second try (for the curl tool)
|
||||
244 - patch for [out] parameters
|
||||
http://curl.haxx.se/mail/lib-2009-06/0342.html
|
||||
|
||||
215 - Patch for Metalink Support (for the curl tool)
|
||||
245 - HTTP version getinfo
|
||||
http://curl.haxx.se/mail/lib-2009-06/0312.html
|
||||
|
||||
216 -
|
||||
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 -
|
||||
|
||||
|
512
acinclude.m4
512
acinclude.m4
@@ -22,53 +22,6 @@
|
||||
#***************************************************************************
|
||||
|
||||
|
||||
dnl CURL_CHECK_COMPILER_HALT_ON_ERROR
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if the compiler actually halts after the
|
||||
dnl compilation phase without generating any object
|
||||
dnl code file, when the source compiles with errors.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_COMPILER_HALT_ON_ERROR], [
|
||||
AC_MSG_CHECKING([if compiler halts on compilation errors])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
force compilation error
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([compiler does not halt on compilation errors.])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if the compiler actually halts after the
|
||||
dnl compilation phase without generating any object
|
||||
dnl code file, when the source code tries to define a
|
||||
dnl type for a constant array with negative dimension.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE], [
|
||||
AC_REQUIRE([CURL_CHECK_COMPILER_HALT_ON_ERROR])dnl
|
||||
AC_MSG_CHECKING([if compiler halts on negative sized arrays])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ];
|
||||
]],[[
|
||||
bad_t dummy;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([compiler does not halt on negative sized arrays.])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_DEF (SYMBOL, [INCLUDES], [SILENT])
|
||||
dnl -------------------------------------------------
|
||||
dnl Use the C preprocessor to find out if the given object-style symbol
|
||||
@@ -118,6 +71,72 @@ CURL_DEF_TOKEN $1
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_DEF_CC (SYMBOL, [INCLUDES], [SILENT])
|
||||
dnl -------------------------------------------------
|
||||
dnl Use the C compiler to find out only if the given symbol is defined
|
||||
dnl or not, this can not find out its expansion. This macro will not use
|
||||
dnl default includes even if no INCLUDES argument is given. This macro
|
||||
dnl will run silently when invoked with three arguments.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_DEF_CC], [
|
||||
AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])dnl
|
||||
ifelse($3,,[AC_MSG_CHECKING([for compiler definition of $1])])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_SOURCE(
|
||||
ifelse($2,,,[$2])[[
|
||||
int main (void)
|
||||
{
|
||||
#ifdef $1
|
||||
return 0;
|
||||
#else
|
||||
force compilation error
|
||||
#endif
|
||||
}
|
||||
]])
|
||||
],[
|
||||
tst_symbol_defined="yes"
|
||||
],[
|
||||
tst_symbol_defined="no"
|
||||
])
|
||||
if test "$tst_symbol_defined" = "yes"; then
|
||||
AS_VAR_SET(ac_HaveDef, yes)
|
||||
ifelse($3,,[AC_MSG_RESULT([yes])])
|
||||
else
|
||||
AS_VAR_SET(ac_HaveDef, no)
|
||||
ifelse($3,,[AC_MSG_RESULT([no])])
|
||||
fi
|
||||
AS_VAR_POPDEF([ac_HaveDef])dnl
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_LIB_XNET
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify if X/Open network library is required.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_LIB_XNET], [
|
||||
AC_MSG_CHECKING([if X/Open network library is required])
|
||||
tst_lib_xnet_required="no"
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_SOURCE([[
|
||||
int main (void)
|
||||
{
|
||||
#if defined(__hpux) && defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600)
|
||||
return 0;
|
||||
#elif defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
|
||||
return 0;
|
||||
#else
|
||||
force compilation error
|
||||
#endif
|
||||
}
|
||||
]])
|
||||
],[
|
||||
tst_lib_xnet_required="yes"
|
||||
LIBS="$LIBS -lxnet"
|
||||
])
|
||||
AC_MSG_RESULT([$tst_lib_xnet_required])
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_AIX_ALL_SOURCE
|
||||
dnl -------------------------------------------------
|
||||
dnl Provides a replacement of traditional AC_AIX with
|
||||
@@ -893,91 +912,55 @@ AC_DEFUN([CURL_CHECK_HEADER_MALLOC], [
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_TYPE_SOCKLEN_T
|
||||
dnl CURL_CHECK_HEADER_MEMORY
|
||||
dnl -------------------------------------------------
|
||||
dnl Check for existing socklen_t type, and provide
|
||||
dnl an equivalent type if socklen_t not available
|
||||
dnl Check for compilable and valid memory.h header,
|
||||
dnl and check if it is needed even with stdlib.h for
|
||||
dnl memory related functions.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_TYPE_SOCKLEN_T], [
|
||||
AC_REQUIRE([CURL_CHECK_HEADER_WS2TCPIP])dnl
|
||||
AC_CHECK_TYPE([socklen_t], ,[
|
||||
dnl socklen_t not available
|
||||
AC_CACHE_CHECK([for socklen_t equivalent],
|
||||
[curl_cv_socklen_t_equiv], [
|
||||
curl_cv_socklen_t_equiv="unknown"
|
||||
for arg1 in 'int' 'SOCKET'; do
|
||||
for arg2 in "struct sockaddr" void; do
|
||||
for t in int size_t unsigned long "unsigned long"; do
|
||||
if test "$curl_cv_socklen_t_equiv" = "unknown"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#ifdef HAVE_WINSOCK_H
|
||||
#include <winsock.h>
|
||||
#endif
|
||||
#endif
|
||||
#define GETPEERNCALLCONV PASCAL
|
||||
#else
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#define GETPEERNCALLCONV
|
||||
#endif
|
||||
extern int GETPEERNCALLCONV getpeername($arg1, $arg2 *, $t *);
|
||||
]],[[
|
||||
$t len=0;
|
||||
getpeername(0,0,&len);
|
||||
]])
|
||||
],[
|
||||
curl_cv_socklen_t_equiv="$t"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
AC_DEFUN([CURL_CHECK_HEADER_MEMORY], [
|
||||
AC_CACHE_CHECK([for memory.h], [ac_cv_header_memory_h], [
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#include <memory.h>
|
||||
]],[[
|
||||
void *p = malloc(10);
|
||||
void *q = calloc(10,10);
|
||||
free(p);
|
||||
free(q);
|
||||
]])
|
||||
],[
|
||||
ac_cv_header_memory_h="yes"
|
||||
],[
|
||||
ac_cv_header_memory_h="no"
|
||||
])
|
||||
case "$curl_cv_socklen_t_equiv" in
|
||||
unknown)
|
||||
AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv,
|
||||
[Type to use in place of socklen_t when system does not provide it.])
|
||||
])
|
||||
if test "$ac_cv_header_memory_h" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_MEMORY_H, 1,
|
||||
[Define to 1 if you have the memory.h header file.])
|
||||
#
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#include <stdlib.h>
|
||||
]],[[
|
||||
void *p = malloc(10);
|
||||
void *q = calloc(10,10);
|
||||
free(p);
|
||||
free(q);
|
||||
]])
|
||||
],[
|
||||
curl_cv_need_header_memory_h="no"
|
||||
],[
|
||||
curl_cv_need_header_memory_h="yes"
|
||||
])
|
||||
#
|
||||
case "$curl_cv_need_header_memory_h" in
|
||||
yes)
|
||||
AC_DEFINE_UNQUOTED(NEED_MEMORY_H, 1,
|
||||
[Define to 1 if you need the memory.h header file even with stdlib.h])
|
||||
;;
|
||||
esac
|
||||
],[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#include <winsock2.h>
|
||||
#ifdef HAVE_WS2TCPIP_H
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#endif
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
@@ -994,7 +977,6 @@ dnl argument in GETNAMEINFO_QUAL_ARG1.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
|
||||
AC_REQUIRE([CURL_CHECK_HEADER_WS2TCPIP])dnl
|
||||
AC_REQUIRE([CURL_CHECK_TYPE_SOCKLEN_T])dnl
|
||||
AC_CHECK_HEADERS(sys/types.h sys/socket.h netdb.h)
|
||||
#
|
||||
AC_MSG_CHECKING([for getnameinfo])
|
||||
@@ -1870,7 +1852,7 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
|
||||
AC_REQUIRE([AC_HEADER_TIME])dnl
|
||||
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])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_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
@@ -1900,6 +1882,9 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
]],[[
|
||||
struct timeval ts;
|
||||
@@ -2217,6 +2202,214 @@ 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 -------------------------------------------------
|
||||
dnl Like AC_DEFINE_UNQUOTED this macro will define a C preprocessor
|
||||
dnl symbol that can be further used in custom template configuration
|
||||
dnl files. This macro, unlike AC_DEFINE_UNQUOTED, does not use a third
|
||||
dnl argument for the description. Symbol definitions done with this
|
||||
dnl macro are intended to be exclusively used in handcrafted *.h.in
|
||||
dnl template files. Contrary to what AC_DEFINE_UNQUOTED does, this one
|
||||
dnl prevents autoheader generation and insertion of symbol template
|
||||
dnl stub and definition into the first configuration header file. Do
|
||||
dnl not use this macro as a replacement for AC_DEFINE_UNQUOTED, each
|
||||
dnl one serves different functional needs.
|
||||
|
||||
AC_DEFUN([CURL_DEFINE_UNQUOTED], [
|
||||
cat >>confdefs.h <<_EOF
|
||||
[@%:@define] $1 ifelse($#, 2, [$2], 1)
|
||||
_EOF
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CONFIGURE_LONG
|
||||
dnl -------------------------------------------------
|
||||
dnl Find out the size of long as reported by sizeof() and define
|
||||
dnl CURL_SIZEOF_LONG as appropriate to be used in template file
|
||||
dnl include/curl/curlbuild.h.in to properly configure the library.
|
||||
dnl The size of long is a build time characteristic and as such
|
||||
dnl must be recorded in curlbuild.h
|
||||
|
||||
AC_DEFUN([CURL_CONFIGURE_LONG], [
|
||||
if test -z "$ac_cv_sizeof_long" ||
|
||||
test "$ac_cv_sizeof_long" -eq "0"; then
|
||||
AC_MSG_ERROR([cannot find out size of long.])
|
||||
fi
|
||||
CURL_DEFINE_UNQUOTED([CURL_SIZEOF_LONG], [$ac_cv_sizeof_long])
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CONFIGURE_CURL_SOCKLEN_T
|
||||
dnl -------------------------------------------------
|
||||
dnl Find out suitable curl_socklen_t data type definition and size, making
|
||||
dnl appropriate definitions for template file include/curl/curlbuild.h.in
|
||||
dnl to properly configure and use the library.
|
||||
dnl
|
||||
dnl The need for the curl_socklen_t definition arises mainly to properly
|
||||
dnl interface HP-UX systems which on one hand have a typedef'ed socklen_t
|
||||
dnl data type which is 32 or 64-Bit wide depending on the data model being
|
||||
dnl used, and that on the other hand is only actually used when interfacing
|
||||
dnl the X/Open sockets provided in the xnet library.
|
||||
|
||||
AC_DEFUN([CURL_CONFIGURE_CURL_SOCKLEN_T], [
|
||||
AC_REQUIRE([CURL_INCLUDES_WS2TCPIP])dnl
|
||||
AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])dnl
|
||||
AC_REQUIRE([CURL_PREPROCESS_CALLCONV])dnl
|
||||
#
|
||||
AC_MSG_CHECKING([for curl_socklen_t data type])
|
||||
curl_typeof_curl_socklen_t="unknown"
|
||||
for arg1 in int SOCKET; do
|
||||
for arg2 in 'struct sockaddr' void; do
|
||||
for t in socklen_t int size_t 'unsigned int' long 'unsigned long' void; do
|
||||
if test "$curl_typeof_curl_socklen_t" = "unknown"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$curl_includes_ws2tcpip
|
||||
$curl_includes_sys_socket
|
||||
$curl_preprocess_callconv
|
||||
extern int FUNCALLCONV getpeername($arg1, $arg2 *, $t *);
|
||||
]],[[
|
||||
$t *lenptr = 0;
|
||||
if(0 != getpeername(0, 0, lenptr))
|
||||
return 1;
|
||||
]])
|
||||
],[
|
||||
curl_typeof_curl_socklen_t="$t"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
for t in socklen_t int; do
|
||||
if test "$curl_typeof_curl_socklen_t" = "void"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$curl_includes_sys_socket
|
||||
typedef $t curl_socklen_t;
|
||||
]],[[
|
||||
curl_socklen_t dummy;
|
||||
]])
|
||||
],[
|
||||
curl_typeof_curl_socklen_t="$t"
|
||||
])
|
||||
fi
|
||||
done
|
||||
AC_MSG_RESULT([$curl_typeof_curl_socklen_t])
|
||||
if test "$curl_typeof_curl_socklen_t" = "void" ||
|
||||
test "$curl_typeof_curl_socklen_t" = "unknown"; then
|
||||
AC_MSG_ERROR([cannot find data type for curl_socklen_t.])
|
||||
fi
|
||||
#
|
||||
AC_MSG_CHECKING([size of curl_socklen_t])
|
||||
curl_sizeof_curl_socklen_t="unknown"
|
||||
curl_pull_headers_socklen_t="unknown"
|
||||
if test "$ac_cv_header_ws2tcpip_h" = "yes"; then
|
||||
tst_pull_header_checks='none ws2tcpip'
|
||||
tst_size_checks='4'
|
||||
else
|
||||
tst_pull_header_checks='none systypes syssocket'
|
||||
tst_size_checks='4 8 2'
|
||||
fi
|
||||
for tst_size in $tst_size_checks; do
|
||||
for tst_pull_headers in $tst_pull_header_checks; do
|
||||
if test "$curl_sizeof_curl_socklen_t" = "unknown"; then
|
||||
case $tst_pull_headers in
|
||||
ws2tcpip)
|
||||
tmp_includes="$curl_includes_ws2tcpip"
|
||||
;;
|
||||
systypes)
|
||||
tmp_includes="$curl_includes_sys_types"
|
||||
;;
|
||||
syssocket)
|
||||
tmp_includes="$curl_includes_sys_socket"
|
||||
;;
|
||||
*)
|
||||
tmp_includes=""
|
||||
;;
|
||||
esac
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$tmp_includes
|
||||
typedef $curl_typeof_curl_socklen_t curl_socklen_t;
|
||||
typedef char dummy_arr[sizeof(curl_socklen_t) == $tst_size ? 1 : -1];
|
||||
]],[[
|
||||
curl_socklen_t dummy;
|
||||
]])
|
||||
],[
|
||||
curl_sizeof_curl_socklen_t="$tst_size"
|
||||
curl_pull_headers_socklen_t="$tst_pull_headers"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
AC_MSG_RESULT([$curl_sizeof_curl_socklen_t])
|
||||
if test "$curl_sizeof_curl_socklen_t" = "unknown"; then
|
||||
AC_MSG_ERROR([cannot find out size of curl_socklen_t.])
|
||||
fi
|
||||
#
|
||||
case $curl_pull_headers_socklen_t in
|
||||
ws2tcpip)
|
||||
CURL_DEFINE_UNQUOTED([CURL_PULL_WS2TCPIP_H])
|
||||
;;
|
||||
systypes)
|
||||
CURL_DEFINE_UNQUOTED([CURL_PULL_SYS_TYPES_H])
|
||||
;;
|
||||
syssocket)
|
||||
CURL_DEFINE_UNQUOTED([CURL_PULL_SYS_TYPES_H])
|
||||
CURL_DEFINE_UNQUOTED([CURL_PULL_SYS_SOCKET_H])
|
||||
;;
|
||||
esac
|
||||
CURL_DEFINE_UNQUOTED([CURL_TYPEOF_CURL_SOCKLEN_T], [$curl_typeof_curl_socklen_t])
|
||||
CURL_DEFINE_UNQUOTED([CURL_SIZEOF_CURL_SOCKLEN_T], [$curl_sizeof_curl_socklen_t])
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_FUNC_SELECT
|
||||
dnl -------------------------------------------------
|
||||
dnl Test if the socket select() function is available,
|
||||
@@ -2640,67 +2833,6 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_DEFINE_UNQUOTED (VARIABLE, [VALUE])
|
||||
dnl -------------------------------------------------
|
||||
dnl Like AC_DEFINE_UNQUOTED this macro will define a C preprocessor
|
||||
dnl symbol that can be further used in custom template configuration
|
||||
dnl files. This macro, unlike AC_DEFINE_UNQUOTED, does not use a third
|
||||
dnl argument for the description. Symbol definitions done with this
|
||||
dnl macro are intended to be exclusively used in handcrafted *.h.in
|
||||
dnl template files. Contrary to what AC_DEFINE_UNQUOTED does, this one
|
||||
dnl prevents autoheader generation and insertion of symbol template
|
||||
dnl stub and definition into the first configuration header file. Do
|
||||
dnl not use this macro as a replacement for AC_DEFINE_UNQUOTED, each
|
||||
dnl one serves different functional needs.
|
||||
|
||||
AC_DEFUN([CURL_DEFINE_UNQUOTED], [
|
||||
cat >>confdefs.h <<_EOF
|
||||
[@%:@define] $1 ifelse($#, 2, [$2], 1)
|
||||
_EOF
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_INCLUDES_INTTYPES
|
||||
dnl -------------------------------------------------
|
||||
dnl Set up variable with list of headers that must be
|
||||
dnl included when inttypes.h is to be included.
|
||||
|
||||
AC_DEFUN([CURL_INCLUDES_INTTYPES], [
|
||||
curl_includes_inttypes="\
|
||||
/* includes start */
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
/* includes end */"
|
||||
AC_CHECK_HEADERS(
|
||||
sys/types.h stdint.h inttypes.h,
|
||||
[], [], [$curl_includes_inttypes])
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CONFIGURE_LONG
|
||||
dnl -------------------------------------------------
|
||||
dnl Find out the size of long as reported by sizeof() and define
|
||||
dnl CURL_SIZEOF_LONG as appropriate to be used in template file
|
||||
dnl include/curl/curlbuild.h.in to properly configure the library.
|
||||
dnl The size of long is a build time characteristic and as such
|
||||
dnl must be recorded in curlbuild.h
|
||||
|
||||
AC_DEFUN([CURL_CONFIGURE_LONG], [
|
||||
if test -z "$ac_cv_sizeof_long" ||
|
||||
test "$ac_cv_sizeof_long" -eq "0"; then
|
||||
AC_MSG_ERROR([cannot find out size of long.])
|
||||
fi
|
||||
CURL_DEFINE_UNQUOTED([CURL_SIZEOF_LONG], [$ac_cv_sizeof_long])
|
||||
])
|
||||
|
||||
|
||||
dnl DO_CURL_OFF_T_CHECK (TYPE, SIZE)
|
||||
dnl -------------------------------------------------
|
||||
dnl Internal macro for CURL_CONFIGURE_CURL_OFF_T
|
||||
|
@@ -1,24 +1,29 @@
|
||||
configure
|
||||
autom4te.cache
|
||||
*.html
|
||||
*.lo
|
||||
*.pdf
|
||||
.deps
|
||||
.libs
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
adig
|
||||
ahost
|
||||
config.log
|
||||
config.status
|
||||
aclocal.m4
|
||||
.deps
|
||||
Makefile.in
|
||||
ares_build.h
|
||||
ares_version.h.dist
|
||||
autom4te.cache
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in
|
||||
ares_config.h
|
||||
ares_config.h.in
|
||||
config.log
|
||||
config.lt
|
||||
config.status
|
||||
config.sub
|
||||
libtool
|
||||
ltmain.sh
|
||||
stamp-h1
|
||||
*.lo
|
||||
.libs
|
||||
configure
|
||||
depcomp
|
||||
libcares.la
|
||||
missing
|
||||
ares_version.h.dist
|
||||
libcares.pc
|
||||
libtool
|
||||
ltmain.sh
|
||||
man3
|
||||
missing
|
||||
stamp-h*
|
||||
|
75
ares/CHANGES
75
ares/CHANGES
@@ -1,5 +1,80 @@
|
||||
Changelog for the c-ares project
|
||||
|
||||
* 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 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.
|
||||
|
||||
* 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)
|
||||
- Gregor Jasny made c-ares link with libtool 's -export-symbols-regex option to
|
||||
only expose functions starting with ares_.
|
||||
|
||||
* May 2 2009 (Yang Tse)
|
||||
- Use a build-time configured ares_socklen_t data type instead of socklen_t.
|
||||
|
||||
* April 21 2009 (Yang Tse)
|
||||
- Moved potential inclusion of system's malloc.h and memory.h header files to
|
||||
setup_once.h. Inclusion of each header file is based on the definition of
|
||||
NEED_MALLOC_H and NEED_MEMORY_H respectively.
|
||||
|
||||
* March 11 2009 (Yang Tse)
|
||||
- Japheth Cleaver fixed acountry.c replacing u_long with unsigned long.
|
||||
|
||||
* February 20 2009 (Yang Tse)
|
||||
- Do not halt compilation when using VS2008 to build a Windows 2000 target.
|
||||
|
||||
* February 3 2009 (Phil Blundell)
|
||||
- If the server returns garbage or nothing at all in response to an AAAA query,
|
||||
go on and ask for A records anyway.
|
||||
|
||||
* January 31 2009 (Daniel Stenberg)
|
||||
- ares_gethostbyname() now accepts 'AF_UNSPEC' as a family for resolving
|
||||
either AF_INET6 or AF_INET. It works by accepting any of the looksups in the
|
||||
hosts file, and it resolves the AAAA field with a fallback to A.
|
||||
|
||||
* January 14 2009 (Daniel Stenberg)
|
||||
- ares.h no longer uses the HAVE_STRUCT_IN6_ADDR define check, but instead it
|
||||
now declares the private struct ares_in6_addr for all systems instead of
|
||||
|
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,13 @@ ACLOCAL_AMFLAGS = -I m4
|
||||
# libcurl, but we do this anyway for convenience.
|
||||
#
|
||||
# $(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_builddir) is for c-ares's generated ares_config.h file
|
||||
# $(top_srcdir) is for c-ares's lib/setup.h and other "c-ares-private" files
|
||||
|
||||
if CURLDEBUG
|
||||
INCLUDES = -I$(top_builddir)/../include \
|
||||
-I$(top_srcdir)/../include \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)
|
||||
else
|
||||
@@ -33,7 +35,7 @@ man_MANS = $(MANPAGES)
|
||||
MSVCFILES = vc/vc.dsw vc/acountry/acountry.dsp vc/adig/adig.dsp \
|
||||
vc/ahost/ahost.dsp vc/areslib/areslib.dsp vc/areslib/areslib.dsw
|
||||
|
||||
if DEBUGBUILD
|
||||
if CURLDEBUG
|
||||
PROGS =
|
||||
else
|
||||
PROGS = ahost adig acountry
|
||||
@@ -46,7 +48,11 @@ noinst_PROGRAMS =$(PROGS)
|
||||
EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj \
|
||||
Makefile.m32 Makefile.netware Makefile.vc6 $(man_MANS) $(MSVCFILES) \
|
||||
config-win32.h RELEASE-NOTES libcares.pc.in buildconf get_ver.awk maketgz \
|
||||
TODO
|
||||
TODO ares_build.h.in $(PDFPAGES)
|
||||
|
||||
CLEANFILES = $(PDFPAGES) $(HTMLPAGES)
|
||||
|
||||
DISTCLEANFILES = ares_build.h
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libcares.pc
|
||||
@@ -85,8 +91,9 @@ if NO_UNDEFINED
|
||||
UNDEF = -no-undefined
|
||||
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
|
||||
include Makefile.inc
|
||||
@@ -96,16 +103,56 @@ libcares_la_SOURCES = $(CSOURCES) $(HHEADERS)
|
||||
# where to install the c-ares headers
|
||||
libcares_ladir = $(includedir)
|
||||
# what headers to install on 'make install':
|
||||
libcares_la_HEADERS = ares.h ares_version.h ares_dns.h
|
||||
libcares_la_HEADERS = ares.h ares_version.h ares_dns.h \
|
||||
ares_build.h ares_rules.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_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)
|
||||
adig_LDADD = $(top_builddir)/libcares.la
|
||||
|
||||
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
|
||||
dist-hook:
|
||||
|
@@ -4,36 +4,17 @@
|
||||
#
|
||||
# $Id$
|
||||
|
||||
|
||||
TOPDIR = ..
|
||||
|
||||
include ../packages/DOS/common.dj
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_IOCTLSOCKET \
|
||||
-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 -Dsocklen_t=int -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
|
||||
CFLAGS += -DWATT32 -Dselect=select_s
|
||||
|
||||
LDFLAGS = -s
|
||||
|
||||
ifeq ($(USE_DEBUG),1)
|
||||
ifeq ($(USE_CURLDEBUG),1)
|
||||
EX_LIBS = ../lib/libcurl.a
|
||||
OBJ_HACK = $(OBJECTS)
|
||||
else
|
||||
@@ -56,12 +37,15 @@ EX_LIBS += $(WATT32_ROOT)/lib/libwatt.a
|
||||
|
||||
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.
|
||||
|
||||
libcares.a: $(OBJECTS)
|
||||
ar rs $@ $?
|
||||
|
||||
ares_config.h: config.dos
|
||||
$(COPY) $^ $@
|
||||
|
||||
ahost.exe: ahost.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
||||
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
||||
|
||||
@@ -71,12 +55,30 @@ adig.exe: adig.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)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) libcares.a
|
||||
# clean generated files
|
||||
#
|
||||
genclean:
|
||||
- $(DELETE) ares_config.h
|
||||
|
||||
vclean realclean: clean
|
||||
rm -f ahost.exe adig.exe acountry.exe depend.dj
|
||||
- rmdir $(OBJ_DIR)
|
||||
# clean object files and subdir
|
||||
#
|
||||
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
|
||||
|
||||
|
@@ -1,23 +1,157 @@
|
||||
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
|
||||
|
||||
HHEADERS = ares.h ares_private.h setup.h ares_dns.h ares_version.h \
|
||||
nameser.h inet_net_pton.h inet_ntop.h ares_ipv6.h bitncmp.h setup_once.h \
|
||||
ares_llist.h ares_strdup.h ares_strcasecmp.h ares_writev.h
|
||||
CSOURCES = ares__close_sockets.c \
|
||||
ares__get_hostent.c \
|
||||
ares__read_line.c \
|
||||
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_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 \
|
||||
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_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_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_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
|
||||
|
@@ -40,7 +40,7 @@ tags:
|
||||
%.exe: %.o ares_getopt.o $(LIB)
|
||||
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||
|
||||
$(OBJLIB): ares.h ares_dns.h ares_private.h
|
||||
$(OBJLIB): ares.h ares_dns.h ares_private.h ares_build.h ares_rules.h
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
@@ -55,7 +55,8 @@ install:
|
||||
${RANLIB} ${DESTDIR}${libdir}/$(LIB)
|
||||
chmod u-w ${DESTDIR}${libdir}/$(LIB)
|
||||
${INSTALL} -m 444 ${srcdir}/ares.h ${DESTDIR}${includedir}
|
||||
${INSTALL} -m 444 ${srcdir}/ares_version.h ${DESTDIR}${includedir}
|
||||
${INSTALL} -m 444 ${srcdir}/ares_build.h ${DESTDIR}${includedir}
|
||||
${INSTALL} -m 444 ${srcdir}/ares_rules.h ${DESTDIR}${includedir}
|
||||
(for man in $(MANPAGES); do \
|
||||
${INSTALL} -m 444 ${srcdir}/$${man} ${DESTDIR}${mandir}/man3; \
|
||||
done)
|
||||
|
@@ -160,7 +160,7 @@ lib: prebuild $(LTARGET)
|
||||
|
||||
nlm: prebuild $(TARGETS)
|
||||
|
||||
prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h
|
||||
prebuild: $(OBJDIR) ares_build.h $(OBJDIR)/version.inc ares_config.h
|
||||
|
||||
install: $(INSTDIR) all
|
||||
@$(CP) *.nlm $(INSTDIR)
|
||||
@@ -170,7 +170,7 @@ install: $(INSTDIR) all
|
||||
@$(CP) ../RELEASE-NOTES $(INSTDIR)
|
||||
|
||||
clean:
|
||||
-$(RM) $(LTARGET) $(TARGETS) config.h
|
||||
-$(RM) $(LTARGET) $(TARGETS) ares_config.h
|
||||
-$(RM) -r $(OBJDIR)
|
||||
-$(RM) -r arpa
|
||||
|
||||
@@ -269,7 +269,7 @@ ifeq ($(LD),nlmconv)
|
||||
@echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
|
||||
endif
|
||||
|
||||
config.h: Makefile.netware
|
||||
ares_config.h: Makefile.netware
|
||||
@echo Creating $@
|
||||
@echo $(DL)/* $@ for NetWare target.$(DL) > $@
|
||||
@echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
|
||||
@@ -303,7 +303,6 @@ ifeq ($(LIBARCH),CLIB)
|
||||
@echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
|
||||
@echo $(DL)#define socklen_t int$(DL) >> $@
|
||||
else
|
||||
@echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@
|
||||
@@ -311,7 +310,6 @@ else
|
||||
@echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
|
||||
@@ -361,6 +359,7 @@ endif
|
||||
@echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_IOCTL 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_IOCTL_FIONBIO 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_LL 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
|
||||
@@ -407,7 +406,24 @@ endif
|
||||
@echo $(DL)#else$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_VARIADIC_MACROS_C99 1$(DL) >> $@
|
||||
@echo $(DL)#endif$(DL) >> $@
|
||||
ifdef OLD_NOVELLSDK
|
||||
@echo $(DL)#define socklen_t int$(DL) >> $@
|
||||
endif
|
||||
|
||||
FORCE: ;
|
||||
|
||||
ares_build.h: Makefile.netware FORCE
|
||||
@echo Creating $@
|
||||
@echo $(DL)/* $@ intended for NetWare target.$(DL) > $@
|
||||
@echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
|
||||
@echo $(DL)** All your changes will be lost!!$(DL) >> $@
|
||||
@echo $(DL)*/$(DL) >> $@
|
||||
@echo $(DL)#ifndef __CARES_BUILD_H$(DL) >> $@
|
||||
@echo $(DL)#define __CARES_BUILD_H$(DL) >> $@
|
||||
ifeq ($(LIBARCH),CLIB)
|
||||
@echo $(DL)#define CARES_TYPEOF_ARES_SOCKLEN_T int$(DL) >> $@
|
||||
@echo $(DL)#define CARES_SIZEOF_ARES_SOCKLEN_T 4$(DL) >> $@
|
||||
else
|
||||
@echo $(DL)#define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int$(DL) >> $@
|
||||
@echo $(DL)#define CARES_SIZEOF_ARES_SOCKLEN_T 4$(DL) >> $@
|
||||
endif
|
||||
@echo $(DL)#define CARES_SIZEOF_LONG 4$(DL) >> $@
|
||||
@echo $(DL)typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;$(DL) >> $@
|
||||
@echo $(DL)#endif /* __CARES_BUILD_H */$(DL) >> $@
|
||||
|
@@ -12,8 +12,8 @@ USE_WATT32 = 0
|
||||
# Configurations:
|
||||
# -MD - msvcrt.dll, threads, release (normal)
|
||||
# -MDd - msvcrtd.dll, threads, debug
|
||||
# -ML - libc, no threads, release
|
||||
# -MLd - libc, no threads, debug
|
||||
# -ML - libc, no threads, release (not available on VC-2008+)
|
||||
# -MLd - libc, no threads, debug (not available on VC-2008+)
|
||||
# -MT - libc, threads, release
|
||||
# -MTd - libc, threads, debug
|
||||
|
||||
@@ -26,7 +26,7 @@ OBJ_DIR = VC6_obj
|
||||
DEF_FILE = cares.def
|
||||
|
||||
!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
|
||||
|
||||
!else
|
||||
@@ -35,7 +35,7 @@ EX_LIBS = advapi32.lib ws2_32.lib
|
||||
!endif
|
||||
|
||||
!if "$(DEBUG_MODEL)" == "d"
|
||||
CFLAGS = $(CFLAGS) -D_DEBUG -GZ
|
||||
CFLAGS = $(CFLAGS) -DDEBUGBUILD -D_DEBUG -GZ
|
||||
LDFLAGS = $(LDFLAGS) -debug -fixed:no
|
||||
|
||||
!else
|
||||
@@ -43,6 +43,8 @@ CFLAGS = $(CFLAGS) -O2 -Og
|
||||
LDFLAGS = $(LDFLAGS) -release
|
||||
!endif
|
||||
|
||||
CFLAGS = $(CFLAGS) -I.\.
|
||||
|
||||
OBJECTS = $(OBJ_DIR)\ares_fds.obj \
|
||||
$(OBJ_DIR)\ares_process.obj \
|
||||
$(OBJ_DIR)\ares_free_hostent.obj \
|
||||
@@ -61,6 +63,7 @@ OBJECTS = $(OBJ_DIR)\ares_fds.obj \
|
||||
$(OBJ_DIR)\ares_strerror.obj \
|
||||
$(OBJ_DIR)\ares_cancel.obj \
|
||||
$(OBJ_DIR)\ares_init.obj \
|
||||
$(OBJ_DIR)\ares_library_init.obj \
|
||||
$(OBJ_DIR)\ares_llist.obj \
|
||||
$(OBJ_DIR)\ares_timeout.obj \
|
||||
$(OBJ_DIR)\ares__timeval.obj \
|
||||
@@ -108,6 +111,8 @@ $(DEF_FILE): $(OBJECTS) Makefile.VC6
|
||||
@echo ares_getsock >> $@
|
||||
@echo ares_init >> $@
|
||||
@echo ares_init_options >> $@
|
||||
@echo ares_library_init >> $@
|
||||
@echo ares_library_cleanup >> $@
|
||||
@echo ares_mkquery >> $@
|
||||
@echo ares_parse_a_reply >> $@
|
||||
@echo ares_parse_ptr_reply >> $@
|
||||
@@ -154,101 +159,116 @@ vclean realclean: clean
|
||||
# Copyright "gcc -MM .."
|
||||
#
|
||||
$(OBJ_DIR)\ares_fds.obj: ares_fds.c setup.h setup_once.h ares.h ares_private.h \
|
||||
ares_ipv6.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 \
|
||||
ares.h ares_dns.h ares_private.h ares_ipv6.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 \
|
||||
ares.h ares_private.h ares_ipv6.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 \
|
||||
ares.h ares_dns.h ares_private.h ares_ipv6.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 \
|
||||
ares.h ares_private.h ares_ipv6.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 ares.h
|
||||
$(OBJ_DIR)\ares_free_string.obj: ares_free_string.c setup.h setup_once.h \
|
||||
ares.h ares_build.h ares_rules.h
|
||||
|
||||
$(OBJ_DIR)\ares_search.obj: ares_search.c setup.h setup_once.h nameser.h \
|
||||
ares.h ares_private.h ares_ipv6.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 \
|
||||
ares.h ares_private.h ares_ipv6.h inet_net_pton.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 \
|
||||
nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h
|
||||
nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h ares_build.h \
|
||||
ares_rules.h
|
||||
|
||||
$(OBJ_DIR)\ares_send.obj: ares_send.c setup.h setup_once.h nameser.h ares.h \
|
||||
ares_dns.h ares_private.h ares_ipv6.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 \
|
||||
ares_private.h ares_ipv6.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 \
|
||||
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
|
||||
|
||||
$(OBJ_DIR)\ares_strcasecmp.obj: ares_strcasecmp.c setup.h setup_once.h ares.h
|
||||
$(OBJ_DIR)\ares_strcasecmp.obj: ares_strcasecmp.c setup.h setup_once.h ares.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 setup.h setup_once.h ares.h \
|
||||
ares_build.h ares_rules.h
|
||||
|
||||
$(OBJ_DIR)\ares_cancel.obj: ares_cancel.c setup.h setup_once.h ares.h \
|
||||
ares_private.h ares_ipv6.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 \
|
||||
ares_private.h ares_ipv6.h inet_net_pton.h
|
||||
ares_private.h ares_ipv6.h inet_net_pton.h ares_build.h ares_rules.h \
|
||||
ares_library_init.h
|
||||
|
||||
$(OBJ_DIR)\ares_timeout.obj: ares_timeout.c setup.h setup_once.h ares.h \
|
||||
ares_private.h ares_ipv6.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 \
|
||||
ares_private.h ares_ipv6.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 \
|
||||
ares_private.h ares_ipv6.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 \
|
||||
ares.h ares_dns.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_version.h
|
||||
$(OBJ_DIR)\ares_version.obj: ares_version.c setup.h setup_once.h ares.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 \
|
||||
nameser.h ares.h ares_private.h ares_ipv6.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 \
|
||||
nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h
|
||||
nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h ares_build.h \
|
||||
ares_rules.h
|
||||
|
||||
$(OBJ_DIR)\windows_port.obj: windows_port.c setup.h setup_once.h nameser.h \
|
||||
ares.h ares_private.h ares_ipv6.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 \
|
||||
nameser.h ares.h ares_private.h ares_ipv6.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 \
|
||||
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
|
||||
|
||||
$(OBJ_DIR)\ares_parse_aaaa_reply.obj: ares_parse_aaaa_reply.c setup.h \
|
||||
setup_once.h nameser.h ares.h ares_dns.h inet_net_pton.h ares_private.h \
|
||||
ares_ipv6.h
|
||||
ares_ipv6.h ares_build.h ares_rules.h
|
||||
|
||||
$(OBJ_DIR)\ares_parse_ns_reply.obj: ares_parse_ns_reply.c 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
|
||||
|
||||
$(OBJ_DIR)\ares_getnameinfo.obj: ares_getnameinfo.c setup.h setup_once.h \
|
||||
nameser.h ares.h ares_private.h ares_ipv6.h inet_ntop.h
|
||||
nameser.h ares.h ares_private.h ares_ipv6.h inet_ntop.h ares_build.h \
|
||||
ares_rules.h
|
||||
|
||||
$(OBJ_DIR)\inet_net_pton.obj: inet_net_pton.c setup.h setup_once.h nameser.h \
|
||||
ares_ipv6.h inet_net_pton.h
|
||||
ares_ipv6.h inet_net_pton.h ares_build.h ares_rules.h
|
||||
|
||||
$(OBJ_DIR)\bitncmp.obj: bitncmp.c bitncmp.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 \
|
||||
ares_ipv6.h inet_ntop.h
|
||||
ares_ipv6.h inet_ntop.h ares_build.h ares_rules.h
|
||||
|
||||
$(OBJ_DIR)\ares_getopt.obj: ares_getopt.c ares_getopt.h
|
||||
$(OBJ_DIR)\ares_getopt.obj: ares_getopt.c ares_getopt.h ares_build.h \
|
||||
ares_rules.h
|
||||
|
||||
$(OBJ_DIR)\ares_library_init.obj: ares_library_init.c setup.h setup_once.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 \
|
||||
ares_private.h ares_llist.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 \
|
||||
ares_writev.h
|
||||
ares_writev.h ares_build.h ares_rules.h
|
||||
|
@@ -23,3 +23,41 @@ original ares.
|
||||
You'll find all c-ares details and news here:
|
||||
|
||||
http://c-ares.haxx.se/
|
||||
|
||||
|
||||
NOTES FOR C-ARES HACKERS
|
||||
|
||||
The following notes apply to c-ares version 1.6.1 and later.
|
||||
|
||||
* The distributed ares_build.h file is only intended to be used on systems
|
||||
which can not run the also distributed configure script.
|
||||
|
||||
* The distributed ares_build.h file is generated as a copy of ares_build.h.dist
|
||||
when the c-ares source code distribution archive file is originally created.
|
||||
|
||||
* If you check out from CVS on a non-configure platform, you must run the
|
||||
appropriate buildconf* script to set up ares_build.h and other local files
|
||||
before being able of compiling the library.
|
||||
|
||||
* On systems capable of running the configure script, the configure process
|
||||
will overwrite the distributed ares_build.h file with one that is suitable
|
||||
and specific to the library being configured and built, this new file is
|
||||
generated from the ares_build.h.in template file.
|
||||
|
||||
* If you intend to distribute an already compiled c-ares library you _MUST_
|
||||
also distribute along with it the generated ares_build.h which has been
|
||||
used to compile it. Otherwise the library will be of no use for the users of
|
||||
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 ares_build.h includes platform and configuration dependant info,
|
||||
and must not be modified by anyone. Configure script generates it for you.
|
||||
|
||||
* We cannot assume anything else but very basic compiler features being
|
||||
present. While c-ares requires an ANSI C compiler to build, some of the
|
||||
earlier ANSI compilers clearly can't deal with some preprocessor operators.
|
||||
|
||||
* Newlines must remain unix-style for older compilers' sake.
|
||||
|
||||
* Comments must be written in the old-style /* unnested C-fashion */
|
||||
|
||||
|
@@ -2,16 +2,26 @@ This is what's new and changed in the c-ares 1.6.1 release:
|
||||
|
||||
Changed:
|
||||
|
||||
o in6_addr is not used in ares.h anymore, but a private ares_in6_addr is instead
|
||||
declared and used
|
||||
o in6_addr is not used in ares.h anymore, but a private ares_in6_addr is
|
||||
instead declared and used
|
||||
o ares_gethostbyname() now supports 'AF_UNSPEC' as a family for resolving
|
||||
either AF_INET6 or AF_INET
|
||||
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()
|
||||
|
||||
Fixed:
|
||||
|
||||
o ares_parse_*_reply() functions now return ARES_EBADRESP instead of
|
||||
ARES_EBADNAME if the name in the response failed to decode
|
||||
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
|
||||
|
||||
Thanks go to these friendly people for their efforts and contributions:
|
||||
|
||||
Phil Blundell
|
||||
Phil Blundell, Japheth Cleaver, Yang Tse, Gregor Jasny, Joshua Kwan,
|
||||
Timo Teras
|
||||
|
||||
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,
|
||||
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.
|
||||
|
||||
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.
|
||||
|
@@ -1,52 +1,5 @@
|
||||
|
||||
|
||||
dnl CURL_CHECK_COMPILER_HALT_ON_ERROR
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if the compiler actually halts after the
|
||||
dnl compilation phase without generating any object
|
||||
dnl code file, when the source compiles with errors.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_COMPILER_HALT_ON_ERROR], [
|
||||
AC_MSG_CHECKING([if compiler halts on compilation errors])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
force compilation error
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([compiler does not halt on compilation errors.])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if the compiler actually halts after the
|
||||
dnl compilation phase without generating any object
|
||||
dnl code file, when the source code tries to define a
|
||||
dnl type for a constant array with negative dimension.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE], [
|
||||
AC_REQUIRE([CURL_CHECK_COMPILER_HALT_ON_ERROR])dnl
|
||||
AC_MSG_CHECKING([if compiler halts on negative sized arrays])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ];
|
||||
]],[[
|
||||
bad_t dummy;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([compiler does not halt on negative sized arrays.])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_DEF (SYMBOL, [INCLUDES], [SILENT])
|
||||
dnl -------------------------------------------------
|
||||
dnl Use the C preprocessor to find out if the given object-style symbol
|
||||
@@ -96,6 +49,72 @@ CURL_DEF_TOKEN $1
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_DEF_CC (SYMBOL, [INCLUDES], [SILENT])
|
||||
dnl -------------------------------------------------
|
||||
dnl Use the C compiler to find out only if the given symbol is defined
|
||||
dnl or not, this can not find out its expansion. This macro will not use
|
||||
dnl default includes even if no INCLUDES argument is given. This macro
|
||||
dnl will run silently when invoked with three arguments.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_DEF_CC], [
|
||||
AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])dnl
|
||||
ifelse($3,,[AC_MSG_CHECKING([for compiler definition of $1])])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_SOURCE(
|
||||
ifelse($2,,,[$2])[[
|
||||
int main (void)
|
||||
{
|
||||
#ifdef $1
|
||||
return 0;
|
||||
#else
|
||||
force compilation error
|
||||
#endif
|
||||
}
|
||||
]])
|
||||
],[
|
||||
tst_symbol_defined="yes"
|
||||
],[
|
||||
tst_symbol_defined="no"
|
||||
])
|
||||
if test "$tst_symbol_defined" = "yes"; then
|
||||
AS_VAR_SET(ac_HaveDef, yes)
|
||||
ifelse($3,,[AC_MSG_RESULT([yes])])
|
||||
else
|
||||
AS_VAR_SET(ac_HaveDef, no)
|
||||
ifelse($3,,[AC_MSG_RESULT([no])])
|
||||
fi
|
||||
AS_VAR_POPDEF([ac_HaveDef])dnl
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_LIB_XNET
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify if X/Open network library is required.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_LIB_XNET], [
|
||||
AC_MSG_CHECKING([if X/Open network library is required])
|
||||
tst_lib_xnet_required="no"
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_SOURCE([[
|
||||
int main (void)
|
||||
{
|
||||
#if defined(__hpux) && defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600)
|
||||
return 0;
|
||||
#elif defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
|
||||
return 0;
|
||||
#else
|
||||
force compilation error
|
||||
#endif
|
||||
}
|
||||
]])
|
||||
],[
|
||||
tst_lib_xnet_required="yes"
|
||||
LIBS="$LIBS -lxnet"
|
||||
])
|
||||
AC_MSG_RESULT([$tst_lib_xnet_required])
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_AIX_ALL_SOURCE
|
||||
dnl -------------------------------------------------
|
||||
dnl Provides a replacement of traditional AC_AIX with
|
||||
@@ -360,91 +379,55 @@ AC_DEFUN([CURL_CHECK_HEADER_MALLOC], [
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_TYPE_SOCKLEN_T
|
||||
dnl CURL_CHECK_HEADER_MEMORY
|
||||
dnl -------------------------------------------------
|
||||
dnl Check for existing socklen_t type, and provide
|
||||
dnl an equivalent type if socklen_t not available
|
||||
dnl Check for compilable and valid memory.h header,
|
||||
dnl and check if it is needed even with stdlib.h for
|
||||
dnl memory related functions.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_TYPE_SOCKLEN_T], [
|
||||
AC_REQUIRE([CURL_CHECK_HEADER_WS2TCPIP])dnl
|
||||
AC_CHECK_TYPE([socklen_t], ,[
|
||||
dnl socklen_t not available
|
||||
AC_CACHE_CHECK([for socklen_t equivalent],
|
||||
[curl_cv_socklen_t_equiv], [
|
||||
curl_cv_socklen_t_equiv="unknown"
|
||||
for arg1 in 'int' 'SOCKET'; do
|
||||
for arg2 in "struct sockaddr" void; do
|
||||
for t in int size_t unsigned long "unsigned long"; do
|
||||
if test "$curl_cv_socklen_t_equiv" = "unknown"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#ifdef HAVE_WINSOCK_H
|
||||
#include <winsock.h>
|
||||
#endif
|
||||
#endif
|
||||
#define GETPEERNCALLCONV PASCAL
|
||||
#else
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#define GETPEERNCALLCONV
|
||||
#endif
|
||||
extern int GETPEERNCALLCONV getpeername($arg1, $arg2 *, $t *);
|
||||
]],[[
|
||||
$t len=0;
|
||||
getpeername(0,0,&len);
|
||||
]])
|
||||
],[
|
||||
curl_cv_socklen_t_equiv="$t"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
AC_DEFUN([CURL_CHECK_HEADER_MEMORY], [
|
||||
AC_CACHE_CHECK([for memory.h], [ac_cv_header_memory_h], [
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#include <memory.h>
|
||||
]],[[
|
||||
void *p = malloc(10);
|
||||
void *q = calloc(10,10);
|
||||
free(p);
|
||||
free(q);
|
||||
]])
|
||||
],[
|
||||
ac_cv_header_memory_h="yes"
|
||||
],[
|
||||
ac_cv_header_memory_h="no"
|
||||
])
|
||||
case "$curl_cv_socklen_t_equiv" in
|
||||
unknown)
|
||||
AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv,
|
||||
[Type to use in place of socklen_t when system does not provide it.])
|
||||
])
|
||||
if test "$ac_cv_header_memory_h" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED(HAVE_MEMORY_H, 1,
|
||||
[Define to 1 if you have the memory.h header file.])
|
||||
#
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#include <stdlib.h>
|
||||
]],[[
|
||||
void *p = malloc(10);
|
||||
void *q = calloc(10,10);
|
||||
free(p);
|
||||
free(q);
|
||||
]])
|
||||
],[
|
||||
curl_cv_need_header_memory_h="no"
|
||||
],[
|
||||
curl_cv_need_header_memory_h="yes"
|
||||
])
|
||||
#
|
||||
case "$curl_cv_need_header_memory_h" in
|
||||
yes)
|
||||
AC_DEFINE_UNQUOTED(NEED_MEMORY_H, 1,
|
||||
[Define to 1 if you need the memory.h header file even with stdlib.h])
|
||||
;;
|
||||
esac
|
||||
],[
|
||||
#undef inline
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#ifdef HAVE_WINSOCK2_H
|
||||
#include <winsock2.h>
|
||||
#ifdef HAVE_WS2TCPIP_H
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#endif
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
@@ -461,7 +444,6 @@ dnl argument in GETNAMEINFO_QUAL_ARG1.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
|
||||
AC_REQUIRE([CURL_CHECK_HEADER_WS2TCPIP])dnl
|
||||
AC_REQUIRE([CURL_CHECK_TYPE_SOCKLEN_T])dnl
|
||||
AC_CHECK_HEADERS(sys/types.h sys/socket.h netdb.h)
|
||||
#
|
||||
AC_MSG_CHECKING([for getnameinfo])
|
||||
@@ -1338,7 +1320,7 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
|
||||
AC_REQUIRE([AC_HEADER_TIME])dnl
|
||||
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])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_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
@@ -1368,6 +1350,9 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
]],[[
|
||||
struct timeval ts;
|
||||
@@ -1685,6 +1670,214 @@ 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 -------------------------------------------------
|
||||
dnl Like AC_DEFINE_UNQUOTED this macro will define a C preprocessor
|
||||
dnl symbol that can be further used in custom template configuration
|
||||
dnl files. This macro, unlike AC_DEFINE_UNQUOTED, does not use a third
|
||||
dnl argument for the description. Symbol definitions done with this
|
||||
dnl macro are intended to be exclusively used in handcrafted *.h.in
|
||||
dnl template files. Contrary to what AC_DEFINE_UNQUOTED does, this one
|
||||
dnl prevents autoheader generation and insertion of symbol template
|
||||
dnl stub and definition into the first configuration header file. Do
|
||||
dnl not use this macro as a replacement for AC_DEFINE_UNQUOTED, each
|
||||
dnl one serves different functional needs.
|
||||
|
||||
AC_DEFUN([CARES_DEFINE_UNQUOTED], [
|
||||
cat >>confdefs.h <<_EOF
|
||||
[@%:@define] $1 ifelse($#, 2, [$2], 1)
|
||||
_EOF
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CONFIGURE_LONG
|
||||
dnl -------------------------------------------------
|
||||
dnl Find out the size of long as reported by sizeof() and define
|
||||
dnl CARES_SIZEOF_LONG as appropriate to be used in template file
|
||||
dnl ares_build.h.in to properly configure the library.
|
||||
dnl The size of long is a build time characteristic and as such
|
||||
dnl must be recorded in ares_build.h
|
||||
|
||||
AC_DEFUN([CARES_CONFIGURE_LONG], [
|
||||
if test -z "$ac_cv_sizeof_long" ||
|
||||
test "$ac_cv_sizeof_long" -eq "0"; then
|
||||
AC_MSG_ERROR([cannot find out size of long.])
|
||||
fi
|
||||
CARES_DEFINE_UNQUOTED([CARES_SIZEOF_LONG], [$ac_cv_sizeof_long])
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CONFIGURE_ARES_SOCKLEN_T
|
||||
dnl -------------------------------------------------
|
||||
dnl Find out suitable ares_socklen_t data type definition and size, making
|
||||
dnl appropriate definitions for template file ares_build.h.in
|
||||
dnl to properly configure and use the library.
|
||||
dnl
|
||||
dnl The need for the ares_socklen_t definition arises mainly to properly
|
||||
dnl interface HP-UX systems which on one hand have a typedef'ed socklen_t
|
||||
dnl data type which is 32 or 64-Bit wide depending on the data model being
|
||||
dnl used, and that on the other hand is only actually used when interfacing
|
||||
dnl the X/Open sockets provided in the xnet library.
|
||||
|
||||
AC_DEFUN([CARES_CONFIGURE_ARES_SOCKLEN_T], [
|
||||
AC_REQUIRE([CARES_INCLUDES_WS2TCPIP])dnl
|
||||
AC_REQUIRE([CARES_INCLUDES_SYS_SOCKET])dnl
|
||||
AC_REQUIRE([CARES_PREPROCESS_CALLCONV])dnl
|
||||
#
|
||||
AC_MSG_CHECKING([for ares_socklen_t data type])
|
||||
cares_typeof_ares_socklen_t="unknown"
|
||||
for arg1 in int SOCKET; do
|
||||
for arg2 in 'struct sockaddr' void; do
|
||||
for t in socklen_t int size_t 'unsigned int' long 'unsigned long' void; do
|
||||
if test "$cares_typeof_ares_socklen_t" = "unknown"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$cares_includes_ws2tcpip
|
||||
$cares_includes_sys_socket
|
||||
$cares_preprocess_callconv
|
||||
extern int FUNCALLCONV getpeername($arg1, $arg2 *, $t *);
|
||||
]],[[
|
||||
$t *lenptr = 0;
|
||||
if(0 != getpeername(0, 0, lenptr))
|
||||
return 1;
|
||||
]])
|
||||
],[
|
||||
cares_typeof_ares_socklen_t="$t"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
for t in socklen_t int; do
|
||||
if test "$cares_typeof_ares_socklen_t" = "void"; then
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$cares_includes_sys_socket
|
||||
typedef $t ares_socklen_t;
|
||||
]],[[
|
||||
ares_socklen_t dummy;
|
||||
]])
|
||||
],[
|
||||
cares_typeof_ares_socklen_t="$t"
|
||||
])
|
||||
fi
|
||||
done
|
||||
AC_MSG_RESULT([$cares_typeof_ares_socklen_t])
|
||||
if test "$cares_typeof_ares_socklen_t" = "void" ||
|
||||
test "$cares_typeof_ares_socklen_t" = "unknown"; then
|
||||
AC_MSG_ERROR([cannot find data type for ares_socklen_t.])
|
||||
fi
|
||||
#
|
||||
AC_MSG_CHECKING([size of ares_socklen_t])
|
||||
cares_sizeof_ares_socklen_t="unknown"
|
||||
cares_pull_headers_socklen_t="unknown"
|
||||
if test "$ac_cv_header_ws2tcpip_h" = "yes"; then
|
||||
tst_pull_header_checks='none ws2tcpip'
|
||||
tst_size_checks='4'
|
||||
else
|
||||
tst_pull_header_checks='none systypes syssocket'
|
||||
tst_size_checks='4 8 2'
|
||||
fi
|
||||
for tst_size in $tst_size_checks; do
|
||||
for tst_pull_headers in $tst_pull_header_checks; do
|
||||
if test "$cares_sizeof_ares_socklen_t" = "unknown"; then
|
||||
case $tst_pull_headers in
|
||||
ws2tcpip)
|
||||
tmp_includes="$cares_includes_ws2tcpip"
|
||||
;;
|
||||
systypes)
|
||||
tmp_includes="$cares_includes_sys_types"
|
||||
;;
|
||||
syssocket)
|
||||
tmp_includes="$cares_includes_sys_socket"
|
||||
;;
|
||||
*)
|
||||
tmp_includes=""
|
||||
;;
|
||||
esac
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$tmp_includes
|
||||
typedef $cares_typeof_ares_socklen_t ares_socklen_t;
|
||||
typedef char dummy_arr[sizeof(ares_socklen_t) == $tst_size ? 1 : -1];
|
||||
]],[[
|
||||
ares_socklen_t dummy;
|
||||
]])
|
||||
],[
|
||||
cares_sizeof_ares_socklen_t="$tst_size"
|
||||
cares_pull_headers_socklen_t="$tst_pull_headers"
|
||||
])
|
||||
fi
|
||||
done
|
||||
done
|
||||
AC_MSG_RESULT([$cares_sizeof_ares_socklen_t])
|
||||
if test "$cares_sizeof_ares_socklen_t" = "unknown"; then
|
||||
AC_MSG_ERROR([cannot find out size of ares_socklen_t.])
|
||||
fi
|
||||
#
|
||||
case $cares_pull_headers_socklen_t in
|
||||
ws2tcpip)
|
||||
CARES_DEFINE_UNQUOTED([CARES_PULL_WS2TCPIP_H])
|
||||
;;
|
||||
systypes)
|
||||
CARES_DEFINE_UNQUOTED([CARES_PULL_SYS_TYPES_H])
|
||||
;;
|
||||
syssocket)
|
||||
CARES_DEFINE_UNQUOTED([CARES_PULL_SYS_TYPES_H])
|
||||
CARES_DEFINE_UNQUOTED([CARES_PULL_SYS_SOCKET_H])
|
||||
;;
|
||||
esac
|
||||
CARES_DEFINE_UNQUOTED([CARES_TYPEOF_ARES_SOCKLEN_T], [$cares_typeof_ares_socklen_t])
|
||||
CARES_DEFINE_UNQUOTED([CARES_SIZEOF_ARES_SOCKLEN_T], [$cares_sizeof_ares_socklen_t])
|
||||
])
|
||||
|
||||
|
||||
dnl This macro determines if the specified struct exists in the specified file
|
||||
dnl Syntax:
|
||||
dnl CARES_CHECK_STRUCT(headers, struct name, if found, [if not found])
|
||||
|
@@ -10,8 +10,8 @@
|
||||
* 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)
|
||||
*
|
||||
* The 2 letter country code in <CC> and the ISO-3166 country
|
||||
* number in x.y (number = x*256 + y). Version 2 of the protocol is missing
|
||||
* The 2 letter country code is in <CC> and the ISO-3166 country
|
||||
* number is in x.y (number = x*256 + y). Version 2 of the protocol is missing
|
||||
* the <CC> number.
|
||||
*
|
||||
* Ref: http://countries.nerd.dk/more.html
|
||||
@@ -116,6 +116,13 @@ int main(int argc, char **argv)
|
||||
WSAStartup(wVersionRequested, &wsaData);
|
||||
#endif
|
||||
|
||||
status = ares_library_init(ARES_LIB_INIT_ALL);
|
||||
if (status != ARES_SUCCESS)
|
||||
{
|
||||
fprintf(stderr, "ares_library_init: %s\n", ares_strerror(status));
|
||||
return 1;
|
||||
}
|
||||
|
||||
while ((ch = ares_getopt(argc, argv, "dvh?")) != -1)
|
||||
switch (ch)
|
||||
{
|
||||
@@ -178,6 +185,8 @@ int main(int argc, char **argv)
|
||||
wait_ares(channel);
|
||||
ares_destroy(channel);
|
||||
|
||||
ares_library_cleanup();
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
WSACleanup();
|
||||
#endif
|
||||
@@ -547,7 +556,7 @@ static void find_country_from_cname(const char *cname, struct in_addr addr)
|
||||
const struct search_list *country;
|
||||
char ccode_A2[3], *ccopy, *dot_4;
|
||||
int cnumber, z0, z1, ver_1, ver_2;
|
||||
u_long ip;
|
||||
unsigned long ip;
|
||||
|
||||
ip = ntohl(addr.s_addr);
|
||||
z0 = tolower(cname[0]);
|
||||
@@ -603,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);
|
||||
else
|
||||
{
|
||||
if (ver_1 && *(unsigned short*)&country->short_name != *(unsigned*)&ccode_A2)
|
||||
printf("short-name mismatch; %s vs %s\n", country->short_name, ccode_A2);
|
||||
|
||||
if (ver_1)
|
||||
{
|
||||
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",
|
||||
country->long_name, country->short_name, cnumber);
|
||||
}
|
||||
|
29
ares/adig.c
29
ares/adig.c
@@ -84,6 +84,11 @@
|
||||
#define T_SRV 33 /* server selection */
|
||||
#endif
|
||||
|
||||
/* AIX portability check */
|
||||
#ifndef T_NAPTR
|
||||
#define T_NAPTR 35 /* naming authority pointer */
|
||||
#endif
|
||||
|
||||
struct nv {
|
||||
const char *name;
|
||||
int value;
|
||||
@@ -187,6 +192,13 @@ int main(int argc, char **argv)
|
||||
WSAStartup(wVersionRequested, &wsaData);
|
||||
#endif
|
||||
|
||||
status = ares_library_init(ARES_LIB_INIT_ALL);
|
||||
if (status != ARES_SUCCESS)
|
||||
{
|
||||
fprintf(stderr, "ares_library_init: %s\n", ares_strerror(status));
|
||||
return 1;
|
||||
}
|
||||
|
||||
options.flags = ARES_FLAG_NOCHECKRESP;
|
||||
options.servers = NULL;
|
||||
options.nservers = 0;
|
||||
@@ -207,9 +219,10 @@ int main(int argc, char **argv)
|
||||
if (strcmp(flags[i].name, optarg) == 0)
|
||||
break;
|
||||
}
|
||||
if (i == nflags)
|
||||
if (i < nflags)
|
||||
options.flags |= flags[i].value;
|
||||
else
|
||||
usage();
|
||||
options.flags |= flags[i].value;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
@@ -244,9 +257,10 @@ int main(int argc, char **argv)
|
||||
if (strcasecmp(classes[i].name, optarg) == 0)
|
||||
break;
|
||||
}
|
||||
if (i == nclasses)
|
||||
if (i < nclasses)
|
||||
dnsclass = classes[i].value;
|
||||
else
|
||||
usage();
|
||||
dnsclass = classes[i].value;
|
||||
break;
|
||||
|
||||
case 't':
|
||||
@@ -256,9 +270,10 @@ int main(int argc, char **argv)
|
||||
if (strcasecmp(types[i].name, optarg) == 0)
|
||||
break;
|
||||
}
|
||||
if (i == ntypes)
|
||||
if (i < ntypes)
|
||||
type = types[i].value;
|
||||
else
|
||||
usage();
|
||||
type = types[i].value;
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
@@ -325,6 +340,8 @@ int main(int argc, char **argv)
|
||||
|
||||
ares_destroy(channel);
|
||||
|
||||
ares_library_cleanup();
|
||||
|
||||
#ifdef USE_WINSOCK
|
||||
WSACleanup();
|
||||
#endif
|
||||
|
10
ares/ahost.c
10
ares/ahost.c
@@ -42,6 +42,7 @@
|
||||
#include "inet_ntop.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_getopt.h"
|
||||
#include "ares_ipv6.h"
|
||||
|
||||
#ifndef HAVE_STRDUP
|
||||
# include "ares_strdup.h"
|
||||
@@ -76,6 +77,13 @@ int main(int argc, char **argv)
|
||||
WSAStartup(wVersionRequested, &wsaData);
|
||||
#endif
|
||||
|
||||
status = ares_library_init(ARES_LIB_INIT_ALL);
|
||||
if (status != ARES_SUCCESS)
|
||||
{
|
||||
fprintf(stderr, "ares_library_init: %s\n", ares_strerror(status));
|
||||
return 1;
|
||||
}
|
||||
|
||||
while ((c = ares_getopt(argc,argv,"dt:h")) != -1)
|
||||
{
|
||||
switch (c)
|
||||
@@ -146,6 +154,8 @@ int main(int argc, char **argv)
|
||||
|
||||
ares_destroy(channel);
|
||||
|
||||
ares_library_cleanup();
|
||||
|
||||
#ifdef USE_WINSOCK
|
||||
WSACleanup();
|
||||
#endif
|
||||
|
23
ares/ares.h
23
ares/ares.h
@@ -19,6 +19,10 @@
|
||||
#ifndef ARES__H
|
||||
#define ARES__H
|
||||
|
||||
#include "ares_version.h" /* c-ares version defines */
|
||||
#include "ares_build.h" /* c-ares build definitions */
|
||||
#include "ares_rules.h" /* c-ares rules enforcement */
|
||||
|
||||
/*
|
||||
* Define WIN32 when build target is Win32 API
|
||||
*/
|
||||
@@ -82,6 +86,7 @@ extern "C" {
|
||||
#define ARES_ENOMEM 15
|
||||
#define ARES_EDESTRUCTION 16
|
||||
#define ARES_EBADSTR 17
|
||||
#define ARES_ECANCELLED 21
|
||||
|
||||
/* ares_getnameinfo error codes */
|
||||
#define ARES_EBADFLAGS 18
|
||||
@@ -90,6 +95,13 @@ extern "C" {
|
||||
#define ARES_ENONAME 19
|
||||
#define ARES_EBADHINTS 20
|
||||
|
||||
/* Uninitialized library error code */
|
||||
#define ARES_ENOTINITIALIZED 21
|
||||
|
||||
/* ares_library_init error codes */
|
||||
#define ARES_ELOADIPHLPAPI 22
|
||||
#define ARES_EADDRGETNETWORKPARAMS 23
|
||||
|
||||
/* Flag values */
|
||||
#define ARES_FLAG_USEVC (1 << 0)
|
||||
#define ARES_FLAG_PRIMARY (1 << 1)
|
||||
@@ -158,6 +170,11 @@ extern "C" {
|
||||
#define ARES_GETSOCK_WRITABLE(bits,num) (bits & (1 << ((num) + \
|
||||
ARES_GETSOCK_MAXNUM)))
|
||||
|
||||
/* c-ares library initialization flag values */
|
||||
#define ARES_LIB_INIT_NONE (0)
|
||||
#define ARES_LIB_INIT_WIN32 (1 << 0)
|
||||
#define ARES_LIB_INIT_ALL (ARES_LIB_INIT_WIN32)
|
||||
|
||||
|
||||
/*
|
||||
* Typedef our socket type
|
||||
@@ -232,6 +249,10 @@ typedef void (*ares_nameinfo_callback)(void *arg, int status, int timeouts,
|
||||
typedef int (*ares_sock_create_callback)(ares_socket_t socket_fd,
|
||||
int type, void *data);
|
||||
|
||||
int ares_library_init(int flags);
|
||||
void ares_library_cleanup(void);
|
||||
const char *ares_version(int *version);
|
||||
|
||||
int ares_init(ares_channel *channelptr);
|
||||
int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
int optmask);
|
||||
@@ -257,7 +278,7 @@ int ares_gethostbyname_file(ares_channel channel, const char *name,
|
||||
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,
|
||||
socklen_t salen, int flags,
|
||||
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);
|
||||
|
@@ -54,14 +54,14 @@ void ares__close_sockets(ares_channel channel, struct server_state *server)
|
||||
if (server->tcp_socket != ARES_SOCKET_BAD)
|
||||
{
|
||||
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_connection_generation = ++channel->tcp_connection_generation;
|
||||
}
|
||||
if (server->udp_socket != ARES_SOCKET_BAD)
|
||||
{
|
||||
SOCK_STATE_CALLBACK(channel, server->udp_socket, 0, 0);
|
||||
closesocket(server->udp_socket);
|
||||
sclose(server->udp_socket);
|
||||
server->udp_socket = ARES_SOCKET_BAD;
|
||||
}
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
|
||||
int status, linesize, end_at_hostname, naliases;
|
||||
struct in_addr addr;
|
||||
struct in6_addr addr6;
|
||||
int addrlen = sizeof(struct in_addr);
|
||||
size_t addrlen = sizeof(struct in_addr);
|
||||
struct hostent *hostent = NULL;
|
||||
|
||||
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
|
||||
@@ -68,17 +68,21 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
|
||||
*p = 0;
|
||||
addr.s_addr = inet_addr(line);
|
||||
if (addr.s_addr == INADDR_NONE)
|
||||
{
|
||||
if (ares_inet_pton(AF_INET6, line, &addr6) > 0)
|
||||
{
|
||||
if (family != AF_INET6)
|
||||
continue;
|
||||
addrlen = sizeof(struct in6_addr);
|
||||
}
|
||||
else
|
||||
continue;
|
||||
}
|
||||
{
|
||||
/* 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;
|
||||
|
||||
/* Get the canonical hostname. */
|
||||
@@ -158,7 +162,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
|
||||
hostent->h_aliases[naliases] = NULL;
|
||||
|
||||
hostent->h_addrtype = family;
|
||||
hostent->h_length = addrlen;
|
||||
hostent->h_length = (int)addrlen;
|
||||
if (family == AF_INET)
|
||||
memcpy(hostent->h_addr_list[0], &addr, addrlen);
|
||||
else if (family == AF_INET6)
|
||||
|
253
ares/ares_build.h.dist
Normal file
253
ares/ares_build.h.dist
Normal file
@@ -0,0 +1,253 @@
|
||||
#ifndef __CARES_BUILD_H
|
||||
#define __CARES_BUILD_H
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 2009 by Daniel Stenberg et al
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/* ================================================================ */
|
||||
/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* NOTE 1:
|
||||
* -------
|
||||
*
|
||||
* See file ares_build.h.in, run configure, and forget that this file
|
||||
* exists it is only used for non-configure systems.
|
||||
* But you can keep reading if you want ;-)
|
||||
*
|
||||
*/
|
||||
|
||||
/* ================================================================ */
|
||||
/* NOTES FOR NON-CONFIGURE SYSTEMS */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* NOTE 1:
|
||||
* -------
|
||||
*
|
||||
* Nothing in this file is intended to be modified or adjusted by the
|
||||
* c-ares library user nor by the c-ares library builder.
|
||||
*
|
||||
* If you think that something actually needs to be changed, adjusted
|
||||
* or fixed in this file, then, report it on the c-ares development
|
||||
* mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/
|
||||
*
|
||||
* Try to keep one section per platform, compiler and architecture,
|
||||
* otherwise, if an existing section is reused for a different one and
|
||||
* later on the original is adjusted, probably the piggybacking one can
|
||||
* be adversely changed.
|
||||
*
|
||||
* In order to differentiate between platforms/compilers/architectures
|
||||
* use only compiler built in predefined preprocessor symbols.
|
||||
*
|
||||
* This header file shall only export symbols which are 'cares' or 'CARES'
|
||||
* prefixed, otherwise public name space would be polluted.
|
||||
*
|
||||
* NOTE 2:
|
||||
* -------
|
||||
*
|
||||
* Right now you might be staring at file ares_build.h.dist or ares_build.h,
|
||||
* this is due to the following reason: file ares_build.h.dist is renamed
|
||||
* to ares_build.h when the c-ares source code distribution archive file is
|
||||
* created.
|
||||
*
|
||||
* File ares_build.h.dist is not included in the distribution archive.
|
||||
* File ares_build.h is not present in the CVS tree.
|
||||
*
|
||||
* The distributed ares_build.h file is only intended to be used on systems
|
||||
* which can not run the also distributed configure script.
|
||||
*
|
||||
* On systems capable of running the configure script, the configure process
|
||||
* will overwrite the distributed ares_build.h file with one that is suitable
|
||||
* and specific to the library being configured and built, which is generated
|
||||
* from the ares_build.h.in template file.
|
||||
*
|
||||
* If you check out from CVS on a non-configure platform, you must run the
|
||||
* appropriate buildconf* script to set up ares_build.h and other local files.
|
||||
*
|
||||
*/
|
||||
|
||||
/* ================================================================ */
|
||||
/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
|
||||
/* ================================================================ */
|
||||
|
||||
#ifdef CARES_SIZEOF_LONG
|
||||
# error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h"
|
||||
Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CARES_TYPEOF_ARES_SOCKLEN_T
|
||||
# error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
|
||||
Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CARES_SIZEOF_ARES_SOCKLEN_T
|
||||
# error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
|
||||
Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined
|
||||
#endif
|
||||
|
||||
/* ================================================================ */
|
||||
/* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */
|
||||
/* ================================================================ */
|
||||
|
||||
#if defined(__DJGPP__) || defined(__GO32__)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T int
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__SALFORDC__)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T int
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T int
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__TURBOC__)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T int
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T int
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__POCC__)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T int
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__LCC__)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T int
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__SYMBIAN32__)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__MWERKS__)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T int
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
|
||||
#elif defined(_WIN32_WCE)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T int
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__MINGW32__)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T int
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__VMS)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
|
||||
#elif defined(__OS400__)
|
||||
# if defined(__ILEC400__)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
# define CARES_PULL_SYS_TYPES_H 1
|
||||
# define CARES_PULL_SYS_SOCKET_H 1
|
||||
# endif
|
||||
|
||||
#elif defined(__MVS__)
|
||||
# if defined(__IBMC__) || defined(__IBMCPP__)
|
||||
# if defined(_ILP32)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# elif defined(_LP64)
|
||||
# define CARES_SIZEOF_LONG 8
|
||||
# endif
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
# define CARES_PULL_SYS_TYPES_H 1
|
||||
# define CARES_PULL_SYS_SOCKET_H 1
|
||||
# endif
|
||||
|
||||
#elif defined(__370__)
|
||||
# if defined(__IBMC__) || defined(__IBMCPP__)
|
||||
# if defined(_ILP32)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# elif defined(_LP64)
|
||||
# define CARES_SIZEOF_LONG 8
|
||||
# endif
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
# define CARES_PULL_SYS_TYPES_H 1
|
||||
# define CARES_PULL_SYS_SOCKET_H 1
|
||||
# endif
|
||||
|
||||
#elif defined(TPF)
|
||||
# define CARES_SIZEOF_LONG 8
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T int
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
|
||||
/* ===================================== */
|
||||
/* KEEP MSVC THE PENULTIMATE ENTRY */
|
||||
/* ===================================== */
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T int
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
|
||||
/* ===================================== */
|
||||
/* KEEP GENERIC GCC THE LAST ENTRY */
|
||||
/* ===================================== */
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
# if defined(__i386__) || defined(__ppc__)
|
||||
# define CARES_SIZEOF_LONG 4
|
||||
# elif defined(__x86_64__) || defined(__ppc64__)
|
||||
# define CARES_SIZEOF_LONG 8
|
||||
# endif
|
||||
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
|
||||
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
|
||||
# define CARES_PULL_SYS_TYPES_H 1
|
||||
# define CARES_PULL_SYS_SOCKET_H 1
|
||||
|
||||
#else
|
||||
# error "Unknown non-configure build target!"
|
||||
Error Compilation_aborted_Unknown_non_configure_build_target
|
||||
#endif
|
||||
|
||||
/* CARES_PULL_SYS_TYPES_H is defined above when inclusion of header file */
|
||||
/* sys/types.h is required here to properly make type definitions below. */
|
||||
#ifdef CARES_PULL_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/* CARES_PULL_SYS_SOCKET_H is defined above when inclusion of header file */
|
||||
/* sys/socket.h is required here to properly make type definitions below. */
|
||||
#ifdef CARES_PULL_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
/* Data type definition of ares_socklen_t. */
|
||||
|
||||
#ifdef CARES_TYPEOF_ARES_SOCKLEN_T
|
||||
typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;
|
||||
#endif
|
||||
|
||||
#endif /* __CARES_BUILD_H */
|
111
ares/ares_build.h.in
Normal file
111
ares/ares_build.h.in
Normal file
@@ -0,0 +1,111 @@
|
||||
#ifndef __CARES_BUILD_H
|
||||
#define __CARES_BUILD_H
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 2009 by Daniel Stenberg et al
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/* ================================================================ */
|
||||
/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* NOTE 1:
|
||||
* -------
|
||||
*
|
||||
* Nothing in this file is intended to be modified or adjusted by the
|
||||
* c-ares library user nor by the c-ares library builder.
|
||||
*
|
||||
* If you think that something actually needs to be changed, adjusted
|
||||
* or fixed in this file, then, report it on the c-ares development
|
||||
* mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/
|
||||
*
|
||||
* This header file shall only export symbols which are 'cares' or 'CARES'
|
||||
* prefixed, otherwise public name space would be polluted.
|
||||
*
|
||||
* NOTE 2:
|
||||
* -------
|
||||
*
|
||||
* Right now you might be staring at file ares_build.h.in or ares_build.h,
|
||||
* this is due to the following reason:
|
||||
*
|
||||
* On systems capable of running the configure script, the configure process
|
||||
* will overwrite the distributed ares_build.h file with one that is suitable
|
||||
* and specific to the library being configured and built, which is generated
|
||||
* from the ares_build.h.in template file.
|
||||
*
|
||||
*/
|
||||
|
||||
/* ================================================================ */
|
||||
/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
|
||||
/* ================================================================ */
|
||||
|
||||
#ifdef CARES_SIZEOF_LONG
|
||||
# error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h"
|
||||
Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CARES_TYPEOF_ARES_SOCKLEN_T
|
||||
# error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
|
||||
Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined
|
||||
#endif
|
||||
|
||||
#ifdef CARES_SIZEOF_ARES_SOCKLEN_T
|
||||
# error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
|
||||
Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined
|
||||
#endif
|
||||
|
||||
/* ================================================================ */
|
||||
/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
|
||||
/* ================================================================ */
|
||||
|
||||
/* Configure process defines this to 1 when it finds out that system */
|
||||
/* header file ws2tcpip.h must be included by the external interface. */
|
||||
#undef CARES_PULL_WS2TCPIP_H
|
||||
#ifdef CARES_PULL_WS2TCPIP_H
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
/* Configure process defines this to 1 when it finds out that system */
|
||||
/* header file sys/types.h must be included by the external interface. */
|
||||
#undef CARES_PULL_SYS_TYPES_H
|
||||
#ifdef CARES_PULL_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/* Configure process defines this to 1 when it finds out that system */
|
||||
/* header file sys/socket.h must be included by the external interface. */
|
||||
#undef CARES_PULL_SYS_SOCKET_H
|
||||
#ifdef CARES_PULL_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#undef CARES_SIZEOF_LONG
|
||||
|
||||
/* Integral data type used for ares_socklen_t. */
|
||||
#undef CARES_TYPEOF_ARES_SOCKLEN_T
|
||||
|
||||
/* The size of `ares_socklen_t', as computed by sizeof. */
|
||||
#undef CARES_SIZEOF_ARES_SOCKLEN_T
|
||||
|
||||
/* Data type definition of ares_socklen_t. */
|
||||
typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;
|
||||
|
||||
#endif /* __CARES_BUILD_H */
|
@@ -27,7 +27,7 @@ ares_cancel \- Cancel a resolve
|
||||
The \fBares_cancel\fP function cancels all lookups/requests made on the the
|
||||
name service channel identified by \fIchannel\fP. \fBares_cancel\fP invokes
|
||||
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
|
||||
might have been stored in their arguments.
|
||||
.SH SEE ALSO
|
||||
@@ -35,5 +35,10 @@ might have been stored in their arguments.
|
||||
.BR ares_destroy (3)
|
||||
.SH NOTES
|
||||
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
|
||||
Dirk Manske
|
||||
|
@@ -36,7 +36,7 @@ void ares_cancel(ares_channel channel)
|
||||
{
|
||||
query = list_node->data;
|
||||
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);
|
||||
}
|
||||
#ifndef NDEBUG
|
||||
|
@@ -1,6 +1,6 @@
|
||||
.\" $Id$
|
||||
.\"
|
||||
.\" Copyright (C) 2007-2008 by Daniel Stenberg
|
||||
.\" Copyright (C) 2004-2009 by Daniel Stenberg
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this
|
||||
.\" software and its documentation for any purpose and without
|
||||
@@ -14,7 +14,7 @@
|
||||
.\" this software for any purpose. It is provided "as is"
|
||||
.\" without express or implied warranty.
|
||||
.\"
|
||||
.TH ARES_DUP 3 "2 Dec 2008"
|
||||
.TH ARES_DUP 3 "26 May 2009"
|
||||
.SH NAME
|
||||
ares_dup \- Duplicate a resolver channel
|
||||
.SH SYNOPSIS
|
||||
@@ -35,7 +35,8 @@ with additional options set exactly as the \fIsource\fP channel has them
|
||||
configured.
|
||||
.SH SEE ALSO
|
||||
.BR ares_destroy(3),
|
||||
.BR ares_init(3)
|
||||
.BR ares_init(3),
|
||||
.BR ares_library_init(3)
|
||||
.SH AVAILABILITY
|
||||
ares_dup(3) was added in c-ares 1.6.0
|
||||
.SH AUTHOR
|
||||
|
@@ -145,16 +145,23 @@ static void addr_callback(void *arg, int status, int timeouts,
|
||||
{
|
||||
struct addr_query *aquery = (struct addr_query *) arg;
|
||||
struct hostent *host;
|
||||
size_t addrlen;
|
||||
|
||||
aquery->timeouts += timeouts;
|
||||
if (status == ARES_SUCCESS)
|
||||
{
|
||||
if (aquery->addr.family == AF_INET)
|
||||
status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV4,
|
||||
sizeof(struct in_addr), AF_INET, &host);
|
||||
{
|
||||
addrlen = sizeof(struct in_addr);
|
||||
status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV4,
|
||||
(int)addrlen, AF_INET, &host);
|
||||
}
|
||||
else
|
||||
status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV6,
|
||||
sizeof(struct in6_addr), AF_INET6, &host);
|
||||
{
|
||||
addrlen = sizeof(struct in6_addr);
|
||||
status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV6,
|
||||
(int)addrlen, AF_INET6, &host);
|
||||
}
|
||||
end_aquery(aquery, status, host);
|
||||
}
|
||||
else if (status == ARES_EDESTRUCTION)
|
||||
|
@@ -61,7 +61,8 @@ struct host_query {
|
||||
char *name;
|
||||
ares_host_callback callback;
|
||||
void *arg;
|
||||
int family;
|
||||
int sent_family; /* this family is what was is being used */
|
||||
int want_family; /* this family is what is asked for in the API */
|
||||
const char *remaining_lookups;
|
||||
int timeouts;
|
||||
};
|
||||
@@ -71,29 +72,34 @@ static void host_callback(void *arg, int status, int timeouts,
|
||||
unsigned char *abuf, int alen);
|
||||
static void end_hquery(struct host_query *hquery, int status,
|
||||
struct hostent *host);
|
||||
static int fake_hostent(const char *name, int family, ares_host_callback callback,
|
||||
void *arg);
|
||||
static int fake_hostent(const char *name, int family,
|
||||
ares_host_callback callback, void *arg);
|
||||
static int file_lookup(const char *name, int family, struct hostent **host);
|
||||
static void sort_addresses(struct hostent *host, const struct apattern *sortlist,
|
||||
int nsort);
|
||||
static void sort6_addresses(struct hostent *host, const struct apattern *sortlist,
|
||||
int nsort);
|
||||
static int get_address_index(const struct in_addr *addr, const struct apattern *sortlist,
|
||||
int nsort);
|
||||
static int get6_address_index(const struct in6_addr *addr, const struct apattern *sortlist,
|
||||
int nsort);
|
||||
static void sort_addresses(struct hostent *host,
|
||||
const struct apattern *sortlist, int nsort);
|
||||
static void sort6_addresses(struct hostent *host,
|
||||
const struct apattern *sortlist, int nsort);
|
||||
static int get_address_index(const struct in_addr *addr,
|
||||
const struct apattern *sortlist, int nsort);
|
||||
static int get6_address_index(const struct in6_addr *addr,
|
||||
const struct apattern *sortlist, int nsort);
|
||||
|
||||
void ares_gethostbyname(ares_channel channel, const char *name, int family,
|
||||
ares_host_callback callback, void *arg)
|
||||
{
|
||||
struct host_query *hquery;
|
||||
|
||||
/* Right now we only know how to look up Internet addresses. */
|
||||
if (family != AF_INET && family != AF_INET6)
|
||||
{
|
||||
callback(arg, ARES_ENOTIMP, 0, NULL);
|
||||
return;
|
||||
}
|
||||
/* Right now we only know how to look up Internet addresses - and unspec
|
||||
means try both basically. */
|
||||
switch (family) {
|
||||
case AF_INET:
|
||||
case AF_INET6:
|
||||
case AF_UNSPEC:
|
||||
break;
|
||||
default:
|
||||
callback(arg, ARES_ENOTIMP, 0, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (fake_hostent(name, family, callback, arg))
|
||||
return;
|
||||
@@ -107,13 +113,13 @@ void ares_gethostbyname(ares_channel channel, const char *name, int family,
|
||||
}
|
||||
hquery->channel = channel;
|
||||
hquery->name = strdup(name);
|
||||
hquery->family = family;
|
||||
if (!hquery->name)
|
||||
{
|
||||
free(hquery);
|
||||
callback(arg, ARES_ENOMEM, 0, NULL);
|
||||
return;
|
||||
}
|
||||
hquery->want_family = family;
|
||||
hquery->sent_family = -1; /* nothing is sent yet */
|
||||
if (!hquery->name) {
|
||||
free(hquery);
|
||||
callback(arg, ARES_ENOMEM, 0, NULL);
|
||||
return;
|
||||
}
|
||||
hquery->callback = callback;
|
||||
hquery->arg = arg;
|
||||
hquery->remaining_lookups = channel->lookups;
|
||||
@@ -136,17 +142,23 @@ static void next_lookup(struct host_query *hquery, int status_code)
|
||||
case 'b':
|
||||
/* DNS lookup */
|
||||
hquery->remaining_lookups = p + 1;
|
||||
if (hquery->family == AF_INET6)
|
||||
if ((hquery->want_family == AF_INET6) ||
|
||||
(hquery->want_family == AF_UNSPEC)) {
|
||||
/* if inet6 or unspec, start out with AAAA */
|
||||
hquery->sent_family = AF_INET6;
|
||||
ares_search(hquery->channel, hquery->name, C_IN, T_AAAA,
|
||||
host_callback, hquery);
|
||||
else
|
||||
}
|
||||
else {
|
||||
hquery->sent_family = AF_INET;
|
||||
ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback,
|
||||
hquery);
|
||||
}
|
||||
return;
|
||||
|
||||
case 'f':
|
||||
/* Host file lookup */
|
||||
status = file_lookup(hquery->name, hquery->family, &host);
|
||||
status = file_lookup(hquery->name, hquery->want_family, &host);
|
||||
|
||||
/* this status check below previously checked for !ARES_ENOTFOUND,
|
||||
but we should not assume that this single error code is the one
|
||||
@@ -173,33 +185,34 @@ static void host_callback(void *arg, int status, int timeouts,
|
||||
hquery->timeouts += timeouts;
|
||||
if (status == ARES_SUCCESS)
|
||||
{
|
||||
if (hquery->family == AF_INET)
|
||||
if (hquery->sent_family == AF_INET)
|
||||
{
|
||||
status = ares_parse_a_reply(abuf, alen, &host, NULL, NULL);
|
||||
if (host && channel->nsort)
|
||||
sort_addresses(host, channel->sortlist, channel->nsort);
|
||||
}
|
||||
else if (hquery->family == AF_INET6)
|
||||
else if (hquery->sent_family == AF_INET6)
|
||||
{
|
||||
status = ares_parse_aaaa_reply(abuf, alen, &host, NULL, NULL);
|
||||
if (status == ARES_ENODATA)
|
||||
{
|
||||
/* The query returned something (e.g. CNAME) but there were no
|
||||
AAAA records. Try looking up A instead. */
|
||||
hquery->family = AF_INET;
|
||||
ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback,
|
||||
hquery);
|
||||
return;
|
||||
}
|
||||
if (status == ARES_ENODATA || status == ARES_EBADRESP) {
|
||||
/* The query returned something but either there were no AAAA records (e.g. just CNAME)
|
||||
or the response was malformed. Try looking up A instead.
|
||||
We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */
|
||||
hquery->sent_family = AF_INET;
|
||||
ares_search(hquery->channel, hquery->name, C_IN, T_A,
|
||||
host_callback, hquery);
|
||||
return;
|
||||
}
|
||||
if (host && channel->nsort)
|
||||
sort6_addresses(host, channel->sortlist, channel->nsort);
|
||||
}
|
||||
end_hquery(hquery, status, host);
|
||||
}
|
||||
else if (status == ARES_ENODATA && hquery->family == AF_INET6)
|
||||
else if ((status == ARES_ENODATA || status == ARES_EBADRESP || status == ARES_ETIMEOUT) && hquery->sent_family == AF_INET6)
|
||||
{
|
||||
/* There was no AAAA. Now lookup an A */
|
||||
hquery->family = AF_INET;
|
||||
/* The AAAA query yielded no useful result. Now look up an A instead.
|
||||
We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */
|
||||
hquery->sent_family = AF_INET;
|
||||
ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback,
|
||||
hquery);
|
||||
}
|
||||
@@ -262,12 +275,12 @@ static int fake_hostent(const char *name, int family, ares_host_callback callbac
|
||||
|
||||
if (family == AF_INET)
|
||||
{
|
||||
hostent.h_length = sizeof(struct in_addr);
|
||||
hostent.h_length = (int)sizeof(struct in_addr);
|
||||
addrs[0] = (char *)∈
|
||||
}
|
||||
else if (family == AF_INET6)
|
||||
{
|
||||
hostent.h_length = sizeof(struct in6_addr);
|
||||
hostent.h_length = (int)sizeof(struct in6_addr);
|
||||
addrs[0] = (char *)&in6;
|
||||
}
|
||||
/* Duplicate the name, to avoid a constness violation. */
|
||||
|
@@ -14,7 +14,7 @@
|
||||
.\" this software for any purpose. It is provided "as is"
|
||||
.\" without express or implied warranty.
|
||||
.\"
|
||||
.TH ARES_GETNAMEINFO 3 "16 May 2005"
|
||||
.TH ARES_GETNAMEINFO 3 "1 May 2009"
|
||||
.SH NAME
|
||||
ares_getnameinfo \- Address-to-nodename translation in protocol-independent manner
|
||||
.SH SYNOPSIS
|
||||
@@ -25,7 +25,7 @@ ares_getnameinfo \- Address-to-nodename translation in protocol-independent mann
|
||||
.B int \fItimeouts\fP, char *\fInode\fP, char *\fIservice\fP)
|
||||
.PP
|
||||
.B void ares_getnameinfo(ares_channel \fIchannel\fP, const struct sockaddr *\fIsa\fP,
|
||||
.B socklen_t \fIsalen\fP, int \fIflags\fP, ares_nameinfo_callback \fIcallback\fP,
|
||||
.B ares_socklen_t \fIsalen\fP, int \fIflags\fP, ares_nameinfo_callback \fIcallback\fP,
|
||||
.B void *\fIarg\fP)
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
|
@@ -92,7 +92,8 @@ static void append_scopeid(struct sockaddr_in6 *addr6, unsigned int scopeid,
|
||||
#endif
|
||||
static char *ares_striendstr(const char *s1, const char *s2);
|
||||
|
||||
void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa, socklen_t salen,
|
||||
void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
|
||||
ares_socklen_t salen,
|
||||
int flags, ares_nameinfo_callback callback, void *arg)
|
||||
{
|
||||
struct sockaddr_in *addr = NULL;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
.\" $Id$
|
||||
.\"
|
||||
.\" 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
|
||||
.\" software and its documentation for any purpose and without
|
||||
@@ -15,7 +15,7 @@
|
||||
.\" this software for any purpose. It is provided "as is"
|
||||
.\" without express or implied warranty.
|
||||
.\"
|
||||
.TH ARES_INIT 3 "13 May 2008"
|
||||
.TH ARES_INIT 3 "26 May 2009"
|
||||
.SH NAME
|
||||
ares_init, ares_init_options \- Initialize a resolver channel
|
||||
.SH SYNOPSIS
|
||||
@@ -184,10 +184,16 @@ A configuration file could not be read.
|
||||
.TP 14
|
||||
.B ARES_ENOMEM
|
||||
The process's available memory was exhausted.
|
||||
.TP 14
|
||||
.B ARES_ENOTINITIALIZED
|
||||
c-ares library initialization not yet performed.
|
||||
.SH SEE ALSO
|
||||
.BR ares_destroy(3),
|
||||
.BR ares_dup(3)
|
||||
.BR ares_dup(3),
|
||||
.BR ares_library_init(3)
|
||||
.SH AUTHOR
|
||||
Greg Hudson, MIT Information Systems
|
||||
.br
|
||||
Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
.br
|
||||
Copyright (C) 2004-2009 by Daniel Stenberg.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2007-2008 by Daniel Stenberg
|
||||
* Copyright (C) 2007-2009 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include <iphlpapi.h>
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
@@ -68,6 +67,7 @@
|
||||
#include <errno.h>
|
||||
#include "ares.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_library_init.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
#ifdef WATT32
|
||||
@@ -129,6 +129,9 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
curl_memlimit(atoi(env));
|
||||
#endif
|
||||
|
||||
if (ares_library_initialized() != ARES_SUCCESS)
|
||||
return ARES_ENOTINITIALIZED;
|
||||
|
||||
channel = malloc(sizeof(struct ares_channeldata));
|
||||
if (!channel) {
|
||||
*channelptr = NULL;
|
||||
@@ -198,12 +201,15 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
DEBUGF(fprintf(stderr, "Error: init_by_resolv_conf failed: %s\n",
|
||||
ares_strerror(status)));
|
||||
}
|
||||
if (status == ARES_SUCCESS) {
|
||||
status = init_by_defaults(channel);
|
||||
if (status != ARES_SUCCESS)
|
||||
DEBUGF(fprintf(stderr, "Error: init_by_defaults failed: %s\n",
|
||||
ares_strerror(status)));
|
||||
}
|
||||
|
||||
/*
|
||||
* No matter what failed or succeeded, seed defaults to provide
|
||||
* useful behavior for things that we missed.
|
||||
*/
|
||||
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 */
|
||||
|
||||
@@ -559,11 +565,8 @@ static int get_res_interfaces_nt(HKEY hKey, const char *subkey, char **obuf)
|
||||
|
||||
static int get_iphlpapi_dns_info (char *ret_buf, size_t ret_size)
|
||||
{
|
||||
FIXED_INFO *fi = alloca (sizeof(*fi));
|
||||
FIXED_INFO *fi, *newfi;
|
||||
DWORD size = sizeof (*fi);
|
||||
typedef DWORD (WINAPI* get_net_param_func) (FIXED_INFO*, DWORD*);
|
||||
get_net_param_func fpGetNetworkParams; /* available only on Win-98/2000+ */
|
||||
HMODULE handle;
|
||||
IP_ADDR_STRING *ipAddr;
|
||||
int i, count = 0;
|
||||
int debug = 0;
|
||||
@@ -572,23 +575,21 @@ static int get_iphlpapi_dns_info (char *ret_buf, size_t ret_size)
|
||||
char *ret = ret_buf;
|
||||
HRESULT res;
|
||||
|
||||
fi = malloc(size);
|
||||
if (!fi)
|
||||
return (0);
|
||||
|
||||
handle = LoadLibrary ("iphlpapi.dll");
|
||||
if (!handle)
|
||||
return (0);
|
||||
|
||||
fpGetNetworkParams = (get_net_param_func) GetProcAddress (handle, "GetNetworkParams");
|
||||
if (!fpGetNetworkParams)
|
||||
goto quit;
|
||||
return 0;
|
||||
|
||||
res = (*fpGetNetworkParams) (fi, &size);
|
||||
if ((res != ERROR_BUFFER_OVERFLOW) && (res != ERROR_SUCCESS))
|
||||
goto quit;
|
||||
|
||||
fi = alloca (size);
|
||||
if (!fi || (*fpGetNetworkParams) (fi, &size) != ERROR_SUCCESS)
|
||||
newfi = realloc(fi, size);
|
||||
if (!newfi)
|
||||
goto quit;
|
||||
|
||||
fi = newfi;
|
||||
res = (*fpGetNetworkParams) (fi, &size);
|
||||
if (res != ERROR_SUCCESS)
|
||||
goto quit;
|
||||
|
||||
if (debug)
|
||||
@@ -621,14 +622,14 @@ static int get_iphlpapi_dns_info (char *ret_buf, size_t ret_size)
|
||||
}
|
||||
|
||||
quit:
|
||||
if (handle)
|
||||
FreeLibrary (handle);
|
||||
if (fi)
|
||||
free(fi);
|
||||
|
||||
if (debug && left <= ip_size)
|
||||
printf ("Too many nameservers. Truncating to %d addressess", count);
|
||||
if (ret > ret_buf)
|
||||
ret[-1] = '\0';
|
||||
return (count);
|
||||
return count;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1490,15 +1491,13 @@ static void randomize_key(unsigned char* key,int key_data_len)
|
||||
int randomized = 0;
|
||||
int counter=0;
|
||||
#ifdef WIN32
|
||||
HMODULE lib=LoadLibrary("ADVAPI32.DLL");
|
||||
if (lib) {
|
||||
BOOLEAN (APIENTRY *pfn)(void*, ULONG) =
|
||||
(BOOLEAN (APIENTRY *)(void*,ULONG))GetProcAddress(lib,"SystemFunction036");
|
||||
if (pfn && pfn(key,key_data_len) )
|
||||
randomized = 1;
|
||||
|
||||
FreeLibrary(lib);
|
||||
}
|
||||
BOOLEAN res;
|
||||
if (fpSystemFunction036)
|
||||
{
|
||||
res = (*fpSystemFunction036) (key, key_data_len);
|
||||
if (res)
|
||||
randomized = 1;
|
||||
}
|
||||
#else /* !WIN32 */
|
||||
#ifdef RANDOM_FILE
|
||||
FILE *f = fopen(RANDOM_FILE, "rb");
|
||||
|
@@ -49,7 +49,7 @@ struct addrinfo
|
||||
int ai_family;
|
||||
int ai_socktype;
|
||||
int ai_protocol;
|
||||
socklen_t ai_addrlen; /* Follow rfc3493 struct addrinfo */
|
||||
ares_socklen_t ai_addrlen; /* Follow rfc3493 struct addrinfo */
|
||||
char *ai_canonname;
|
||||
struct sockaddr *ai_addr;
|
||||
struct addrinfo *ai_next;
|
||||
|
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.
|
133
ares/ares_library_init.c
Normal file
133
ares/ares_library_init.c
Normal file
@@ -0,0 +1,133 @@
|
||||
/* $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.
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_library_init.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
/* library-private global and unique instance vars */
|
||||
|
||||
#ifdef WIN32
|
||||
fpGetNetworkParams_t fpGetNetworkParams = ZERO_NULL;
|
||||
fpSystemFunction036_t fpSystemFunction036 = ZERO_NULL;
|
||||
#endif
|
||||
|
||||
/* library-private global vars with source visibility restricted to this file */
|
||||
|
||||
static unsigned int ares_initialized;
|
||||
static int ares_init_flags;
|
||||
|
||||
#ifdef WIN32
|
||||
static HMODULE hnd_iphlpapi;
|
||||
static HMODULE hnd_advapi32;
|
||||
#endif
|
||||
|
||||
|
||||
static int ares_win32_init(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
|
||||
hnd_iphlpapi = 0;
|
||||
hnd_iphlpapi = LoadLibrary("iphlpapi.dll");
|
||||
if (!hnd_iphlpapi)
|
||||
return ARES_ELOADIPHLPAPI;
|
||||
|
||||
fpGetNetworkParams = (fpGetNetworkParams_t)
|
||||
GetProcAddress(hnd_iphlpapi, "GetNetworkParams");
|
||||
if (!fpGetNetworkParams)
|
||||
{
|
||||
FreeLibrary(hnd_iphlpapi);
|
||||
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 = LoadLibrary("advapi32.dll");
|
||||
if (hnd_advapi32)
|
||||
{
|
||||
fpSystemFunction036 = (fpSystemFunction036_t)
|
||||
GetProcAddress(hnd_advapi32, "SystemFunction036");
|
||||
}
|
||||
|
||||
#endif
|
||||
return ARES_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static void ares_win32_cleanup(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
if (hnd_advapi32)
|
||||
FreeLibrary(hnd_advapi32);
|
||||
if (hnd_iphlpapi)
|
||||
FreeLibrary(hnd_iphlpapi);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int ares_library_init(int flags)
|
||||
{
|
||||
int res;
|
||||
|
||||
if (ares_initialized)
|
||||
return ARES_SUCCESS;
|
||||
ares_initialized++;
|
||||
|
||||
if (flags & ARES_LIB_INIT_WIN32)
|
||||
{
|
||||
res = ares_win32_init();
|
||||
if (res != ARES_SUCCESS)
|
||||
return res;
|
||||
}
|
||||
|
||||
ares_init_flags = flags;
|
||||
|
||||
return ARES_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
void ares_library_cleanup(void)
|
||||
{
|
||||
if (!ares_initialized)
|
||||
return;
|
||||
ares_initialized--;
|
||||
|
||||
if (ares_init_flags & ARES_LIB_INIT_WIN32)
|
||||
ares_win32_cleanup();
|
||||
|
||||
ares_init_flags = ARES_LIB_INIT_NONE;
|
||||
}
|
||||
|
||||
|
||||
int ares_library_initialized(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
if (!ares_initialized)
|
||||
return ARES_ENOTINITIALIZED;
|
||||
#endif
|
||||
return ARES_SUCCESS;
|
||||
}
|
||||
|
||||
|
40
ares/ares_library_init.h
Normal file
40
ares/ares_library_init.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef HEADER_CARES_LIBRARY_INIT_H
|
||||
#define HEADER_CARES_LIBRARY_INIT_H
|
||||
|
||||
/* $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.
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
#include <iphlpapi.h>
|
||||
|
||||
typedef DWORD (WINAPI *fpGetNetworkParams_t) (FIXED_INFO*, DWORD*);
|
||||
typedef BOOLEAN (APIENTRY *fpSystemFunction036_t) (void*, ULONG);
|
||||
|
||||
/* Forward-declaration of variables defined in ares_library_init.c */
|
||||
/* that are global and unique instances for whole c-ares library. */
|
||||
|
||||
extern fpGetNetworkParams_t fpGetNetworkParams;
|
||||
extern fpSystemFunction036_t fpSystemFunction036;
|
||||
|
||||
#endif /* WIN32 */
|
||||
|
||||
#endif /* HEADER_CARES_LIBRARY_INIT_H */
|
||||
|
@@ -44,7 +44,10 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#ifdef HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "ares_private.h"
|
||||
|
@@ -44,7 +44,10 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#ifdef HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "inet_net_pton.h"
|
||||
|
@@ -4,7 +4,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* 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
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -32,16 +32,11 @@
|
||||
|
||||
#if !defined(WIN32) || defined(WATT32)
|
||||
#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
|
||||
|
||||
#ifdef WATT32
|
||||
#include <tcp.h>
|
||||
#include <sys/ioctl.h>
|
||||
#undef closesocket
|
||||
#define closesocket(s) close_s(s)
|
||||
#define writev(s,v,c) writev_s(s,v,c)
|
||||
#define HAVE_WRITEV 1
|
||||
#endif
|
||||
@@ -310,6 +305,8 @@ int ares__timeadd(struct timeval *now,
|
||||
/* return time offset between now and (future) check, in milliseconds */
|
||||
long ares__timeoffset(struct timeval *now,
|
||||
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__send_query(ares_channel channel, struct query *query,
|
||||
struct timeval *now);
|
||||
@@ -338,8 +335,8 @@ long ares__tvdiff(struct timeval t1, struct timeval t2);
|
||||
#ifdef CURLDEBUG
|
||||
/* 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
|
||||
c-ares is built and linked with a similarly debug-build libcurl, but we do
|
||||
this anyway for convenience. */
|
||||
c-ares is built and linked with a similarly curldebug-enabled libcurl,
|
||||
but we do this anyway for convenience. */
|
||||
#include "../lib/memdebug.h"
|
||||
#endif
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* 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
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -104,7 +104,7 @@ static void end_query(ares_channel channel, struct query *query, int status,
|
||||
int ares__timedout(struct timeval *now,
|
||||
struct timeval *check)
|
||||
{
|
||||
int secs = (now->tv_sec - check->tv_sec);
|
||||
long secs = (now->tv_sec - check->tv_sec);
|
||||
|
||||
if(secs > 0)
|
||||
return 1; /* yes, timed out */
|
||||
@@ -429,7 +429,7 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
||||
unsigned char buf[PACKETSZ + 1];
|
||||
#ifdef HAVE_RECVFROM
|
||||
struct sockaddr_in from;
|
||||
socklen_t fromlen;
|
||||
ares_socklen_t fromlen;
|
||||
#endif
|
||||
|
||||
if(!read_fds && (read_fd == ARES_SOCKET_BAD))
|
||||
@@ -896,7 +896,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
||||
/* Configure it. */
|
||||
if (configure_socket(s, channel) < 0)
|
||||
{
|
||||
closesocket(s);
|
||||
sclose(s);
|
||||
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,
|
||||
(void *)&opt, sizeof(opt)) == -1)
|
||||
{
|
||||
closesocket(s);
|
||||
sclose(s);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
@@ -927,7 +927,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
||||
|
||||
if (err != EINPROGRESS && err != EWOULDBLOCK)
|
||||
{
|
||||
closesocket(s);
|
||||
sclose(s);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -938,7 +938,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
||||
channel->sock_create_cb_data);
|
||||
if (err < 0)
|
||||
{
|
||||
closesocket(s);
|
||||
sclose(s);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
@@ -963,7 +963,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server)
|
||||
/* Set the socket non-blocking. */
|
||||
if (configure_socket(s, channel) < 0)
|
||||
{
|
||||
closesocket(s);
|
||||
sclose(s);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -978,7 +978,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server)
|
||||
|
||||
if (err != EINPROGRESS && err != EWOULDBLOCK)
|
||||
{
|
||||
closesocket(s);
|
||||
sclose(s);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -989,7 +989,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server)
|
||||
channel->sock_create_cb_data);
|
||||
if (err < 0)
|
||||
{
|
||||
closesocket(s);
|
||||
sclose(s);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
145
ares/ares_rules.h
Normal file
145
ares/ares_rules.h
Normal file
@@ -0,0 +1,145 @@
|
||||
#ifndef __CARES_RULES_H
|
||||
#define __CARES_RULES_H
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 2009 by Daniel Stenberg et al
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/* ================================================================ */
|
||||
/* COMPILE TIME SANITY CHECKS */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* NOTE 1:
|
||||
* -------
|
||||
*
|
||||
* All checks done in this file are intentionally placed in a public
|
||||
* header file which is pulled by ares.h when an application is
|
||||
* being built using an already built c-ares library. Additionally
|
||||
* this file is also included and used when building the library.
|
||||
*
|
||||
* If compilation fails on this file it is certainly sure that the
|
||||
* problem is elsewhere. It could be a problem in the ares_build.h
|
||||
* header file, or simply that you are using different compilation
|
||||
* settings than those used to build the library.
|
||||
*
|
||||
* Nothing in this file is intended to be modified or adjusted by the
|
||||
* c-ares library user nor by the c-ares library builder.
|
||||
*
|
||||
* Do not deactivate any check, these are done to make sure that the
|
||||
* library is properly built and used.
|
||||
*
|
||||
* You can find further help on the c-ares development mailing list:
|
||||
* http://cool.haxx.se/mailman/listinfo/c-ares/
|
||||
*
|
||||
* NOTE 2
|
||||
* ------
|
||||
*
|
||||
* Some of the following compile time checks are based on the fact
|
||||
* that the dimension of a constant array can not be a negative one.
|
||||
* In this way if the compile time verification fails, the compilation
|
||||
* will fail issuing an error. The error description wording is compiler
|
||||
* dependant but it will be quite similar to one of the following:
|
||||
*
|
||||
* "negative subscript or subscript is too large"
|
||||
* "array must have at least one element"
|
||||
* "-1 is an illegal array size"
|
||||
* "size of array is negative"
|
||||
*
|
||||
* If you are building an application which tries to use an already
|
||||
* built c-ares library and you are getting this kind of errors on
|
||||
* this file, it is a clear indication that there is a mismatch between
|
||||
* how the library was built and how you are trying to use it for your
|
||||
* application. Your already compiled or binary library provider is the
|
||||
* only one who can give you the details you need to properly use it.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Verify that some macros are actually defined.
|
||||
*/
|
||||
|
||||
#ifndef CARES_SIZEOF_LONG
|
||||
# error "CARES_SIZEOF_LONG definition is missing!"
|
||||
Error Compilation_aborted_CARES_SIZEOF_LONG_is_missing
|
||||
#endif
|
||||
|
||||
#ifndef CARES_TYPEOF_ARES_SOCKLEN_T
|
||||
# error "CARES_TYPEOF_ARES_SOCKLEN_T definition is missing!"
|
||||
Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_is_missing
|
||||
#endif
|
||||
|
||||
#ifndef CARES_SIZEOF_ARES_SOCKLEN_T
|
||||
# error "CARES_SIZEOF_ARES_SOCKLEN_T definition is missing!"
|
||||
Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_is_missing
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Macros private to this header file.
|
||||
*/
|
||||
|
||||
#define CareschkszEQ(t, s) sizeof(t) == s ? 1 : -1
|
||||
|
||||
#define CareschkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1
|
||||
|
||||
/*
|
||||
* Verify that the size previously defined and expected for long
|
||||
* is the same as the one reported by sizeof() at compile time.
|
||||
*/
|
||||
|
||||
typedef char
|
||||
__cares_rule_01__
|
||||
[CareschkszEQ(long, CARES_SIZEOF_LONG)];
|
||||
|
||||
/*
|
||||
* Verify that the size previously defined and expected for
|
||||
* ares_socklen_t is actually the the same as the one reported
|
||||
* by sizeof() at compile time.
|
||||
*/
|
||||
|
||||
typedef char
|
||||
__cares_rule_02__
|
||||
[CareschkszEQ(ares_socklen_t, CARES_SIZEOF_ARES_SOCKLEN_T)];
|
||||
|
||||
/*
|
||||
* Verify at compile time that the size of ares_socklen_t as reported
|
||||
* by sizeof() is greater or equal than the one reported for int for
|
||||
* the current compilation.
|
||||
*/
|
||||
|
||||
typedef char
|
||||
__cares_rule_03__
|
||||
[CareschkszGE(ares_socklen_t, int)];
|
||||
|
||||
/* ================================================================ */
|
||||
/* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* Get rid of macros private to this header file.
|
||||
*/
|
||||
|
||||
#undef CareschkszEQ
|
||||
#undef CareschkszGE
|
||||
|
||||
/*
|
||||
* Get rid of macros not intended to exist beyond this point.
|
||||
*/
|
||||
|
||||
#undef CARES_PULL_WS2TCPIP_H
|
||||
#undef CARES_PULL_SYS_TYPES_H
|
||||
#undef CARES_PULL_SYS_SOCKET_H
|
||||
|
||||
#undef CARES_TYPEOF_ARES_SOCKLEN_T
|
||||
|
||||
#endif /* __CARES_RULES_H */
|
@@ -43,7 +43,10 @@ const char *ares_strerror(int code)
|
||||
"Misformatted string",
|
||||
"Illegal flags specified",
|
||||
"Given hostname is not numeric",
|
||||
"Illegal hints flags specified"
|
||||
"Illegal hints flags specified",
|
||||
"c-ares library initialization not yet performed",
|
||||
"Error loading iphlpapi.dll",
|
||||
"Could not find GetNetworkParams function"
|
||||
};
|
||||
|
||||
if(code >= 0 && code < (int)(sizeof(errtext) / sizeof(*errtext)))
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
#include "setup.h"
|
||||
#include "ares_version.h"
|
||||
#include "ares.h"
|
||||
|
||||
const char *ares_version(int *version)
|
||||
{
|
||||
|
@@ -11,15 +11,12 @@
|
||||
(ARES_VERSION_PATCH))
|
||||
#define ARES_VERSION_STR "1.6.1-CVS"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
const char *ares_version(int *version);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#if (ARES_VERSION >= 0x010601)
|
||||
# define CARES_HAVE_ARES_LIBRARY_INIT 1
|
||||
# define CARES_HAVE_ARES_LIBRARY_CLEANUP 1
|
||||
#else
|
||||
# undef CARES_HAVE_ARES_LIBRARY_INIT
|
||||
# undef CARES_HAVE_ARES_LIBRARY_CLEANUP
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -18,7 +18,10 @@
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#include <limits.h>
|
||||
#ifdef HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
|
@@ -42,4 +42,4 @@ ${libtoolize} --copy --automake --force
|
||||
${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS
|
||||
${AUTOHEADER:-autoheader}
|
||||
${AUTOCONF:-autoconf}
|
||||
${AUTOMAKE:-automake} --add-missing
|
||||
${AUTOMAKE:-automake} --add-missing --copy
|
||||
|
21
ares/buildconf.bat
Normal file
21
ares/buildconf.bat
Normal file
@@ -0,0 +1,21 @@
|
||||
@echo off
|
||||
REM
|
||||
REM $Id$
|
||||
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.
|
||||
|
||||
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
|
||||
:end_ares_build_h
|
||||
|
||||
:end_all
|
||||
|
@@ -29,6 +29,9 @@
|
||||
#define HAVE_GETOPT_H 1
|
||||
#endif
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define if you have the <signal.h> header file. */
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
@@ -223,17 +226,33 @@
|
||||
#define _CRT_NONSTDC_NO_DEPRECATE 1
|
||||
#endif
|
||||
|
||||
/* VS2008 does not support Windows build targets prior to WinXP, */
|
||||
/* so, if no build target has been defined we will target WinXP. */
|
||||
/* Officially, Microsoft's Windows SDK versions 6.X do not support Windows
|
||||
2000 as a supported build target. VS2008 default installations provide an
|
||||
embedded Windows SDK v6.0A along with the claim that Windows 2000 is a
|
||||
valid build target for VS2008. Popular belief is that binaries built using
|
||||
Windows SDK versions 6.X and Windows 2000 as a build target are functional */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
|
||||
# define VS2008_MINIMUM_TARGET 0x0500
|
||||
#endif
|
||||
|
||||
/* When no build target is specified VS2008 default build target is Windows
|
||||
Vista, which leaves out even Winsows XP. If no build target has been given
|
||||
for VS2008 we will target the minimum Officially supported build target,
|
||||
which happens to be Windows XP. */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
|
||||
# define VS2008_DEFAULT_TARGET 0x0501
|
||||
#endif
|
||||
|
||||
/* VS2008 default target settings and minimum build target check */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
|
||||
# ifndef _WIN32_WINNT
|
||||
# define _WIN32_WINNT 0x0501
|
||||
# define _WIN32_WINNT VS2008_DEFAULT_TARGET
|
||||
# endif
|
||||
# ifndef WINVER
|
||||
# define WINVER 0x0501
|
||||
# define WINVER VS2008_DEFAULT_TARGET
|
||||
# endif
|
||||
# if (_WIN32_WINNT < 0x0501) || (WINVER < 0x0501)
|
||||
# error VS2008 does not support Windows build targets prior to WinXP
|
||||
# if (_WIN32_WINNT < VS2008_MINIMUM_TARGET) || (WINVER < VS2008_MINIMUM_TARGET)
|
||||
# error VS2008 does not support Windows build targets prior to Windows 2000
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
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,12 +7,13 @@ AC_INIT([c-ares], [-],
|
||||
CARES_OVERRIDE_AUTOCONF
|
||||
|
||||
AC_CONFIG_SRCDIR([ares_ipv6.h])
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
AM_CONFIG_HEADER([ares_config.h ares_build.h])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
CARES_CHECK_OPTION_DEBUG
|
||||
CARES_CHECK_OPTION_OPTIMIZE
|
||||
CARES_CHECK_OPTION_WARNINGS
|
||||
CARES_CHECK_OPTION_CURLDEBUG
|
||||
|
||||
CARES_CHECK_PATH_SEPARATOR
|
||||
|
||||
@@ -94,11 +95,6 @@ esac
|
||||
dnl support building of Windows DLLs
|
||||
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
|
||||
AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)])
|
||||
case $host in
|
||||
@@ -114,18 +110,6 @@ esac
|
||||
dnl libtool setup
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AC_MSG_CHECKING([if we need -no-undefined])
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
need_no_undefined=yes
|
||||
;;
|
||||
*)
|
||||
need_no_undefined=no
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT($need_no_undefined)
|
||||
AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl platform/compiler/architecture specific checks/flags
|
||||
dnl **********************************************************************
|
||||
@@ -158,8 +142,14 @@ case $host in
|
||||
#
|
||||
esac
|
||||
|
||||
CURL_CHECK_COMPILER_HALT_ON_ERROR
|
||||
CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
CARES_CHECK_COMPILER_HALT_ON_ERROR
|
||||
CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
|
||||
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 Compilation based checks should not be done before this point.
|
||||
@@ -191,6 +181,8 @@ dnl **********************************************************************
|
||||
dnl Checks for libraries.
|
||||
dnl **********************************************************************
|
||||
|
||||
CARES_CHECK_LIB_XNET
|
||||
|
||||
dnl gethostbyname without lib or in the nsl lib?
|
||||
AC_CHECK_FUNC(gethostbyname,
|
||||
[HAVE_GETHOSTBYNAME="1"
|
||||
@@ -345,8 +337,7 @@ if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
|
||||
fi
|
||||
ac_cv_func_strcasecmp="no"
|
||||
|
||||
dnl socket lib?
|
||||
AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ])
|
||||
CARES_CHECK_LIBS_CONNECT
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl In case that function clock_gettime with monotonic timer is available,
|
||||
@@ -430,6 +421,7 @@ dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
CURL_CHECK_HEADER_MALLOC
|
||||
CURL_CHECK_HEADER_MEMORY
|
||||
|
||||
dnl check for a few basic system headers we need
|
||||
AC_CHECK_HEADERS(
|
||||
@@ -445,9 +437,11 @@ AC_CHECK_HEADERS(
|
||||
netinet/tcp.h \
|
||||
net/if.h \
|
||||
errno.h \
|
||||
socket.h \
|
||||
strings.h \
|
||||
stdbool.h \
|
||||
time.h \
|
||||
limits.h \
|
||||
arpa/nameser.h \
|
||||
arpa/nameser_compat.h \
|
||||
arpa/inet.h,
|
||||
@@ -487,7 +481,9 @@ AC_HEADER_TIME
|
||||
CURL_CHECK_STRUCT_TIMEVAL
|
||||
|
||||
AC_CHECK_SIZEOF(size_t)
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
CARES_CONFIGURE_LONG
|
||||
AC_CHECK_SIZEOF(time_t)
|
||||
|
||||
AC_CHECK_TYPE(long long,
|
||||
@@ -523,8 +519,7 @@ AC_CHECK_TYPE([bool],[
|
||||
#endif
|
||||
])
|
||||
|
||||
# Check for socklen_t or equivalent
|
||||
CURL_CHECK_TYPE_SOCKLEN_T
|
||||
CARES_CONFIGURE_ARES_SOCKLEN_T
|
||||
|
||||
TYPE_IN_ADDR_T
|
||||
|
||||
@@ -539,6 +534,9 @@ CURL_CHECK_FUNC_RECVFROM
|
||||
CURL_CHECK_FUNC_SEND
|
||||
CURL_CHECK_MSG_NOSIGNAL
|
||||
|
||||
CARES_CHECK_FUNC_CLOSESOCKET
|
||||
CARES_CHECK_FUNC_CLOSESOCKET_CAMEL
|
||||
CARES_CHECK_FUNC_CONNECT
|
||||
CARES_CHECK_FUNC_FCNTL
|
||||
CARES_CHECK_FUNC_FREEADDRINFO
|
||||
CARES_CHECK_FUNC_GETADDRINFO
|
||||
@@ -552,6 +550,7 @@ CARES_CHECK_FUNC_IOCTL
|
||||
CARES_CHECK_FUNC_IOCTLSOCKET
|
||||
CARES_CHECK_FUNC_IOCTLSOCKET_CAMEL
|
||||
CARES_CHECK_FUNC_SETSOCKOPT
|
||||
CARES_CHECK_FUNC_SOCKET
|
||||
CARES_CHECK_FUNC_STRCASECMP
|
||||
CARES_CHECK_FUNC_STRCMPI
|
||||
CARES_CHECK_FUNC_STRDUP
|
||||
@@ -743,7 +742,7 @@ AC_CHECK_FUNCS([bitncmp \
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
eval "ac_cv_func_$func=yes"
|
||||
AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$func])], [1],
|
||||
AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$func]), [1],
|
||||
[Define to 1 if you have the $func function.])
|
||||
],[
|
||||
AC_MSG_RESULT([but still no])
|
||||
|
5
ares/m4/.cvsignore
Normal file
5
ares/m4/.cvsignore
Normal file
@@ -0,0 +1,5 @@
|
||||
libtool.m4
|
||||
ltoptions.m4
|
||||
ltsugar.m4
|
||||
ltversion.m4
|
||||
lt~obsolete.m4
|
@@ -1,7 +1,7 @@
|
||||
#***************************************************************************
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (C) 2008 by Daniel Stenberg et al
|
||||
# Copyright (C) 2009 by Daniel Stenberg et al
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software and its
|
||||
# documentation for any purpose and without fee is hereby granted, provided
|
||||
@@ -16,7 +16,7 @@
|
||||
#***************************************************************************
|
||||
|
||||
# File version for 'aclocal' use. Keep it a single number.
|
||||
# serial 46
|
||||
# serial 56
|
||||
|
||||
|
||||
dnl CARES_CHECK_COMPILER
|
||||
@@ -24,6 +24,7 @@ dnl -------------------------------------------------
|
||||
dnl Verify if the C compiler being used is known.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_COMPILER], [
|
||||
AC_BEFORE([$0],[CARES_CHECK_NO_UNDEFINED])dnl
|
||||
#
|
||||
compiler_id="unknown"
|
||||
compiler_num="0"
|
||||
@@ -186,7 +187,6 @@ AC_DEFUN([CARES_CHECK_COMPILER_INTEL_C], [
|
||||
if test "$curl_cv_have_def___INTEL_COMPILER" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
compiler_num="$curl_cv_def___INTEL_COMPILER"
|
||||
CURL_CHECK_DEF([__i386__], [], [silent])
|
||||
CURL_CHECK_DEF([__unix__], [], [silent])
|
||||
if test "$curl_cv_have_def___unix__" = "yes"; then
|
||||
compiler_id="INTEL_UNIX_C"
|
||||
@@ -196,13 +196,6 @@ AC_DEFUN([CARES_CHECK_COMPILER_INTEL_C], [
|
||||
flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
|
||||
flags_opt_yes="-O2"
|
||||
flags_opt_off="-O0"
|
||||
dnl icc 9.1 optimization on IA32 triggers SIGSEGV
|
||||
if test "$curl_cv_have_def___i386__" = "yes" &&
|
||||
test "$compiler_num" -eq "910"; then
|
||||
INTEL_UNIX_C_OPT_SIGSEGV="yes"
|
||||
else
|
||||
INTEL_UNIX_C_OPT_SIGSEGV="no"
|
||||
fi
|
||||
else
|
||||
compiler_id="INTEL_WINDOWS_C"
|
||||
flags_dbg_all="/ZI /Zi /zI /zi /ZD /Zd /zD /zd /Z7 /z7 /Oy /Oy-"
|
||||
@@ -382,8 +375,8 @@ dnl -------------------------------------------------
|
||||
dnl Changes standard include paths present in CFLAGS
|
||||
dnl and CPPFLAGS into isystem include paths. This is
|
||||
dnl done to prevent GNUC from generating warnings on
|
||||
dnl headers from these locations, even though this is
|
||||
dnl not reliable on ancient GNUC versions.
|
||||
dnl headers from these locations, although on ancient
|
||||
dnl GNUC versions these warnings are not silenced.
|
||||
|
||||
AC_DEFUN([CARES_CONVERT_INCLUDE_TO_ISYSTEM], [
|
||||
AC_REQUIRE([CARES_SHFUNC_SQUEEZE])dnl
|
||||
@@ -908,11 +901,7 @@ AC_DEFUN([CARES_SET_COMPILER_WARNING_OPTS], [
|
||||
#
|
||||
if test "$want_warnings" = "yes"; then
|
||||
dnl Issue all warnings
|
||||
dnl tmp_CFLAGS="$tmp_CFLAGS +w1"
|
||||
dnl Due to the HP-UX socklen_t issue it is insane to use the +w1
|
||||
dnl warning level. Until the issue is somehow fixed we will just
|
||||
dnl use the +w2 warning level.
|
||||
tmp_CFLAGS="$tmp_CFLAGS +w2"
|
||||
tmp_CFLAGS="$tmp_CFLAGS +w1"
|
||||
fi
|
||||
;;
|
||||
#
|
||||
@@ -961,39 +950,6 @@ AC_DEFUN([CARES_SET_COMPILER_WARNING_OPTS], [
|
||||
dnl Disable vectorizer diagnostic information
|
||||
tmp_CFLAGS="$tmp_CFLAGS -vec-report0"
|
||||
fi
|
||||
dnl Disable some optimizations to debug icc 9.1 SIGSEGV
|
||||
if test "$INTEL_UNIX_C_OPT_SIGSEGV" = "yes"; then
|
||||
dnl Disable interprocedural optimizations
|
||||
tmp_CFLAGS="$tmp_CFLAGS -no-ip -no-ipo"
|
||||
dnl Separate functions for the linker
|
||||
tmp_CFLAGS="$tmp_CFLAGS -ffunction-sections"
|
||||
dnl Disable inlining of user-defined functions
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Ob0"
|
||||
dnl Disable inline expansion of intrinsic functions
|
||||
tmp_CFLAGS="$tmp_CFLAGS -fno-builtin"
|
||||
dnl Disable inlining of functions
|
||||
tmp_CFLAGS="$tmp_CFLAGS -fno-inline"
|
||||
dnl Disable some IPO for single file optimizations
|
||||
tmp_CFLAGS="$tmp_CFLAGS -fno-inline-functions"
|
||||
dnl Disable inlining of standard library functions
|
||||
tmp_CFLAGS="$tmp_CFLAGS -nolib-inline"
|
||||
dnl Disable full and partial inlining when IPO
|
||||
tmp_CFLAGS="$tmp_CFLAGS -ip-no-inlining"
|
||||
dnl Enable floating-point stack integrity checks
|
||||
tmp_CFLAGS="$tmp_CFLAGS -fpstkchk"
|
||||
dnl Enable run-time detection of buffer overruns.
|
||||
tmp_CFLAGS="$tmp_CFLAGS -fstack-security-check"
|
||||
dnl Assume aliasing in the program.
|
||||
tmp_CFLAGS="$tmp_CFLAGS -falias"
|
||||
dnl Assume that arguments may be aliased.
|
||||
tmp_CFLAGS="$tmp_CFLAGS -alias-args"
|
||||
dnl Assume aliasing within functions
|
||||
tmp_CFLAGS="$tmp_CFLAGS -ffnalias"
|
||||
dnl Disable prefetch insertion optimization
|
||||
tmp_CFLAGS="$tmp_CFLAGS -no-prefetch"
|
||||
dnl Disable loop unrolling optimization
|
||||
tmp_CFLAGS="$tmp_CFLAGS -unroll0"
|
||||
fi
|
||||
;;
|
||||
#
|
||||
INTEL_WINDOWS_C)
|
||||
@@ -1115,36 +1071,120 @@ squeeze() {
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_PROCESS_DEBUG_BUILD_OPTS
|
||||
dnl CARES_CHECK_CURLDEBUG
|
||||
dnl -------------------------------------------------
|
||||
dnl Settings which depend on configure's debug given
|
||||
dnl option, and further configure the build process.
|
||||
dnl Don't use this macro for compiler dependant stuff.
|
||||
dnl Settings which depend on configure's curldebug given
|
||||
dnl option, and other additional configure pre-requisites.
|
||||
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_REQUIRE([CARES_CHECK_OPTION_DEBUG])dnl
|
||||
AC_DEFUN([CARES_CHECK_CURLDEBUG], [
|
||||
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
|
||||
|
||||
dnl when doing the debug stuff, use static library only
|
||||
AC_DISABLE_SHARED
|
||||
|
||||
debugbuild="yes"
|
||||
|
||||
dnl the entire --enable-debug is a hack that lives and runs on top of
|
||||
dnl libcurl stuff so this BUILDING_LIBCURL is not THAT much uglier
|
||||
if test "$want_curldebug" = "yes"; then
|
||||
AC_MSG_CHECKING([if curl debug memory tracking can be enabled])
|
||||
test "$supports_curldebug" = "no" || supports_curldebug="yes"
|
||||
AC_MSG_RESULT([$supports_curldebug])
|
||||
if test "$supports_curldebug" = "no"; then
|
||||
AC_MSG_WARN([cannot enable curl debug memory tracking.])
|
||||
want_curldebug="no"
|
||||
fi
|
||||
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])
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -DCURLDEBUG"
|
||||
|
||||
dnl CHECKME: Do we still need so specify this include path here?
|
||||
CPPFLAGS="$CPPFLAGS -I$srcdir/../include"
|
||||
|
||||
# CPPFLAGS="$CPPFLAGS -DCURLDEBUG"
|
||||
CPPFLAGS="$CPPFLAGS -DCURLDEBUG -I../lib"
|
||||
squeeze CPPFLAGS
|
||||
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)
|
||||
])
|
||||
|
||||
|
||||
@@ -1162,6 +1202,115 @@ AC_DEFUN([CARES_CHECK_PROG_CC], [
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_COMPILER_HALT_ON_ERROR
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if the compiler actually halts after the
|
||||
dnl compilation phase without generating any object
|
||||
dnl code file, when the source compiles with errors.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_COMPILER_HALT_ON_ERROR], [
|
||||
AC_MSG_CHECKING([if compiler halts on compilation errors])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
force compilation error
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([compiler does not halt on compilation errors.])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if the compiler actually halts after the
|
||||
dnl compilation phase without generating any object
|
||||
dnl code file, when the source code tries to define a
|
||||
dnl type for a constant array with negative dimension.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE], [
|
||||
AC_REQUIRE([CARES_CHECK_COMPILER_HALT_ON_ERROR])dnl
|
||||
AC_MSG_CHECKING([if compiler halts on negative sized arrays])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ];
|
||||
]],[[
|
||||
bad_t dummy;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([compiler does not halt on negative sized arrays.])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_COMPILER_STRUCT_MEMBER_SIZE
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if the compiler is capable of handling the
|
||||
dnl size of a struct member, struct which is a function
|
||||
dnl result, as a compilation-time condition inside the
|
||||
dnl type definition of a constant array.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_COMPILER_STRUCT_MEMBER_SIZE], [
|
||||
AC_REQUIRE([CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE])dnl
|
||||
AC_MSG_CHECKING([if compiler struct member size checking works])
|
||||
tst_compiler_check_one_works="unknown"
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
struct mystruct {
|
||||
int mi;
|
||||
char mc;
|
||||
struct mystruct *next;
|
||||
};
|
||||
struct mystruct myfunc();
|
||||
typedef char good_t1[sizeof(myfunc().mi) == sizeof(int) ? 1 : -1 ];
|
||||
typedef char good_t2[sizeof(myfunc().mc) == sizeof(char) ? 1 : -1 ];
|
||||
]],[[
|
||||
good_t1 dummy1;
|
||||
good_t2 dummy2;
|
||||
]])
|
||||
],[
|
||||
tst_compiler_check_one_works="yes"
|
||||
],[
|
||||
tst_compiler_check_one_works="no"
|
||||
sed 's/^/cc-src: /' conftest.$ac_ext >&6
|
||||
sed 's/^/cc-err: /' conftest.err >&6
|
||||
])
|
||||
tst_compiler_check_two_works="unknown"
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
struct mystruct {
|
||||
int mi;
|
||||
char mc;
|
||||
struct mystruct *next;
|
||||
};
|
||||
struct mystruct myfunc();
|
||||
typedef char bad_t1[sizeof(myfunc().mi) != sizeof(int) ? 1 : -1 ];
|
||||
typedef char bad_t2[sizeof(myfunc().mc) != sizeof(char) ? 1 : -1 ];
|
||||
]],[[
|
||||
bad_t1 dummy1;
|
||||
bad_t2 dummy2;
|
||||
]])
|
||||
],[
|
||||
tst_compiler_check_two_works="no"
|
||||
],[
|
||||
tst_compiler_check_two_works="yes"
|
||||
])
|
||||
if test "$tst_compiler_check_one_works" = "yes" &&
|
||||
test "$tst_compiler_check_two_works" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([compiler fails struct member size checking.])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_VAR_MATCH (VARNAME, VALUE)
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if shell variable VARNAME contains VALUE.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#***************************************************************************
|
||||
# $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
|
||||
# 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.
|
||||
# serial 3
|
||||
# serial 5
|
||||
|
||||
|
||||
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
|
||||
@@ -27,6 +66,7 @@ dnl variable want_debug value as appropriate.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_OPTION_DEBUG], [
|
||||
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_MSG_CHECKING([whether to enable debug build options])
|
||||
OPT_DEBUG_BUILD="default"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#***************************************************************************
|
||||
# $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
|
||||
# documentation for any purpose and without fee is hereby granted, provided
|
||||
@@ -16,7 +16,7 @@
|
||||
#***************************************************************************
|
||||
|
||||
# File version for 'aclocal' use. Keep it a single number.
|
||||
# serial 26
|
||||
# serial 32
|
||||
|
||||
|
||||
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 -------------------------------------------------
|
||||
dnl Set up variable with list of headers that must be
|
||||
@@ -187,6 +208,24 @@ cares_includes_sys_socket="\
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_INCLUDES_SYS_TYPES
|
||||
dnl -------------------------------------------------
|
||||
dnl Set up variable with list of headers that must be
|
||||
dnl included when sys/types.h is to be included.
|
||||
|
||||
AC_DEFUN([CARES_INCLUDES_SYS_TYPES], [
|
||||
cares_includes_sys_types="\
|
||||
/* includes start */
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
/* includes end */"
|
||||
AC_CHECK_HEADERS(
|
||||
sys/types.h,
|
||||
[], [], [$cares_includes_sys_types])
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_INCLUDES_SYS_UIO
|
||||
dnl -------------------------------------------------
|
||||
dnl Set up variable with list of headers that must be
|
||||
@@ -284,6 +323,305 @@ cares_includes_ws2tcpip="\
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_PREPROCESS_CALLCONV
|
||||
dnl -------------------------------------------------
|
||||
dnl Set up variable with a preprocessor block which
|
||||
dnl defines function calling convention.
|
||||
|
||||
AC_DEFUN([CARES_PREPROCESS_CALLCONV], [
|
||||
cares_preprocess_callconv="\
|
||||
/* preprocess start */
|
||||
#ifdef HAVE_WINDOWS_H
|
||||
# define FUNCALLCONV __stdcall
|
||||
#else
|
||||
# define FUNCALLCONV
|
||||
#endif
|
||||
/* preprocess end */"
|
||||
])
|
||||
|
||||
|
||||
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 -------------------------------------------------
|
||||
dnl Verify if fcntl is available, prototyped, and
|
||||
@@ -2039,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 -------------------------------------------------
|
||||
dnl Verify if strcasecmp is available, prototyped, and
|
||||
|
14
ares/maketgz
14
ares/maketgz
@@ -48,10 +48,24 @@ print "makes a new configure script\n";
|
||||
print "running configure\n";
|
||||
`./configure`;
|
||||
|
||||
# generate HTML versions of man pages
|
||||
# Deactivated for now. It seems that man pages need some adjustments
|
||||
# relative to paragraph and/or line breaks for proper html formatting.
|
||||
# EXTRA_DIST will need $(HTMLPAGES) when this is fully activated.
|
||||
# print "running make html\n";
|
||||
# `make -s html`;
|
||||
|
||||
# generate PDF versions of man pages
|
||||
print "running make pdf\n";
|
||||
`make -s pdf`;
|
||||
|
||||
# now make the actual tarball
|
||||
print "running make dist\n";
|
||||
`make dist VERSION=$version`;
|
||||
|
||||
# remove temporay sourced man pages
|
||||
`make -s clean-sourced-manpages`;
|
||||
|
||||
print "removing temporary configure.ac file\n";
|
||||
`rm configure.ac.dist`;
|
||||
print "removing temporary ares_version.h file\n";
|
||||
|
38
ares/setup.h
38
ares/setup.h
@@ -3,7 +3,7 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 2004 - 2008 by Daniel Stenberg et al
|
||||
/* Copyright (C) 2004 - 2009 by Daniel Stenberg et al
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted, provided
|
||||
@@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "ares_config.h"
|
||||
#else
|
||||
|
||||
#ifdef WIN32
|
||||
@@ -39,6 +39,15 @@
|
||||
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
/* ================================================================ */
|
||||
/* Definition of preprocessor macros/symbols which modify compiler */
|
||||
/* behaviour or generated code characteristics must be done here, */
|
||||
/* as appropriate, before any system header file is included. It is */
|
||||
/* also possible to have them defined in the config file included */
|
||||
/* before this point. As a result of all this we frown inclusion of */
|
||||
/* system header files in our config files, avoid this at any cost. */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* Tru64 needs _REENTRANT set for a few function prototypes and
|
||||
* things to appear in the system header files. Unixware needs it
|
||||
@@ -51,6 +60,29 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* ================================================================ */
|
||||
/* If you need to include a system header file for your platform, */
|
||||
/* please, do it beyond the point further indicated in this file. */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* c-ares external interface definitions are also used internally,
|
||||
* and might also include required system header files to define them.
|
||||
*/
|
||||
|
||||
#include <ares_build.h>
|
||||
|
||||
/*
|
||||
* Compile time sanity checks must also be done when building the library.
|
||||
*/
|
||||
|
||||
#include <ares_rules.h>
|
||||
|
||||
/* ================================================================ */
|
||||
/* No system header file shall be included in this file before this */
|
||||
/* point. The only allowed ones are those included from curlbuild.h */
|
||||
/* ================================================================ */
|
||||
|
||||
/*
|
||||
* Include header files for windows builds before redefining anything.
|
||||
* Use this preproessor block only to include or exclude windows.h,
|
||||
@@ -122,7 +154,7 @@
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
/*
|
||||
* 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
|
||||
* --enable-debug) so we undef them again here.
|
||||
*/
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 2004 - 2008 by Daniel Stenberg et al
|
||||
/* Copyright (C) 2004 - 2009 by Daniel Stenberg et al
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted, provided
|
||||
@@ -42,6 +42,14 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef NEED_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#ifdef NEED_MEMORY_H
|
||||
#include <memory.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
@@ -91,23 +99,6 @@ struct timeval {
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Windows build targets have socklen_t definition in
|
||||
* ws2tcpip.h but some versions of ws2tcpip.h do not
|
||||
* have the definition. It seems that when the socklen_t
|
||||
* definition is missing from ws2tcpip.h the definition
|
||||
* for INET_ADDRSTRLEN is also missing, and that when one
|
||||
* definition is present the other one also is available.
|
||||
*/
|
||||
|
||||
#if defined(WIN32) && !defined(HAVE_CONFIG_H)
|
||||
# if ( defined(_MSC_VER) && !defined(INET_ADDRSTRLEN) ) || \
|
||||
(!defined(_MSC_VER) && !defined(HAVE_WS2TCPIP_H) )
|
||||
# define socklen_t int
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__minix)
|
||||
/* Minix doesn't support recv on TCP sockets */
|
||||
#define sread(x,y,z) (ssize_t)read((RECV_TYPE_ARG1)(x), \
|
||||
@@ -231,6 +222,19 @@ struct timeval {
|
||||
#endif /* if 0 */
|
||||
|
||||
|
||||
/*
|
||||
* Function-like macro definition used to close a socket.
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CLOSESOCKET)
|
||||
# define sclose(x) closesocket((x))
|
||||
#elif defined(HAVE_CLOSESOCKET_CAMEL)
|
||||
# define sclose(x) CloseSocket((x))
|
||||
#else
|
||||
# define sclose(x) close((x))
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Uppercase macro versions of ANSI/ISO is*() functions/macros which
|
||||
* avoid negative number inputs with argument byte codes > 127.
|
||||
@@ -306,7 +310,7 @@ typedef int sig_atomic_t;
|
||||
* Macro used to include code only in debug builds.
|
||||
*/
|
||||
|
||||
#ifdef CURLDEBUG
|
||||
#ifdef DEBUGBUILD
|
||||
#define DEBUGF(x) x
|
||||
#else
|
||||
#define DEBUGF(x) do { } while (0)
|
||||
@@ -317,7 +321,7 @@ typedef int sig_atomic_t;
|
||||
* Macro used to include assertion code only in debug builds.
|
||||
*/
|
||||
|
||||
#if defined(CURLDEBUG) && defined(HAVE_ASSERT_H)
|
||||
#if defined(DEBUGBUILD) && defined(HAVE_ASSERT_H)
|
||||
#define DEBUGASSERT(x) assert(x)
|
||||
#else
|
||||
#define DEBUGASSERT(x) do { } while (0)
|
||||
@@ -436,88 +440,5 @@ typedef int sig_atomic_t;
|
||||
#define ZERO_NULL 0
|
||||
|
||||
|
||||
#if defined (__LP64__) && defined(__hpux) && !defined(_XOPEN_SOURCE_EXTENDED)
|
||||
#include <sys/socket.h>
|
||||
/* HP-UX has this oddity where it features a few functions that don't work
|
||||
with socklen_t so we need to convert to ints
|
||||
|
||||
This is due to socklen_t being a 64bit int under 64bit ABI, but the
|
||||
pre-xopen (default) interfaces require an int, which is 32bits.
|
||||
|
||||
Therefore, Anytime socklen_t is passed by pointer, the libc function
|
||||
truncates the 64bit socklen_t value by treating it as a 32bit value.
|
||||
|
||||
|
||||
Note that some socket calls are allowed to have a NULL pointer for
|
||||
the socklen arg.
|
||||
*/
|
||||
|
||||
inline static int Curl_hp_getsockname(int s, struct sockaddr *name,
|
||||
socklen_t *namelen)
|
||||
{
|
||||
int rc;
|
||||
if(namelen) {
|
||||
int len = *namelen;
|
||||
rc = getsockname(s, name, &len);
|
||||
*namelen = len;
|
||||
}
|
||||
else
|
||||
rc = getsockname(s, name, 0);
|
||||
return rc;
|
||||
}
|
||||
|
||||
inline static int Curl_hp_getsockopt(int s, int level, int optname,
|
||||
void *optval, socklen_t *optlen)
|
||||
{
|
||||
int rc;
|
||||
if(optlen) {
|
||||
int len = *optlen;
|
||||
rc = getsockopt(s, level, optname, optval, &len);
|
||||
*optlen = len;
|
||||
}
|
||||
else
|
||||
rc = getsockopt(s, level, optname, optval, 0);
|
||||
return rc;
|
||||
}
|
||||
|
||||
inline static int Curl_hp_accept(int sockfd, struct sockaddr *addr,
|
||||
socklen_t *addrlen)
|
||||
{
|
||||
int rc;
|
||||
if(addrlen) {
|
||||
int len = *addrlen;
|
||||
rc = accept(sockfd, addr, &len);
|
||||
*addrlen = len;
|
||||
}
|
||||
else
|
||||
rc = accept(sockfd, addr, 0);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
inline static ssize_t Curl_hp_recvfrom(int s, void *buf, size_t len, int flags,
|
||||
struct sockaddr *from,
|
||||
socklen_t *fromlen)
|
||||
{
|
||||
ssize_t rc;
|
||||
if(fromlen) {
|
||||
int fromlen32 = *fromlen;
|
||||
rc = recvfrom(s, buf, len, flags, from, &fromlen32);
|
||||
*fromlen = fromlen32;
|
||||
}
|
||||
else {
|
||||
rc = recvfrom(s, buf, len, flags, from, 0);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
#define getsockname(a,b,c) Curl_hp_getsockname((a),(b),(c))
|
||||
#define getsockopt(a,b,c,d,e) Curl_hp_getsockopt((a),(b),(c),(d),(e))
|
||||
#define accept(a,b,c) Curl_hp_accept((a),(b),(c))
|
||||
#define recvfrom(a,b,c,d,e,f) Curl_hp_recvfrom((a),(b),(c),(d),(e),(f))
|
||||
|
||||
#endif /* HPUX work-around */
|
||||
|
||||
|
||||
#endif /* __SETUP_ONCE_H */
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
Debug
|
||||
Release
|
||||
acountry.dep
|
||||
acountry.mak
|
||||
acountry.plg
|
||||
|
@@ -41,8 +41,8 @@ RSC=rc.exe
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@@ -65,8 +65,8 @@ LINK32=link.exe
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
@@ -41,8 +41,8 @@ RSC=rc.exe
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@@ -65,8 +65,8 @@ LINK32=link.exe
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
@@ -41,8 +41,8 @@ RSC=rc.exe
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@@ -65,8 +65,8 @@ LINK32=link.exe
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
@@ -63,8 +63,8 @@ LIB32=link.exe -lib
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "DEBUGBUILD" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "DEBUGBUILD" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@@ -145,6 +145,10 @@ SOURCE=..\..\ares_init.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_library_init.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_llist.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -225,6 +229,10 @@ SOURCE=..\..\ares.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_build.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_dns.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -233,6 +241,10 @@ SOURCE=..\..\ares_ipv6.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_library_init.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_llist.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -241,6 +253,10 @@ SOURCE=..\..\ares_private.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_rules.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_strcasecmp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
113
buildconf
113
buildconf
@@ -88,7 +88,7 @@ if test -z "$ac_version"; then
|
||||
echo " You need autoconf version $need_autoconf or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
IFS=.; set $ac_version; IFS=' '
|
||||
old_IFS=$IFS; IFS='.'; set $ac_version; IFS=$old_IFS
|
||||
if test "$1" = "2" -a "$2" -lt "57" || test "$1" -lt "2"; then
|
||||
echo "buildconf: autoconf version $ac_version found."
|
||||
echo " You need autoconf version $need_autoconf or newer installed."
|
||||
@@ -121,7 +121,7 @@ if test -z "$ah_version"; then
|
||||
echo " You need autoheader version 2.50 or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
IFS=.; set $ah_version; IFS=' '
|
||||
old_IFS=$IFS; IFS='.'; set $ah_version; IFS=$old_IFS
|
||||
if test "$1" = "2" -a "$2" -lt "50" || test "$1" -lt "2"; then
|
||||
echo "buildconf: autoheader version $ah_version found."
|
||||
echo " You need autoheader version 2.50 or newer installed."
|
||||
@@ -143,7 +143,7 @@ if test -z "$am_version"; then
|
||||
echo " You need automake version $need_automake or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
IFS=.; set $am_version; IFS=' '
|
||||
old_IFS=$IFS; IFS='.'; set $am_version; IFS=$old_IFS
|
||||
if test "$1" = "1" -a "$2" -lt "7" || test "$1" -lt "1"; then
|
||||
echo "buildconf: automake version $am_version found."
|
||||
echo " You need automake version $need_automake or newer installed."
|
||||
@@ -191,28 +191,28 @@ else
|
||||
libtoolize=`findtool $LIBTOOLIZE`
|
||||
fi
|
||||
|
||||
lt_pversion=`$libtool --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//g' -e 's/[- ].*//'`
|
||||
if test -z "$lt_pversion"; then
|
||||
lt_pver=`$libtool --version 2>/dev/null|head -n 1`
|
||||
lt_qver=`echo $lt_pver|sed -e "s/([^)]*)//g" -e "s/^[^0-9]*//g"`
|
||||
lt_version=`echo $lt_qver|sed -e "s/[- ].*//" -e "s/\([a-z]*\)$//"`
|
||||
if test -z "$lt_version"; then
|
||||
echo "buildconf: libtool not found."
|
||||
echo " You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
|
||||
exit 1
|
||||
fi
|
||||
lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$//'`
|
||||
IFS=.; set $lt_version; IFS=' '
|
||||
old_IFS=$IFS; IFS='.'; set $lt_version; IFS=$old_IFS
|
||||
lt_major=$1
|
||||
lt_minor=$2
|
||||
lt_patch=$3
|
||||
lt_status="good"
|
||||
|
||||
major=$1
|
||||
minor=$2
|
||||
patch=$3
|
||||
|
||||
if test "$major" = "$LIBTOOL_WANTED_MAJOR"; then
|
||||
if test "$minor" -lt "$LIBTOOL_WANTED_MINOR"; then
|
||||
if test "$lt_major" = "$LIBTOOL_WANTED_MAJOR"; then
|
||||
if test "$lt_minor" -lt "$LIBTOOL_WANTED_MINOR"; then
|
||||
lt_status="bad"
|
||||
elif test -n "$LIBTOOL_WANTED_PATCH"; then
|
||||
if test "$minor" -gt "$LIBTOOL_WANTED_MINOR"; then
|
||||
if test "$lt_minor" -gt "$LIBTOOL_WANTED_MINOR"; then
|
||||
lt_status="good"
|
||||
elif test -n "$patch"; then
|
||||
if test "$patch" -lt "$LIBTOOL_WANTED_PATCH"; then
|
||||
elif test -n "$lt_patch"; then
|
||||
if test "$lt_patch" -lt "$LIBTOOL_WANTED_PATCH"; then
|
||||
lt_status="bad"
|
||||
fi
|
||||
else
|
||||
@@ -221,7 +221,7 @@ if test "$major" = "$LIBTOOL_WANTED_MAJOR"; then
|
||||
fi
|
||||
fi
|
||||
if test $lt_status != "good"; then
|
||||
echo "buildconf: libtool version $lt_pversion found."
|
||||
echo "buildconf: libtool version $lt_version found."
|
||||
echo " You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
|
||||
exit 1
|
||||
fi
|
||||
@@ -257,15 +257,23 @@ PERL=`findtool ${PERL:-perl}`
|
||||
# Remove files generated on previous buildconf/configure run.
|
||||
#
|
||||
for fname in .deps \
|
||||
.libs \
|
||||
*.la \
|
||||
*.lo \
|
||||
*.a \
|
||||
*.o \
|
||||
Makefile \
|
||||
Makefile.in \
|
||||
aclocal.m4 \
|
||||
aclocal.m4.bak \
|
||||
ares_build.h \
|
||||
autom4te.cache \
|
||||
compile \
|
||||
config.guess \
|
||||
config.h \
|
||||
config.h.in \
|
||||
curl_config.h \
|
||||
curl_config.h.in \
|
||||
config.log \
|
||||
config.lt \
|
||||
config.status \
|
||||
config.sub \
|
||||
configure \
|
||||
@@ -277,6 +285,10 @@ for fname in .deps \
|
||||
libtool \
|
||||
libtool.m4 \
|
||||
ltmain.sh \
|
||||
ltoptions.m4 \
|
||||
ltsugar.m4 \
|
||||
ltversion.m4 \
|
||||
lt~obsolete.m4 \
|
||||
stamp-h1 \
|
||||
stamp-h2 \
|
||||
stamp-h3 ; do
|
||||
@@ -290,6 +302,11 @@ done
|
||||
echo "buildconf: running libtoolize"
|
||||
$libtoolize --copy --automake --force || die "The libtoolize command failed"
|
||||
|
||||
if test ! -f m4/curl-functions.m4; then
|
||||
echo "buildconf: cURL m4 macros not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "buildconf: running aclocal"
|
||||
${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS || die "The aclocal command line failed"
|
||||
|
||||
@@ -304,8 +321,8 @@ fi
|
||||
echo "buildconf: running autoheader"
|
||||
${AUTOHEADER:-autoheader} || die "The autoheader command failed"
|
||||
|
||||
echo "buildconf: cp lib/config.h.in src/config.h.in"
|
||||
cp lib/config.h.in src/config.h.in
|
||||
echo "buildconf: cp lib/curl_config.h.in src/curl_config.h.in"
|
||||
cp lib/curl_config.h.in src/curl_config.h.in
|
||||
|
||||
echo "buildconf: running autoconf"
|
||||
${AUTOCONF:-autoconf} || die "The autoconf command failed"
|
||||
@@ -320,5 +337,59 @@ fi
|
||||
echo "buildconf: running automake"
|
||||
${AUTOMAKE:-automake} -a -c || die "The automake command failed"
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Depending on the libtool and automake versions being used, config.guess
|
||||
# might not be installed in the subdirectory until automake has finished.
|
||||
# So we can not attempt to use it until this very last buildconf stage.
|
||||
#
|
||||
|
||||
if test ! -f ./config.guess; then
|
||||
echo "buildconf: config.guess not found"
|
||||
else
|
||||
buildhost=`./config.guess 2>/dev/null|head -n 1`
|
||||
case $buildhost in
|
||||
*-*-hpux*)
|
||||
need_lt_major=1
|
||||
need_lt_minor=5
|
||||
need_lt_patch=24
|
||||
need_lt_check="yes"
|
||||
;;
|
||||
esac
|
||||
if test ! -z "$need_lt_check"; then
|
||||
if test -z "$lt_major"; then
|
||||
lt_status="bad"
|
||||
elif test "$lt_major" -gt "$need_lt_major"; then
|
||||
lt_status="good"
|
||||
elif test "$lt_major" -lt "$need_lt_major"; then
|
||||
lt_status="bad"
|
||||
elif test -z "$lt_minor"; then
|
||||
lt_status="bad"
|
||||
elif test "$lt_minor" -gt "$need_lt_minor"; then
|
||||
lt_status="good"
|
||||
elif test "$lt_minor" -lt "$need_lt_minor"; then
|
||||
lt_status="bad"
|
||||
elif test -z "$lt_patch"; then
|
||||
lt_status="bad"
|
||||
elif test "$lt_patch" -gt "$need_lt_patch"; then
|
||||
lt_status="good"
|
||||
elif test "$lt_patch" -lt "$need_lt_patch"; then
|
||||
lt_status="bad"
|
||||
else
|
||||
lt_status="good"
|
||||
fi
|
||||
if test "$lt_status" != "good"; then
|
||||
need_lt_version="$need_lt_major.$need_lt_minor.$need_lt_patch"
|
||||
echo "buildconf: libtool version $lt_version found."
|
||||
echo " $buildhost requires libtool $need_lt_version or newer installed."
|
||||
rm -f configure
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Finished succesfully.
|
||||
#
|
||||
|
||||
echo "buildconf: OK"
|
||||
exit 0
|
||||
|
@@ -1,13 +1,39 @@
|
||||
@echo off
|
||||
REM set up a CVS tree to build when there's no autotools
|
||||
REM $Revision$
|
||||
REM $Date$
|
||||
REM
|
||||
REM $Id$
|
||||
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 curl's release
|
||||
REM archives, neither for curl's daily snapshot archives.
|
||||
|
||||
if exist CVS-INFO goto start_doing
|
||||
ECHO ERROR: This file shall only be used with a curl CVS tree checkout.
|
||||
goto end_all
|
||||
:start_doing
|
||||
|
||||
REM create hugehelp.c
|
||||
copy src\hugehelp.c.cvs src\hugehelp.c
|
||||
if not exist src\hugehelp.c.cvs goto end_hugehelp_c
|
||||
copy /Y src\hugehelp.c.cvs src\hugehelp.c
|
||||
:end_hugehelp_c
|
||||
|
||||
REM create Makefile
|
||||
copy Makefile.dist Makefile
|
||||
if not exist Makefile.dist goto end_makefile
|
||||
copy /Y Makefile.dist Makefile
|
||||
:end_makefile
|
||||
|
||||
REM create curlbuild.h
|
||||
copy include\curl\curlbuild.h.dist include\curl\curlbuild.h
|
||||
if not exist include\curl\curlbuild.h.dist goto end_curlbuild_h
|
||||
copy /Y include\curl\curlbuild.h.dist include\curl\curlbuild.h
|
||||
:end_curlbuild_h
|
||||
|
||||
REM setup c-ares CVS tree
|
||||
if not exist ares\buildconf.bat goto end_c_ares
|
||||
cd ares
|
||||
call buildconf.bat
|
||||
cd ..
|
||||
:end_c_ares
|
||||
|
||||
:end_all
|
||||
|
||||
|
169
configure.ac
169
configure.ac
@@ -30,17 +30,18 @@ AC_INIT([curl], [-], [a suitable curl mailing list => http://curl.haxx.se/mail/]
|
||||
CURL_OVERRIDE_AUTOCONF
|
||||
|
||||
dnl configure script copyright
|
||||
AC_COPYRIGHT([Copyright (c) 1998 - 2008 Daniel Stenberg, <daniel@haxx.se>
|
||||
AC_COPYRIGHT([Copyright (c) 1998 - 2009 Daniel Stenberg, <daniel@haxx.se>
|
||||
This configure script may be copied, distributed and modified under the
|
||||
terms of the curl license; see COPYING for more details])
|
||||
|
||||
AC_CONFIG_SRCDIR([lib/urldata.h])
|
||||
AM_CONFIG_HEADER(lib/config.h src/config.h include/curl/curlbuild.h)
|
||||
AM_CONFIG_HEADER(lib/curl_config.h src/curl_config.h include/curl/curlbuild.h)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
CURL_CHECK_OPTION_DEBUG
|
||||
CURL_CHECK_OPTION_OPTIMIZE
|
||||
CURL_CHECK_OPTION_WARNINGS
|
||||
CURL_CHECK_OPTION_CURLDEBUG
|
||||
|
||||
CURL_CHECK_PATH_SEPARATOR
|
||||
|
||||
@@ -155,8 +156,6 @@ AC_SYS_LARGEFILE
|
||||
dnl support building of Windows DLLs
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
|
||||
CURL_PROCESS_DEBUG_BUILD_OPTS
|
||||
|
||||
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)])
|
||||
case $host in
|
||||
@@ -172,18 +171,6 @@ esac
|
||||
dnl libtool setup
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AC_MSG_CHECKING([if we need -no-undefined])
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
need_no_undefined=yes
|
||||
;;
|
||||
*)
|
||||
need_no_undefined=no
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT($need_no_undefined)
|
||||
AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
|
||||
|
||||
AC_MSG_CHECKING([if we need -mimpure-text])
|
||||
mimpure=no
|
||||
case $host in
|
||||
@@ -270,6 +257,12 @@ esac
|
||||
CURL_CHECK_COMPILER_HALT_ON_ERROR
|
||||
CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
|
||||
CURL_CHECK_NO_UNDEFINED
|
||||
AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
|
||||
|
||||
CURL_CHECK_CURLDEBUG
|
||||
AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Compilation based checks should not be done before this point.
|
||||
dnl **********************************************************************
|
||||
@@ -498,6 +491,8 @@ dnl **********************************************************************
|
||||
dnl Checks for libraries.
|
||||
dnl **********************************************************************
|
||||
|
||||
CURL_CHECK_LIB_XNET
|
||||
|
||||
dnl gethostbyname without lib or in the nsl lib?
|
||||
AC_CHECK_FUNC(gethostbyname,
|
||||
[HAVE_GETHOSTBYNAME="1"
|
||||
@@ -661,8 +656,7 @@ if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
|
||||
fi
|
||||
ac_cv_func_strcasecmp="no"
|
||||
|
||||
dnl socket lib?
|
||||
AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ])
|
||||
CURL_CHECK_LIBS_CONNECT
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl In case that function clock_gettime with monotonic timer is available,
|
||||
@@ -1171,8 +1165,11 @@ if test X"$OPT_SSL" != Xno; then
|
||||
PKGTEST="no"
|
||||
PREFIX_OPENSSL=$OPT_SSL
|
||||
LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
|
||||
LDFLAGS="$LDFLAGS -L$LIB_OPENSSL"
|
||||
CPPFLAGS="$CPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
|
||||
if test "$PREFIX_OPENSSL" != "/usr" ; then
|
||||
LDFLAGS="$LDFLAGS -L$LIB_OPENSSL"
|
||||
CPPFLAGS="$CPPFLAGS -I$PREFIX_OPENSSL/include"
|
||||
fi
|
||||
CPPFLAGS="$CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1491,6 +1488,9 @@ if test X"$OPT_LIBSSH2" != Xno; then
|
||||
dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
|
||||
dnl to prevent further configure tests to fail due to this
|
||||
|
||||
dnl libssh2_version is a post 1.0 addition
|
||||
AC_CHECK_FUNCS( libssh2_version )
|
||||
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_LIBSSH2"
|
||||
export LD_LIBRARY_PATH
|
||||
AC_MSG_NOTICE([Added $LIB_LIBSSH2 to LD_LIBRARY_PATH])
|
||||
@@ -1546,25 +1546,9 @@ if test "$OPENSSL_ENABLED" != "1"; then
|
||||
|
||||
if test X"$OPT_GNUTLS" != Xno; then
|
||||
|
||||
AC_MSG_NOTICE([OPT_GNUTLS is $OPT_GNUTLS])
|
||||
|
||||
addld=""
|
||||
if test "x$OPT_GNUTLS" = "xyes"; then
|
||||
check=`libgnutls-config --version 2>/dev/null`
|
||||
if test -n "$check"; then
|
||||
addlib=`libgnutls-config --libs`
|
||||
addcflags=`libgnutls-config --cflags`
|
||||
version=`libgnutls-config --version`
|
||||
gtlslib=`libgnutls-config --prefix`/lib$libsuff
|
||||
fi
|
||||
else
|
||||
addlib=`$OPT_GNUTLS/bin/libgnutls-config --libs`
|
||||
addcflags=`$OPT_GNUTLS/bin/libgnutls-config --cflags`
|
||||
version=`$OPT_GNUTLS/bin/libgnutls-config --version 2>/dev/null`
|
||||
gtlslib=$OPT_GNUTLS/lib$libsuff
|
||||
fi
|
||||
|
||||
if test -z "$version"; then
|
||||
dnl this is with no partiular path given
|
||||
CURL_CHECK_PKGCONFIG(gnutls)
|
||||
|
||||
if test "$PKGCONFIG" != "no" ; then
|
||||
@@ -1573,8 +1557,34 @@ if test "$OPENSSL_ENABLED" != "1"; then
|
||||
addcflags=`$PKGCONFIG --cflags-only-I gnutls`
|
||||
version=`$PKGCONFIG --modversion gnutls`
|
||||
gtlslib=`echo $addld | $SED -e 's/-L//'`
|
||||
else
|
||||
dnl without pkg-config, we try libgnutls-config as that was how it
|
||||
dnl used to be done
|
||||
check=`libgnutls-config --version 2>/dev/null`
|
||||
if test -n "$check"; then
|
||||
addlib=`libgnutls-config --libs`
|
||||
addcflags=`libgnutls-config --cflags`
|
||||
version=`libgnutls-config --version`
|
||||
gtlslib=`libgnutls-config --prefix`/lib$libsuff
|
||||
fi
|
||||
fi
|
||||
else
|
||||
dnl this is with a given path, first check if there's a libgnutls-config
|
||||
dnl there and if not, make an educated guess
|
||||
check=`$OPT_GNUTLS/libgnutls-config --version 2>/dev/null`
|
||||
if test -n "$check"; then
|
||||
addlib=`$OPT_GNUTLS/libgnutls-config --libs`
|
||||
addcflags=`$OPT_GNUTLS/libgnutls-config --cflags`
|
||||
version=`$OPT_GNUTLS/libgnutls-config --version`
|
||||
gtlslib=`$OPT_GNUTLS/libgnutls-config --prefix`/lib$libsuff
|
||||
else
|
||||
dnl without pkg-config and libgnutls-config, we guess a lot!
|
||||
addlib=-lgnutls
|
||||
addld=-L$OPT_GNUTLS/lib$libsuff
|
||||
addcflags=-I$OPT_GNUTLS/include
|
||||
version="" # we just don't know
|
||||
gtlslib=$OPT_GNUTLS/lib$libsuff
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test -z "$version"; then
|
||||
@@ -1655,10 +1665,10 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
|
||||
fi
|
||||
else
|
||||
# Without pkg-config, we'll kludge in some defaults
|
||||
addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
|
||||
addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
|
||||
addcflags="-I$OPT_NSS/include"
|
||||
version="unknown"
|
||||
gtlsprefix=$OPT_GNUTLS
|
||||
nssprefix=$OPT_NSS
|
||||
fi
|
||||
|
||||
dnl Check for functionPK11_CreateGenericObject
|
||||
@@ -1863,6 +1873,7 @@ dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
CURL_CHECK_HEADER_MALLOC
|
||||
CURL_CHECK_HEADER_MEMORY
|
||||
|
||||
dnl Now check for the very most basic headers. Then we can use these
|
||||
dnl ones as default-headers when checking for the rest!
|
||||
@@ -1898,6 +1909,7 @@ AC_CHECK_HEADERS(
|
||||
sys/utime.h \
|
||||
sys/poll.h \
|
||||
poll.h \
|
||||
socket.h \
|
||||
sys/resource.h \
|
||||
libgen.h \
|
||||
locale.h \
|
||||
@@ -1990,8 +2002,7 @@ AC_CHECK_TYPE([bool],[
|
||||
#endif
|
||||
])
|
||||
|
||||
# Check for socklen_t or equivalent
|
||||
CURL_CHECK_TYPE_SOCKLEN_T
|
||||
CURL_CONFIGURE_CURL_SOCKLEN_T
|
||||
|
||||
TYPE_IN_ADDR_T
|
||||
|
||||
@@ -2009,6 +2020,9 @@ CURL_CHECK_FUNC_SEND
|
||||
CURL_CHECK_MSG_NOSIGNAL
|
||||
|
||||
CURL_CHECK_FUNC_ALARM
|
||||
CURL_CHECK_FUNC_CLOSESOCKET
|
||||
CURL_CHECK_FUNC_CLOSESOCKET_CAMEL
|
||||
CURL_CHECK_FUNC_CONNECT
|
||||
CURL_CHECK_FUNC_FCNTL
|
||||
CURL_CHECK_FUNC_FDOPEN
|
||||
CURL_CHECK_FUNC_FREEADDRINFO
|
||||
@@ -2030,11 +2044,13 @@ CURL_CHECK_FUNC_IOCTL
|
||||
CURL_CHECK_FUNC_IOCTLSOCKET
|
||||
CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL
|
||||
CURL_CHECK_FUNC_LOCALTIME_R
|
||||
CURL_CHECK_FUNC_POLL
|
||||
CURL_CHECK_FUNC_SETSOCKOPT
|
||||
CURL_CHECK_FUNC_SIGACTION
|
||||
CURL_CHECK_FUNC_SIGINTERRUPT
|
||||
CURL_CHECK_FUNC_SIGNAL
|
||||
CURL_CHECK_FUNC_SIGSETJMP
|
||||
CURL_CHECK_FUNC_SOCKET
|
||||
CURL_CHECK_FUNC_STRCASECMP
|
||||
CURL_CHECK_FUNC_STRCASESTR
|
||||
CURL_CHECK_FUNC_STRCMPI
|
||||
@@ -2063,7 +2079,6 @@ case $host in
|
||||
esac
|
||||
|
||||
AC_CHECK_FUNCS([basename \
|
||||
closesocket \
|
||||
fork \
|
||||
geteuid \
|
||||
getpass_r \
|
||||
@@ -2075,11 +2090,9 @@ AC_CHECK_FUNCS([basename \
|
||||
inet_addr \
|
||||
perror \
|
||||
pipe \
|
||||
poll \
|
||||
setlocale \
|
||||
setmode \
|
||||
setrlimit \
|
||||
socket \
|
||||
uname \
|
||||
utime
|
||||
],[
|
||||
@@ -2096,7 +2109,7 @@ AC_CHECK_FUNCS([basename \
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
eval "ac_cv_func_$func=yes"
|
||||
AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$func])], [1],
|
||||
AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$func]), [1],
|
||||
[Define to 1 if you have the $func function.])
|
||||
],[
|
||||
AC_MSG_RESULT([but still no])
|
||||
@@ -2132,45 +2145,6 @@ if test "$ipv6" = "yes"; then
|
||||
CURL_CHECK_NI_WITHSCOPEID
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if we are Mac OS X (to disable poll)])
|
||||
disable_poll=no
|
||||
case $host in
|
||||
*-*-darwin*)
|
||||
disable_poll="yes";
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT($disable_poll)
|
||||
|
||||
if test "$disable_poll" = "no"; then
|
||||
|
||||
dnl poll() might be badly emulated, as in Mac OS X 10.3 (and other BSDs?) and
|
||||
dnl to find out we make an extra check here!
|
||||
if test "$ac_cv_func_poll" = "yes"; then
|
||||
AC_MSG_CHECKING([if poll works with NULL inputs])
|
||||
AC_RUN_IFELSE([
|
||||
#ifdef HAVE_SYS_POLL_H
|
||||
#include <sys/poll.h>
|
||||
#elif defined(HAVE_POLL_H)
|
||||
#include <poll.h>
|
||||
#endif
|
||||
|
||||
int main(void)
|
||||
{
|
||||
/* make this return 0 == timeout since there's nothing to read from */
|
||||
return poll((void *)0, 0, 10 /*ms*/);
|
||||
}
|
||||
],
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_POLL_FINE, 1, [If you have a fine poll]),
|
||||
AC_MSG_RESULT(no),
|
||||
AC_MSG_RESULT(cross-compiling assumes yes)
|
||||
AC_DEFINE(HAVE_POLL_FINE, 1, [If you have a fine poll])
|
||||
) dnl end of AC_RUN_IFELSE
|
||||
fi dnl poll() was found
|
||||
fi dnl poll()-check is not disabled
|
||||
|
||||
dnl ************************************************************
|
||||
dnl enable non-blocking communications
|
||||
dnl
|
||||
@@ -2231,6 +2205,9 @@ fi
|
||||
dnl set variable for use in automakefile(s)
|
||||
AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
|
||||
|
||||
aresembedded="unknown"
|
||||
configure_rundir=`pwd`
|
||||
embedded_ares_builddir="$configure_rundir/ares"
|
||||
AC_MSG_CHECKING([whether to enable c-ares])
|
||||
AC_ARG_ENABLE(ares,
|
||||
AC_HELP_STRING([--enable-ares=PATH],[Enable c-ares for name lookups])
|
||||
@@ -2261,14 +2238,9 @@ AC_HELP_STRING([--disable-ares],[Disable c-ares for name lookups]),
|
||||
if test -d "$srcdir/ares"; then
|
||||
aresembedded="yes"
|
||||
AC_CONFIG_SUBDIRS(ares)
|
||||
aresinc=`cd $srcdir/ares && pwd`
|
||||
CPPFLAGS="$CPPFLAGS -I$aresinc"
|
||||
|
||||
dnl the pwd= below cannot 'cd' into the ares dir to get the full
|
||||
dnl path to it, since it may not exist yet if we build outside of
|
||||
dnl the source tree
|
||||
pwd=`pwd`
|
||||
LDFLAGS="$LDFLAGS -L$pwd/ares"
|
||||
dnl Since c-ares has installable configured header files, path
|
||||
dnl inclusion is fully done in makefiles for in-tree builds.
|
||||
LDFLAGS="$LDFLAGS -L$embedded_ares_builddir"
|
||||
fi
|
||||
else
|
||||
CPPFLAGS="$CPPFLAGS -I$enableval/include"
|
||||
@@ -2306,6 +2278,9 @@ AC_HELP_STRING([--disable-ares],[Disable c-ares for name lookups]),
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
dnl set variable for use in automakefile(s)
|
||||
AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$aresembedded = xyes)
|
||||
|
||||
dnl ************************************************************
|
||||
dnl disable verbose text strings
|
||||
dnl
|
||||
@@ -2505,7 +2480,7 @@ fi
|
||||
if test "x$USE_WINDOWS_SSPI" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
|
||||
fi
|
||||
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1"; then
|
||||
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" -o "x$GNUTLS_ENABLED" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
|
||||
fi
|
||||
|
||||
@@ -2561,6 +2536,11 @@ squeeze CURL_LIBS
|
||||
squeeze LIBCURL_LIBS
|
||||
squeeze TEST_SERVER_LIBS
|
||||
|
||||
if test "x$want_curldebug_assumed" = "xyes" &&
|
||||
test "x$want_curldebug" = "xyes" && test "x$HAVE_ARES" = "x1"; then
|
||||
ac_configure_args="$ac_configure_args --enable-curldebug"
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES([Makefile \
|
||||
docs/Makefile \
|
||||
docs/examples/Makefile \
|
||||
@@ -2581,7 +2561,6 @@ AC_CONFIG_FILES([Makefile \
|
||||
packages/Linux/RPM/curl.spec \
|
||||
packages/Linux/RPM/curl-ssl.spec \
|
||||
packages/Solaris/Makefile \
|
||||
packages/DOS/Makefile \
|
||||
packages/EPM/curl.list \
|
||||
packages/EPM/Makefile \
|
||||
packages/vms/Makefile \
|
||||
|
@@ -6,7 +6,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 2001 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 2001 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# This software is licensed as described in the file COPYING, which
|
||||
# you should have received as part of this distribution. The terms
|
||||
@@ -21,10 +21,7 @@
|
||||
#
|
||||
# $Id$
|
||||
###########################################################################
|
||||
#
|
||||
# The idea to this kind of setup info script was stolen from numerous
|
||||
# other packages, such as neon, libxml and gnome.
|
||||
#
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
includedir=@includedir@
|
||||
|
@@ -35,7 +35,7 @@
|
||||
(setq tab-width 8
|
||||
indent-tabs-mode nil ; Use spaces. Not tabs.
|
||||
comment-column 40
|
||||
c-font-lock-extra-types (append '("bool" "CURL" "CURLcode" "ssize_t" "size_t" "socklen_t" "fd_set" "time_t" "curl_off_t" "curl_socket_t" "in_addr_t" "CURLSHcode" "CURLMcode" "Curl_addrinfo"))
|
||||
c-font-lock-extra-types (append '("bool" "CURL" "CURLcode" "ssize_t" "size_t" "curl_socklen_t" "fd_set" "time_t" "curl_off_t" "curl_socket_t" "in_addr_t" "CURLSHcode" "CURLMcode" "Curl_addrinfo"))
|
||||
)
|
||||
;; keybindings for C, C++, and Objective-C. We can put these in
|
||||
;; c-mode-base-map because of inheritance ...
|
||||
|
39
diff-exclude
Normal file
39
diff-exclude
Normal file
@@ -0,0 +1,39 @@
|
||||
diff-exclude
|
||||
*~
|
||||
*.orig
|
||||
*.org
|
||||
*.rej
|
||||
configure
|
||||
Makefile
|
||||
Makefile.in
|
||||
*.pid
|
||||
*.bak
|
||||
*.o
|
||||
*.lo
|
||||
*.Plo
|
||||
*.Po
|
||||
config.log
|
||||
config.status
|
||||
autom4te.cache
|
||||
*.patch
|
||||
CVS
|
||||
*.asc
|
||||
curl_config.h
|
||||
*.la
|
||||
*.lai
|
||||
libtool
|
||||
ltmain.sh
|
||||
missing
|
||||
mkinstalldirs
|
||||
.#*
|
||||
aclocal.m4
|
||||
hugehelp.c
|
||||
.deps
|
||||
.libs
|
||||
libcurl.pc
|
||||
curl-config
|
||||
stamp-h*
|
||||
curllib.dsp
|
||||
curllib.vcproj
|
||||
*.spec
|
||||
curl.list
|
@@ -32,7 +32,7 @@ C
|
||||
C++
|
||||
|
||||
Written by Jean-Philippe Barrette-LaPierre
|
||||
http://rrette.com/textpattern/index.php?s=cURLpp
|
||||
http://curlpp.org/
|
||||
|
||||
Ch
|
||||
|
||||
@@ -54,6 +54,10 @@ Dylan
|
||||
Written by Chris Double
|
||||
http://dylanlibs.sourceforge.net/
|
||||
|
||||
Eiffel
|
||||
Written by Eiffel Software
|
||||
http://curl.haxx.se/libcurl/eiffel/
|
||||
|
||||
Euphoria
|
||||
|
||||
Written by Ray Smith
|
||||
|
100
docs/FAQ
100
docs/FAQ
@@ -1,4 +1,4 @@
|
||||
Updated: Jan 14, 2009 (http://curl.haxx.se/docs/faq.html)
|
||||
Updated: Jun 9, 2009 (http://curl.haxx.se/docs/faq.html)
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
@@ -19,6 +19,7 @@ FAQ
|
||||
1.9 Where do I buy commercial support for curl?
|
||||
1.10 How many are using curl?
|
||||
1.11 Why don't you update ca-bundle.crt
|
||||
1.12 I have a problem who can I chat with?
|
||||
|
||||
2. Install Related Problems
|
||||
2.1 configure doesn't find OpenSSL even when it is installed
|
||||
@@ -26,7 +27,7 @@ FAQ
|
||||
2.1.2 only the libssl lib is missing
|
||||
2.2 Does curl work/build with other SSL libraries?
|
||||
2.3 Where can I find a copy of LIBEAY32.DLL?
|
||||
2.4 Does curl support Socks (RFC 1928) ?
|
||||
2.4 Does curl support SOCKS (RFC 1928) ?
|
||||
|
||||
3. Usage Problems
|
||||
3.1 curl: (1) SSL is disabled, https: not supported
|
||||
@@ -42,7 +43,7 @@ FAQ
|
||||
3.11 How do I POST with a different Content-Type?
|
||||
3.12 Why do FTP specific features over HTTP proxy fail?
|
||||
3.13 Why does my single/double quotes fail?
|
||||
3.14 Does curl support javascript or pac (automated proxy config)?
|
||||
3.14 Does curl support Javascript or PAC (automated proxy config)?
|
||||
3.15 Can I do recursive fetches with curl?
|
||||
3.16 What certificates do I need when I use SSL?
|
||||
3.17 How do I list the root dir of an FTP server?
|
||||
@@ -71,6 +72,7 @@ FAQ
|
||||
4.14 Redirects work in browser but not with curl!
|
||||
4.15 FTPS doesn't work
|
||||
4.16 My HTTP POST or PUT requests are slow!
|
||||
4.17 Non-functional connect timeouts on Windows
|
||||
|
||||
5. libcurl Issues
|
||||
5.1 Is libcurl thread-safe?
|
||||
@@ -87,6 +89,7 @@ FAQ
|
||||
5.12 Can I make libcurl fake or hide my real IP address?
|
||||
5.13 How do I stop an ongoing transfer?
|
||||
5.14 Using C++ non-static functions for callbacks?
|
||||
5.15 How do I get an FTP directory listing?
|
||||
|
||||
6. License Issues
|
||||
6.1 I have a GPL program, can I use the libcurl library?
|
||||
@@ -95,7 +98,7 @@ FAQ
|
||||
6.4 I have a program that uses LGPL libraries, can I use libcurl?
|
||||
6.5 Can I modify curl/libcurl for my program and keep the changes secret?
|
||||
6.6 Can you please change the curl/libcurl license to XXXX?
|
||||
6.7 What are my obligations when using libcurl in my commerical apps?
|
||||
6.7 What are my obligations when using libcurl in my commercial apps?
|
||||
|
||||
7. PHP/CURL Issues
|
||||
7.1 What is PHP/CURL?
|
||||
@@ -343,6 +346,12 @@ FAQ
|
||||
Firefox (by running 'make ca-bundle), or by using our online service setup
|
||||
for this purpose: http://curl.haxx.se/docs/caextract.html
|
||||
|
||||
1.12 I have a problem who can I chat with?
|
||||
|
||||
There's a bunch of friendly people hanging out in the #curl channel on the
|
||||
IRC network irc.freenode.net. If you're polite and nice, chances are big
|
||||
that you can get -- or provide -- help instantly.
|
||||
|
||||
|
||||
2. Install Related Problems
|
||||
|
||||
@@ -399,7 +408,7 @@ FAQ
|
||||
accurate and up-to-date pointers to recent OpenSSL DLLs and other binary
|
||||
packages.
|
||||
|
||||
2.4 Does curl support Socks (RFC 1928) ?
|
||||
2.4 Does curl support SOCKS (RFC 1928) ?
|
||||
|
||||
Yes, SOCKS 4 and 5 are supported.
|
||||
|
||||
@@ -557,27 +566,27 @@ FAQ
|
||||
Remember that curl works and runs on more operating systems than most single
|
||||
individuals have ever tried.
|
||||
|
||||
3.14 Does curl support javascript or pac (automated proxy config)?
|
||||
3.14 Does curl support Javascript or PAC (automated proxy config)?
|
||||
|
||||
Many web pages do magic stuff using embedded javascript. Curl and libcurl
|
||||
Many web pages do magic stuff using embedded Javascript. Curl and libcurl
|
||||
have no built-in support for that, so it will be treated just like any other
|
||||
contents.
|
||||
|
||||
.pac files are a netscape invention and are sometimes used by organizations
|
||||
to allow them to differentiate which proxies to use. The .pac contents is
|
||||
just a javascript program that gets invoked by the browser and that returns
|
||||
the name of the proxy to connect to. Since curl doesn't support javascript,
|
||||
just a Javascript program that gets invoked by the browser and that returns
|
||||
the name of the proxy to connect to. Since curl doesn't support Javascript,
|
||||
it can't support .pac proxy configuration either.
|
||||
|
||||
Some work-arounds usually suggested to overcome this javascript dependency:
|
||||
Some work-arounds usually suggested to overcome this Javascript dependency:
|
||||
|
||||
- Depending on the javascript complexity, write up a script that
|
||||
- Depending on the Javascript complexity, write up a script that
|
||||
translates it to another language and execute that.
|
||||
|
||||
- Read the javascript code and rewrite the same logic in another language.
|
||||
- Read the Javascript code and rewrite the same logic in another language.
|
||||
|
||||
- Implement a javascript interpreter, people have successfully used the
|
||||
Mozilla javascript engine in the past.
|
||||
- Implement a Javascript interpreter, people have successfully used the
|
||||
Mozilla Javascript engine in the past.
|
||||
|
||||
- Ask your admins to stop this, for a static proxy setup or similar.
|
||||
|
||||
@@ -658,21 +667,22 @@ FAQ
|
||||
|
||||
4.2 Why do I get problems when I use & or % in the URL?
|
||||
|
||||
In general unix shells, the & letter is treated special and when used, it
|
||||
In general unix shells, the & symbol is treated specially and when used, it
|
||||
runs the specified command in the background. To safely send the & as a part
|
||||
of a URL, you should quote the entire URL by using single (') or double (")
|
||||
quotes around it.
|
||||
quotes around it. Similar problems can also occur on some shells with other
|
||||
characters, including ?*!$~(){}<>\|;`. When in doubt, quote the URL.
|
||||
|
||||
An example that would invoke a remote CGI that uses &-letters could be:
|
||||
An example that would invoke a remote CGI that uses &-symbols could be:
|
||||
|
||||
curl 'http://www.altavista.com/cgi-bin/query?text=yes&q=curl'
|
||||
|
||||
In Windows, the standard DOS shell treats the %-letter specially and you
|
||||
need to use TWO %-letters for each single one you want to use in the URL.
|
||||
In Windows, the standard DOS shell treats the %-symbol specially and you
|
||||
need to use TWO %-symbols for each single one you want to use in the URL.
|
||||
|
||||
Also note that if you want the literal %-letter to be part of the data you
|
||||
Also note that if you want the literal %-symbol to be part of the data you
|
||||
pass in a POST using -d/--data you must encode it as '%25' (which then also
|
||||
needs the %-letter doubled on Windows machines).
|
||||
needs the %-symbol doubled on Windows machines).
|
||||
|
||||
4.3 How can I use {, }, [ or ] to specify multiple URLs?
|
||||
|
||||
@@ -787,7 +797,7 @@ FAQ
|
||||
|
||||
This is supported in curl 7.10.6 or later. No earlier curl version knows
|
||||
of this magic. Later versions require the OpenSSL or Microsoft Windows
|
||||
libraries to provide this functionality. Using GnuTLS or NSS libraries will
|
||||
libraries to provide this functionality. Using the NSS library will
|
||||
not provide NTLM authentication functionality in curl.
|
||||
|
||||
NTLM is a Microsoft proprietary protocol. Proprietary formats are evil. You
|
||||
@@ -848,7 +858,7 @@ FAQ
|
||||
- Meta tags. You can write a HTML tag that will cause the browser to
|
||||
redirect to another given URL after a certain time.
|
||||
|
||||
- Javascript. You can write a javascript program embeded in a HTML page
|
||||
- Javascript. You can write a Javascript program embedded in a HTML page
|
||||
that redirects the browser to another given URL.
|
||||
|
||||
There is no way to make curl follow these redirects. You must either
|
||||
@@ -884,6 +894,23 @@ FAQ
|
||||
You can disable libcurl's use of the Expect: header the same way you disable
|
||||
any header, using -H / CURLOPT_HTTPHEADER, or by forcing it to use HTTP 1.0.
|
||||
|
||||
4.17 Non-functional connect timeouts
|
||||
|
||||
In most Windows setups having a timeout longer than 21 seconds make no
|
||||
difference, as it will only send 3 TCP SYN packets and no more. The second
|
||||
packet sent three seconds after the first and the third six seconds after
|
||||
the second. No more than three packets are sent, no matter how long the
|
||||
timeout is set.
|
||||
|
||||
See option TcpMaxConnectRetransmissions on this page:
|
||||
http://support.microsoft.com/?scid=kb%3Ben-us%3B175523&x=6&y=7
|
||||
|
||||
Also, even on non-Windows systems there may run a firewall or anti-virus
|
||||
software or similar that accepts the connection but does not actually do
|
||||
anything else. This will make (lib)curl to consider the connection connected
|
||||
and thus the connect timeout won't trigger.
|
||||
|
||||
|
||||
5. libcurl Issues
|
||||
|
||||
5.1 Is libcurl thread-safe?
|
||||
@@ -897,7 +924,7 @@ FAQ
|
||||
If you use a OpenSSL-powered libcurl in a multi-threaded environment, you
|
||||
need to provide one or two locking functions:
|
||||
|
||||
http://www.openssl.org/docs/crypto/threads.html#DESCRIPTION
|
||||
http://www.openssl.org/docs/crypto/threads.html
|
||||
|
||||
If you use a GnuTLS-powered libcurl in a multi-threaded environment, you
|
||||
need to provide locking function(s) for libgcrypt (which is used by GnuTLS
|
||||
@@ -1104,6 +1131,27 @@ FAQ
|
||||
curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:staticFunction);
|
||||
curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, this);
|
||||
|
||||
5.15 How do I get an FTP directory listing?
|
||||
|
||||
If you end the FTP URL you request with a slash, libcurl will provide you
|
||||
with a directory listing of that given directory. You can also set
|
||||
CURLOPT_CUSTOMREQUEST to alter what exact listing command libcurl would use
|
||||
to list the files.
|
||||
|
||||
The follow-up question that tend to follow the previous one, is how a
|
||||
program is supposed to parse the directory listing. How does it know what's
|
||||
a file and what's a dir and what's a symlink etc. The harsh reality is that
|
||||
FTP provides no such fine and easy-to-parse output. The output format FTP
|
||||
servers respond to LIST commands are entirely at the server's own liking and
|
||||
the NLST output doesn't reveal any types and in many cases don't even
|
||||
include all the directory entries. Also, both LIST and NLST tend to hide
|
||||
unix-style hidden files (those that start with a dot) by default so you need
|
||||
to do "LIST -a" or similar to see them.
|
||||
|
||||
The application thus needs to parse the LIST output. One such existing
|
||||
list parser is available at http://cr.yp.to/ftpparse.html
|
||||
|
||||
|
||||
6. License Issues
|
||||
|
||||
Curl and libcurl are released under a MIT/X derivate license. The license is
|
||||
@@ -1158,7 +1206,7 @@ FAQ
|
||||
libraries that use it. It should be possible for everyone to use libcurl or
|
||||
curl in their projects, no matter what license they already have in use.
|
||||
|
||||
6.7 What are my obligations when using libcurl in my commerical apps?
|
||||
6.7 What are my obligations when using libcurl in my commercial apps?
|
||||
|
||||
Next to none. All you need to adhere to is the MIT-style license (stated in
|
||||
the COPYING file) which basically says you have to include the copyright
|
||||
@@ -1174,7 +1222,7 @@ FAQ
|
||||
your app.
|
||||
|
||||
As can be seen here: http://curl.haxx.se/docs/companies.html and
|
||||
elsewhere, more and more companies are dicovering the power
|
||||
elsewhere, more and more companies are discovering the power
|
||||
of libcurl and take advantage of it even in commercial environments.
|
||||
|
||||
|
||||
|
42
docs/INSTALL
42
docs/INSTALL
@@ -177,6 +177,9 @@ Win32
|
||||
KB140584 - How to link with the correct C Run-Time (CRT) library
|
||||
http://support.microsoft.com/kb/140584/en-us
|
||||
|
||||
KB190799 - Potential Errors Passing CRT Objects Across DLL Boundaries
|
||||
http://msdn.microsoft.com/en-us/library/ms235460
|
||||
|
||||
If your app is misbehaving in some strange way, or it is suffering
|
||||
from memory corruption, before asking for further help, please try
|
||||
first to rebuild every single library your app uses as well as your
|
||||
@@ -203,8 +206,8 @@ Win32
|
||||
environment variables, for example:
|
||||
|
||||
set ZLIB_PATH=c:\zlib-1.2.3
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8g
|
||||
set LIBSSH2_PATH=c:\libssh2-0.17
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8k
|
||||
set LIBSSH2_PATH=c:\libssh2-1.1
|
||||
|
||||
ATTENTION: if you want to build with libssh2 support you have to use latest
|
||||
version 0.17 - previous versions will NOT work with 7.17.0 and later!
|
||||
@@ -272,7 +275,7 @@ Win32
|
||||
Before running nmake define the OPENSSL_PATH environment variable with
|
||||
the root/base directory of OpenSSL, for example:
|
||||
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8g
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8k
|
||||
|
||||
Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root
|
||||
directory. 'nmake vc-ssl' will create a libcurl static and dynamic
|
||||
@@ -383,7 +386,7 @@ Win32
|
||||
- Modify lib/setup.h
|
||||
- Modify lib/Makefile.vc6
|
||||
- Add defines to Project/Settings/C/C++/General/Preprocessor Definitions
|
||||
in the curllib.dsw/curllib.dsp Visual C++ 6 IDE project.
|
||||
in the vc6libcurl.dsw/vc6libcurl.dsp Visual C++ 6 IDE project.
|
||||
|
||||
|
||||
Important static libcurl usage note
|
||||
@@ -563,9 +566,8 @@ NetWare
|
||||
- optional OpenSSL sources (version 0.9.8 or later build with BSD sockets);
|
||||
you can find precompiled packages at:
|
||||
http://www.gknw.net/development/ossl/netware/
|
||||
for CLIB-based builds OpenSSL needs to be patched to build with BSD
|
||||
sockets (currently only a winsock-based CLIB build is supported):
|
||||
http://www.gknw.net/development/ossl/netware/patches/v_0.9.8g/openssl-0.9.8g.diff
|
||||
for CLIB-based builds OpenSSL 0.9.8h or later is required - earlier versions
|
||||
dont support buildunf with CLIB BSD sockets.
|
||||
- optional SSH2 sources (version 0.17 or later);
|
||||
|
||||
Set a search path to your compiler, linker and tools; on Linux make
|
||||
@@ -703,6 +705,32 @@ Symbian OS
|
||||
to obtain that first.
|
||||
|
||||
|
||||
VxWorks
|
||||
========
|
||||
Build for VxWorks is performed using cross compilation.
|
||||
That means you build on Windows machine using VxWorks tools and
|
||||
run the built image on the VxWorks device.
|
||||
|
||||
To build libcurl for VxWorks you need:
|
||||
|
||||
- CYGWIN (free, http://cygwin.com/)
|
||||
- Wind River Workbench (commercial)
|
||||
|
||||
If you have CYGWIN and Workbench installed on you machine
|
||||
follow after next steps:
|
||||
|
||||
1. Open the Command Prompt window and change directory ('cd')
|
||||
to the libcurl 'lib' folder.
|
||||
2. Add CYGWIN 'bin' folder to the PATH environment variable.
|
||||
For example, type 'set PATH=C:/embedded/cygwin/bin;%PATH%'.
|
||||
3. Adjust environment variables defined in 'Environment' section
|
||||
of the Makefile.vxworks file to point to your software folders.
|
||||
4. Build the libcurl by typing 'make -f ./Makefile.vxworks'
|
||||
|
||||
As a result the libcurl.a library should be created in the 'lib' folder.
|
||||
To clean the build results type 'make -f ./Makefile.vxworks clean'.
|
||||
|
||||
|
||||
CROSS COMPILE
|
||||
=============
|
||||
(This section was graciously brought to us by Jim Duey, with additions by
|
||||
|
65
docs/INSTALL.cmake
Executable file
65
docs/INSTALL.cmake
Executable file
@@ -0,0 +1,65 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
How To Compile with CMake
|
||||
|
||||
Building with CMake
|
||||
==========================
|
||||
This document describes how to compile, build and install curl and libcurl
|
||||
from source code using the CMake build tool. To build with CMake, you will
|
||||
of course have to first install CMake. The minimum required version of
|
||||
CMake is specifed in the file CMakeLists.txt found in the top of the curl
|
||||
source tree. Once the correct version of CMake is installed you can follow
|
||||
the instructions below for the platform you are building on.
|
||||
|
||||
CMake builds can be configured either from the command line, or from one
|
||||
of CMake's GUI's.
|
||||
|
||||
Command Line CMake
|
||||
==================
|
||||
A command line build of Curl is similar to the autotools build of Curl. It
|
||||
consists of the following steps after you have unpacked the source.
|
||||
# 1st create an out of source build tree parallel to the curl source
|
||||
# tree and change into that directory
|
||||
mkdir curl-build
|
||||
cd curl-build
|
||||
# now run CMake from the build tree, giving it the path to the top of
|
||||
# the Curl source tree. CMake will pick a compiler for you. If you
|
||||
# want to specifiy the compile, you can set the CC environment
|
||||
# variable prior to running CMake.
|
||||
cmake ../curl
|
||||
make
|
||||
# currently make test and make install are not implemented
|
||||
#make test
|
||||
#make install
|
||||
|
||||
ccmake
|
||||
=========
|
||||
CMake comes with a curses based interface called ccmake. To run ccmake on
|
||||
a curl use the instructions for the command line cmake, but substitue
|
||||
ccmake ../curl for cmake ../curl. This will bring up a curses interface
|
||||
with instructions on the bottom of the screen. You can press the "c" key
|
||||
to configure the project, and the "g" key to generate the project. After
|
||||
the project is generated, you can run make.
|
||||
|
||||
cmake-gui
|
||||
=========
|
||||
CMake also comes with a Qt based GUI called cmake-gui. To configure with
|
||||
cmake-gui, you run cmake-gui and follow these steps:
|
||||
1. Fill in the "Where is the source code" combo box with the path to
|
||||
the curl source tree.
|
||||
2. Fill in the "Where to build the binaries" combo box with the path
|
||||
to the directory for your build tree, ideally this should not be the
|
||||
same as the source tree, but a parallel diretory called curl-build or
|
||||
something similar.
|
||||
3. Once the source and binary directories are specified, press the
|
||||
"Configure" button.
|
||||
4. Select the native build tool that you want to use.
|
||||
5. At this point you can change any of the options presented in the
|
||||
GUI. Once you have selected all the options you want, click the
|
||||
"Generate" button.
|
||||
6. Run the native build tool that you used CMake to genratate.
|
||||
|
@@ -103,9 +103,9 @@ Windows vs Unix
|
||||
Inside the source code, We make an effort to avoid '#ifdef [Your OS]'. All
|
||||
conditionals that deal with features *should* instead be in the format
|
||||
'#ifdef HAVE_THAT_WEIRD_FUNCTION'. Since Windows can't run configure scripts,
|
||||
we maintain two config-win32.h files (one in lib/ and one in src/) that are
|
||||
supposed to look exactly as a config.h file would have looked like on a
|
||||
Windows machine!
|
||||
we maintain two curl_config-win32.h files (one in lib/ and one in src/) that
|
||||
are supposed to look exactly as a curl_config.h file would have looked like on
|
||||
a Windows machine!
|
||||
|
||||
Generally speaking: always remember that this will be compiled on dozens of
|
||||
operating systems. Don't walk on the edge.
|
||||
@@ -472,3 +472,6 @@ Building Releases
|
||||
need to fill in the Makefile.am files properly for which files that should
|
||||
be included in the release archives.
|
||||
|
||||
NOTE: you need to have curl checked out from CVS to be able to do a proper
|
||||
release build. The release tarballs do not have everything setup in order to
|
||||
do releases properly.
|
||||
|
@@ -3,6 +3,46 @@ join in and help us correct one or more of these! Also be sure to check the
|
||||
changelog of the current development status, as one or more of these problems
|
||||
may have been fixed since this was written!
|
||||
|
||||
72. "Pausing pipeline problems."
|
||||
http://curl.haxx.se/mail/lib-2009-07/0214.html
|
||||
|
||||
71. TFTP block size / better integration in transfer
|
||||
http://curl.haxx.se/mail/lib-2009-08/0028.html
|
||||
|
||||
70. Problem re-using easy handle after call to curl_multi_remove_handle
|
||||
http://curl.haxx.se/mail/lib-2009-07/0249.html
|
||||
|
||||
69. debugging a crash in Curl_pgrsTime/checkPendPipeline?
|
||||
http://curl.haxx.se/mail/lib-2009-08/0066.html
|
||||
|
||||
68. "More questions about ares behavior".
|
||||
http://curl.haxx.se/mail/lib-2009-08/0012.html
|
||||
|
||||
67. When creating multipart formposts. The file name part can be encoded with
|
||||
something beyond ascii but currently libcurl will only pass in the verbatim
|
||||
string the app provides. There are several browsers that already do this
|
||||
encoding. The key seems to be the updated draft to RFC2231:
|
||||
http://tools.ietf.org/html/draft-reschke-rfc2231-in-http-02
|
||||
|
||||
66. When using telnet, the time limitation options don't work.
|
||||
http://curl.haxx.se/bug/view.cgi?id=2818950
|
||||
|
||||
65. When doing FTP over a socks proxy or CONNECT through HTTP proxy and the
|
||||
multi interface is used, libcurl will fail if the (passive) TCP connection
|
||||
for the data transfer isn't more or less instant as the code does not
|
||||
properly wait for the connect to be confirmed. See test case 564 for a first
|
||||
shot at a test case.
|
||||
|
||||
64. The threaded resolver used in libcurl on Windows has some kind of race
|
||||
problem when multiple simultanoes resolves are done, like with the multi
|
||||
interface transferring many files in parallell:
|
||||
http://curl.haxx.se/mail/lib-2009-04/0028.html
|
||||
|
||||
63. When CURLOPT_CONNECT_ONLY is used, the handle cannot reliably be re-used
|
||||
for any further requests or transfers. The work-around is then to close that
|
||||
handle with curl_easy_cleanup() and create a new. Some more details:
|
||||
http://curl.haxx.se/mail/lib-2009-04/0300.html
|
||||
|
||||
62. CURLOPT_TIMEOUT does not work properly with the regular multi and
|
||||
multi_socket interfaces. The work-around for apps is to simply remove the
|
||||
easy handle once the time is up. See also:
|
||||
@@ -18,7 +58,8 @@ may have been fixed since this was written!
|
||||
http://curl.haxx.se/mail/lib-2008-08/0462.html
|
||||
|
||||
59. If the CURLOPT_PORT option is used on an FTP URL like
|
||||
"ftp://example.com/file;type=A" the ";type=A" is stripped off.
|
||||
"ftp://example.com/file;type=A" using a proxy, the ";type=A" is stripped off.
|
||||
See the comment in parse_remote_port()
|
||||
|
||||
58. It seems sensible to be able to use CURLOPT_NOBODY and
|
||||
CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is
|
||||
@@ -42,11 +83,6 @@ may have been fixed since this was written!
|
||||
library header files exporting symbols/macros that should be kept private
|
||||
to the KfW library. See ticket #5601 at http://krbdev.mit.edu/rt/
|
||||
|
||||
53. SFTP busy-loop problem. When doing SFTP uploads, we can see that libcurl
|
||||
occasionally will busy-loop while waiting for certain network conditions.
|
||||
Reported by Pavel Shalagin, explained somewhat by Daniel Stenberg here:
|
||||
http://curl.haxx.se/mail/lib-2008-04/0439.html
|
||||
|
||||
52. Gautam Kachroo's issue that identifies a problem with the multi interface
|
||||
where a connection can be re-used without actually being properly
|
||||
SSL-negoatiated:
|
||||
@@ -64,13 +100,6 @@ may have been fixed since this was written!
|
||||
function will return prematurely and will confuse the rest of the HTTP
|
||||
protocol code. This should be very rare.
|
||||
|
||||
45. libcurl built to support ipv6 uses getaddrinfo() to resolve host names.
|
||||
getaddrinfo() sorts the response list which effectively kills how libcurl
|
||||
deals with round-robin DNS entries. All details:
|
||||
http://curl.haxx.se/mail/lib-2007-07/0168.html
|
||||
initial suggested function to use for randomizing the response:
|
||||
http://curl.haxx.se/mail/lib-2007-07/0178.html
|
||||
|
||||
43. There seems to be a problem when connecting to the Microsoft telnet server.
|
||||
http://curl.haxx.se/bug/view.cgi?id=1720605
|
||||
|
||||
|
15
docs/MANUAL
15
docs/MANUAL
@@ -136,6 +136,14 @@ PROXY
|
||||
|
||||
curl -U user:passwd -x my-proxy:888 http://www.get.this/
|
||||
|
||||
A comma-separated list of hosts and domains which do not use the proxy can
|
||||
be specified as:
|
||||
|
||||
curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/
|
||||
|
||||
If the proxy is specified with --proxy1.0 instead of --proxy or -x, then
|
||||
curl will use HTTP/1.0 instead of HTTP/1.1 for any CONNECT attempts.
|
||||
|
||||
curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.
|
||||
|
||||
See also the environment variables Curl support that offer further proxy
|
||||
@@ -504,7 +512,7 @@ CONFIG FILE
|
||||
can also specify the long options without the dashes to make it more
|
||||
readable. You can separate the options and the parameter with spaces, or
|
||||
with = or :. Comments can be used within the file. If the first letter on a
|
||||
line is a '#'-letter the rest of the line is treated as a comment.
|
||||
line is a '#'-symbol the rest of the line is treated as a comment.
|
||||
|
||||
If you want the parameter to contain spaces, you must enclose the entire
|
||||
parameter within double quotes ("). Within those quotes, you specify a
|
||||
@@ -793,8 +801,9 @@ ENVIRONMENT VARIABLES
|
||||
|
||||
NO_PROXY
|
||||
|
||||
If a tail substring of the domain-path for a host matches one of these
|
||||
strings, transactions with that node will not be proxied.
|
||||
If the host name matches one of these strings, or the host is within the
|
||||
domain of one of these strings, transactions with that node will not be
|
||||
proxied.
|
||||
|
||||
|
||||
The usage of the -x/--proxy flag overrides the environment variables.
|
||||
|
16
docs/README.cmake
Executable file
16
docs/README.cmake
Executable file
@@ -0,0 +1,16 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
README.cmake
|
||||
Read the README file first.
|
||||
|
||||
Curl contains CMake build files that provide a way to build Curl with the
|
||||
CMake build tool (www.cmake.org). CMake is a cross platform meta build tool
|
||||
that generates native makefiles and IDE project files. The CMake build
|
||||
system can be used to build Curl on any of its supported platforms.
|
||||
|
||||
Read the INSTALL.cmake file for instructions on how to compile curl with
|
||||
CMake.
|
48
docs/THANKS
48
docs/THANKS
@@ -21,6 +21,7 @@ Alexander Kourakos
|
||||
Alexander Krasnostavsky
|
||||
Alexander Lazic
|
||||
Alexander Zhuravlev
|
||||
Alexey Borzov
|
||||
Alexey Pesternikov
|
||||
Alexey Simak
|
||||
Alexis Carvalho
|
||||
@@ -32,10 +33,12 @@ Andi Jahja
|
||||
Andre Guibert de Bruet
|
||||
Andreas Damm
|
||||
Andreas Faerber
|
||||
Andreas Farber
|
||||
Andreas Ntaflos
|
||||
Andreas Olsson
|
||||
Andreas Rieke
|
||||
Andreas Schuldei
|
||||
Andreas Wurf
|
||||
Andres Garcia
|
||||
Andrew Benham
|
||||
Andrew Biggs
|
||||
@@ -44,11 +47,13 @@ Andrew Francis
|
||||
Andrew Fuller
|
||||
Andrew Moise
|
||||
Andrew Wansink
|
||||
Andrew de los Reyes
|
||||
Andr<EFBFBD>s Garc<72>a
|
||||
Andy Cedilnik
|
||||
Andy Serpa
|
||||
Andy Tsouladze
|
||||
Angus Mackay
|
||||
Anthony Bryan
|
||||
Antoine Calando
|
||||
Anton Kalmykov
|
||||
Arkadiusz Miskiewicz
|
||||
@@ -59,13 +64,16 @@ Ates Goral
|
||||
Augustus Saunders
|
||||
Avery Fay
|
||||
Axel Tillequin
|
||||
Balint Szilakszi
|
||||
Bart Whiteley
|
||||
Bas Mevissen
|
||||
Ben Greear
|
||||
Ben Madsen
|
||||
Ben Van Hof
|
||||
Benjamin Gerard
|
||||
Bernard Leak
|
||||
Bertrand Demiddelaer
|
||||
Bill Egert
|
||||
Bjorn Reese
|
||||
Bj<EFBFBD>rn Stenberg
|
||||
Bob Schader
|
||||
@@ -76,6 +84,7 @@ Brendan Jurd
|
||||
Brent Beardsley
|
||||
Brian Akins
|
||||
Brian Dessent
|
||||
Brian J. Murrell
|
||||
Brian R Duffy
|
||||
Brian Ulm
|
||||
Brock Noland
|
||||
@@ -84,12 +93,15 @@ Bryan Henderson
|
||||
Bryan Kemp
|
||||
Caolan McNamara
|
||||
Casey O'Donnell
|
||||
Chad Monroe
|
||||
Chih-Chung Chang
|
||||
Chris "Bob Bob"
|
||||
Chris Combes
|
||||
Chris Deidun
|
||||
Chris Flerackers
|
||||
Chris Gaukroger
|
||||
Chris Maltby
|
||||
Christian Krause
|
||||
Christian Kurz
|
||||
Christian Robottom Reis
|
||||
Christian Vogt
|
||||
@@ -106,6 +118,7 @@ Colin Watson
|
||||
Colm Buckley
|
||||
Constantine Sapuntzakis
|
||||
Cory Nelson
|
||||
Craig A West
|
||||
Craig Davison
|
||||
Craig Markwardt
|
||||
Cris Bailiff
|
||||
@@ -139,6 +152,7 @@ David Houlder
|
||||
David Hull
|
||||
David J Meyer
|
||||
David James
|
||||
David Kierznowski
|
||||
David Kimdon
|
||||
David Lang
|
||||
David LeBlanc
|
||||
@@ -178,6 +192,7 @@ Dustin Boswell
|
||||
Dylan Ellicott
|
||||
Dylan Salisbury
|
||||
Early Ehlinger
|
||||
Ebenezer Ikonne
|
||||
Edin Kadribasic
|
||||
Eduard Bloch
|
||||
Eetu Ojanen
|
||||
@@ -210,6 +225,7 @@ Forrest Cahoon
|
||||
Frank Hempel
|
||||
Frank Keeney
|
||||
Frank Ticheler
|
||||
Fred Machado
|
||||
Fred New
|
||||
Fred Noz
|
||||
Frederic Lepied
|
||||
@@ -235,6 +251,7 @@ Giuseppe Attardi
|
||||
Giuseppe D'Ambrosio
|
||||
Glen Nakamura
|
||||
Glen Scott
|
||||
Grant Erickson
|
||||
Greg Hewgill
|
||||
Greg Morse
|
||||
Greg Onufer
|
||||
@@ -255,6 +272,7 @@ Hardeep Singh
|
||||
Harshal Pradhan
|
||||
Heikki Korpela
|
||||
Henrik Storner
|
||||
Hidemoto Nakada
|
||||
Hzhijun
|
||||
Ian Ford
|
||||
Ian Gulliver
|
||||
@@ -274,6 +292,7 @@ Ingo Wilken
|
||||
Jacky Lam
|
||||
Jacob Meuser
|
||||
James Bursa
|
||||
James Cheng
|
||||
James Clancy
|
||||
James Cone
|
||||
James Gallagher
|
||||
@@ -308,6 +327,9 @@ Jes Badwal
|
||||
Jesper Jensen
|
||||
Jesse Noller
|
||||
Jim Drash
|
||||
Jim Freeman
|
||||
Jim Meyering
|
||||
Jocelyn Jaubert
|
||||
Joe Halpin
|
||||
Joe Malicki
|
||||
Joel Chen
|
||||
@@ -330,6 +352,7 @@ Jonatan Lander
|
||||
Jonathan Hseu
|
||||
Jongki Suwandi
|
||||
Jose Kahan
|
||||
Josef Wolf
|
||||
Josh Kapell
|
||||
Juan F. Codagnone
|
||||
Juan Ignacio Herv<72>s
|
||||
@@ -344,6 +367,7 @@ J
|
||||
J<EFBFBD>rn Hartroth
|
||||
Kai Sommerfeld
|
||||
Kai-Uwe Rommel
|
||||
Kamil Dudka
|
||||
Kang-Jin Lee
|
||||
Karl Moerder
|
||||
Karol Pietrzak
|
||||
@@ -356,6 +380,7 @@ Keith Mok
|
||||
Ken Hirsch
|
||||
Ken Rastatter
|
||||
Kent Boortz
|
||||
Keshav Krity
|
||||
Kevin Fisk
|
||||
Kevin Lussier
|
||||
Kevin Reed
|
||||
@@ -378,14 +403,17 @@ Lars J. Aas
|
||||
Lars Nilsson
|
||||
Lars Torben Wilson
|
||||
Lau Hang Kin
|
||||
Laurent Rabret
|
||||
Legoff Vincent
|
||||
Lehel Bernadt
|
||||
Len Krause
|
||||
Lenaic Lefever
|
||||
Lenny Rachitsky
|
||||
Liam Healy
|
||||
Linas Vepstas
|
||||
Ling Thio
|
||||
Linus Nielsen Feltzing
|
||||
Lisa Xu
|
||||
Loic Dachary
|
||||
Loren Kirkby
|
||||
Luca Altea
|
||||
@@ -406,6 +434,8 @@ Mario Schroeder
|
||||
Mark Butler
|
||||
Mark Davies
|
||||
Mark Eichin
|
||||
Mark Incley
|
||||
Mark Karpeles
|
||||
Mark Lentczner
|
||||
Markus Koetter
|
||||
Markus Moeller
|
||||
@@ -415,6 +445,7 @@ Martin C. Martin
|
||||
Martin Drasar
|
||||
Martin Hedenfalk
|
||||
Martin Skinner
|
||||
Martin Storsjo
|
||||
Marty Kuhrt
|
||||
Maruko
|
||||
Massimiliano Ziccardi
|
||||
@@ -434,11 +465,13 @@ Mekonikum
|
||||
Mettgut Jamalla
|
||||
Michael Benedict
|
||||
Michael Calmer
|
||||
Michael Cronenworth
|
||||
Michael Curtis
|
||||
Michael Goffioul
|
||||
Michael Jahn
|
||||
Michael Jerris
|
||||
Michael Mealling
|
||||
Michael Smith
|
||||
Michael Wallner
|
||||
Michal Bonino
|
||||
Michal Marek
|
||||
@@ -487,7 +520,9 @@ P R Schaffner
|
||||
Pascal Terjan
|
||||
Patrick Bihan-Faou
|
||||
Patrick Monnerat
|
||||
Patrick Scott
|
||||
Patrick Smith
|
||||
Patrik Thunstrom
|
||||
Paul Harrington
|
||||
Paul Marquis
|
||||
Paul Moore
|
||||
@@ -496,11 +531,13 @@ Paul Querna
|
||||
Pavel Cenek
|
||||
Pavel Orehov
|
||||
Pawel A. Gajda
|
||||
Pawel Kierski
|
||||
Pedro Neves
|
||||
Pete Su
|
||||
Peter Bray
|
||||
Peter Forret
|
||||
Peter Heuchert
|
||||
Peter Korsgaard
|
||||
Peter Lamberg
|
||||
Peter O'Gorman
|
||||
Peter Pentchev
|
||||
@@ -513,6 +550,7 @@ Peter Wullinger
|
||||
Peteris Krumins
|
||||
Phil Blundell
|
||||
Phil Karn
|
||||
Phil Lisiecki
|
||||
Phil Pellouchoud
|
||||
Philip Gladstone
|
||||
Philip Langdale
|
||||
@@ -520,12 +558,14 @@ Philippe Hameau
|
||||
Philippe Raoult
|
||||
Philippe Vaucher
|
||||
Pierre
|
||||
Pierre Brico
|
||||
Pooyan McSporran
|
||||
Pramod Sharma
|
||||
Puneet Pawaia
|
||||
Quagmire
|
||||
Rafa Muyo
|
||||
Rafael Sagula
|
||||
Rainer Koenig
|
||||
Ralf S. Engelschall
|
||||
Ralph Beckmann
|
||||
Ralph Mitchell
|
||||
@@ -588,9 +628,11 @@ Scott Cantor
|
||||
Scott Davis
|
||||
Scott McCreary
|
||||
Sebastien Willemijns
|
||||
Senthil Raja Velu
|
||||
Sergio Ballestrero
|
||||
Seshubabu Pasam
|
||||
Sh Diao
|
||||
Sharad Gupta
|
||||
Shard
|
||||
Shawn Poulson
|
||||
Shmulik Regev
|
||||
@@ -605,6 +647,7 @@ Spiridonoff A.V
|
||||
Stadler Stephan
|
||||
Stefan Esser
|
||||
Stefan Krause
|
||||
Stefan Teleman
|
||||
Stefan Ulrich
|
||||
Stephan Bergmann
|
||||
Stephen Collyer
|
||||
@@ -621,6 +664,7 @@ Steven Bazyl
|
||||
Steven G. Johnson
|
||||
Stoned Elipot
|
||||
Sven Neuhaus
|
||||
Sven Wegener
|
||||
S<EFBFBD>bastien Willemijns
|
||||
T. Bharath
|
||||
T. Yamada
|
||||
@@ -629,8 +673,10 @@ Thomas J. Moore
|
||||
Thomas Klausner
|
||||
Thomas Schwinge
|
||||
Thomas Tonino
|
||||
Tim Ansell
|
||||
Tim Baker
|
||||
Tim Bartley
|
||||
Tim Chen
|
||||
Tim Costello
|
||||
Tim Sneddon
|
||||
Tobias Rundstr<74>m
|
||||
@@ -651,6 +697,7 @@ Ton Voon
|
||||
Toon Verwaest
|
||||
Tor Arntsen
|
||||
Torsten Foertsch
|
||||
Toshio Kuratomi
|
||||
Toshiyuki Maezawa
|
||||
Traian Nicolescu
|
||||
Troels Walsted Hansen
|
||||
@@ -666,6 +713,7 @@ Vincent Bronner
|
||||
Vincent Le Normand
|
||||
Vincent Penquerc'h
|
||||
Vincent Sanders
|
||||
Vlad Grachov
|
||||
Vladimir Lazarenko
|
||||
Vojtech Janota
|
||||
Vojtech Minarik
|
||||
|
16
docs/TODO
16
docs/TODO
@@ -328,10 +328,10 @@ to provide the data to send.
|
||||
|
||||
8.1 Make NTLM work without OpenSSL functions
|
||||
|
||||
Get NTLM working using the functions provided by libgcrypt, since GnuTLS
|
||||
already depends on that to function. Not strictly SSL/TLS related, but
|
||||
hey... Another option is to get available DES and MD4 source code from the
|
||||
cryptopp library. They are fine license-wise, but are C++.
|
||||
Get NTLM working using the functions provided by NSS. Not strictly
|
||||
SSL/TLS related, but hey... Another option is to get available DES and
|
||||
MD4 source code from the cryptopp library. They are fine license-wise,
|
||||
but are C++.
|
||||
|
||||
8.2 SSL engine stuff
|
||||
|
||||
@@ -551,7 +551,13 @@ to provide the data to send.
|
||||
curl_strnequal
|
||||
|
||||
They will instead become curlx_ - alternatives. That makes the curl app
|
||||
still capable of building with them from source.
|
||||
still capable of using them, by building with them from source.
|
||||
|
||||
These functions have no purpose anymore:
|
||||
|
||||
curl_multi_socket
|
||||
|
||||
curl_multi_socket_all
|
||||
|
||||
15.5 remove CURLOPT_FAILONERROR
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user