Compare commits
685 Commits
curl-7_18_
...
curl-7_19_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6ebc2b2561 | ||
![]() |
95b817e8d7 | ||
![]() |
558f034007 | ||
![]() |
72ea805298 | ||
![]() |
79ffbf7fe1 | ||
![]() |
4f0d286d2c | ||
![]() |
6fb5888e55 | ||
![]() |
b5810dfe9d | ||
![]() |
85a79f9d67 | ||
![]() |
d24465b79a | ||
![]() |
c67a99ff27 | ||
![]() |
bae4e12302 | ||
![]() |
09df1cdb5c | ||
![]() |
2946d87e48 | ||
![]() |
6a2d7bff1a | ||
![]() |
9b7b2b347f | ||
![]() |
33638d5347 | ||
![]() |
2ae7d2e6ea | ||
![]() |
ffc490ef89 | ||
![]() |
29b75ca46f | ||
![]() |
004dde18a7 | ||
![]() |
3440e8d208 | ||
![]() |
e138ae5ec9 | ||
![]() |
bf8ba229e0 | ||
![]() |
19d0a7495e | ||
![]() |
099b62f124 | ||
![]() |
8ce78ca488 | ||
![]() |
fc9610919c | ||
![]() |
e082d2403c | ||
![]() |
370c3afc71 | ||
![]() |
93357ef017 | ||
![]() |
753592cc70 | ||
![]() |
b150e6866d | ||
![]() |
2f475fa9ea | ||
![]() |
ecff50c2b4 | ||
![]() |
6f53cf9cc6 | ||
![]() |
1056202b48 | ||
![]() |
709de3d621 | ||
![]() |
f9894f4ebc | ||
![]() |
74d3b80d70 | ||
![]() |
4b01dfe369 | ||
![]() |
fc09d10560 | ||
![]() |
59b2e3ea4a | ||
![]() |
243cf29793 | ||
![]() |
9ded8fbe58 | ||
![]() |
9258928c2d | ||
![]() |
132cd3aa2c | ||
![]() |
fef60d9d41 | ||
![]() |
2fdd24c724 | ||
![]() |
852a02daff | ||
![]() |
2a6148716c | ||
![]() |
5ca692fc89 | ||
![]() |
3e2487493e | ||
![]() |
fdcb0cd2bc | ||
![]() |
4962e1772d | ||
![]() |
d7d5618498 | ||
![]() |
3f3d6ebe66 | ||
![]() |
ec28988bfa | ||
![]() |
db23538898 | ||
![]() |
423a18cecc | ||
![]() |
f164260eee | ||
![]() |
a091121293 | ||
![]() |
d744c85310 | ||
![]() |
c9f2c54c49 | ||
![]() |
f29d223ed5 | ||
![]() |
8dabd34432 | ||
![]() |
a104a365e3 | ||
![]() |
62d94ff342 | ||
![]() |
cbc04a7d40 | ||
![]() |
71d3c5bf41 | ||
![]() |
bc69e46ad1 | ||
![]() |
13f035b905 | ||
![]() |
79cbe50894 | ||
![]() |
1c04aa54a7 | ||
![]() |
b718283327 | ||
![]() |
b34390017b | ||
![]() |
8980f89370 | ||
![]() |
f46d47239f | ||
![]() |
13dc82b9d4 | ||
![]() |
a243dd4587 | ||
![]() |
9d5d6c557b | ||
![]() |
a604682805 | ||
![]() |
70b1cd798f | ||
![]() |
578f42d588 | ||
![]() |
e3ad6d2bd1 | ||
![]() |
4b64a8d20d | ||
![]() |
fcc8700218 | ||
![]() |
e5b713ee63 | ||
![]() |
9849c6b847 | ||
![]() |
9bb5da968c | ||
![]() |
d5a71fd567 | ||
![]() |
0f98ba4729 | ||
![]() |
a6a2174bf7 | ||
![]() |
f07c3171e3 | ||
![]() |
6cb1e3f3fa | ||
![]() |
81b64f69a5 | ||
![]() |
17e1f58fd6 | ||
![]() |
582833b338 | ||
![]() |
48be4fa069 | ||
![]() |
2af05bdd3c | ||
![]() |
4dbfc91e2b | ||
![]() |
95cef39def | ||
![]() |
00fb5bcf35 | ||
![]() |
42eeb93d99 | ||
![]() |
afe7bb4b33 | ||
![]() |
0f5f91df0b | ||
![]() |
f209a4804b | ||
![]() |
5794ffe4bd | ||
![]() |
ceb49d3742 | ||
![]() |
44142f8234 | ||
![]() |
347213d124 | ||
![]() |
8ca51bc68a | ||
![]() |
56f852a64f | ||
![]() |
1c68e79091 | ||
![]() |
473a050f0b | ||
![]() |
6768e81d5d | ||
![]() |
3743f515cf | ||
![]() |
3e0b6a7d1f | ||
![]() |
ef72f7d513 | ||
![]() |
2f71461b29 | ||
![]() |
d8cab4c133 | ||
![]() |
95a093e97b | ||
![]() |
68bb51c55b | ||
![]() |
fb8fe6f2b3 | ||
![]() |
3e61c90dbe | ||
![]() |
ac18b471d2 | ||
![]() |
bbe2386bff | ||
![]() |
2f47248e3c | ||
![]() |
315bb970a5 | ||
![]() |
65b0f6049d | ||
![]() |
0033535e21 | ||
![]() |
3e4a8cb800 | ||
![]() |
ad638da2c2 | ||
![]() |
a923d8541c | ||
![]() |
66fb9ca5f6 | ||
![]() |
11cb78c5f8 | ||
![]() |
527a5f0980 | ||
![]() |
6e878d2ca4 | ||
![]() |
cf30b24706 | ||
![]() |
709a2ed474 | ||
![]() |
ecd30cc8bb | ||
![]() |
0105ad5e39 | ||
![]() |
cebaab8ee5 | ||
![]() |
34281925d6 | ||
![]() |
e90c4fa770 | ||
![]() |
a06e077938 | ||
![]() |
7bdae7be4f | ||
![]() |
c125d83e9e | ||
![]() |
2abf9221e3 | ||
![]() |
6f1e89085c | ||
![]() |
5303cdc4af | ||
![]() |
feb03e4717 | ||
![]() |
64e3a091c3 | ||
![]() |
a2c50a980c | ||
![]() |
23478b891f | ||
![]() |
aab2d52b25 | ||
![]() |
9a9041f1ce | ||
![]() |
0aa704935b | ||
![]() |
ede7f8f5de | ||
![]() |
3c317d2fac | ||
![]() |
b55b0258e0 | ||
![]() |
55a8098d48 | ||
![]() |
389e50ff1e | ||
![]() |
1df4043ad7 | ||
![]() |
b000b8a736 | ||
![]() |
7eab7fa353 | ||
![]() |
58f7c82d52 | ||
![]() |
4d1cd0da93 | ||
![]() |
9ee7a014c9 | ||
![]() |
e1ab7db87d | ||
![]() |
14a5596346 | ||
![]() |
2eba5f33b9 | ||
![]() |
60a3773c50 | ||
![]() |
e8e8177e9d | ||
![]() |
f1fe04245a | ||
![]() |
8bb208e8f8 | ||
![]() |
f8a3aa91cd | ||
![]() |
019bde82ce | ||
![]() |
ca5e38751c | ||
![]() |
b5b25b39e9 | ||
![]() |
1784523cc6 | ||
![]() |
d71d10adbc | ||
![]() |
40fb750589 | ||
![]() |
62a6b8d4a6 | ||
![]() |
24b1890710 | ||
![]() |
3a1d28379a | ||
![]() |
c57285d199 | ||
![]() |
68cfe929c4 | ||
![]() |
6237fd2c16 | ||
![]() |
b023f9bd2a | ||
![]() |
b7ac885d38 | ||
![]() |
cbd9dcbe41 | ||
![]() |
4594187732 | ||
![]() |
63818f8488 | ||
![]() |
8af61cdb66 | ||
![]() |
ab83c0fd5b | ||
![]() |
3cc40a2584 | ||
![]() |
c11933b3fd | ||
![]() |
4687699726 | ||
![]() |
012dcb4893 | ||
![]() |
f01d18e4b9 | ||
![]() |
dabd3cd355 | ||
![]() |
fa001f27a5 | ||
![]() |
40b2e06a7f | ||
![]() |
8008499028 | ||
![]() |
3ac6929919 | ||
![]() |
8d36acd29b | ||
![]() |
e54209d643 | ||
![]() |
f6a958dc3a | ||
![]() |
2548e7b23f | ||
![]() |
97046a3548 | ||
![]() |
a7d52c414f | ||
![]() |
479466a495 | ||
![]() |
fa2a8f6fb8 | ||
![]() |
ddfa33be79 | ||
![]() |
25c76a760e | ||
![]() |
14240e9e10 | ||
![]() |
a3045b4e49 | ||
![]() |
b0685b3576 | ||
![]() |
138c57c76a | ||
![]() |
182a415555 | ||
![]() |
6e789fc516 | ||
![]() |
09f278121e | ||
![]() |
ed50e3f1b4 | ||
![]() |
3a499099af | ||
![]() |
931fc45f05 | ||
![]() |
6076c74041 | ||
![]() |
b4fdccf87a | ||
![]() |
8d012181b0 | ||
![]() |
d6344d9b5f | ||
![]() |
cb9410ded2 | ||
![]() |
6838fb32af | ||
![]() |
74d77cb140 | ||
![]() |
7ad3abfd05 | ||
![]() |
7c6df7132e | ||
![]() |
f27299dc3b | ||
![]() |
47724ef238 | ||
![]() |
357389a905 | ||
![]() |
42cabc14d4 | ||
![]() |
a948ca1669 | ||
![]() |
9cef14dfb2 | ||
![]() |
2d15d84a01 | ||
![]() |
1035469662 | ||
![]() |
296a6f7749 | ||
![]() |
5cff8124b0 | ||
![]() |
90e2510e2f | ||
![]() |
9251dd7b24 | ||
![]() |
3615063fbc | ||
![]() |
09664f1ab8 | ||
![]() |
bdf1157d55 | ||
![]() |
b4a5ce89c2 | ||
![]() |
660516914e | ||
![]() |
4c1c479fcf | ||
![]() |
309651dc82 | ||
![]() |
b13b9f3331 | ||
![]() |
108e584983 | ||
![]() |
f3b4071209 | ||
![]() |
fe1d024351 | ||
![]() |
0de08d418f | ||
![]() |
109edaae6d | ||
![]() |
d69a630989 | ||
![]() |
987b67bd2e | ||
![]() |
f4d56802f9 | ||
![]() |
9dfd6eacf4 | ||
![]() |
5aed78e183 | ||
![]() |
011e5dd864 | ||
![]() |
ae654266df | ||
![]() |
03986f1b8b | ||
![]() |
bc649593e4 | ||
![]() |
cc0285da7f | ||
![]() |
f3bc16f4f5 | ||
![]() |
15f94858f2 | ||
![]() |
5febd06c25 | ||
![]() |
9eb7fe8ac0 | ||
![]() |
1f26ea4a85 | ||
![]() |
912c29fd8c | ||
![]() |
eea468918e | ||
![]() |
537490e391 | ||
![]() |
de8e362d4a | ||
![]() |
7a588144b7 | ||
![]() |
7f2999aa43 | ||
![]() |
a3498f96ef | ||
![]() |
637bfa0252 | ||
![]() |
1c8f689ecb | ||
![]() |
7a8b11d716 | ||
![]() |
a67e207866 | ||
![]() |
5817209158 | ||
![]() |
b39d409aa2 | ||
![]() |
a18fb9448b | ||
![]() |
1f3007dbb4 | ||
![]() |
5dafa4a270 | ||
![]() |
e93bcbeee1 | ||
![]() |
adc032e7d8 | ||
![]() |
248c2b9bf5 | ||
![]() |
a8baa05023 | ||
![]() |
7066a79466 | ||
![]() |
4a623f7ed2 | ||
![]() |
f18700ef64 | ||
![]() |
52d9a3c34f | ||
![]() |
d785ed2588 | ||
![]() |
4ff37a4ed1 | ||
![]() |
fe167b6ba2 | ||
![]() |
f042a7419d | ||
![]() |
bc0ebfcdeb | ||
![]() |
57d13c770a | ||
![]() |
1692384636 | ||
![]() |
7634091325 | ||
![]() |
bdc8f59c17 | ||
![]() |
817efbc29c | ||
![]() |
d2661cb4b2 | ||
![]() |
9b0110f50c | ||
![]() |
5876381f86 | ||
![]() |
c4edc25d01 | ||
![]() |
36361d14cf | ||
![]() |
c8fe5f485c | ||
![]() |
1ac1212925 | ||
![]() |
3d4fb5136d | ||
![]() |
b6b03c8ab9 | ||
![]() |
432945e422 | ||
![]() |
052f9ddedb | ||
![]() |
a96784b98e | ||
![]() |
e06944438a | ||
![]() |
fa1009b6fc | ||
![]() |
b377e857bd | ||
![]() |
9a806f667b | ||
![]() |
979c9ce8e3 | ||
![]() |
b217e6eed7 | ||
![]() |
6b7e74a030 | ||
![]() |
7fdeb14e6d | ||
![]() |
8a323f8354 | ||
![]() |
a7abd5bf70 | ||
![]() |
932b589780 | ||
![]() |
27c282a6ee | ||
![]() |
5373289574 | ||
![]() |
7d0eabaa80 | ||
![]() |
e7f5d12cb6 | ||
![]() |
f14e020370 | ||
![]() |
e933b28aaf | ||
![]() |
1bc490077a | ||
![]() |
7d773abe50 | ||
![]() |
f22114aeed | ||
![]() |
0919de4511 | ||
![]() |
3e5292a052 | ||
![]() |
2066d60b16 | ||
![]() |
51e84c77e7 | ||
![]() |
775d9e0615 | ||
![]() |
a20d55fb64 | ||
![]() |
1b37baf656 | ||
![]() |
bffe69a151 | ||
![]() |
71525352f0 | ||
![]() |
facc5f7ec5 | ||
![]() |
184229b1e5 | ||
![]() |
3e488c4f19 | ||
![]() |
3f84e373ac | ||
![]() |
ac6d6ec2f1 | ||
![]() |
f11d5d9de8 | ||
![]() |
ed2dbefa73 | ||
![]() |
39f23aec6b | ||
![]() |
362422641e | ||
![]() |
a9dc900515 | ||
![]() |
3a705696af | ||
![]() |
2cfb8a2bf0 | ||
![]() |
21ee1c2d01 | ||
![]() |
a00febe1a0 | ||
![]() |
1e7125ae7b | ||
![]() |
aa4a7471dd | ||
![]() |
69a03ce23c | ||
![]() |
0f50cd7623 | ||
![]() |
669c555874 | ||
![]() |
1cfb73a129 | ||
![]() |
2a585c2fba | ||
![]() |
32a83128e6 | ||
![]() |
fe7bb33af8 | ||
![]() |
da6fa34f02 | ||
![]() |
37a358ab93 | ||
![]() |
3452c8d693 | ||
![]() |
336992cc54 | ||
![]() |
13afcbd1eb | ||
![]() |
e58a3fd0aa | ||
![]() |
57625b6c4c | ||
![]() |
0d058d2174 | ||
![]() |
8d49a8f278 | ||
![]() |
b4b6cfdb1c | ||
![]() |
6b7ccde156 | ||
![]() |
9b0fd007fd | ||
![]() |
6f3ef94836 | ||
![]() |
08ac9866e0 | ||
![]() |
a17fadea3a | ||
![]() |
e30bbfd85d | ||
![]() |
120f9d81b2 | ||
![]() |
fa38839a80 | ||
![]() |
d8f109176c | ||
![]() |
bbb1b99ce1 | ||
![]() |
0cd8840dba | ||
![]() |
d4b253ba3e | ||
![]() |
aee7fc118b | ||
![]() |
60f0b4fffe | ||
![]() |
a95e600eb0 | ||
![]() |
a25959184e | ||
![]() |
0e5da5b8bc | ||
![]() |
ddfa4b8896 | ||
![]() |
d816a11bca | ||
![]() |
7820391cb9 | ||
![]() |
148866bc73 | ||
![]() |
0b57c47547 | ||
![]() |
02db4450df | ||
![]() |
ed7af82bdf | ||
![]() |
e3b5673e98 | ||
![]() |
82412f218f | ||
![]() |
7c648782bc | ||
![]() |
ee64d14733 | ||
![]() |
bfaab6ed6b | ||
![]() |
97333deb3f | ||
![]() |
400d9d4205 | ||
![]() |
ad1145a201 | ||
![]() |
513c22df3b | ||
![]() |
b5afd53138 | ||
![]() |
72b4b3c7f8 | ||
![]() |
eb60ba23f5 | ||
![]() |
69aac49f79 | ||
![]() |
67f139e016 | ||
![]() |
654f047302 | ||
![]() |
e6c23672b2 | ||
![]() |
1058e5fdde | ||
![]() |
6929d9355f | ||
![]() |
8c377ad965 | ||
![]() |
a81a16beac | ||
![]() |
d92945bb8a | ||
![]() |
90a6a59a2f | ||
![]() |
8bae3d9007 | ||
![]() |
98042b858d | ||
![]() |
a837bd08b0 | ||
![]() |
2c61e9c76a | ||
![]() |
da97f78ae0 | ||
![]() |
2e1a9da5e2 | ||
![]() |
422fd933f5 | ||
![]() |
2594124825 | ||
![]() |
d09b6ecaa5 | ||
![]() |
fb2e71b9bd | ||
![]() |
68b67e24f2 | ||
![]() |
c1e2341f0a | ||
![]() |
70d834c512 | ||
![]() |
65ee4e4555 | ||
![]() |
5304b13365 | ||
![]() |
e547bfa933 | ||
![]() |
36ddb13d1f | ||
![]() |
74e3def5b3 | ||
![]() |
24d41452b0 | ||
![]() |
2597020d22 | ||
![]() |
2d0fea2650 | ||
![]() |
c1a71ad14f | ||
![]() |
024c7641a9 | ||
![]() |
5c56bdf229 | ||
![]() |
af779fa57c | ||
![]() |
9918541795 | ||
![]() |
04d5c8fb77 | ||
![]() |
5980b3cbb0 | ||
![]() |
10074bfcc6 | ||
![]() |
3940e69c91 | ||
![]() |
0ace5f6553 | ||
![]() |
b8a9f19515 | ||
![]() |
6cd007838d | ||
![]() |
72870e2c57 | ||
![]() |
9c8997cbe4 | ||
![]() |
c6efb82526 | ||
![]() |
5abfdc0140 | ||
![]() |
d8bc4a0e9a | ||
![]() |
8ad2fdd71e | ||
![]() |
a2e45a2211 | ||
![]() |
621c2b9015 | ||
![]() |
b39d1e9b9d | ||
![]() |
e1c456407e | ||
![]() |
3fe8251dfb | ||
![]() |
930a45e7a9 | ||
![]() |
afc66554d7 | ||
![]() |
998ab15570 | ||
![]() |
c0d258ca17 | ||
![]() |
230e4547e8 | ||
![]() |
4cf33909ee | ||
![]() |
323273382c | ||
![]() |
6f0a2608b4 | ||
![]() |
ea86edbd82 | ||
![]() |
e7b5a8e6cb | ||
![]() |
27eaf0cf02 | ||
![]() |
c84904d8c8 | ||
![]() |
01e1c85304 | ||
![]() |
4774582dfb | ||
![]() |
1ed09ff7a4 | ||
![]() |
d89cf27d65 | ||
![]() |
35d5ba2626 | ||
![]() |
e5f0c38fa9 | ||
![]() |
47925f3dd7 | ||
![]() |
82c5950c7e | ||
![]() |
1806879bb2 | ||
![]() |
998b046d70 | ||
![]() |
ec4f6e93c2 | ||
![]() |
b49dcfb52b | ||
![]() |
c62d55342d | ||
![]() |
f7815fa93c | ||
![]() |
6e305e11e3 | ||
![]() |
b97606f0b0 | ||
![]() |
f26154bfa9 | ||
![]() |
d220ac8582 | ||
![]() |
c57e748107 | ||
![]() |
d6f8f16068 | ||
![]() |
466429efb0 | ||
![]() |
89977c73d1 | ||
![]() |
a9a05a32bd | ||
![]() |
2045c79e37 | ||
![]() |
e60b5245d3 | ||
![]() |
90bbabce56 | ||
![]() |
ddfbe8b649 | ||
![]() |
d001f6a396 | ||
![]() |
d31da176eb | ||
![]() |
e664cd5826 | ||
![]() |
b8abeab6d3 | ||
![]() |
4aa176c127 | ||
![]() |
498e939f0e | ||
![]() |
9a22b893b6 | ||
![]() |
76d0d40946 | ||
![]() |
791ad1210e | ||
![]() |
100945694a | ||
![]() |
abe2e6ecf7 | ||
![]() |
d8efc99217 | ||
![]() |
0163b5b8be | ||
![]() |
baee3996ab | ||
![]() |
8ad1928d93 | ||
![]() |
24bf52bc69 | ||
![]() |
862049c490 | ||
![]() |
a8fc98aa30 | ||
![]() |
d70f33748c | ||
![]() |
b006c31b7b | ||
![]() |
ae45a462e0 | ||
![]() |
3cb0dd6685 | ||
![]() |
c2a84aa6f0 | ||
![]() |
9346e55d5a | ||
![]() |
8fc2f8ef62 | ||
![]() |
512b9ac194 | ||
![]() |
560a82aeaf | ||
![]() |
7358db5c27 | ||
![]() |
e059efda1b | ||
![]() |
164a985115 | ||
![]() |
ade57a781c | ||
![]() |
9f12ed83f2 | ||
![]() |
8aabd9839b | ||
![]() |
882fbb0433 | ||
![]() |
15eee5dbbb | ||
![]() |
cfc1d037ff | ||
![]() |
c24ed07596 | ||
![]() |
08aab6a620 | ||
![]() |
2748c64d60 | ||
![]() |
c4f1ab3cc5 | ||
![]() |
5e06ec8409 | ||
![]() |
04d0a84ae5 | ||
![]() |
c1dfe2c529 | ||
![]() |
7f88e8badb | ||
![]() |
2f66ff2e4f | ||
![]() |
76c251513e | ||
![]() |
80afddacc8 | ||
![]() |
7543c9df50 | ||
![]() |
83fb13329d | ||
![]() |
e06c923605 | ||
![]() |
ab1169895f | ||
![]() |
01e81c7e10 | ||
![]() |
7bf1142ae0 | ||
![]() |
af9f7a952b | ||
![]() |
514592b892 | ||
![]() |
d72efff878 | ||
![]() |
e4c60e2030 | ||
![]() |
ed80eb5b0f | ||
![]() |
60dd765b3d | ||
![]() |
b380dd030f | ||
![]() |
19479ea021 | ||
![]() |
d708ef6731 | ||
![]() |
d1238baecb | ||
![]() |
0510759bc4 | ||
![]() |
6d5cca5ed0 | ||
![]() |
e2b82b4325 | ||
![]() |
cf4570a06f | ||
![]() |
6df5dddd90 | ||
![]() |
d4e9b141db | ||
![]() |
ec0665a931 | ||
![]() |
836fa69e2e | ||
![]() |
9026dc2da4 | ||
![]() |
98c9af4c59 | ||
![]() |
e481d679b2 | ||
![]() |
eb68aa38e3 | ||
![]() |
082237e2b5 | ||
![]() |
dd08a7a4f6 | ||
![]() |
a60c9ef88e | ||
![]() |
4e3d235e04 | ||
![]() |
19da3606f9 | ||
![]() |
fc9e0d2249 | ||
![]() |
21a0f09081 | ||
![]() |
b84b71f524 | ||
![]() |
3d29bda9f8 | ||
![]() |
459c664043 | ||
![]() |
45edad84cb | ||
![]() |
fd31f7e7e5 | ||
![]() |
7b2531da24 | ||
![]() |
848a13654d | ||
![]() |
1cca8f5a30 | ||
![]() |
12ffcf0b45 | ||
![]() |
852989856d | ||
![]() |
7dfdbf8fbe | ||
![]() |
1eebb90030 | ||
![]() |
ab71654078 | ||
![]() |
7a6cff4b3a | ||
![]() |
c3ba2198b1 | ||
![]() |
ff748f1a41 | ||
![]() |
b8193b6321 | ||
![]() |
113d0937de | ||
![]() |
d0a506661f | ||
![]() |
4e71173928 | ||
![]() |
e0f0a2ccee | ||
![]() |
96edebf4d9 | ||
![]() |
3783b455c0 | ||
![]() |
7ee5238f5e | ||
![]() |
b398169567 | ||
![]() |
1960eebc2d | ||
![]() |
ad1dd08693 | ||
![]() |
95fd093c4a | ||
![]() |
ed1ad28e29 | ||
![]() |
7076505c24 | ||
![]() |
5825cf9457 | ||
![]() |
ff40415aee | ||
![]() |
f48eb36f75 | ||
![]() |
768e3e796e | ||
![]() |
3869d4a3a7 | ||
![]() |
a87c468c5c | ||
![]() |
7abf50a5c0 | ||
![]() |
d3f46eb61b | ||
![]() |
72c58b0d1d | ||
![]() |
6c89e1b311 | ||
![]() |
09777a4fc2 | ||
![]() |
0331071346 | ||
![]() |
614ae7b2bc | ||
![]() |
af41ada7aa | ||
![]() |
6a33a4456e | ||
![]() |
e0c2a39ad4 | ||
![]() |
cda1f2be58 | ||
![]() |
79e06c4147 | ||
![]() |
ead2618c31 | ||
![]() |
84eb9fee76 | ||
![]() |
79300cdcd9 | ||
![]() |
a9591ad1b7 | ||
![]() |
098106b54c | ||
![]() |
74bb59fa57 | ||
![]() |
c97d112b30 | ||
![]() |
2dc20b84c1 | ||
![]() |
39b689f966 | ||
![]() |
6fd3ff4032 | ||
![]() |
ab8d1464a7 | ||
![]() |
bf90d11a31 | ||
![]() |
a08b6ae813 | ||
![]() |
74c500b6ec | ||
![]() |
26aeadbc3e | ||
![]() |
d0a4b50e19 | ||
![]() |
ebaf06a741 | ||
![]() |
34d837c2dd | ||
![]() |
7607d5145b | ||
![]() |
12a90289ed | ||
![]() |
592697583d | ||
![]() |
b50a96982e | ||
![]() |
aa2a54c10a | ||
![]() |
532d4b5106 | ||
![]() |
5788719988 | ||
![]() |
ac0b911eda | ||
![]() |
10232bfe9e | ||
![]() |
a9c1ca9fc5 | ||
![]() |
d051dd8087 | ||
![]() |
bf52cef16f | ||
![]() |
16a9c5e02b | ||
![]() |
fef1a90938 | ||
![]() |
27870d48ff | ||
![]() |
2f66f3ce08 | ||
![]() |
369df58a0d | ||
![]() |
3d08b352a2 | ||
![]() |
d13be06aaa | ||
![]() |
f1c69192da | ||
![]() |
a2314225e0 | ||
![]() |
1e482fe6a8 | ||
![]() |
80e7f9b9de | ||
![]() |
d219269f1b | ||
![]() |
0ff0512aff |
@@ -4,6 +4,7 @@ Makefile
|
||||
libtool
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
aclocal.m4.bak
|
||||
configure
|
||||
config.h
|
||||
config.status
|
||||
|
11
Makefile.am
11
Makefile.am
@@ -23,8 +23,11 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist curl-config.in \
|
||||
curl-style.el sample.emacs RELEASE-NOTES buildconf buildconf.bat libcurl.pc.in
|
||||
curl-style.el sample.emacs RELEASE-NOTES buildconf buildconf.bat \
|
||||
libcurl.pc.in vc6curl.dsw
|
||||
|
||||
bin_SCRIPTS = curl-config
|
||||
|
||||
@@ -72,7 +75,7 @@ test-torture:
|
||||
endif
|
||||
|
||||
examples:
|
||||
@(cd docs/examples; $(MAKE) all)
|
||||
@(cd docs/examples; $(MAKE) check)
|
||||
|
||||
#
|
||||
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
|
||||
@@ -135,3 +138,7 @@ uninstall-hook:
|
||||
ca-bundle: lib/mk-ca-bundle.pl
|
||||
@echo "generate a fresh ca-bundle.crt"
|
||||
@perl $< -b -l -u lib/ca-bundle.crt
|
||||
|
||||
ca-firefox: lib/firefox-db2pem.sh
|
||||
@echo "generate a fresh ca-bundle.crt"
|
||||
./lib/firefox-db2pem.sh lib/ca-bundle.crt
|
||||
|
@@ -265,4 +265,6 @@ ca-bundle: lib/mk-ca-bundle.pl
|
||||
@echo "generate a fresh ca-bundle.crt"
|
||||
@perl $< -b -l -u lib/ca-bundle.crt
|
||||
|
||||
|
||||
ca-firefox: lib/firefox-db2pem.sh
|
||||
@echo "generate a fresh ca-bundle.crt"
|
||||
./lib/firefox-db2pem.sh lib/ca-bundle.crt
|
||||
|
5
README
5
README
@@ -30,10 +30,9 @@ CONTACT
|
||||
|
||||
WEB SITE
|
||||
|
||||
Visit the curl web site or mirrors for the latest news and downloads:
|
||||
Visit the curl web site for the latest news and downloads:
|
||||
|
||||
Sweden http://curl.haxx.se/
|
||||
Mirrors http://curlm.haxx.se/
|
||||
http://curl.haxx.se/
|
||||
|
||||
CVS
|
||||
|
||||
|
123
RELEASE-NOTES
123
RELEASE-NOTES
@@ -1,59 +1,69 @@
|
||||
Curl and libcurl 7.18.1
|
||||
Curl and libcurl 7.19.0
|
||||
|
||||
Public curl releases: 104
|
||||
Command line options: 126
|
||||
curl_easy_setopt() options: 150
|
||||
Public functions in libcurl: 56
|
||||
Public web site mirrors: 39
|
||||
Public curl releases: 106
|
||||
Command line options: 127
|
||||
curl_easy_setopt() options: 153
|
||||
Public functions in libcurl: 58
|
||||
Known libcurl bindings: 36
|
||||
Contributors: 621
|
||||
Contributors: 654
|
||||
|
||||
This release includes the following changes:
|
||||
|
||||
o curl_off_t gets its size/typedef somewhat differently than before. This _may_
|
||||
cause an ABI change for you. See lib/README.curl_off_t for a full explanation.
|
||||
|
||||
o added support for HttpOnly cookies
|
||||
o 'make ca-bundle' downloads and generates an updated ca bundle file
|
||||
o we no longer distribute or install a ca cert bundle
|
||||
o SSLv2 is now disabled by default for SSL operations
|
||||
o the test509-style setting URL in callback is officially no longer supported
|
||||
o support a full chain of certificates in a given PKCS12 certificate
|
||||
o resumed transfers work with SFTP
|
||||
o added type checking macros for curl_easy_setopt() and curl_easy_getinfo(),
|
||||
watch out for new warnings in code using libcurl (needs gcc-4.3 and
|
||||
currently only works in C mode)
|
||||
o curl_easy_setopt(), curl_easy_getinfo(), curl_share_setopt() and
|
||||
curl_multi_setopt() uses are now checked to use exactly three arguments
|
||||
o --with-ca-path=DIR configure option allows to set an openSSL CApath instead
|
||||
of a default ca bundle.
|
||||
o Added CURLINFO_PRIMARY_IP
|
||||
o Added CURLOPT_CRLFILE and CURLE_SSL_CRL_BADFILE
|
||||
o Added CURLOPT_ISSUERCERT and CURLE_SSL_ISSUER_ERROR
|
||||
o curl's option parser for boolean options reworked
|
||||
o Added --remote-name-all
|
||||
o Now builds for the INTEGRITY operating system
|
||||
o Added CURLINFO_APPCONNECT_TIME
|
||||
o Added test selection by key word in runtests.pl
|
||||
o the curl tool's -w option support the %{ssl_verify_result} variable
|
||||
o Added CURLOPT_ADDRESS_SCOPE and scope parsing of the URL according to RFC4007
|
||||
o Support --append on SFTP uploads (not with OpenSSH, though)
|
||||
o Added curlbuild.h and curlrules.h to the external library interface
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
o improved pipelining
|
||||
o improved strdup replacement
|
||||
o GnuTLS-built libcurl failed when doing global cleanup and reinit
|
||||
o error message problem when unable to resolve a host on Windows
|
||||
o Accept: header replacing
|
||||
o not verifying server certs with GnuTLS still failed if gnutls had
|
||||
problems with the cert
|
||||
o when using the multi interface and a handle is removed while still having
|
||||
a transfer going on, the connection is now closed by force
|
||||
o bad re-use of SSL connections in non-complete state
|
||||
o test case 405 failures with GnuTLS builds
|
||||
o crash when connection cache size is 1 and Curl_do() failed
|
||||
o GnuTLS-built libcurl can now be forced to prefer SSLv3
|
||||
o crash when doing Negotiate again on a re-used connection
|
||||
o select/poll regression
|
||||
o better MIT kerberos configure check
|
||||
o curl_easy_reset() + SFTP re-used connection download crash
|
||||
o SFTP non-existing file + SFTP existing file error
|
||||
o sharing DNS cache between easy handles running in multiple threads could
|
||||
lead to crash
|
||||
o SFTP upload with CURLOPT_FTP_CREATE_MISSING_DIRS on re-used connection
|
||||
o SFTP infinite loop when given an invalid quote command
|
||||
o curl-config erroneously reported LDAPS support with missing LDAP libraries
|
||||
o SCP infinite loop when downloading a zero byte file
|
||||
o setting the CURLOPT_SSL_CTX_FUNCTION with libcurl built without OpenSSL
|
||||
now makes curl_easy_setopt() properly return failure
|
||||
o configure --with-libssh2 (with no given path)
|
||||
o Fixed curl-config --ca
|
||||
o Fixed the multi interface connection re-use with NSS-built libcurl
|
||||
o connection re-use when using the multi interface with pipelining enabled
|
||||
o curl_multi_socket() socket callback fix for close/re-create sockets case
|
||||
o SCP or SFTP over socks proxy crashed
|
||||
o RC4-MD5 cipher now works with NSS-built libcurl
|
||||
o range requests with --head are now done correctly
|
||||
o fallback to gettimeofday when monotonic clock is unavailable at run-time
|
||||
o range numbers could be made to wrongly get output as signed
|
||||
o unexpected 1xx responses hung transfers
|
||||
o FTP transfers segfault when using different CURLOPT_FTP_FILEMETHOD
|
||||
o c-ares powered libcurls can resolve/use IPv6 addresses
|
||||
o poll not working on Windows Vista due to POLLPRI being incorrectly used
|
||||
o user-agent in CONNECT with non-HTTP protocols
|
||||
o CURL_READFUNC_PAUSE problems fixed
|
||||
o --use-ascii now works on Symbian OS, MS-DOS and OS/2
|
||||
o CURLINFO_SSL_VERIFYRESULT is fixed
|
||||
o FTP URLs and IPv6 URLs mangled when sent to proxy with CURLOPT_PORT set
|
||||
o a user name in a proxy URL without a password was parsed incorrectly
|
||||
o library will now be built with _REENTRANT symbol defined only if needed
|
||||
o no longer link with gdi32 on Windows cross-compiled targets
|
||||
o HTTP PUT with -C - sent bad Content-Range: header
|
||||
o HTTP PUT or POST with redirect could lead to hang
|
||||
o re-use of connections with failed SSL connects in the multi interface
|
||||
o NTLM over proxy state was wrongly cleared when host connection was closed
|
||||
o Windows SSPI DLL loading is now done in curl_global_init()
|
||||
o runtests.pl has an improved find-stunnel-and-invoke
|
||||
o FTP sessions could go out of sync on a long header boundary condition
|
||||
o potential buffer overflows in the MS-DOS command-line port fixed
|
||||
o --stderr is now honoured with the -v option
|
||||
o memory leak in libcurl on Windows built with OpenSSL
|
||||
o improved curl_m*printf() integral data type size and signedness handling
|
||||
o error when --dump-header - used with more than one URL
|
||||
o proxy closing connect during CONNECT with auth with the multi interface
|
||||
o CURLOPT_UPLOAD sets HTTP method back to GET or HEAD when passed in a 0
|
||||
o shared cookies could get locked twice
|
||||
o deal with closed connection while doing POST/PUT
|
||||
|
||||
This release includes the following known bugs:
|
||||
|
||||
@@ -63,17 +73,16 @@ Other curl-related news:
|
||||
|
||||
o
|
||||
|
||||
New curl mirrors:
|
||||
|
||||
o http://curl.cuendet.com/ is a new mirror in Atlanta, USA
|
||||
|
||||
This release would not have looked like this without help, code, reports and
|
||||
advice from friends like these:
|
||||
|
||||
Michal Marek, Dmitry Kurochkin, Niklas Angebrand, G<>nter Knauf, Yang Tse,
|
||||
Dan Fandrich, Mike Hommey, Pooyan McSporran, Jerome Muffat-Meridol,
|
||||
Kaspar Brand, Gautam Kachroo, Zmey Petroff, Georg Lippitsch, Sam Listopad,
|
||||
Anatoli Tubman, Mike Protts, Michael Calmer, Brian Ulm, Dmitry Popov,
|
||||
Jes Badwal, Dan Petitt, Stephen Collyer
|
||||
Lenny Rachitsky, Axel Tillequin, Arnaud Ebalard, Yang Tse, Dan Fandrich,
|
||||
Rob Crittenden, Dengminwen, Christopher Palow, Hans-Jurgen May,
|
||||
Phil Pellouchoud, Eduard Bloch, John Lightsey, Stephen Collyer, Tor Arntsen,
|
||||
Rolland Dudemaine, Phil Blundell, Scott Barrett, Andreas Schuldei,
|
||||
Peter Lamberg, David Bau, Pramod Sharma, Yehoshua Hershberg,
|
||||
Constantine Sapuntzakis, Lars Nilsson, Andy Tsouladze, Jamie Lokier,
|
||||
Vincent Le Normand
|
||||
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
||||
|
27
TODO-RELEASE
27
TODO-RELEASE
@@ -1,17 +1,26 @@
|
||||
To be addressed before 7.18.2 (planned release: June 2008)
|
||||
To be addressed before 7.19.0 (planned release: August 2008)
|
||||
=============================
|
||||
|
||||
128 - Phil Blundell's ares and ipv6 fix (feedback lacking)
|
||||
|
||||
129 - Pierre Reiss' libcurl + https + multi = lost information (awaiting
|
||||
better example/clarification on how to figure out when the claimed
|
||||
problem occurs)
|
||||
To be addressed before 7.19.1 (planned release: October 2008)
|
||||
=============================
|
||||
|
||||
130 - Vincent Le Normand's SFTP patch for touch
|
||||
157 - the CERTINFO patch as posted to:
|
||||
http://curl.haxx.se/mail/lib-2008-08/0105.html
|
||||
|
||||
131 - Scott Barrett's Support for CURLOPT_NOBODY with SFTP
|
||||
158 - Martin Drasar's CURLOPT_POSTREDIR work:
|
||||
http://curl.haxx.se/mail/lib-2008-08/0170.html
|
||||
|
||||
132 - Xponaut's CURLFORM_STREAM option to curl_formadd()
|
||||
162 - Craig Perras' note "http upload: how to stop on error"
|
||||
http://curl.haxx.se/mail/archive-2008-08/0138.html
|
||||
|
||||
133 -
|
||||
163 - Detecting illegal attempts at chunked transfers on HTTP 1.0
|
||||
(tests 1069, 1072, 1073)
|
||||
http://curl.haxx.se/mail/archive-2008-08/0435.html
|
||||
|
||||
164 - Automatic downgrading to HTTP 1.0 (tests 1071 through 1074)
|
||||
|
||||
165 - "Problem with CURLOPT_RESUME_FROM and CURLOPT_APPEND" by Daniele Pinau,
|
||||
recipe: http://curl.haxx.se/mail/lib-2008-08/0439.html
|
||||
|
||||
166 -
|
||||
|
2479
acinclude.m4
2479
acinclude.m4
File diff suppressed because it is too large
Load Diff
@@ -21,3 +21,4 @@ depcomp
|
||||
libcares.la
|
||||
missing
|
||||
ares_version.h.dist
|
||||
libcares.pc
|
||||
|
47
ares/AUTHORS
47
ares/AUTHORS
@@ -1,28 +1,37 @@
|
||||
c-ares is based on ares, and these are the people that have worked on it since
|
||||
the fork was made:
|
||||
|
||||
Daniel Stenberg
|
||||
Dominick Meglio
|
||||
liren at vivisimo.com
|
||||
James Bursa
|
||||
Duncan Wilcox
|
||||
Dirk Manske
|
||||
Alexander Lazic
|
||||
Alexey Simak
|
||||
Andreas Rieke
|
||||
Ashish Sharma
|
||||
Brad House
|
||||
Brad Spencer
|
||||
Bram Matthys
|
||||
Dan Fandrich
|
||||
Daniel Stenberg
|
||||
Dirk Manske
|
||||
Dominick Meglio
|
||||
Doug Goldstein
|
||||
Duncan Wilcox
|
||||
Eino Tuominen
|
||||
Erik Kline
|
||||
George Neill
|
||||
Gisle Vanem
|
||||
Guilherme Balena Versiani
|
||||
Gunter Knauf
|
||||
Henrik Stoerner
|
||||
Yang Tse
|
||||
Nick Mathewson
|
||||
Alexander Lazic
|
||||
Andreas Rieke
|
||||
Guilherme Balena Versiani
|
||||
Brad Spencer
|
||||
Ravi Pratap
|
||||
William Ahern
|
||||
Bram Matthys
|
||||
James Bursa
|
||||
Michael Wallner
|
||||
Vlad Dinulescu
|
||||
Brad House
|
||||
Nick Mathewson
|
||||
Phil Blundell
|
||||
Ravi Pratap
|
||||
Robin Cornelius
|
||||
Sebastian at basti79.de
|
||||
Shmulik Regev
|
||||
Ashish Sharma
|
||||
Brad Spencer
|
||||
Steinar H. Gunderson
|
||||
Tofu Linden
|
||||
Vlad Dinulescu
|
||||
William Ahern
|
||||
Yang Tse
|
||||
liren at vivisimo.com
|
||||
|
156
ares/CHANGES
156
ares/CHANGES
@@ -1,5 +1,161 @@
|
||||
Changelog for the c-ares project
|
||||
|
||||
Version 1.5.3 (Aug 29, 2008)
|
||||
|
||||
* Aug 25 2008 (Yang Tse)
|
||||
- Improvement by Brad House:
|
||||
|
||||
This patch addresses an issue in which a response could be sent back to the
|
||||
source port of a client from a different address than the request was made to.
|
||||
This is one form of a DNS cache poisoning attack.
|
||||
|
||||
The patch simply uses recvfrom() rather than recv() and validates that the
|
||||
address returned from recvfrom() matches the address of the server we have
|
||||
connected to. Only necessary on UDP sockets as they are connection-less, TCP
|
||||
is unaffected.
|
||||
|
||||
- Fix by George Neill:
|
||||
Fixed compilation of acountry sample application failure on some systems.
|
||||
|
||||
* Aug 4 2008 (Daniel Stenberg)
|
||||
- Fix by Tofu Linden:
|
||||
|
||||
The symptom:
|
||||
* Users (usually, but not always) on 2-Wire routers and the Comcast service
|
||||
and a wired connection to their router would find that the second and
|
||||
subsequent DNS lookups from fresh processes using c-ares to resolve the same
|
||||
address would cause the process to never see a reply (it keeps polling for
|
||||
around 1m15s before giving up).
|
||||
|
||||
The repro:
|
||||
* On such a machine (and yeah, it took us a lot of QA to find the systems
|
||||
that reproduce such a specific problem!), do 'ahost www.secondlife.com',
|
||||
then do it again. The first process's lookup will work, subsequent lookups
|
||||
will time-out and fail.
|
||||
|
||||
The cause:
|
||||
* init_id_key() was calling randomize_key() *before* it initialized
|
||||
key->state, meaning that the randomness generated by randomize_key() is
|
||||
immediately overwritten with deterministic values. (/dev/urandom was also
|
||||
being read incorrectly in the c-ares version we were using, but this was
|
||||
fixed in a later version.)
|
||||
* This makes the stream of generated query-IDs from any new c-ares process
|
||||
be an identical and predictable sequence of IDs.
|
||||
* This makes the 2-Wire's default built-in DNS server detect these queries
|
||||
as probable-duplicates and (erroneously) not respond at all.
|
||||
|
||||
|
||||
* Aug 4 2008 (Yang Tse)
|
||||
- Autoconf 2.62 has changed the behaviour of the AC_AIX macro which we use.
|
||||
Prior versions of autoconf defined _ALL_SOURCE if _AIX was defined. 2.62
|
||||
version of AC_AIX defines _ALL_SOURCE and other four preprocessor symbols
|
||||
no matter if the system is AIX or not. To keep the traditional behaviour,
|
||||
and an uniform one across autoconf versions AC_AIX is replaced with our
|
||||
own internal macro CARES_CHECK_AIX_ALL_SOURCE.
|
||||
|
||||
* Aug 1 2008 (Yang Tse)
|
||||
- Configure process now checks if the preprocessor _REENTRANT symbol is already
|
||||
defined. If it isn't currently defined a set of checks are performed to test
|
||||
if its definition is required to make visible to the compiler a set of *_r
|
||||
functions. Finally, if _REENTRANT is already defined or needed it takes care
|
||||
of making adjustments necessary to ensure that it is defined equally for the
|
||||
configure process tests and generated config file.
|
||||
|
||||
* Jul 20 2008 (Yang Tse)
|
||||
- When recvfrom prototype uses a void pointer for arguments 2, 5 or 6 this will
|
||||
now cause the definition, as appropriate, of RECVFROM_TYPE_ARG2_IS_VOID,
|
||||
RECVFROM_TYPE_ARG5_IS_VOID or RECVFROM_TYPE_ARG6_IS_VOID.
|
||||
|
||||
* Jul 17 2008 (Yang Tse)
|
||||
- RECVFROM_TYPE_ARG2, RECVFROM_TYPE_ARG5 and RECVFROM_TYPE_ARG6 are now defined
|
||||
to the data type pointed by its respective argument and not the pointer type.
|
||||
|
||||
* Jul 16 2008 (Yang Tse)
|
||||
- Improved configure detection of number of arguments for getservbyport_r.
|
||||
Detection is now based on compilation checks instead of linker ones.
|
||||
|
||||
- Configure process now checks availability of recvfrom() socket function and
|
||||
finds out its return type and the types of its arguments. Added definitions
|
||||
for non-configure systems config files, and introduced macro sreadfrom which
|
||||
will be used on udp sockets as a recvfrom() wrapper in the future.
|
||||
|
||||
* Jul 15 2008 (Yang Tse)
|
||||
- Introduce definition of _REENTRANT symbol in setup.h to improve library
|
||||
usability. Previously the configure process only used the AC_SYS_LARGEFILE
|
||||
macro for debug builds, now it is also used for non-debug ones enabling the
|
||||
use of configure options --enable-largefile and --disable-largefile which
|
||||
might be needed for library compatibility. Remove checking the size of
|
||||
curl_off_t, it is no longer needed.
|
||||
|
||||
* Jul 3 2008 (Daniel Stenberg)
|
||||
- Phil Blundell: If you ask ares_gethostbyname() to do an AF_INET6 lookup and
|
||||
the target host has only A records, it automatically falls back to an
|
||||
AF_INET lookup and gives you the A results. However, if the target host has
|
||||
a CNAME record, this behaviour is defeated since the original query does
|
||||
return some data even though ares_parse_aaa_reply() doesn't consider it
|
||||
relevant. Here's a small patch to make it behave the same with and without
|
||||
the CNAME.
|
||||
|
||||
* Jul 2 2008 (Yang Tse)
|
||||
- Fallback to gettimeofday when monotonic clock is unavailable at run-time.
|
||||
|
||||
* Jun 30 2008 (Daniel Stenberg)
|
||||
|
||||
- As was pointed out to me by Andreas Schuldei, the MAXHOSTNAMELEN define is
|
||||
not posix or anything and thus c-ares failed to build on hurd (and possibly
|
||||
elsewhere). The define was also somewhat artificially used in the windows
|
||||
port. Now, I instead rewrote the use of gethostbyname to enlarge the host
|
||||
name buffer in case of need and totally avoid the use of the MAXHOSTNAMELEN
|
||||
define. I thus also removed the defien from the namser.h file where it was
|
||||
once added for the windows build.
|
||||
|
||||
I also fixed init_by_defaults() function to not leak memory in case if
|
||||
error.
|
||||
|
||||
* Jun 9 2008 (Yang Tse)
|
||||
|
||||
- Make libcares.pc generated file for pkg-config include information relative
|
||||
to the libraries needed for the static linking of c-ares.
|
||||
|
||||
* May 30 2008 (Yang Tse)
|
||||
|
||||
- Brad House fixed a missing header file inclusion in adig sample program.
|
||||
|
||||
Version 1.5.2 (May 29, 2008)
|
||||
|
||||
* May 13 2008 (Daniel Stenberg)
|
||||
|
||||
- Introducing millisecond resolution support for the timeout option. See
|
||||
ares_init_options()'s ARES_OPT_TIMEOUTMS.
|
||||
|
||||
* May 9 2008 (Yang Tse)
|
||||
|
||||
- Use monotonic time source if available, for private function ares__tvnow()
|
||||
|
||||
* May 7 2008 (Daniel Stenberg)
|
||||
|
||||
- Sebastian made c-ares able to return all PTR-records when doing reverse
|
||||
lookups. It is not common practice to have multiple PTR-Records for a single
|
||||
IP, but its perfectly legal and some sites have those.
|
||||
|
||||
- Doug Goldstein provided a configure patch: updates autoconf 2.13 usage to
|
||||
autoconf 2.57 usage (which is the version you have specified as the minimum
|
||||
version). It's a minor change but it does clean up some warnings with newer
|
||||
autoconf (specifically 2.62).
|
||||
|
||||
* May 5 2008 (Yang Tse)
|
||||
|
||||
- Improved parsing of resolver configuration files.
|
||||
|
||||
* April 4 2008 (Daniel Stenberg)
|
||||
|
||||
- Eino Tuominen improved the code when a file is used to seed the randomizer.
|
||||
|
||||
- Alexey Simak made adig support NAPTR records
|
||||
|
||||
- Alexey Simak fixed the VC dsp file by adding the missing source file
|
||||
ares_expand_string.c
|
||||
|
||||
* December 11 2007 (Gisle Vanem)
|
||||
|
||||
- Added another sample application; acountry.c which converts an
|
||||
|
35
ares/FILES
35
ares/FILES
@@ -1,35 +0,0 @@
|
||||
*.c
|
||||
*.h
|
||||
*.3
|
||||
NEWS
|
||||
README
|
||||
README.cares
|
||||
CHANGES
|
||||
FILES
|
||||
maketgz
|
||||
aclocal.m4
|
||||
acinclude.m4
|
||||
Makefile.in
|
||||
Makefile.dj
|
||||
Makefile.m32
|
||||
Makefile.netware
|
||||
Makefile.vc6
|
||||
install-sh
|
||||
mkinstalldirs
|
||||
configure
|
||||
configure.ac
|
||||
config.guess
|
||||
config.sub
|
||||
vc/adig/adig.dep
|
||||
vc/adig/adig.dsp
|
||||
vc/adig/adig.mak
|
||||
vc/adig/adig.plg
|
||||
vc/vc.dsw
|
||||
vc/ahost/ahost.dep
|
||||
vc/ahost/ahost.dsp
|
||||
vc/ahost/ahost.mak
|
||||
vc/ahost/ahost.plg
|
||||
vc/areslib/areslib.dep
|
||||
vc/areslib/areslib.dsp
|
||||
vc/areslib/areslib.mak
|
||||
vc/areslib/areslib.plg
|
@@ -1,12 +1,37 @@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
AUTOMAKE_OPTIONS = foreign nostdinc
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
# Specify our include paths here, and do it relative to $(top_srcdir) and
|
||||
# $(top_builddir), to ensure that these paths which belong to the library
|
||||
# being currently built and tested are searched before the library which
|
||||
# might possibly already be installed in the system.
|
||||
#
|
||||
# When using the low-level hard-hacking memory leak tracking code from
|
||||
# libcurl the generated curl/curlbuild.h file must also be reachable.
|
||||
# Using the libcurl lowlevel code from within c-ares 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.
|
||||
#
|
||||
# $(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) is for c-ares's lib/setup.h and other "c-ares-private" files
|
||||
|
||||
if CURLDEBUG
|
||||
INCLUDES = -I$(top_builddir)/../include \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)
|
||||
else
|
||||
INCLUDES = -I$(top_builddir) \
|
||||
-I$(top_srcdir)
|
||||
endif
|
||||
|
||||
lib_LTLIBRARIES = libcares.la
|
||||
|
||||
man_MANS = $(MANPAGES)
|
||||
|
||||
MSVCFILES = vc/adig/adig.dep vc/adig/adig.dsp vc/vc.dsw vc/ahost/ahost.dep \
|
||||
vc/ahost/ahost.dsp vc/areslib/areslib.dep vc/areslib/areslib.dsp \
|
||||
vc/areslib/areslib.dsw
|
||||
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
|
||||
PROGS =
|
||||
@@ -18,9 +43,9 @@ noinst_PROGRAMS =$(PROGS)
|
||||
|
||||
# adig and ahost are just sample programs and thus not mentioned with the
|
||||
# regular sources and headers
|
||||
EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj \
|
||||
Makefile.m32 Makefile.netware Makefile.vc6 adig.c ahost.c $(man_MANS) \
|
||||
$(MSVCFILES) config-win32.h RELEASE-NOTES libcares.pc.in
|
||||
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
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libcares.pc
|
||||
@@ -72,13 +97,13 @@ libcares_ladir = $(includedir)
|
||||
# what headers to install on 'make install':
|
||||
libcares_la_HEADERS = ares.h ares_version.h ares_dns.h
|
||||
|
||||
ahost_SOURCES = ahost.c ares_getopt.c
|
||||
ahost_SOURCES = ahost.c ares_getopt.c ares_getopt.h
|
||||
ahost_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)
|
||||
|
||||
adig_SOURCES = adig.c ares_getopt.c
|
||||
adig_SOURCES = adig.c ares_getopt.c ares_getopt.h
|
||||
adig_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)
|
||||
|
||||
acountry_SOURCES = acountry.c ares_getopt.c
|
||||
acountry_SOURCES = acountry.c ares_getopt.c ares_getopt.h
|
||||
acountry_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)
|
||||
|
||||
# Make files named *.dist replace the file without .dist extension
|
||||
|
@@ -10,19 +10,25 @@ include ../packages/DOS/common.dj
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_FIONBIO \
|
||||
CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_IOCTLSOCKET \
|
||||
-DHAVE_STRUCT_IN6_ADDR -DHAVE_SOCKADDR_IN6_SIN6_SCOPE_ID \
|
||||
-DHAVE_SYS_TIME_H -DHAVE_STRUCT_SOCKADDR_IN6 -DHAVE_STRUCT_ADDRINFO \
|
||||
-DHAVE_SIGNAL_H -DHAVE_SIG_ATOMIC_T -DRETSIGTYPE='void' -DHAVE_PROCESS_H \
|
||||
-DHAVE_ARPA_NAMESER_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_SIGNAL_H -DHAVE_SIG_ATOMIC_T -DRETSIGTYPE='void' \
|
||||
-DHAVE_PROCESS_H -DHAVE_ARPA_NAMESER_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
|
||||
-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
|
||||
|
||||
LDFLAGS = -s
|
||||
|
||||
|
@@ -6,7 +6,7 @@ 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_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_parse_ns_reply.c ares_llist.c
|
||||
ares_parse_ns_reply.c ares_llist.c ares__timeval.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 \
|
||||
|
@@ -75,7 +75,7 @@ MKDIR = mkdir
|
||||
MPKXDC = mkxdc
|
||||
|
||||
# Global flags for all compilers
|
||||
CFLAGS = $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
|
||||
CFLAGS += $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
|
||||
|
||||
ifeq ($(CC),mwccnlm)
|
||||
LD = mwldnlm
|
||||
@@ -282,13 +282,19 @@ config.h: Makefile.netware
|
||||
@echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@
|
||||
ifeq ($(LIBARCH),CLIB)
|
||||
@echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@
|
||||
@echo $(DL)#define MAXHOSTNAMELEN 256$(DL) >> $@
|
||||
@echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG2 char$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG3 int$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG6 int$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_RETV int$(DL) >> $@
|
||||
@echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@
|
||||
@@ -325,6 +331,14 @@ else
|
||||
@echo $(DL)#define RECV_TYPE_ARG3 size_t$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_RETV ssize_t$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG2 void$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG3 size_t$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG6 size_t$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_RETV ssize_t$(DL) >> $@
|
||||
@echo $(DL)#define RECVFROM_TYPE_ARG2_IS_VOID 1$(DL) >> $@
|
||||
@echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@
|
||||
@@ -350,6 +364,7 @@ endif
|
||||
@echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_RECV 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_RECVFROM 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_SEND 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
|
||||
@@ -373,7 +388,6 @@ endif
|
||||
@echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@
|
||||
@echo $(DL)#define RETSIGTYPE void$(DL) >> $@
|
||||
@echo $(DL)#define SIZEOF_CURL_OFF_T 4$(DL) >> $@
|
||||
@echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
|
||||
@echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
|
||||
@echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
|
||||
|
@@ -62,6 +62,7 @@ OBJECTS = $(OBJ_DIR)\ares_fds.obj \
|
||||
$(OBJ_DIR)\ares_init.obj \
|
||||
$(OBJ_DIR)\ares_llist.obj \
|
||||
$(OBJ_DIR)\ares_timeout.obj \
|
||||
$(OBJ_DIR)\ares__timeval.obj \
|
||||
$(OBJ_DIR)\ares_destroy.obj \
|
||||
$(OBJ_DIR)\ares_mkquery.obj \
|
||||
$(OBJ_DIR)\ares_version.obj \
|
||||
@@ -110,6 +111,7 @@ $(DEF_FILE): $(OBJECTS) Makefile.VC6
|
||||
@echo ares_parse_ptr_reply >> $@
|
||||
@echo ares_parse_ns_reply >> $@
|
||||
@echo ares_process >> $@
|
||||
@echo ares_process_fd >> $@
|
||||
@echo ares_query >> $@
|
||||
@echo ares_search >> $@
|
||||
@echo ares_strerror >> $@
|
||||
@@ -122,7 +124,6 @@ $(DEF_FILE): $(OBJECTS) Makefile.VC6
|
||||
@echo ares_inet_pton >> $@
|
||||
@echo ares_writev >> $@
|
||||
@echo ares_getnameinfo >> $@
|
||||
@echo ares_gettimeofday >> $@
|
||||
@echo ares_parse_aaaa_reply >> $@
|
||||
|
||||
ahost.exe: $(OBJ_DIR) $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib
|
||||
@@ -138,7 +139,8 @@ clean:
|
||||
- del $(OBJ_DIR)\*.obj *.ilk *.pdb *.pbt *.pbi *.pbo *._xe *.map
|
||||
|
||||
vclean realclean: clean
|
||||
- del $(DEF_FILE) cares.lib cares_imp.* cares.dll ahost.exe adig.exe
|
||||
- del $(DEF_FILE) cares.lib cares_imp.* cares.dll
|
||||
- del ahost.exe adig.exe acountry.exe
|
||||
- rd $(OBJ_DIR)
|
||||
|
||||
.c{$(OBJ_DIR)}.obj:
|
||||
@@ -193,6 +195,9 @@ $(OBJ_DIR)\ares_init.obj: ares_init.c setup.h setup_once.h nameser.h ares.h \
|
||||
$(OBJ_DIR)\ares_timeout.obj: ares_timeout.c setup.h setup_once.h ares.h \
|
||||
ares_private.h ares_ipv6.h
|
||||
|
||||
$(OBJ_DIR)\ares__timeval.obj: ares__timeval.c setup.h setup_once.h ares.h \
|
||||
ares_private.h ares_ipv6.h
|
||||
|
||||
$(OBJ_DIR)\ares_destroy.obj: ares_destroy.c setup.h setup_once.h ares.h \
|
||||
ares_private.h ares_ipv6.h
|
||||
|
||||
|
@@ -27,7 +27,7 @@ call ares_process() when select() returns.
|
||||
Some features are missing from the current version of ares, relative
|
||||
to the BIND resolver:
|
||||
|
||||
* There is no IPV6 support.
|
||||
* There is no IPV6 support. [not true for c-ares]
|
||||
* There is no hostname verification.
|
||||
* There is no logging of unexpected events.
|
||||
* There is no debugging-oriented logging.
|
||||
|
@@ -1,9 +1,10 @@
|
||||
This is what's new and changed in the c-ares 1.5.2 release:
|
||||
This is what's new and changed in the c-ares 1.5.4 release:
|
||||
|
||||
o
|
||||
|
||||
Thanks go to these friendly people for their efforts and contributions:
|
||||
|
||||
|
||||
and obviously Daniel Stenberg
|
||||
|
||||
Have fun!
|
||||
|
1292
ares/acinclude.m4
1292
ares/acinclude.m4
File diff suppressed because it is too large
Load Diff
@@ -43,8 +43,11 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#if defined(WIN32)
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
#include <winsock.h>
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
@@ -57,6 +60,10 @@
|
||||
#include "inet_net_pton.h"
|
||||
#include "inet_ntop.h"
|
||||
|
||||
#ifndef INADDR_NONE
|
||||
#define INADDR_NONE 0xffffffff
|
||||
#endif
|
||||
|
||||
static const char *usage = "acountry [-vh?] {host|addr} ...\n";
|
||||
static const char nerd_fmt[] = "%u.%u.%u.%u.zz.countries.nerd.dk";
|
||||
static const char *nerd_ver1 = nerd_fmt + 14;
|
||||
@@ -87,7 +94,7 @@ int main(int argc, char **argv)
|
||||
ares_channel channel;
|
||||
int ch, status;
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
WORD wVersionRequested = MAKEWORD(USE_WINSOCK,USE_WINSOCK);
|
||||
WSADATA wsaData;
|
||||
WSAStartup(wVersionRequested, &wsaData);
|
||||
@@ -155,7 +162,7 @@ int main(int argc, char **argv)
|
||||
wait_ares(channel);
|
||||
ares_destroy(channel);
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32) && !defined(WATT32)
|
||||
WSACleanup();
|
||||
#endif
|
||||
|
||||
|
44
ares/adig.c
44
ares/adig.c
@@ -27,11 +27,17 @@
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <arpa/nameser.h>
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -110,6 +116,7 @@ static const struct nv types[] = {
|
||||
{ "AXFR", T_AXFR },
|
||||
{ "MAILB", T_MAILB },
|
||||
{ "MAILA", T_MAILA },
|
||||
{ "NAPTR", T_NAPTR },
|
||||
{ "ANY", T_ANY }
|
||||
};
|
||||
static const int ntypes = sizeof(types) / sizeof(types[0]);
|
||||
@@ -303,6 +310,8 @@ static void callback(void *arg, int status, int timeouts,
|
||||
unsigned int qdcount, ancount, nscount, arcount, i;
|
||||
const unsigned char *aptr;
|
||||
|
||||
(void) timeouts;
|
||||
|
||||
/* Display the query name if given. */
|
||||
if (name)
|
||||
printf("Answer for query %s:\n", name);
|
||||
@@ -603,6 +612,41 @@ static const unsigned char *display_rr(const unsigned char *aptr,
|
||||
ares_free_string(name);
|
||||
break;
|
||||
|
||||
case T_NAPTR:
|
||||
|
||||
printf("\t%d", DNS__16BIT(aptr)); /* order */
|
||||
printf(" %d\n", DNS__16BIT(aptr + 2)); /* preference */
|
||||
|
||||
p = aptr + 4;
|
||||
status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t\t\t\t\t\t%s\n", name);
|
||||
ares_free_string(name);
|
||||
p += len;
|
||||
|
||||
status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t\t\t\t\t\t%s\n", name);
|
||||
ares_free_string(name);
|
||||
p += len;
|
||||
|
||||
status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t\t\t\t\t\t%s\n", name);
|
||||
ares_free_string(name);
|
||||
p += len;
|
||||
|
||||
status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len);
|
||||
if (status != ARES_SUCCESS)
|
||||
return NULL;
|
||||
printf("\t\t\t\t\t\t%s", name);
|
||||
ares_free_string(name);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
printf("\t[Unknown RR; cannot parse]");
|
||||
break;
|
||||
|
@@ -29,6 +29,9 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -139,6 +142,8 @@ static void callback(void *arg, int status, int timeouts, struct hostent *host)
|
||||
{
|
||||
char **p;
|
||||
|
||||
(void)timeouts;
|
||||
|
||||
if (status != ARES_SUCCESS)
|
||||
{
|
||||
fprintf(stderr, "%s: %s\n", (char *) arg, ares_strerror(status));
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2007 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -112,6 +113,7 @@ extern "C" {
|
||||
#define ARES_OPT_SORTLIST (1 << 10)
|
||||
#define ARES_OPT_SOCK_SNDBUF (1 << 11)
|
||||
#define ARES_OPT_SOCK_RCVBUF (1 << 12)
|
||||
#define ARES_OPT_TIMEOUTMS (1 << 13)
|
||||
|
||||
/* Nameinfo flag values */
|
||||
#define ARES_NI_NOFQDN (1 << 0)
|
||||
@@ -179,7 +181,7 @@ struct apattern;
|
||||
|
||||
struct ares_options {
|
||||
int flags;
|
||||
int timeout;
|
||||
int timeout; /* in seconds or milliseconds, depending on options */
|
||||
int tries;
|
||||
int ndots;
|
||||
unsigned short udp_port;
|
||||
|
112
ares/ares__timeval.c
Normal file
112
ares/ares__timeval.c
Normal file
@@ -0,0 +1,112 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 2008 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.
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
#if defined(WIN32) && !defined(MSDOS)
|
||||
|
||||
struct timeval ares__tvnow(void)
|
||||
{
|
||||
/*
|
||||
** GetTickCount() is available on _all_ Windows versions from W95 up
|
||||
** to nowadays. Returns milliseconds elapsed since last system boot,
|
||||
** increases monotonically and wraps once 49.7 days have elapsed.
|
||||
*/
|
||||
struct timeval now;
|
||||
DWORD milliseconds = GetTickCount();
|
||||
now.tv_sec = milliseconds / 1000;
|
||||
now.tv_usec = (milliseconds % 1000) * 1000;
|
||||
return now;
|
||||
}
|
||||
|
||||
#elif defined(HAVE_CLOCK_GETTIME_MONOTONIC)
|
||||
|
||||
struct timeval ares__tvnow(void)
|
||||
{
|
||||
/*
|
||||
** clock_gettime() is granted to be increased monotonically when the
|
||||
** monotonic clock is queried. Time starting point is unspecified, it
|
||||
** could be the system start-up time, the Epoch, or something else,
|
||||
** in any case the time starting point does not change once that the
|
||||
** system has started up.
|
||||
*/
|
||||
struct timeval now;
|
||||
struct timespec tsnow;
|
||||
if(0 == clock_gettime(CLOCK_MONOTONIC, &tsnow)) {
|
||||
now.tv_sec = tsnow.tv_sec;
|
||||
now.tv_usec = tsnow.tv_nsec / 1000;
|
||||
}
|
||||
/*
|
||||
** Even when the configure process has truly detected monotonic clock
|
||||
** availability, it might happen that it is not actually available at
|
||||
** run-time. When this occurs simply fallback to other time source.
|
||||
*/
|
||||
#ifdef HAVE_GETTIMEOFDAY
|
||||
else
|
||||
(void)gettimeofday(&now, NULL);
|
||||
#else
|
||||
else {
|
||||
now.tv_sec = (long)time(NULL);
|
||||
now.tv_usec = 0;
|
||||
}
|
||||
#endif
|
||||
return now;
|
||||
}
|
||||
|
||||
#elif defined(HAVE_GETTIMEOFDAY)
|
||||
|
||||
struct timeval ares__tvnow(void)
|
||||
{
|
||||
/*
|
||||
** gettimeofday() is not granted to be increased monotonically, due to
|
||||
** clock drifting and external source time synchronization it can jump
|
||||
** forward or backward in time.
|
||||
*/
|
||||
struct timeval now;
|
||||
(void)gettimeofday(&now, NULL);
|
||||
return now;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
struct timeval ares__tvnow(void)
|
||||
{
|
||||
/*
|
||||
** time() returns the value of time in seconds since the Epoch.
|
||||
*/
|
||||
struct timeval now;
|
||||
now.tv_sec = (long)time(NULL);
|
||||
now.tv_usec = 0;
|
||||
return now;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if 0 /* Not used */
|
||||
/*
|
||||
* Make sure that the first argument is the more recent time, as otherwise
|
||||
* we'll get a weird negative time-diff back...
|
||||
*
|
||||
* Returns: the time difference in number of milliseconds.
|
||||
*/
|
||||
long ares__tvdiff(struct timeval newer, struct timeval older)
|
||||
{
|
||||
return (newer.tv_sec-older.tv_sec)*1000+
|
||||
(newer.tv_usec-older.tv_usec)/1000;
|
||||
}
|
||||
#endif
|
||||
|
@@ -36,6 +36,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
@@ -159,7 +162,7 @@ static void host_callback(void *arg, int status, int timeouts,
|
||||
{
|
||||
struct host_query *hquery = (struct host_query *) arg;
|
||||
ares_channel channel = hquery->channel;
|
||||
struct hostent *host;
|
||||
struct hostent *host = NULL;
|
||||
|
||||
hquery->timeouts += timeouts;
|
||||
if (status == ARES_SUCCESS)
|
||||
@@ -173,6 +176,15 @@ static void host_callback(void *arg, int status, int timeouts,
|
||||
else if (hquery->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 (host && channel->nsort)
|
||||
sort6_addresses(host, channel->sortlist, channel->nsort);
|
||||
}
|
||||
|
@@ -82,7 +82,7 @@ ares_getopt(int nargc, char * const nargv[], const char *ostr)
|
||||
}
|
||||
} /* option letter okay? */
|
||||
if ((optopt = (int)*place++) == (int)':' ||
|
||||
!(oli = strchr(ostr, optopt))) {
|
||||
(oli = strchr(ostr, optopt)) == NULL) {
|
||||
/*
|
||||
* if the user didn't specify '-' as an option,
|
||||
* assume it means EOF.
|
||||
|
@@ -1,6 +1,7 @@
|
||||
.\" $Id$
|
||||
.\"
|
||||
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
.\" Copyright (C) 2007-2008 by Daniel Stenberg
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this
|
||||
.\" software and its documentation for any purpose and without
|
||||
@@ -14,7 +15,7 @@
|
||||
.\" this software for any purpose. It is provided "as is"
|
||||
.\" without express or implied warranty.
|
||||
.\"
|
||||
.TH ARES_INIT 3 "7 December 2004"
|
||||
.TH ARES_INIT 3 "13 May 2008"
|
||||
.SH NAME
|
||||
ares_init, ares_init_options \- Initialize a resolver channel
|
||||
.SH SYNOPSIS
|
||||
@@ -49,10 +50,22 @@ description of possible flag values.
|
||||
.B ARES_OPT_TIMEOUT
|
||||
.B int \fItimeout\fP;
|
||||
.br
|
||||
The number of seconds each name server is given to respond to a query
|
||||
on the first try. (After the first try, the timeout algorithm becomes
|
||||
more complicated, but scales linearly with the value of
|
||||
\fItimeout\fP.) The default is five seconds.
|
||||
The number of seconds each name server is given to respond to a query on the
|
||||
first try. (After the first try, the timeout algorithm becomes more
|
||||
complicated, but scales linearly with the value of \fItimeout\fP.) The
|
||||
default is five seconds. This option is being deprecated by
|
||||
\fIARES_OPT_TIMEOUTMS\fP starting in c-ares 1.5.2.
|
||||
.TP 18
|
||||
.B ARES_OPT_TIMEOUTMS
|
||||
.B int \fItimeout\fP;
|
||||
.br
|
||||
The number of milliseconds each name server is given to respond to a query on
|
||||
the first try. (After the first try, the timeout algorithm becomes more
|
||||
complicated, but scales linearly with the value of \fItimeout\fP.) The
|
||||
default is five seconds. Note that this option is specified with the same
|
||||
struct field as the former \fIARES_OPT_TIMEOUT\fP, it is but the option bits
|
||||
that tell c-ares how to interpret the number. This option was added in c-ares
|
||||
1.5.2.
|
||||
.TP 18
|
||||
.B ARES_OPT_TRIES
|
||||
.B int \fItries\fP;
|
||||
|
219
ares/ares_init.c
219
ares/ares_init.c
@@ -1,6 +1,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2007-2008 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -107,6 +108,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
int i;
|
||||
int status = ARES_SUCCESS;
|
||||
struct server_state *server;
|
||||
struct timeval now;
|
||||
|
||||
#ifdef CURLDEBUG
|
||||
const char *env = getenv("CARES_MEMDEBUG");
|
||||
@@ -124,6 +126,8 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
return ARES_ENOMEM;
|
||||
}
|
||||
|
||||
now = ares__tvnow();
|
||||
|
||||
/* Set everything to distinguished values so we know they haven't
|
||||
* been set yet.
|
||||
*/
|
||||
@@ -146,7 +150,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
channel->sock_state_cb = NULL;
|
||||
channel->sock_state_cb_data = NULL;
|
||||
|
||||
channel->last_timeout_processed = (long)time(NULL);
|
||||
channel->last_timeout_processed = (time_t)now.tv_sec;
|
||||
|
||||
/* Initialize our lists of queries */
|
||||
ares__init_list_head(&(channel->all_queries));
|
||||
@@ -254,13 +258,16 @@ int ares_save_options(ares_channel channel, struct ares_options *options,
|
||||
if (!ARES_CONFIG_CHECK(channel))
|
||||
return ARES_ENODATA;
|
||||
|
||||
(*optmask) = (ARES_OPT_FLAGS|ARES_OPT_TIMEOUT|ARES_OPT_TRIES|ARES_OPT_NDOTS|
|
||||
(*optmask) = (ARES_OPT_FLAGS|ARES_OPT_TRIES|ARES_OPT_NDOTS|
|
||||
ARES_OPT_UDP_PORT|ARES_OPT_TCP_PORT|ARES_OPT_SOCK_STATE_CB|
|
||||
ARES_OPT_SERVERS|ARES_OPT_DOMAINS|ARES_OPT_LOOKUPS|
|
||||
ARES_OPT_SORTLIST);
|
||||
ARES_OPT_SORTLIST|ARES_OPT_TIMEOUTMS);
|
||||
|
||||
/* Copy easy stuff */
|
||||
options->flags = channel->flags;
|
||||
|
||||
/* We return full millisecond resolution but that's only because we don't
|
||||
set the ARES_OPT_TIMEOUT anymore, only the new ARES_OPT_TIMEOUTMS */
|
||||
options->timeout = channel->timeout;
|
||||
options->tries = channel->tries;
|
||||
options->ndots = channel->ndots;
|
||||
@@ -328,8 +335,10 @@ static int init_by_options(ares_channel channel,
|
||||
/* Easy stuff. */
|
||||
if ((optmask & ARES_OPT_FLAGS) && channel->flags == -1)
|
||||
channel->flags = options->flags;
|
||||
if ((optmask & ARES_OPT_TIMEOUT) && channel->timeout == -1)
|
||||
if ((optmask & ARES_OPT_TIMEOUTMS) && channel->timeout == -1)
|
||||
channel->timeout = options->timeout;
|
||||
else if ((optmask & ARES_OPT_TIMEOUT) && channel->timeout == -1)
|
||||
channel->timeout = options->timeout * 1000;
|
||||
if ((optmask & ARES_OPT_TRIES) && channel->tries == -1)
|
||||
channel->tries = options->tries;
|
||||
if ((optmask & ARES_OPT_NDOTS) && channel->ndots == -1)
|
||||
@@ -903,7 +912,8 @@ okay:
|
||||
|
||||
static int init_by_defaults(ares_channel channel)
|
||||
{
|
||||
char hostname[MAXHOSTNAMELEN + 1];
|
||||
char *hostname = NULL;
|
||||
int rc = ARES_SUCCESS;
|
||||
|
||||
if (channel->flags == -1)
|
||||
channel->flags = 0;
|
||||
@@ -918,53 +928,103 @@ static int init_by_defaults(ares_channel channel)
|
||||
if (channel->tcp_port == -1)
|
||||
channel->tcp_port = htons(NAMESERVER_PORT);
|
||||
|
||||
if (channel->nservers == -1)
|
||||
{
|
||||
/* If nobody specified servers, try a local named. */
|
||||
channel->servers = malloc(sizeof(struct server_state));
|
||||
if (!channel->servers)
|
||||
return ARES_ENOMEM;
|
||||
channel->servers[0].addr.s_addr = htonl(INADDR_LOOPBACK);
|
||||
channel->nservers = 1;
|
||||
if (channel->nservers == -1) {
|
||||
/* If nobody specified servers, try a local named. */
|
||||
channel->servers = malloc(sizeof(struct server_state));
|
||||
if (!channel->servers) {
|
||||
rc = ARES_ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
channel->servers[0].addr.s_addr = htonl(INADDR_LOOPBACK);
|
||||
channel->nservers = 1;
|
||||
}
|
||||
|
||||
#ifdef ENAMETOOLONG
|
||||
#define toolong(x) (x == -1) && ((ENAMETOOLONG == errno) || (EINVAL == errno))
|
||||
#else
|
||||
#define toolong(x) (x == -1) && (EINVAL == errno)
|
||||
#endif
|
||||
|
||||
if (channel->ndomains == -1) {
|
||||
/* Derive a default domain search list from the kernel hostname,
|
||||
* or set it to empty if the hostname isn't helpful.
|
||||
*/
|
||||
size_t len = 64;
|
||||
int res;
|
||||
|
||||
hostname = (char *)malloc(len);
|
||||
if(!hostname) {
|
||||
rc = ARES_ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (channel->ndomains == -1)
|
||||
{
|
||||
/* Derive a default domain search list from the kernel hostname,
|
||||
* or set it to empty if the hostname isn't helpful.
|
||||
*/
|
||||
if (gethostname(hostname, sizeof(hostname)) == -1
|
||||
|| !strchr(hostname, '.'))
|
||||
{
|
||||
channel->ndomains = 0;
|
||||
do {
|
||||
res = gethostname(hostname, len);
|
||||
|
||||
if(toolong(res)) {
|
||||
char *p;
|
||||
len *= 2;
|
||||
p = realloc(hostname, len);
|
||||
if(!p) {
|
||||
rc = ARES_ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
else
|
||||
{
|
||||
channel->domains = malloc(sizeof(char *));
|
||||
if (!channel->domains)
|
||||
return ARES_ENOMEM;
|
||||
channel->ndomains = 0;
|
||||
channel->domains[0] = strdup(strchr(hostname, '.') + 1);
|
||||
if (!channel->domains[0])
|
||||
return ARES_ENOMEM;
|
||||
channel->ndomains = 1;
|
||||
}
|
||||
}
|
||||
hostname = p;
|
||||
continue;
|
||||
}
|
||||
else if(res) {
|
||||
rc = ARES_EBADNAME;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (channel->nsort == -1)
|
||||
{
|
||||
channel->sortlist = NULL;
|
||||
channel->nsort = 0;
|
||||
}
|
||||
} while(0);
|
||||
|
||||
if (!channel->lookups)
|
||||
{
|
||||
channel->lookups = strdup("fb");
|
||||
if (!channel->lookups)
|
||||
return ARES_ENOMEM;
|
||||
}
|
||||
channel->ndomains = 0; /* default to none */
|
||||
if (strchr(hostname, '.')) {
|
||||
/* a dot was found */
|
||||
|
||||
return ARES_SUCCESS;
|
||||
channel->domains = malloc(sizeof(char *));
|
||||
if (!channel->domains) {
|
||||
rc = ARES_ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
channel->domains[0] = strdup(strchr(hostname, '.') + 1);
|
||||
if (!channel->domains[0]) {
|
||||
rc = ARES_ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
channel->ndomains = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (channel->nsort == -1) {
|
||||
channel->sortlist = NULL;
|
||||
channel->nsort = 0;
|
||||
}
|
||||
|
||||
if (!channel->lookups) {
|
||||
channel->lookups = strdup("fb");
|
||||
if (!channel->lookups)
|
||||
rc = ARES_ENOMEM;
|
||||
}
|
||||
|
||||
error:
|
||||
if(rc) {
|
||||
if(channel->servers)
|
||||
free(channel->servers);
|
||||
|
||||
if(channel->domains && channel->domains[0])
|
||||
free(channel->domains[0]);
|
||||
if(channel->domains)
|
||||
free(channel->domains);
|
||||
if(channel->lookups)
|
||||
free(channel->lookups);
|
||||
}
|
||||
|
||||
if(hostname)
|
||||
free(hostname);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
@@ -1245,16 +1305,61 @@ static int set_options(ares_channel channel, const char *str)
|
||||
static char *try_config(char *s, const char *opt)
|
||||
{
|
||||
size_t len;
|
||||
ssize_t i;
|
||||
ssize_t j;
|
||||
char *p;
|
||||
|
||||
len = strlen(opt);
|
||||
if (strncmp(s, opt, len) != 0 || !ISSPACE(s[len]))
|
||||
if (!s || !opt)
|
||||
/* no line or no option */
|
||||
return NULL;
|
||||
s += len;
|
||||
while (ISSPACE(*s))
|
||||
s++;
|
||||
return s;
|
||||
}
|
||||
|
||||
/* trim line comment */
|
||||
for (i = 0; s[i] && s[i] != '#'; ++i);
|
||||
s[i] = '\0';
|
||||
|
||||
/* trim trailing whitespace */
|
||||
for (j = i-1; j >= 0 && ISSPACE(s[j]); --j);
|
||||
s[++j] = '\0';
|
||||
|
||||
/* skip leading whitespace */
|
||||
for (i = 0; s[i] && ISSPACE(s[i]); ++i);
|
||||
p = &s[i];
|
||||
|
||||
if (!*p)
|
||||
/* empty line */
|
||||
return NULL;
|
||||
|
||||
if ((len = strlen(opt)) == 0)
|
||||
/* empty option */
|
||||
return NULL;
|
||||
|
||||
if (strncmp(p, opt, len) != 0)
|
||||
/* line and option do not match */
|
||||
return NULL;
|
||||
|
||||
/* skip over given option name */
|
||||
p += len;
|
||||
|
||||
if (!*p)
|
||||
/* no option value */
|
||||
return NULL;
|
||||
|
||||
if ((opt[len-1] != ':') && (opt[len-1] != '=') && !ISSPACE(*p))
|
||||
/* whitespace between option name and value is mandatory
|
||||
for given option names which do not end with ':' or '=' */
|
||||
return NULL;
|
||||
|
||||
/* skip over whitespace */
|
||||
while (*p && ISSPACE(*p))
|
||||
p++;
|
||||
|
||||
if (!*p)
|
||||
/* no option value */
|
||||
return NULL;
|
||||
|
||||
/* return pointer to option value */
|
||||
return p;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const char *try_option(const char *p, const char *q, const char *opt)
|
||||
@@ -1333,13 +1438,9 @@ static void randomize_key(unsigned char* key,int key_data_len)
|
||||
}
|
||||
#else /* !WIN32 */
|
||||
#ifdef RANDOM_FILE
|
||||
char buffer[256];
|
||||
FILE *f = fopen(RANDOM_FILE, "rb");
|
||||
if(f) {
|
||||
size_t i;
|
||||
size_t rc = fread(buffer, key_data_len, 1, f);
|
||||
for(i=0; i<rc && counter < key_data_len; i++)
|
||||
key[counter++]=buffer[i];
|
||||
counter = fread(key, 1, key_data_len, f);
|
||||
fclose(f);
|
||||
}
|
||||
#endif
|
||||
@@ -1363,11 +1464,11 @@ static int init_id_key(rc4_key* key,int key_data_len)
|
||||
if (!key_data_ptr)
|
||||
return ARES_ENOMEM;
|
||||
|
||||
randomize_key(key->state,key_data_len);
|
||||
state = &key->state[0];
|
||||
for(counter = 0; counter < 256; counter++)
|
||||
/* unnecessary AND but it keeps some compilers happier */
|
||||
state[counter] = (unsigned char)(counter & 0xff);
|
||||
randomize_key(key->state,key_data_len);
|
||||
key->x = 0;
|
||||
key->y = 0;
|
||||
index1 = 0;
|
||||
|
@@ -29,6 +29,9 @@
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@@ -31,6 +31,9 @@
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@@ -28,6 +28,9 @@
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -44,6 +47,8 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
const unsigned char *aptr;
|
||||
char *ptrname, *hostname, *rr_name, *rr_data;
|
||||
struct hostent *hostent;
|
||||
int aliascnt = 0;
|
||||
char ** aliases;
|
||||
|
||||
/* Set *host to NULL for all failure cases. */
|
||||
*host = NULL;
|
||||
@@ -72,6 +77,12 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
|
||||
/* Examine each answer resource record (RR) in turn. */
|
||||
hostname = NULL;
|
||||
aliases = (char **) malloc(8 * sizeof(char *));
|
||||
if (!aliases)
|
||||
{
|
||||
free(ptrname);
|
||||
return ARES_ENOMEM;
|
||||
}
|
||||
for (i = 0; i < (int)ancount; i++)
|
||||
{
|
||||
/* Decode the RR up to the data field. */
|
||||
@@ -99,6 +110,16 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
if (hostname)
|
||||
free(hostname);
|
||||
hostname = rr_data;
|
||||
aliases[aliascnt] = malloc((strlen(rr_data)+1) * sizeof(char *));
|
||||
if (!aliases[aliascnt])
|
||||
{
|
||||
status = ARES_ENOMEM;
|
||||
break;
|
||||
}
|
||||
strncpy(aliases[aliascnt], rr_data, strlen(rr_data)+1);
|
||||
aliascnt++;
|
||||
if ((aliascnt%8)==0)
|
||||
aliases = (char **) realloc(aliases, (aliascnt/16+1) * sizeof(char *));
|
||||
}
|
||||
|
||||
if (rr_class == C_IN && rr_type == T_CNAME)
|
||||
@@ -134,17 +155,20 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
hostent->h_addr_list[0] = malloc(addrlen);
|
||||
if (hostent->h_addr_list[0])
|
||||
{
|
||||
hostent->h_aliases = malloc(sizeof (char *));
|
||||
hostent->h_aliases = malloc((aliascnt+1) * sizeof (char *));
|
||||
if (hostent->h_aliases)
|
||||
{
|
||||
/* Fill in the hostent and return successfully. */
|
||||
hostent->h_name = hostname;
|
||||
hostent->h_aliases[0] = NULL;
|
||||
for (i=0 ; i<aliascnt ; i++)
|
||||
hostent->h_aliases[i] = aliases[i];
|
||||
hostent->h_aliases[aliascnt] = NULL;
|
||||
hostent->h_addrtype = family;
|
||||
hostent->h_length = addrlen;
|
||||
memcpy(hostent->h_addr_list[0], addr, addrlen);
|
||||
hostent->h_addr_list[1] = NULL;
|
||||
*host = hostent;
|
||||
free(aliases);
|
||||
free(ptrname);
|
||||
return ARES_SUCCESS;
|
||||
}
|
||||
@@ -156,6 +180,10 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
}
|
||||
status = ARES_ENOMEM;
|
||||
}
|
||||
for (i=0 ; i<aliascnt ; i++)
|
||||
if (aliases[i])
|
||||
free(aliases[i]);
|
||||
free(aliases);
|
||||
if (hostname)
|
||||
free(hostname);
|
||||
free(ptrname);
|
||||
|
@@ -4,6 +4,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2004-2008 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -48,7 +49,7 @@
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#define DEFAULT_TIMEOUT 5
|
||||
#define DEFAULT_TIMEOUT 5000 /* milliseconds */
|
||||
#define DEFAULT_TRIES 4
|
||||
#ifndef INADDR_NONE
|
||||
#define INADDR_NONE 0xffffffff
|
||||
@@ -149,7 +150,7 @@ struct server_state {
|
||||
struct query {
|
||||
/* Query ID from qbuf, for faster lookup, and current timeout */
|
||||
unsigned short qid;
|
||||
time_t timeout;
|
||||
struct timeval timeout;
|
||||
|
||||
/*
|
||||
* Links for the doubly-linked lists in which we insert a query.
|
||||
@@ -217,7 +218,7 @@ typedef struct rc4_key
|
||||
struct ares_channeldata {
|
||||
/* Configuration data */
|
||||
int flags;
|
||||
int timeout;
|
||||
int timeout; /* in milliseconds */
|
||||
int tries;
|
||||
int ndots;
|
||||
int udp_port;
|
||||
@@ -242,7 +243,8 @@ struct ares_channeldata {
|
||||
/* Generation number to use for the next TCP socket open/close */
|
||||
int tcp_connection_generation;
|
||||
|
||||
/* The time at which we last called process_timeouts() */
|
||||
/* The time at which we last called process_timeouts(). Uses integer seconds
|
||||
just to draw the line somewhere. */
|
||||
time_t last_timeout_processed;
|
||||
|
||||
/* Circular, doubly-linked list of queries, bucketed various ways.... */
|
||||
@@ -259,13 +261,27 @@ struct ares_channeldata {
|
||||
void *sock_state_cb_data;
|
||||
};
|
||||
|
||||
/* return true if now is exactly check time or later */
|
||||
int ares__timedout(struct timeval *now,
|
||||
struct timeval *check);
|
||||
/* add the specific number of milliseconds to the time in the first argument */
|
||||
int ares__timeadd(struct timeval *now,
|
||||
int millisecs);
|
||||
/* return time offset between now and (future) check, in milliseconds */
|
||||
long ares__timeoffset(struct timeval *now,
|
||||
struct timeval *check);
|
||||
void ares__rc4(rc4_key* key,unsigned char *buffer_ptr, int buffer_len);
|
||||
void ares__send_query(ares_channel channel, struct query *query, time_t now);
|
||||
void ares__send_query(ares_channel channel, struct query *query,
|
||||
struct timeval *now);
|
||||
void ares__close_sockets(ares_channel channel, struct server_state *server);
|
||||
int ares__get_hostent(FILE *fp, int family, struct hostent **host);
|
||||
int ares__read_line(FILE *fp, char **buf, int *bufsize);
|
||||
void ares__free_query(struct query *query);
|
||||
short ares__generate_new_id(rc4_key* key);
|
||||
struct timeval ares__tvnow(void);
|
||||
#if 0 /* Not used */
|
||||
long ares__tvdiff(struct timeval t1, struct timeval t2);
|
||||
#endif
|
||||
|
||||
#define ARES_SWAP_BYTE(a,b) \
|
||||
{ unsigned char swapByte = *(a); *(a) = *(b); *(b) = swapByte; }
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2004-2008 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -42,8 +43,14 @@
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
#include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#endif /* WIN32 && !WATT32 */
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
@@ -68,21 +75,25 @@
|
||||
|
||||
static int try_again(int errnum);
|
||||
static void write_tcp_data(ares_channel channel, fd_set *write_fds,
|
||||
ares_socket_t write_fd, time_t now);
|
||||
ares_socket_t write_fd, struct timeval *now);
|
||||
static void read_tcp_data(ares_channel channel, fd_set *read_fds,
|
||||
ares_socket_t read_fd, time_t now);
|
||||
ares_socket_t read_fd, struct timeval *now);
|
||||
static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
||||
ares_socket_t read_fd, time_t now);
|
||||
ares_socket_t read_fd, struct timeval *now);
|
||||
static void advance_tcp_send_queue(ares_channel channel, int whichserver,
|
||||
ssize_t num_bytes);
|
||||
static void process_timeouts(ares_channel channel, time_t now);
|
||||
static void process_broken_connections(ares_channel channel, time_t now);
|
||||
static void process_timeouts(ares_channel channel, struct timeval *now);
|
||||
static void process_broken_connections(ares_channel channel,
|
||||
struct timeval *now);
|
||||
static void process_answer(ares_channel channel, unsigned char *abuf,
|
||||
int alen, int whichserver, int tcp, time_t now);
|
||||
static void handle_error(ares_channel channel, int whichserver, time_t now);
|
||||
int alen, int whichserver, int tcp,
|
||||
struct timeval *now);
|
||||
static void handle_error(ares_channel channel, int whichserver,
|
||||
struct timeval *now);
|
||||
static void skip_server(ares_channel channel, struct query *query,
|
||||
int whichserver);
|
||||
static void next_server(ares_channel channel, struct query *query, time_t now);
|
||||
static void next_server(ares_channel channel, struct query *query,
|
||||
struct timeval *now);
|
||||
static int configure_socket(int s, ares_channel channel);
|
||||
static int open_tcp_socket(ares_channel channel, struct server_state *server);
|
||||
static int open_udp_socket(ares_channel channel, struct server_state *server);
|
||||
@@ -91,19 +102,57 @@ static int same_questions(const unsigned char *qbuf, int qlen,
|
||||
static void end_query(ares_channel channel, struct query *query, int status,
|
||||
unsigned char *abuf, int alen);
|
||||
|
||||
/* return true if now is exactly check time or later */
|
||||
int ares__timedout(struct timeval *now,
|
||||
struct timeval *check)
|
||||
{
|
||||
int secs = (now->tv_sec - check->tv_sec);
|
||||
|
||||
if(secs > 0)
|
||||
return 1; /* yes, timed out */
|
||||
if(secs < 0)
|
||||
return 0; /* nope, not timed out */
|
||||
|
||||
/* if the full seconds were identical, check the sub second parts */
|
||||
return (now->tv_usec - check->tv_usec >= 0);
|
||||
}
|
||||
|
||||
/* add the specific number of milliseconds to the time in the first argument */
|
||||
int ares__timeadd(struct timeval *now,
|
||||
int millisecs)
|
||||
{
|
||||
now->tv_sec += millisecs/1000;
|
||||
now->tv_usec += (millisecs%1000)*1000;
|
||||
|
||||
if(now->tv_usec >= 1000000) {
|
||||
++(now->tv_sec);
|
||||
now->tv_usec -= 1000000;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* return time offset between now and (future) check, in milliseconds */
|
||||
long ares__timeoffset(struct timeval *now,
|
||||
struct timeval *check)
|
||||
{
|
||||
return (check->tv_sec - now->tv_sec)*1000 +
|
||||
(check->tv_usec - now->tv_usec)/1000;
|
||||
}
|
||||
|
||||
|
||||
/* Something interesting happened on the wire, or there was a timeout.
|
||||
* See what's up and respond accordingly.
|
||||
*/
|
||||
void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds)
|
||||
{
|
||||
time_t now;
|
||||
struct timeval now = ares__tvnow();
|
||||
|
||||
time(&now);
|
||||
write_tcp_data(channel, write_fds, ARES_SOCKET_BAD, now);
|
||||
read_tcp_data(channel, read_fds, ARES_SOCKET_BAD, now);
|
||||
read_udp_packets(channel, read_fds, ARES_SOCKET_BAD, now);
|
||||
process_timeouts(channel, now);
|
||||
process_broken_connections(channel, now);
|
||||
write_tcp_data(channel, write_fds, ARES_SOCKET_BAD, &now);
|
||||
read_tcp_data(channel, read_fds, ARES_SOCKET_BAD, &now);
|
||||
read_udp_packets(channel, read_fds, ARES_SOCKET_BAD, &now);
|
||||
process_timeouts(channel, &now);
|
||||
process_broken_connections(channel, &now);
|
||||
}
|
||||
|
||||
/* Something interesting happened on the wire, or there was a timeout.
|
||||
@@ -114,13 +163,12 @@ void ares_process_fd(ares_channel channel,
|
||||
file descriptors */
|
||||
ares_socket_t write_fd)
|
||||
{
|
||||
time_t now;
|
||||
struct timeval now = ares__tvnow();
|
||||
|
||||
time(&now);
|
||||
write_tcp_data(channel, NULL, write_fd, now);
|
||||
read_tcp_data(channel, NULL, read_fd, now);
|
||||
read_udp_packets(channel, NULL, read_fd, now);
|
||||
process_timeouts(channel, now);
|
||||
write_tcp_data(channel, NULL, write_fd, &now);
|
||||
read_tcp_data(channel, NULL, read_fd, &now);
|
||||
read_udp_packets(channel, NULL, read_fd, &now);
|
||||
process_timeouts(channel, &now);
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +203,7 @@ static int try_again(int errnum)
|
||||
static void write_tcp_data(ares_channel channel,
|
||||
fd_set *write_fds,
|
||||
ares_socket_t write_fd,
|
||||
time_t now)
|
||||
struct timeval *now)
|
||||
{
|
||||
struct server_state *server;
|
||||
struct send_request *sendreq;
|
||||
@@ -174,7 +222,8 @@ static void write_tcp_data(ares_channel channel,
|
||||
/* Make sure server has data to send and is selected in write_fds or
|
||||
write_fd. */
|
||||
server = &channel->servers[i];
|
||||
if (!server->qhead || server->tcp_socket == ARES_SOCKET_BAD || server->is_broken)
|
||||
if (!server->qhead || server->tcp_socket == ARES_SOCKET_BAD ||
|
||||
server->is_broken)
|
||||
continue;
|
||||
|
||||
if(write_fds) {
|
||||
@@ -278,7 +327,7 @@ static void advance_tcp_send_queue(ares_channel channel, int whichserver,
|
||||
* a packet if we finish reading one.
|
||||
*/
|
||||
static void read_tcp_data(ares_channel channel, fd_set *read_fds,
|
||||
ares_socket_t read_fd, time_t now)
|
||||
ares_socket_t read_fd, struct timeval *now)
|
||||
{
|
||||
struct server_state *server;
|
||||
int i;
|
||||
@@ -374,12 +423,16 @@ static void read_tcp_data(ares_channel channel, fd_set *read_fds,
|
||||
|
||||
/* If any UDP sockets select true for reading, process them. */
|
||||
static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
||||
ares_socket_t read_fd, time_t now)
|
||||
ares_socket_t read_fd, struct timeval *now)
|
||||
{
|
||||
struct server_state *server;
|
||||
int i;
|
||||
ssize_t count;
|
||||
unsigned char buf[PACKETSZ + 1];
|
||||
#ifdef HAVE_RECVFROM
|
||||
struct sockaddr_in from;
|
||||
socklen_t fromlen;
|
||||
#endif
|
||||
|
||||
if(!read_fds && (read_fd == ARES_SOCKET_BAD))
|
||||
/* no possible action */
|
||||
@@ -413,11 +466,24 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
||||
/* To reduce event loop overhead, read and process as many
|
||||
* packets as we can. */
|
||||
do {
|
||||
#ifdef HAVE_RECVFROM
|
||||
fromlen = sizeof(from);
|
||||
count = (ssize_t)recvfrom(server->udp_socket, (void *)buf, sizeof(buf),
|
||||
0, (struct sockaddr *)&from, &fromlen);
|
||||
#else
|
||||
count = sread(server->udp_socket, buf, sizeof(buf));
|
||||
#endif
|
||||
if (count == -1 && try_again(SOCKERRNO))
|
||||
continue;
|
||||
else if (count <= 0)
|
||||
handle_error(channel, i, now);
|
||||
#ifdef HAVE_RECVFROM
|
||||
else if (from.sin_addr.s_addr != server->addr.s_addr)
|
||||
/* Address response came from did not match the address
|
||||
* we sent the request to. Someone may be attempting
|
||||
* to perform a cache poisoning attack */
|
||||
break;
|
||||
#endif
|
||||
else
|
||||
process_answer(channel, buf, (int)count, i, 0, now);
|
||||
} while (count > 0);
|
||||
@@ -425,7 +491,7 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
||||
}
|
||||
|
||||
/* If any queries have timed out, note the timeout and move them on. */
|
||||
static void process_timeouts(ares_channel channel, time_t now)
|
||||
static void process_timeouts(ares_channel channel, struct timeval *now)
|
||||
{
|
||||
time_t t; /* the time of the timeouts we're processing */
|
||||
struct query *query;
|
||||
@@ -438,14 +504,14 @@ static void process_timeouts(ares_channel channel, time_t now)
|
||||
* only a handful of requests that fall into the "now" bucket, so
|
||||
* this should be quite quick.
|
||||
*/
|
||||
for (t = channel->last_timeout_processed; t <= now; t++)
|
||||
for (t = channel->last_timeout_processed; t <= now->tv_sec; t++)
|
||||
{
|
||||
list_head = &(channel->queries_by_timeout[t % ARES_TIMEOUT_TABLE_SIZE]);
|
||||
for (list_node = list_head->next; list_node != list_head; )
|
||||
{
|
||||
query = list_node->data;
|
||||
list_node = list_node->next; /* in case the query gets deleted */
|
||||
if (query->timeout != 0 && now >= query->timeout)
|
||||
if (query->timeout.tv_sec && ares__timedout(now, &query->timeout))
|
||||
{
|
||||
query->error_status = ARES_ETIMEOUT;
|
||||
++query->timeouts;
|
||||
@@ -453,12 +519,13 @@ static void process_timeouts(ares_channel channel, time_t now)
|
||||
}
|
||||
}
|
||||
}
|
||||
channel->last_timeout_processed = now;
|
||||
channel->last_timeout_processed = now->tv_sec;
|
||||
}
|
||||
|
||||
/* Handle an answer from a server. */
|
||||
static void process_answer(ares_channel channel, unsigned char *abuf,
|
||||
int alen, int whichserver, int tcp, time_t now)
|
||||
int alen, int whichserver, int tcp,
|
||||
struct timeval *now)
|
||||
{
|
||||
int tc, rcode;
|
||||
unsigned short id;
|
||||
@@ -536,7 +603,8 @@ static void process_answer(ares_channel channel, unsigned char *abuf,
|
||||
}
|
||||
|
||||
/* Close all the connections that are no longer usable. */
|
||||
static void process_broken_connections(ares_channel channel, time_t now)
|
||||
static void process_broken_connections(ares_channel channel,
|
||||
struct timeval *now)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < channel->nservers; i++)
|
||||
@@ -549,7 +617,8 @@ static void process_broken_connections(ares_channel channel, time_t now)
|
||||
}
|
||||
}
|
||||
|
||||
static void handle_error(ares_channel channel, int whichserver, time_t now)
|
||||
static void handle_error(ares_channel channel, int whichserver,
|
||||
struct timeval *now)
|
||||
{
|
||||
struct server_state *server;
|
||||
struct query *query;
|
||||
@@ -600,7 +669,8 @@ static void skip_server(ares_channel channel, struct query *query,
|
||||
}
|
||||
}
|
||||
|
||||
static void next_server(ares_channel channel, struct query *query, time_t now)
|
||||
static void next_server(ares_channel channel, struct query *query,
|
||||
struct timeval *now)
|
||||
{
|
||||
/* Advance to the next server or try. */
|
||||
query->server++;
|
||||
@@ -637,7 +707,8 @@ static void next_server(ares_channel channel, struct query *query, time_t now)
|
||||
end_query(channel, query, query->error_status, NULL, 0);
|
||||
}
|
||||
|
||||
void ares__send_query(ares_channel channel, struct query *query, time_t now)
|
||||
void ares__send_query(ares_channel channel, struct query *query,
|
||||
struct timeval *now)
|
||||
{
|
||||
struct send_request *sendreq;
|
||||
struct server_state *server;
|
||||
@@ -704,16 +775,17 @@ void ares__send_query(ares_channel channel, struct query *query, time_t now)
|
||||
return;
|
||||
}
|
||||
}
|
||||
query->timeout = now
|
||||
+ ((query->try == 0) ? channel->timeout
|
||||
: channel->timeout << query->try / channel->nservers);
|
||||
query->timeout = *now;
|
||||
ares__timeadd(&query->timeout,
|
||||
(query->try == 0) ? channel->timeout
|
||||
: channel->timeout << query->try / channel->nservers);
|
||||
/* Keep track of queries bucketed by timeout, so we can process
|
||||
* timeout events quickly.
|
||||
*/
|
||||
ares__remove_from_list(&(query->queries_by_timeout));
|
||||
ares__insert_in_list(
|
||||
&(query->queries_by_timeout),
|
||||
&(channel->queries_by_timeout[query->timeout %
|
||||
&(channel->queries_by_timeout[query->timeout.tv_sec %
|
||||
ARES_TIMEOUT_TABLE_SIZE]));
|
||||
|
||||
/* Keep track of queries bucketed by server, so we can process server
|
||||
|
@@ -39,7 +39,7 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
|
||||
{
|
||||
struct query *query;
|
||||
int i;
|
||||
time_t now;
|
||||
struct timeval now;
|
||||
|
||||
/* Verify that the query is at least long enough to hold the header. */
|
||||
if (qlen < HFIXEDSZ || qlen >= (1 << 16))
|
||||
@@ -74,7 +74,8 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
|
||||
|
||||
/* Compute the query ID. Start with no timeout. */
|
||||
query->qid = (unsigned short)DNS_HEADER_QID(qbuf);
|
||||
query->timeout = 0;
|
||||
query->timeout.tv_sec = 0;
|
||||
query->timeout.tv_usec = 0;
|
||||
|
||||
/* Form the TCP query buffer by prepending qlen (as two
|
||||
* network-order bytes) to qbuf.
|
||||
@@ -107,17 +108,17 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
|
||||
ares__init_list_node(&(query->queries_by_timeout), query);
|
||||
ares__init_list_node(&(query->queries_to_server), query);
|
||||
ares__init_list_node(&(query->all_queries), query);
|
||||
|
||||
|
||||
/* Chain the query into the list of all queries. */
|
||||
ares__insert_in_list(&(query->all_queries), &(channel->all_queries));
|
||||
/* Keep track of queries bucketed by qid, so we can process DNS
|
||||
* responses quickly.
|
||||
*/
|
||||
ares__insert_in_list(
|
||||
&(query->queries_by_qid),
|
||||
&(channel->queries_by_qid[query->qid % ARES_QID_TABLE_SIZE]));
|
||||
&(query->queries_by_qid),
|
||||
&(channel->queries_by_qid[query->qid % ARES_QID_TABLE_SIZE]));
|
||||
|
||||
/* Perform the first query action. */
|
||||
time(&now);
|
||||
ares__send_query(channel, query, now);
|
||||
now = ares__tvnow();
|
||||
ares__send_query(channel, query, &now);
|
||||
}
|
||||
|
@@ -37,16 +37,16 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
|
||||
struct query *query;
|
||||
struct list_node* list_head;
|
||||
struct list_node* list_node;
|
||||
time_t now;
|
||||
time_t offset, min_offset; /* these use time_t since some 32 bit systems
|
||||
still use 64 bit time_t! (like VS2005) */
|
||||
struct timeval now;
|
||||
struct timeval nextstop;
|
||||
long offset, min_offset;
|
||||
|
||||
/* No queries, no timeout (and no fetch of the current time). */
|
||||
if (ares__is_list_empty(&(channel->all_queries)))
|
||||
return maxtv;
|
||||
|
||||
/* Find the minimum timeout for the current set of queries. */
|
||||
time(&now);
|
||||
now = ares__tvnow();
|
||||
min_offset = -1;
|
||||
|
||||
list_head = &(channel->all_queries);
|
||||
@@ -54,23 +54,26 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
|
||||
list_node = list_node->next)
|
||||
{
|
||||
query = list_node->data;
|
||||
if (query->timeout == 0)
|
||||
if (query->timeout.tv_sec == 0)
|
||||
continue;
|
||||
offset = query->timeout - now;
|
||||
offset = ares__timeoffset(&now, &query->timeout);
|
||||
if (offset < 0)
|
||||
offset = 0;
|
||||
if (min_offset == -1 || offset < min_offset)
|
||||
min_offset = offset;
|
||||
}
|
||||
|
||||
/* If we found a minimum timeout and it's sooner than the one
|
||||
* specified in maxtv (if any), return it. Otherwise go with
|
||||
* maxtv.
|
||||
if(min_offset != -1) {
|
||||
nextstop.tv_sec = min_offset/1000;
|
||||
nextstop.tv_usec = (min_offset%1000)*1000;
|
||||
}
|
||||
|
||||
/* If we found a minimum timeout and it's sooner than the one specified in
|
||||
* maxtv (if any), return it. Otherwise go with maxtv.
|
||||
*/
|
||||
if (min_offset != -1 && (!maxtv || min_offset <= maxtv->tv_sec))
|
||||
if (min_offset != -1 && (!maxtv || ares__timedout(maxtv, &nextstop)))
|
||||
{
|
||||
tvbuf->tv_sec = (long)min_offset;
|
||||
tvbuf->tv_usec = 0;
|
||||
*tvbuf = nextstop;
|
||||
return tvbuf;
|
||||
}
|
||||
else
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
#define ARES_VERSION_MAJOR 1
|
||||
#define ARES_VERSION_MINOR 5
|
||||
#define ARES_VERSION_PATCH 2
|
||||
#define ARES_VERSION_PATCH 4
|
||||
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
|
||||
(ARES_VERSION_MINOR<<8)|\
|
||||
(ARES_VERSION_PATCH))
|
||||
#define ARES_VERSION_STR "1.5.2-CVS"
|
||||
#define ARES_VERSION_STR "1.5.4-CVS"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
${LIBTOOLIZE:-libtoolize} --copy --automake --force
|
||||
${ACLOCAL:-aclocal} $ACLOCAL_FLAGS
|
||||
${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS
|
||||
${AUTOHEADER:-autoheader}
|
||||
${AUTOCONF:-autoconf}
|
||||
${AUTOMAKE:-automake} --add-missing
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 2004 - 2006 by Daniel Stenberg et al
|
||||
/* Copyright (C) 2004 - 2008 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
|
||||
@@ -97,6 +97,30 @@
|
||||
/* Define to the function return type for recv. */
|
||||
#define RECV_TYPE_RETV int
|
||||
|
||||
/* Define if you have the recvfrom function. */
|
||||
#define HAVE_RECVFROM 1
|
||||
|
||||
/* Define to the type of arg 1 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG1 SOCKET
|
||||
|
||||
/* Define to the type pointed by arg 2 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG2 char
|
||||
|
||||
/* Define to the type of arg 3 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG3 int
|
||||
|
||||
/* Define to the type of arg 4 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG4 int
|
||||
|
||||
/* Define to the type pointed by arg 5 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG5 struct sockaddr
|
||||
|
||||
/* Define to the type pointed by arg 6 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG6 int
|
||||
|
||||
/* Define to the function return type for recvfrom. */
|
||||
#define RECVFROM_TYPE_RETV int
|
||||
|
||||
/* Define if you have the send function. */
|
||||
#define HAVE_SEND 1
|
||||
|
||||
|
@@ -1,11 +1,60 @@
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT(ares_init.c)
|
||||
|
||||
dnl Version not hardcoded here. Fetched later from ares_version.h
|
||||
AC_INIT([c-ares], [-],
|
||||
[c-ares mailing list => http://cool.haxx.se/mailman/listinfo/c-ares])
|
||||
|
||||
AC_CONFIG_SRCDIR([ares_ipv6.h])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
AM_MAINTAINER_MODE
|
||||
AM_INIT_AUTOMAKE(c-ares, CVS)
|
||||
|
||||
dnl SED is mandatory for configure process and libtool.
|
||||
dnl Set it now, allowing it to be changed later.
|
||||
AC_PATH_PROG([SED], [sed], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
if test -z "$SED" || test "$SED" = "not_found"; then
|
||||
AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
|
||||
fi
|
||||
AC_SUBST([SED])
|
||||
|
||||
dnl GREP is mandatory for configure process and libtool.
|
||||
dnl Set it now, allowing it to be changed later.
|
||||
AC_PATH_PROG([GREP], [grep], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
if test -z "$GREP" || test "$GREP" = "not_found"; then
|
||||
AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
|
||||
fi
|
||||
AC_SUBST([GREP])
|
||||
|
||||
dnl EGREP is mandatory for configure process and libtool.
|
||||
dnl Set it now, allowing it to be changed later.
|
||||
if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
|
||||
AC_MSG_CHECKING([for egrep])
|
||||
EGREP="$GREP -E"
|
||||
AC_MSG_RESULT([$EGREP])
|
||||
else
|
||||
AC_PATH_PROG([EGREP], [egrep], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
fi
|
||||
if test -z "$EGREP" || test "$EGREP" = "not_found"; then
|
||||
AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
|
||||
fi
|
||||
AC_SUBST([EGREP])
|
||||
|
||||
dnl AR is mandatory for configure process and libtool.
|
||||
dnl This is target dependant, so check it as a tool.
|
||||
AC_PATH_TOOL([AR], [ar], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
if test -z "$AR" || test "$AR" = "not_found"; then
|
||||
AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
|
||||
fi
|
||||
AC_SUBST([AR])
|
||||
|
||||
dnl Fetch c-ares version from ares_version.h
|
||||
VERSION=`$SED -ne 's/^#define ARES_VERSION_STR "\(.*\)"/\1/p' ${srcdir}/ares_version.h`
|
||||
AM_INIT_AUTOMAKE([c-ares], [$VERSION])
|
||||
AC_MSG_CHECKING([c-ares version])
|
||||
AC_MSG_RESULT([$VERSION])
|
||||
|
||||
dnl
|
||||
dnl Detect the canonical host and target build environment
|
||||
@@ -15,14 +64,23 @@ AC_CANONICAL_HOST
|
||||
dnl Get system canonical name
|
||||
AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
|
||||
|
||||
AC_AIX
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_INSTALL
|
||||
|
||||
dnl This defines _ALL_SOURCE for AIX
|
||||
CARES_CHECK_AIX_ALL_SOURCE
|
||||
|
||||
dnl Our configure and build reentrant settings
|
||||
CARES_CONFIGURE_REENTRANT
|
||||
|
||||
dnl check for how to do large files
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
case $host_os in
|
||||
solaris*)
|
||||
AC_DEFINE(ETC_INET, 1, [if a /etc/inet dir is being used])
|
||||
;;
|
||||
solaris*)
|
||||
AC_DEFINE(ETC_INET, 1, [if a /etc/inet dir is being used])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl support building of Windows DLLs
|
||||
@@ -55,15 +113,6 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]),
|
||||
CPPFLAGS="$CPPFLAGS -DCURLDEBUG -I$srcdir/../include"
|
||||
CFLAGS="$CFLAGS -g"
|
||||
|
||||
dnl check for how to do large files, needed to get the curl_off_t check
|
||||
dnl done right
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
AC_CHECK_SIZEOF(curl_off_t, ,[
|
||||
#include <stdio.h>
|
||||
#include "$srcdir/../include/curl/curl.h"
|
||||
])
|
||||
|
||||
dnl set compiler "debug" options to become more picky, and remove
|
||||
dnl optimize options from CFLAGS
|
||||
CURL_CC_DEBUG_OPTS
|
||||
@@ -73,16 +122,21 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]),
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
AM_CONDITIONAL(DEBUGBUILD, test x$debugbuild = xyes)
|
||||
AM_CONDITIONAL(CURLDEBUG, test x$debugbuild = xyes)
|
||||
|
||||
dnl skip libtool C++ and Fortran compiler checks
|
||||
m4_ifdef([AC_PROG_CXX], [m4_undefine([AC_PROG_CXX])])
|
||||
m4_defun([AC_PROG_CXX],[])
|
||||
m4_ifdef([AC_PROG_CXXCPP], [m4_undefine([AC_PROG_CXXCPP])])
|
||||
m4_defun([AC_PROG_CXXCPP],[true])
|
||||
m4_ifdef([AC_PROG_F77], [m4_undefine([AC_PROG_F77])])
|
||||
m4_defun([AC_PROG_F77],[])
|
||||
|
||||
dnl skip libtool C++ and Fortran linker checks
|
||||
m4_ifdef([AC_LIBTOOL_CXX], [m4_undefine([AC_LIBTOOL_CXX])])
|
||||
m4_defun([AC_LIBTOOL_CXX],[])
|
||||
m4_ifdef([AC_LIBTOOL_CXXCPP], [m4_undefine([AC_LIBTOOL_CXXCPP])])
|
||||
m4_defun([AC_LIBTOOL_CXXCPP],[true])
|
||||
m4_ifdef([AC_LIBTOOL_F77], [m4_undefine([AC_LIBTOOL_F77])])
|
||||
m4_defun([AC_LIBTOOL_F77],[])
|
||||
|
||||
@@ -103,7 +157,7 @@ AC_PROG_LIBTOOL
|
||||
|
||||
AC_MSG_CHECKING([if we need -no-undefined])
|
||||
case $host in
|
||||
*-*-cygwin | *-*-mingw* | *-*-pw32*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
need_no_undefined=yes
|
||||
;;
|
||||
*)
|
||||
@@ -157,6 +211,73 @@ case $host in
|
||||
#
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING([whether we are using the IBM C compiler])
|
||||
CURL_CHECK_DEF([__IBMC__], [], [silent])
|
||||
if test "$curl_cv_have_def___IBMC__" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
dnl Ensure that compiler optimizations are always thread-safe.
|
||||
CFLAGS="$CFLAGS -qthreaded"
|
||||
dnl Disable type based strict aliasing optimizations, using worst
|
||||
dnl case aliasing assumptions when compiling. Type based aliasing
|
||||
dnl would restrict the lvalues that could be safely used to access
|
||||
dnl a data object.
|
||||
CFLAGS="$CFLAGS -qnoansialias"
|
||||
dnl Force compiler to stop after the compilation phase, without
|
||||
dnl generating an object code file when compilation has errors.
|
||||
CFLAGS="$CFLAGS -qhalt=e"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether we are using the DEC/Compaq C compiler])
|
||||
CURL_CHECK_DEF([__DECC], [], [silent])
|
||||
CURL_CHECK_DEF([__DECC_VER], [], [silent])
|
||||
if test "$curl_cv_have_def___DECC" = "yes" &&
|
||||
test "$curl_cv_have_def___DECC_VER" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
dnl Select strict ANSI C compiler mode
|
||||
CFLAGS="$CFLAGS -std1"
|
||||
dnl Turn off optimizer ANSI C aliasing rules
|
||||
CFLAGS="$CFLAGS -noansi_alias"
|
||||
dnl Select a higher warning level than default level2
|
||||
CFLAGS="$CFLAGS -msg_enable level3"
|
||||
dnl Generate warnings for missing function prototypes
|
||||
CFLAGS="$CFLAGS -warnprotos"
|
||||
dnl Change some warnings into fatal errors
|
||||
CFLAGS="$CFLAGS -msg_fatal toofewargs,toomanyargs"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
CURL_CHECK_COMPILER_HALT_ON_ERROR
|
||||
CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Compilation based checks should not be done before this point.
|
||||
dnl **********************************************************************
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
|
||||
dnl and ws2tcpip.h take precedence over any other further checks which
|
||||
dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
|
||||
dnl this specific header files. And do them before its results are used.
|
||||
dnl **********************************************************************
|
||||
|
||||
CURL_CHECK_HEADER_WINDOWS
|
||||
CURL_CHECK_NATIVE_WINDOWS
|
||||
case X-"$ac_cv_native_windows" in
|
||||
X-yes)
|
||||
CURL_CHECK_HEADER_WINSOCK
|
||||
CURL_CHECK_HEADER_WINSOCK2
|
||||
CURL_CHECK_HEADER_WS2TCPIP
|
||||
;;
|
||||
*)
|
||||
ac_cv_header_winsock_h="no"
|
||||
ac_cv_header_winsock2_h="no"
|
||||
ac_cv_header_ws2tcpip_h="no"
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Checks for libraries.
|
||||
dnl **********************************************************************
|
||||
@@ -187,49 +308,107 @@ then
|
||||
AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
|
||||
my_ac_save_LIBS=$LIBS
|
||||
LIBS="-lnsl -lsocket $LIBS"
|
||||
AC_TRY_LINK( ,
|
||||
[gethostbyname();],
|
||||
[ dnl found it!
|
||||
HAVE_GETHOSTBYNAME="1"
|
||||
AC_MSG_RESULT([yes])],
|
||||
[ dnl failed!
|
||||
AC_MSG_RESULT([no])
|
||||
dnl restore LIBS
|
||||
LIBS=$my_ac_save_LIBS]
|
||||
)
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
gethostbyname();
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
LIBS=$my_ac_save_LIBS
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||
then
|
||||
dnl This is for Msys/Mingw
|
||||
AC_MSG_CHECKING([for gethostbyname in ws2_32])
|
||||
my_ac_save_LIBS=$LIBS
|
||||
LIBS="-lws2_32 $LIBS"
|
||||
AC_TRY_LINK([#include <winsock2.h>],
|
||||
[gethostbyname("www.dummysite.com");],
|
||||
[ dnl worked!
|
||||
ws2="yes"
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"],
|
||||
[ dnl failed, restore LIBS
|
||||
LIBS=$my_ac_save_LIBS
|
||||
AC_MSG_RESULT(no)]
|
||||
)
|
||||
dnl This is for winsock systems
|
||||
if test "$ac_cv_header_windows_h" = "yes"; then
|
||||
if test "$ac_cv_header_winsock_h" = "yes"; then
|
||||
case $host in
|
||||
*-*-mingw32ce*)
|
||||
winsock_LIB="-lwinsock"
|
||||
;;
|
||||
*)
|
||||
winsock_LIB="-lwsock32"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test "$ac_cv_header_winsock2_h" = "yes"; then
|
||||
winsock_LIB="-lws2_32"
|
||||
fi
|
||||
if test ! -z "$winsock_LIB"; then
|
||||
my_ac_save_LIBS=$LIBS
|
||||
LIBS="$winsock_LIB $LIBS"
|
||||
AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#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
|
||||
]],[[
|
||||
gethostbyname("www.dummysite.com");
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
winsock_LIB=""
|
||||
LIBS=$my_ac_save_LIBS
|
||||
])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||
then
|
||||
dnl This is for Minix 3.1
|
||||
AC_MSG_CHECKING([for gethostbyname for Minix 3])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
/* Older Minix versions may need <net/gen/netdb.h> here instead */
|
||||
#include <netdb.h>
|
||||
]],[[
|
||||
gethostbyname("www.dummysite.com");
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||
then
|
||||
dnl This is for eCos with a stubbed DNS implementation
|
||||
AC_MSG_CHECKING([for gethostbyname for eCos])
|
||||
AC_TRY_LINK([
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#include <stdio.h>
|
||||
#include <netdb.h>],
|
||||
[gethostbyname("www.dummysite.com");],
|
||||
[ dnl worked!
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
#include <netdb.h>
|
||||
]],[[
|
||||
gethostbyname("www.dummysite.com");
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||
@@ -261,6 +440,12 @@ fi
|
||||
dnl socket lib?
|
||||
AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ])
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl In case that function clock_gettime with monotonic timer is available,
|
||||
dnl check for additional required libraries.
|
||||
dnl **********************************************************************
|
||||
CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
|
||||
|
||||
AC_MSG_CHECKING([whether to use libgcc])
|
||||
AC_ARG_ENABLE(libgcc,
|
||||
AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
|
||||
@@ -326,26 +511,6 @@ if test "x$RECENTAIX" = "xyes"; then
|
||||
|
||||
AC_DEFINE(_THREAD_SAFE, 1, [define this if you need it to compile thread-safe code])
|
||||
|
||||
dnl check if this is the IBM xlc compiler
|
||||
dnl Details thanks to => http://predef.sourceforge.net/
|
||||
AC_MSG_CHECKING([if this is the xlc compiler])
|
||||
AC_EGREP_CPP([^__xlC__], [__xlC__],
|
||||
dnl action if the text is found, this it has not been replaced by the
|
||||
dnl cpp
|
||||
XLC="no"
|
||||
AC_MSG_RESULT([no]),
|
||||
dnl the text was not found, it was replaced by the cpp
|
||||
XLC="yes"
|
||||
AC_MSG_RESULT([yes])
|
||||
CFLAGS="$CFLAGS -qthreaded"
|
||||
dnl AIX xlc has to have strict aliasing turned off. If not,
|
||||
dnl the optimizer assumes that pointers can only point to
|
||||
dnl an object of the same type.
|
||||
CFLAGS="$CFLAGS -qnoansialias"
|
||||
dnl Force AIX xlc to stop after the compilation phase, and not
|
||||
dnl generate object code, when the source compiles with errors.
|
||||
CFLAGS="$CFLAGS -qhalt=e"
|
||||
)
|
||||
fi
|
||||
|
||||
|
||||
@@ -356,18 +521,6 @@ dnl **********************************************************************
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
|
||||
dnl and ws2tcpip.h take precedence over any other further checks which
|
||||
dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
|
||||
dnl this specific header files. And do them before its results are used.
|
||||
dnl **********************************************************************
|
||||
|
||||
CURL_CHECK_HEADER_WINDOWS
|
||||
CURL_CHECK_HEADER_WINSOCK
|
||||
CURL_CHECK_HEADER_WINSOCK2
|
||||
CURL_CHECK_HEADER_WS2TCPIP
|
||||
|
||||
CURL_CHECK_HEADER_MALLOC
|
||||
|
||||
dnl check for a few basic system headers we need
|
||||
@@ -383,7 +536,9 @@ AC_CHECK_HEADERS(
|
||||
netinet/tcp.h \
|
||||
net/if.h \
|
||||
errno.h \
|
||||
strings.h \
|
||||
stdbool.h \
|
||||
time.h \
|
||||
arpa/nameser.h \
|
||||
arpa/nameser_compat.h \
|
||||
arpa/inet.h,
|
||||
@@ -427,7 +582,8 @@ AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(time_t)
|
||||
|
||||
AC_CHECK_TYPE(long long,
|
||||
[AC_DEFINE(HAVE_LONGLONG, 1, [if your compiler supports long long])]
|
||||
[AC_DEFINE(HAVE_LONGLONG, 1,
|
||||
[Define to 1 if the compiler supports the 'long long' data type.])]
|
||||
longlong="yes"
|
||||
)
|
||||
|
||||
@@ -470,9 +626,8 @@ TYPE_SIG_ATOMIC_T
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
CURL_CHECK_FUNC_RECV
|
||||
|
||||
CURL_CHECK_FUNC_RECVFROM
|
||||
CURL_CHECK_FUNC_SEND
|
||||
|
||||
CURL_CHECK_MSG_NOSIGNAL
|
||||
|
||||
dnl check for AF_INET6
|
||||
@@ -641,23 +796,27 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags,
|
||||
)
|
||||
|
||||
|
||||
AC_CHECK_FUNCS( bitncmp \
|
||||
gettimeofday \
|
||||
if_indextoname,
|
||||
dnl if found
|
||||
[],
|
||||
dnl if not found, $ac_func is the name we check for
|
||||
func="$ac_func"
|
||||
AC_MSG_CHECKING([deeper for $func])
|
||||
AC_TRY_LINK( [],
|
||||
[ $func ();],
|
||||
AC_MSG_RESULT(yes!)
|
||||
eval "ac_cv_func_$func=yes"
|
||||
def=`echo "HAVE_$func" | tr 'a-z' 'A-Z'`
|
||||
AC_DEFINE_UNQUOTED($def, 1, [If you have $func]),
|
||||
AC_MSG_RESULT(but still no)
|
||||
)
|
||||
)
|
||||
AC_CHECK_FUNCS([bitncmp \
|
||||
gettimeofday \
|
||||
if_indextoname
|
||||
],[
|
||||
],[
|
||||
func="$ac_func"
|
||||
AC_MSG_CHECKING([deeper for $func])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
$func ();
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
eval "ac_cv_func_$func=yes"
|
||||
AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$func])], [1],
|
||||
[Define to 1 if you have the $func function.])
|
||||
],[
|
||||
AC_MSG_RESULT([but still no])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl check for inet_pton
|
||||
@@ -851,4 +1010,8 @@ if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
|
||||
[a suitable file/device to read random data from])
|
||||
fi
|
||||
|
||||
AC_OUTPUT(Makefile libcares.pc)
|
||||
CARES_PRIVATE_LIBS="$LIBS"
|
||||
AC_SUBST(CARES_PRIVATE_LIBS)
|
||||
|
||||
AC_CONFIG_FILES([Makefile libcares.pc])
|
||||
AC_OUTPUT
|
||||
|
@@ -3,7 +3,7 @@
|
||||
# / __|____ / _` | '__/ _ \/ __|
|
||||
# | (_|_____| (_| | | | __/\__ \
|
||||
# \___| \__,_|_| \___||___/
|
||||
# $id: $
|
||||
# $Id$
|
||||
#
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
@@ -18,3 +18,4 @@ Requires:
|
||||
Requires.private:
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lcares
|
||||
Libs.private: @CARES_PRIVATE_LIBS@
|
||||
|
442
ares/m4/cares-reentrant.m4
Normal file
442
ares/m4/cares-reentrant.m4
Normal file
@@ -0,0 +1,442 @@
|
||||
#***************************************************************************
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (C) 2008 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.
|
||||
#
|
||||
#***************************************************************************
|
||||
|
||||
# File version for 'aclocal' use. Keep it a single number.
|
||||
# serial 2
|
||||
|
||||
dnl Note 1
|
||||
dnl ------
|
||||
dnl None of the CARES_CHECK_NEED_REENTRANT_* macros shall use HAVE_FOO_H to
|
||||
dnl conditionally include header files. These macros are used early in the
|
||||
dnl configure process much before header file availability is known.
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_GMTIME_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function gmtime_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_GMTIME_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([gmtime_r])
|
||||
],[
|
||||
tmp_gmtime_r="yes"
|
||||
],[
|
||||
tmp_gmtime_r="no"
|
||||
])
|
||||
if test "$tmp_gmtime_r" = "yes"; then
|
||||
AC_EGREP_CPP([gmtime_r],[
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
],[
|
||||
tmp_gmtime_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([gmtime_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
],[
|
||||
tmp_gmtime_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_LOCALTIME_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function localtime_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_LOCALTIME_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([localtime_r])
|
||||
],[
|
||||
tmp_localtime_r="yes"
|
||||
],[
|
||||
tmp_localtime_r="no"
|
||||
])
|
||||
if test "$tmp_localtime_r" = "yes"; then
|
||||
AC_EGREP_CPP([localtime_r],[
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
],[
|
||||
tmp_localtime_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([localtime_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
],[
|
||||
tmp_localtime_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_STRERROR_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function strerror_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_STRERROR_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([strerror_r])
|
||||
],[
|
||||
tmp_strerror_r="yes"
|
||||
],[
|
||||
tmp_strerror_r="no"
|
||||
])
|
||||
if test "$tmp_strerror_r" = "yes"; then
|
||||
AC_EGREP_CPP([strerror_r],[
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
],[
|
||||
tmp_strerror_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([strerror_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
],[
|
||||
tmp_strerror_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_STRTOK_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function strtok_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_STRTOK_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([strtok_r])
|
||||
],[
|
||||
tmp_strtok_r="yes"
|
||||
],[
|
||||
tmp_strtok_r="no"
|
||||
])
|
||||
if test "$tmp_strtok_r" = "yes"; then
|
||||
AC_EGREP_CPP([strtok_r],[
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
],[
|
||||
tmp_strtok_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([strtok_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
],[
|
||||
tmp_strtok_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_INET_NTOA_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function inet_ntoa_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_INET_NTOA_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([inet_ntoa_r])
|
||||
],[
|
||||
tmp_inet_ntoa_r="yes"
|
||||
],[
|
||||
tmp_inet_ntoa_r="no"
|
||||
])
|
||||
if test "$tmp_inet_ntoa_r" = "yes"; then
|
||||
AC_EGREP_CPP([inet_ntoa_r],[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
],[
|
||||
tmp_inet_ntoa_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([inet_ntoa_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
],[
|
||||
tmp_inet_ntoa_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function gethostbyaddr_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([gethostbyaddr_r])
|
||||
],[
|
||||
tmp_gethostbyaddr_r="yes"
|
||||
],[
|
||||
tmp_gethostbyaddr_r="no"
|
||||
])
|
||||
if test "$tmp_gethostbyaddr_r" = "yes"; then
|
||||
AC_EGREP_CPP([gethostbyaddr_r],[
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_gethostbyaddr_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([gethostbyaddr_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_gethostbyaddr_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function gethostbyname_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_GETHOSTBYNAME_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([gethostbyname_r])
|
||||
],[
|
||||
tmp_gethostbyname_r="yes"
|
||||
],[
|
||||
tmp_gethostbyname_r="no"
|
||||
])
|
||||
if test "$tmp_gethostbyname_r" = "yes"; then
|
||||
AC_EGREP_CPP([gethostbyname_r],[
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_gethostbyname_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([gethostbyname_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_gethostbyname_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_GETPROTOBYNAME_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function getprotobyname_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_GETPROTOBYNAME_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([getprotobyname_r])
|
||||
],[
|
||||
tmp_getprotobyname_r="yes"
|
||||
],[
|
||||
tmp_getprotobyname_r="no"
|
||||
])
|
||||
if test "$tmp_getprotobyname_r" = "yes"; then
|
||||
AC_EGREP_CPP([getprotobyname_r],[
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_getprotobyname_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([getprotobyname_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_getprotobyname_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_GETSERVBYPORT_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes function getservbyport_r compiler visible.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_GETSERVBYPORT_R], [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_FUNC_LINK_TRY([getservbyport_r])
|
||||
],[
|
||||
tmp_getservbyport_r="yes"
|
||||
],[
|
||||
tmp_getservbyport_r="no"
|
||||
])
|
||||
if test "$tmp_getservbyport_r" = "yes"; then
|
||||
AC_EGREP_CPP([getservbyport_r],[
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_getservbyport_r="proto_declared"
|
||||
],[
|
||||
AC_EGREP_CPP([getservbyport_r],[
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
],[
|
||||
tmp_getservbyport_r="proto_needs_reentrant"
|
||||
tmp_need_reentrant="yes"
|
||||
])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NEED_REENTRANT_FUNCTIONS_R
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the preprocessor _REENTRANT definition
|
||||
dnl makes several _r functions compiler visible.
|
||||
dnl Internal macro for CARES_CONFIGURE_REENTRANT.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NEED_REENTRANT_FUNCTIONS_R], [
|
||||
#
|
||||
tmp_need_reentrant="no"
|
||||
#
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_GMTIME_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_LOCALTIME_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_STRERROR_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_STRTOK_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_INET_NTOA_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_GETPROTOBYNAME_R
|
||||
fi
|
||||
if test "$tmp_need_reentrant" = "no"; then
|
||||
CARES_CHECK_NEED_REENTRANT_GETSERVBYPORT_R
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT
|
||||
dnl -------------------------------------------------
|
||||
dnl This macro ensures that configuration tests done
|
||||
dnl after this will execute with preprocessor symbol
|
||||
dnl _REENTRANT defined. This macro also ensures that
|
||||
dnl the generated config file defines NEED_REENTRANT
|
||||
dnl and that in turn setup.h will define _REENTRANT.
|
||||
dnl Internal macro for CARES_CONFIGURE_REENTRANT.
|
||||
|
||||
AC_DEFUN([CARES_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT], [
|
||||
AC_DEFINE(NEED_REENTRANT, 1,
|
||||
[Define to 1 if _REENTRANT preprocessor symbol must be defined.])
|
||||
cat >>confdefs.h <<_EOF
|
||||
#ifndef _REENTRANT
|
||||
# define _REENTRANT
|
||||
#endif
|
||||
_EOF
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CONFIGURE_REENTRANT
|
||||
dnl -------------------------------------------------
|
||||
dnl This first checks if the preprocessor _REENTRANT
|
||||
dnl symbol is already defined. If it isn't currently
|
||||
dnl defined a set of checks are performed to verify
|
||||
dnl if its definition is required to make visible to
|
||||
dnl the compiler a set of *_r functions. Finally, if
|
||||
dnl _REENTRANT is already defined or needed it takes
|
||||
dnl care of making adjustments necessary to ensure
|
||||
dnl that it is defined equally for further configure
|
||||
dnl tests and generated config file.
|
||||
|
||||
AC_DEFUN([CARES_CONFIGURE_REENTRANT], [
|
||||
AC_PREREQ([2.50])dnl
|
||||
#
|
||||
AC_MSG_CHECKING([if _REENTRANT is already defined])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
#ifdef _REENTRANT
|
||||
int dummy=1;
|
||||
#else
|
||||
force compilation error
|
||||
#endif
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
tmp_reentrant_initially_defined="yes"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
tmp_reentrant_initially_defined="no"
|
||||
])
|
||||
#
|
||||
if test "$tmp_reentrant_initially_defined" = "no"; then
|
||||
AC_MSG_CHECKING([if _REENTRANT is actually needed])
|
||||
CARES_CHECK_NEED_REENTRANT_FUNCTIONS_R
|
||||
if test "$tmp_need_reentrant" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
#
|
||||
AC_MSG_CHECKING([if _REENTRANT is onwards defined])
|
||||
if test "$tmp_reentrant_initially_defined" = "yes" ||
|
||||
test "$tmp_need_reentrant" = "yes"; then
|
||||
CARES_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
#
|
||||
])
|
||||
|
10
ares/maketgz
10
ares/maketgz
@@ -38,11 +38,11 @@ if(!-f "configure") {
|
||||
`./buildconf`;
|
||||
}
|
||||
print "adding $version in the configure.ac file\n";
|
||||
`sed -e 's/AM_INIT_AUTOMAKE(c-ares, CVS)/AM_INIT_AUTOMAKE(c-ares, $version)/' < configure.ac > configure.ac-rel`;
|
||||
`sed -e 's/AC_INIT.*/AC_INIT([c-ares], [$version],/' < configure.ac > configure.ac.dist`;
|
||||
|
||||
# now make a new configure script with this
|
||||
print "makes a new configure script\n";
|
||||
`autoconf configure.ac-rel >configure`;
|
||||
`autoconf configure.ac.dist >configure`;
|
||||
|
||||
# now run this new configure to get a fine makefile
|
||||
print "running configure\n";
|
||||
@@ -50,9 +50,11 @@ print "running configure\n";
|
||||
|
||||
# now make the actual tarball
|
||||
print "running make dist\n";
|
||||
`make dist`;
|
||||
`make dist VERSION=$version`;
|
||||
|
||||
print "removing temporary configure.ac file\n";
|
||||
`rm configure.ac-rel`;
|
||||
`rm configure.ac.dist`;
|
||||
print "removing temporary ares_version.h file\n";
|
||||
`rm ares_version.h.dist`;
|
||||
|
||||
print "NOTE: now cvs tag this release!\n";
|
||||
|
@@ -13,8 +13,6 @@
|
||||
|
||||
#ifndef NETWARE
|
||||
|
||||
#define MAXHOSTNAMELEN 256
|
||||
|
||||
/* Structure for scatter/gather I/O. */
|
||||
struct iovec
|
||||
{
|
||||
@@ -29,13 +27,6 @@ struct iovec
|
||||
int ares_writev (SOCKET s, const struct iovec *vector, size_t count);
|
||||
#define writev(s,vect,count) ares_writev(s,vect,count)
|
||||
|
||||
#ifndef HAVE_GETTIMEOFDAY
|
||||
struct timezone { int dummy; };
|
||||
#endif
|
||||
|
||||
int ares_gettimeofday(struct timeval *tv, struct timezone *tz);
|
||||
#define gettimeofday(tv,tz) ares_gettimeofday(tv,tz)
|
||||
|
||||
#endif /* !NETWARE */
|
||||
|
||||
#define NS_CMPRSFLGS 0xc0
|
||||
|
14
ares/setup.h
14
ares/setup.h
@@ -3,7 +3,7 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 2004 - 2007 by Daniel Stenberg et al
|
||||
/* Copyright (C) 2004 - 2008 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
|
||||
@@ -39,6 +39,18 @@
|
||||
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
/*
|
||||
* Tru64 needs _REENTRANT set for a few function prototypes and
|
||||
* things to appear in the system header files. Unixware needs it
|
||||
* to build proper reentrant code. Others may also need it.
|
||||
*/
|
||||
|
||||
#ifdef NEED_REENTRANT
|
||||
# ifndef _REENTRANT
|
||||
# define _REENTRANT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Include header files for windows builds before redefining anything.
|
||||
* Use this preproessor block only to include or exclude windows.h,
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright (C) 2004 - 2007 by Daniel Stenberg et al
|
||||
/* Copyright (C) 2004 - 2008 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
|
||||
@@ -100,11 +100,10 @@ struct timeval {
|
||||
* definition is present the other one also is available.
|
||||
*/
|
||||
|
||||
#if defined(WIN32) && !defined(HAVE_SOCKLEN_T)
|
||||
#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
|
||||
# define HAVE_SOCKLEN_T
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -192,6 +191,46 @@ struct timeval {
|
||||
#endif /* HAVE_SEND */
|
||||
|
||||
|
||||
#if 0
|
||||
#if defined(HAVE_RECVFROM)
|
||||
/*
|
||||
* Currently recvfrom is only used on udp sockets.
|
||||
*/
|
||||
#if !defined(RECVFROM_TYPE_ARG1) || \
|
||||
!defined(RECVFROM_TYPE_ARG2) || \
|
||||
!defined(RECVFROM_TYPE_ARG3) || \
|
||||
!defined(RECVFROM_TYPE_ARG4) || \
|
||||
!defined(RECVFROM_TYPE_ARG5) || \
|
||||
!defined(RECVFROM_TYPE_ARG6) || \
|
||||
!defined(RECVFROM_TYPE_RETV)
|
||||
/* */
|
||||
Error Missing_definition_of_return_and_arguments_types_of_recvfrom
|
||||
/* */
|
||||
#else
|
||||
#define sreadfrom(s,b,bl,f,fl) (ssize_t)recvfrom((RECVFROM_TYPE_ARG1) (s), \
|
||||
(RECVFROM_TYPE_ARG2 *)(b), \
|
||||
(RECVFROM_TYPE_ARG3) (bl), \
|
||||
(RECVFROM_TYPE_ARG4) (0), \
|
||||
(RECVFROM_TYPE_ARG5 *)(f), \
|
||||
(RECVFROM_TYPE_ARG6 *)(fl))
|
||||
#endif
|
||||
#else /* HAVE_RECVFROM */
|
||||
#ifndef sreadfrom
|
||||
/* */
|
||||
Error Missing_definition_of_macro_sreadfrom
|
||||
/* */
|
||||
#endif
|
||||
#endif /* HAVE_RECVFROM */
|
||||
|
||||
|
||||
#ifdef RECVFROM_TYPE_ARG6_IS_VOID
|
||||
# define RECVFROM_ARG6_T int
|
||||
#else
|
||||
# define RECVFROM_ARG6_T RECVFROM_TYPE_ARG6
|
||||
#endif
|
||||
#endif /* if 0 */
|
||||
|
||||
|
||||
/*
|
||||
* Uppercase macro versions of ANSI/ISO is*() functions/macros which
|
||||
* avoid negative number inputs with argument byte codes > 127.
|
||||
|
2
ares/vc/.cvsignore
Normal file
2
ares/vc/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
vc.ncb
|
||||
vc.opt
|
3
ares/vc/acountry/.cvsignore
Normal file
3
ares/vc/acountry/.cvsignore
Normal file
@@ -0,0 +1,3 @@
|
||||
acountry.dep
|
||||
acountry.mak
|
||||
acountry.plg
|
110
ares/vc/acountry/acountry.dsp
Normal file
110
ares/vc/acountry/acountry.dsp
Normal file
@@ -0,0 +1,110 @@
|
||||
# Microsoft Developer Studio Project File - Name="acountry" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=acountry - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "acountry.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "acountry.mak" CFG="acountry - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "acountry - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "acountry - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "acountry - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# 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 RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||
# ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "acountry - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# 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 RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||
# ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "acountry - Win32 Release"
|
||||
# Name "acountry - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\acountry.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_getopt.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_getopt.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
3
ares/vc/adig/.cvsignore
Normal file
3
ares/vc/adig/.cvsignore
Normal file
@@ -0,0 +1,3 @@
|
||||
adig.dep
|
||||
adig.mak
|
||||
adig.plg
|
@@ -1,2 +0,0 @@
|
||||
# Microsoft Developer Studio Generated Dependency File, included by adig.mak
|
||||
|
@@ -41,15 +41,15 @@ RSC=rc.exe
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# 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 RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||
# ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "adig - Win32 Debug"
|
||||
@@ -65,15 +65,15 @@ LINK32=link.exe
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# 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 RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||
# ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||
|
||||
!ENDIF
|
||||
|
3
ares/vc/ahost/.cvsignore
Normal file
3
ares/vc/ahost/.cvsignore
Normal file
@@ -0,0 +1,3 @@
|
||||
ahost.dep
|
||||
ahost.mak
|
||||
ahost.plg
|
@@ -1,2 +0,0 @@
|
||||
# Microsoft Developer Studio Generated Dependency File, included by ahost.mak
|
||||
|
@@ -41,15 +41,15 @@ RSC=rc.exe
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# 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 RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||
# ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ahost - Win32 Debug"
|
||||
@@ -65,15 +65,15 @@ LINK32=link.exe
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||
# 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 RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||
# ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug"
|
||||
|
||||
!ENDIF
|
||||
|
3
ares/vc/areslib/.cvsignore
Normal file
3
ares/vc/areslib/.cvsignore
Normal file
@@ -0,0 +1,3 @@
|
||||
areslib.dep
|
||||
areslib.mak
|
||||
areslib.plg
|
@@ -1,2 +0,0 @@
|
||||
# Microsoft Developer Studio Generated Dependency File, included by areslib.mak
|
||||
|
@@ -40,8 +40,8 @@ RSC=rc.exe
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
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 /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# 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 RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@@ -97,6 +97,10 @@ SOURCE=..\..\ares__read_line.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares__timeval.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_cancel.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -109,6 +113,10 @@ SOURCE=..\..\ares_expand_name.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_expand_string.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\ares_fds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@@ -3,6 +3,21 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "acountry"=".\acountry\acountry.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name areslib
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "adig"=".\adig\adig.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
|
@@ -55,37 +55,6 @@ ares_strcasecmp(const char *a, const char *b)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Number of micro-seconds between the beginning of the Windows epoch
|
||||
* (Jan. 1, 1601) and the Unix epoch (Jan. 1, 1970).
|
||||
*/
|
||||
#if defined(_MSC_VER) || defined(__WATCOMC__)
|
||||
#define EPOCH_FILETIME 11644473600000000Ui64
|
||||
#else
|
||||
#define EPOCH_FILETIME 11644473600000000ULL
|
||||
#endif
|
||||
|
||||
int
|
||||
ares_gettimeofday(struct timeval *tv, struct timezone *tz)
|
||||
{
|
||||
FILETIME ft;
|
||||
LARGE_INTEGER li;
|
||||
__int64 t;
|
||||
|
||||
if (tv)
|
||||
{
|
||||
GetSystemTimeAsFileTime(&ft);
|
||||
li.LowPart = ft.dwLowDateTime;
|
||||
li.HighPart = ft.dwHighDateTime;
|
||||
t = li.QuadPart / 10; /* In micro-second intervals */
|
||||
t -= EPOCH_FILETIME; /* Offset to the Epoch time */
|
||||
tv->tv_sec = (long)(t / 1000000);
|
||||
tv->tv_usec = (long)(t % 1000000);
|
||||
}
|
||||
(void) tz;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
ares_writev (ares_socket_t s, const struct iovec *vector, size_t count)
|
||||
{
|
||||
|
104
buildconf
104
buildconf
@@ -6,7 +6,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2008, 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
|
||||
@@ -27,22 +27,57 @@ die(){
|
||||
exit
|
||||
}
|
||||
|
||||
# this works as 'which' but we use a different name to make it more obvious we
|
||||
# aren't using 'which'! ;-)
|
||||
#--------------------------------------------------------------------------
|
||||
# findtool works as 'which' but we use a different name to make it more
|
||||
# obvious we aren't using 'which'! ;-)
|
||||
#
|
||||
findtool(){
|
||||
file="$1"
|
||||
|
||||
IFS=":"
|
||||
old_IFS=$IFS; IFS=':'
|
||||
for path in $PATH
|
||||
do
|
||||
IFS=$old_IFS
|
||||
# echo "checks for $file in $path" >&2
|
||||
if test -f "$path/$file"; then
|
||||
echo "$path/$file"
|
||||
return
|
||||
fi
|
||||
done
|
||||
IFS=$old_IFS
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# removethis() removes all files and subdirectories with the given name,
|
||||
# inside and below the current subdirectory at invocation time.
|
||||
#
|
||||
removethis(){
|
||||
if test "$#" = "1"; then
|
||||
find . -depth -name $1 -print > buildconf.tmp.$$
|
||||
while read fdname
|
||||
do
|
||||
if test -f "$fdname"; then
|
||||
rm -f "$fdname"
|
||||
elif test -d "$fdname"; then
|
||||
rm -f -r "$fdname"
|
||||
fi
|
||||
done < buildconf.tmp.$$
|
||||
rm -f buildconf.tmp.$$
|
||||
fi
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Ensure that buildconf runs from the subdirectory where configure.ac lives
|
||||
#
|
||||
if test ! -f configure.ac ||
|
||||
test ! -f src/main.c ||
|
||||
test ! -f lib/urldata.h ||
|
||||
test ! -f include/curl/curl.h; then
|
||||
echo "Can not run buildconf from outside of curl's source subdirectory!"
|
||||
echo "Change to the subdirectory where buildconf is found, and try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# autoconf 2.57 or newer
|
||||
#
|
||||
@@ -65,6 +100,18 @@ fi
|
||||
|
||||
echo "buildconf: autoconf version $ac_version (ok)"
|
||||
|
||||
am4te_version=`${AUTOM4TE:-autom4te} --version 2>/dev/null|head -n 1| sed -e 's/autom4te\(.*\)/\1/' -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
|
||||
if test -z "$am4te_version"; then
|
||||
echo "buildconf: autom4te not found. Weird autoconf installation!"
|
||||
exit 1
|
||||
fi
|
||||
if test "$am4te_version" = "$ac_version"; then
|
||||
echo "buildconf: autom4te version $am4te_version (ok)"
|
||||
else
|
||||
echo "buildconf: autom4te version $am4te_version (ERROR: does not match autoconf version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# autoheader 2.50 or newer
|
||||
#
|
||||
@@ -108,12 +155,16 @@ fi
|
||||
|
||||
echo "buildconf: automake version $am_version (ok)"
|
||||
|
||||
ac=`findtool ${ACLOCAL:-aclocal}`
|
||||
if test -z "$ac"; then
|
||||
acloc_version=`${ACLOCAL:-aclocal} --version 2>/dev/null|head -n 1| sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//' -e 's/\(.*\)\(-p.*\)/\1/'`
|
||||
if test -z "$acloc_version"; then
|
||||
echo "buildconf: aclocal not found. Weird automake installation!"
|
||||
exit 1
|
||||
fi
|
||||
if test "$acloc_version" = "$am_version"; then
|
||||
echo "buildconf: aclocal version $acloc_version (ok)"
|
||||
else
|
||||
echo "buildconf: aclocal found"
|
||||
echo "buildconf: aclocal version $acloc_version (ERROR: does not match automake version)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
@@ -202,14 +253,46 @@ fi
|
||||
#
|
||||
PERL=`findtool ${PERL:-perl}`
|
||||
|
||||
# ------------------------------------------------------------
|
||||
#--------------------------------------------------------------------------
|
||||
# Remove files generated on previous buildconf/configure run.
|
||||
#
|
||||
for fname in .deps \
|
||||
Makefile.in \
|
||||
aclocal.m4 \
|
||||
aclocal.m4.bak \
|
||||
autom4te.cache \
|
||||
compile \
|
||||
config.guess \
|
||||
config.h \
|
||||
config.h.in \
|
||||
config.log \
|
||||
config.status \
|
||||
config.sub \
|
||||
configure \
|
||||
curl-config \
|
||||
curlbuild.h \
|
||||
depcomp \
|
||||
libcares.pc \
|
||||
libcurl.pc \
|
||||
libtool \
|
||||
libtool.m4 \
|
||||
ltmain.sh \
|
||||
stamp-h1 \
|
||||
stamp-h2 \
|
||||
stamp-h3 ; do
|
||||
removethis "$fname"
|
||||
done
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# run the correct scripts now
|
||||
#
|
||||
|
||||
echo "buildconf: running libtoolize"
|
||||
$libtoolize --copy --automake --force || die "The libtoolize command failed"
|
||||
|
||||
echo "buildconf: running aclocal"
|
||||
${ACLOCAL:-aclocal} $ACLOCAL_FLAGS || die "The aclocal command line failed"
|
||||
${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS || die "The aclocal command line failed"
|
||||
|
||||
if test -n "$PERL"; then
|
||||
echo "buildconf: running aclocal hack to convert all mv to mv -f"
|
||||
$PERL -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4
|
||||
@@ -217,10 +300,13 @@ else
|
||||
echo "buildconf: perl not found"
|
||||
exit 1
|
||||
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: running autoconf"
|
||||
${AUTOCONF:-autoconf} || die "The autoconf command failed"
|
||||
|
||||
|
@@ -3,11 +3,11 @@ REM set up a CVS tree to build when there's no autotools
|
||||
REM $Revision$
|
||||
REM $Date$
|
||||
|
||||
REM create ca-bundle.h
|
||||
echo /* This file is generated automatically */ >lib\ca-bundle.h
|
||||
|
||||
REM create hugehelp.c
|
||||
copy src\hugehelp.c.cvs src\hugehelp.c
|
||||
|
||||
REM create Makefile
|
||||
copy Makefile.dist Makefile
|
||||
copy Makefile.dist Makefile
|
||||
|
||||
REM create curlbuild.h
|
||||
copy include\curl\curlbuild.h.dist include\curl\curlbuild.h
|
||||
|
705
configure.ac
705
configure.ac
@@ -19,13 +19,13 @@
|
||||
# KIND, either express or implied.
|
||||
#
|
||||
# $Id$
|
||||
###########################################################################
|
||||
#***************************************************************************
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
|
||||
dnl We don't know the version number "statically" so we use a dash here
|
||||
AC_INIT(curl, [-], [a suitable curl mailing list => http://curl.haxx.se/mail/])
|
||||
AC_INIT([curl], [-], [a suitable curl mailing list => http://curl.haxx.se/mail/])
|
||||
|
||||
dnl configure script copyright
|
||||
AC_COPYRIGHT([Copyright (c) 1998 - 2008 Daniel Stenberg, <daniel@haxx.se>
|
||||
@@ -33,28 +33,51 @@ 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)
|
||||
AM_CONFIG_HEADER(lib/config.h src/config.h include/curl/curlbuild.h)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
dnl SED is needed by some of the tools
|
||||
AC_PATH_PROG( SED, sed, sed-was-not-found-by-configure,
|
||||
$PATH:/usr/bin:/usr/local/bin)
|
||||
AC_SUBST(SED)
|
||||
|
||||
if test "x$SED" = "xsed-was-not-found-by-configure"; then
|
||||
AC_MSG_WARN([sed was not found, this may ruin your chances to build fine])
|
||||
dnl SED is mandatory for configure process and libtool.
|
||||
dnl Set it now, allowing it to be changed later.
|
||||
AC_PATH_PROG([SED], [sed], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
if test -z "$SED" || test "$SED" = "not_found"; then
|
||||
AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
|
||||
fi
|
||||
AC_SUBST([SED])
|
||||
|
||||
dnl AR is used by libtool, and try the odd Solaris path too
|
||||
dnl we use AC_CHECK_TOOL since this should make a library for the target
|
||||
dnl platform
|
||||
AC_CHECK_TOOL(AR, ar,
|
||||
ar-was-not-found-by-configure,
|
||||
$PATH:/usr/bin:/usr/local/bin:/usr/ccs/bin)
|
||||
AC_SUBST(AR)
|
||||
if test "x$AR" = "xar-was-not-found-by-configure"; then
|
||||
AC_MSG_WARN([ar was not found, this may ruin your chances to build fine])
|
||||
dnl GREP is mandatory for configure process and libtool.
|
||||
dnl Set it now, allowing it to be changed later.
|
||||
AC_PATH_PROG([GREP], [grep], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
if test -z "$GREP" || test "$GREP" = "not_found"; then
|
||||
AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
|
||||
fi
|
||||
AC_SUBST([GREP])
|
||||
|
||||
dnl EGREP is mandatory for configure process and libtool.
|
||||
dnl Set it now, allowing it to be changed later.
|
||||
if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
|
||||
AC_MSG_CHECKING([for egrep])
|
||||
EGREP="$GREP -E"
|
||||
AC_MSG_RESULT([$EGREP])
|
||||
else
|
||||
AC_PATH_PROG([EGREP], [egrep], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
fi
|
||||
if test -z "$EGREP" || test "$EGREP" = "not_found"; then
|
||||
AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
|
||||
fi
|
||||
AC_SUBST([EGREP])
|
||||
|
||||
dnl AR is mandatory for configure process and libtool.
|
||||
dnl This is target dependant, so check it as a tool.
|
||||
AC_PATH_TOOL([AR], [ar], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
if test -z "$AR" || test "$AR" = "not_found"; then
|
||||
AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
|
||||
fi
|
||||
AC_SUBST([AR])
|
||||
|
||||
AC_SUBST(libext)
|
||||
|
||||
dnl figure out the libcurl version
|
||||
@@ -106,12 +129,18 @@ AC_CANONICAL_HOST
|
||||
dnl Get system canonical name
|
||||
AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
|
||||
|
||||
dnl Check for AIX weirdos
|
||||
AC_AIX
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
|
||||
dnl Our curl_off_t internal and external configure settings
|
||||
CURL_CONFIGURE_CURL_OFF_T
|
||||
|
||||
dnl This defines _ALL_SOURCE for AIX
|
||||
CURL_CHECK_AIX_ALL_SOURCE
|
||||
|
||||
dnl Our configure and build reentrant settings
|
||||
CURL_CONFIGURE_REENTRANT
|
||||
|
||||
dnl check for how to do large files
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
@@ -151,7 +180,7 @@ AC_PROG_LIBTOOL
|
||||
|
||||
AC_MSG_CHECKING([if we need -no-undefined])
|
||||
case $host in
|
||||
*-*-cygwin | *-*-mingw* | *-*-pw32*)
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
need_no_undefined=yes
|
||||
;;
|
||||
*)
|
||||
@@ -212,21 +241,6 @@ AC_PROG_MAKE_SET
|
||||
dnl check if there's a way to force code inline
|
||||
AC_C_INLINE
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
|
||||
dnl and ws2tcpip.h take precedence over any other further checks which
|
||||
dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
|
||||
dnl this specific header files. And do them before its results are used.
|
||||
dnl **********************************************************************
|
||||
|
||||
CURL_CHECK_HEADER_WINDOWS
|
||||
CURL_CHECK_HEADER_WINSOCK
|
||||
CURL_CHECK_HEADER_WINSOCK2
|
||||
CURL_CHECK_HEADER_WS2TCPIP
|
||||
|
||||
CURL_CHECK_HEADER_WINLDAP
|
||||
CURL_CHECK_HEADER_WINBER
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl platform/compiler/architecture specific checks/flags
|
||||
dnl **********************************************************************
|
||||
@@ -264,6 +278,78 @@ case $host in
|
||||
#
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING([whether we are using the IBM C compiler])
|
||||
CURL_CHECK_DEF([__IBMC__], [], [silent])
|
||||
if test "$curl_cv_have_def___IBMC__" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
dnl Ensure that compiler optimizations are always thread-safe.
|
||||
CFLAGS="$CFLAGS -qthreaded"
|
||||
dnl Disable type based strict aliasing optimizations, using worst
|
||||
dnl case aliasing assumptions when compiling. Type based aliasing
|
||||
dnl would restrict the lvalues that could be safely used to access
|
||||
dnl a data object.
|
||||
CFLAGS="$CFLAGS -qnoansialias"
|
||||
dnl Force compiler to stop after the compilation phase, without
|
||||
dnl generating an object code file when compilation has errors.
|
||||
CFLAGS="$CFLAGS -qhalt=e"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether we are using the DEC/Compaq C compiler])
|
||||
CURL_CHECK_DEF([__DECC], [], [silent])
|
||||
CURL_CHECK_DEF([__DECC_VER], [], [silent])
|
||||
if test "$curl_cv_have_def___DECC" = "yes" &&
|
||||
test "$curl_cv_have_def___DECC_VER" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
dnl Select strict ANSI C compiler mode
|
||||
CFLAGS="$CFLAGS -std1"
|
||||
dnl Turn off optimizer ANSI C aliasing rules
|
||||
CFLAGS="$CFLAGS -noansi_alias"
|
||||
dnl Select a higher warning level than default level2
|
||||
CFLAGS="$CFLAGS -msg_enable level3"
|
||||
dnl Generate warnings for missing function prototypes
|
||||
CFLAGS="$CFLAGS -warnprotos"
|
||||
dnl Change some warnings into fatal errors
|
||||
CFLAGS="$CFLAGS -msg_fatal toofewargs,toomanyargs"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
CURL_CHECK_COMPILER_HALT_ON_ERROR
|
||||
CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Compilation based checks should not be done before this point.
|
||||
dnl **********************************************************************
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
|
||||
dnl and ws2tcpip.h take precedence over any other further checks which
|
||||
dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for
|
||||
dnl this specific header files. And do them before its results are used.
|
||||
dnl **********************************************************************
|
||||
|
||||
CURL_CHECK_HEADER_WINDOWS
|
||||
CURL_CHECK_NATIVE_WINDOWS
|
||||
case X-"$ac_cv_native_windows" in
|
||||
X-yes)
|
||||
CURL_CHECK_HEADER_WINSOCK
|
||||
CURL_CHECK_HEADER_WINSOCK2
|
||||
CURL_CHECK_HEADER_WS2TCPIP
|
||||
CURL_CHECK_HEADER_WINLDAP
|
||||
CURL_CHECK_HEADER_WINBER
|
||||
;;
|
||||
*)
|
||||
ac_cv_header_winsock_h="no"
|
||||
ac_cv_header_winsock2_h="no"
|
||||
ac_cv_header_ws2tcpip_h="no"
|
||||
ac_cv_header_winldap_h="no"
|
||||
ac_cv_header_winber_h="no"
|
||||
;;
|
||||
esac
|
||||
CURL_CHECK_WIN32_LARGEFILE
|
||||
|
||||
dnl ************************************************************
|
||||
dnl switch off particular protocols
|
||||
dnl
|
||||
@@ -478,64 +564,116 @@ then
|
||||
AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
|
||||
my_ac_save_LIBS=$LIBS
|
||||
LIBS="-lnsl -lsocket $LIBS"
|
||||
AC_TRY_LINK( ,
|
||||
[gethostbyname();],
|
||||
[ dnl found it!
|
||||
HAVE_GETHOSTBYNAME="1"
|
||||
AC_MSG_RESULT([yes])],
|
||||
[ dnl failed!
|
||||
AC_MSG_RESULT([no])
|
||||
dnl restore LIBS
|
||||
LIBS=$my_ac_save_LIBS]
|
||||
)
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
gethostbyname();
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
LIBS=$my_ac_save_LIBS
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||
then
|
||||
dnl This is for Msys/Mingw
|
||||
AC_MSG_CHECKING([for gethostbyname in ws2_32])
|
||||
my_ac_save_LIBS=$LIBS
|
||||
LIBS="-lws2_32 $LIBS"
|
||||
AC_TRY_LINK([#include <winsock2.h>],
|
||||
[gethostbyname("www.dummysite.com");],
|
||||
[ dnl worked!
|
||||
ws2="yes"
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"],
|
||||
[ dnl failed, restore LIBS
|
||||
LIBS=$my_ac_save_LIBS
|
||||
AC_MSG_RESULT(no)]
|
||||
)
|
||||
dnl This is for winsock systems
|
||||
if test "$ac_cv_header_windows_h" = "yes"; then
|
||||
if test "$ac_cv_header_winsock_h" = "yes"; then
|
||||
case $host in
|
||||
*-*-mingw32ce*)
|
||||
winsock_LIB="-lwinsock"
|
||||
;;
|
||||
*)
|
||||
winsock_LIB="-lwsock32"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test "$ac_cv_header_winsock2_h" = "yes"; then
|
||||
winsock_LIB="-lws2_32"
|
||||
fi
|
||||
if test ! -z "$winsock_LIB"; then
|
||||
my_ac_save_LIBS=$LIBS
|
||||
LIBS="$winsock_LIB $LIBS"
|
||||
AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#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
|
||||
]],[[
|
||||
gethostbyname("www.dummysite.com");
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
winsock_LIB=""
|
||||
LIBS=$my_ac_save_LIBS
|
||||
])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||
then
|
||||
dnl This is for Minix 3.1
|
||||
AC_MSG_CHECKING([for gethostbyname for Minix 3])
|
||||
AC_TRY_LINK([
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
/* Older Minix versions may need <net/gen/netdb.h> here instead */
|
||||
#include <netdb.h>],
|
||||
[gethostbyname("www.dummysite.com");],
|
||||
[ dnl worked!
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
#include <netdb.h>
|
||||
]],[[
|
||||
gethostbyname("www.dummysite.com");
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||
then
|
||||
dnl This is for eCos with a stubbed DNS implementation
|
||||
AC_MSG_CHECKING([for gethostbyname for eCos])
|
||||
AC_TRY_LINK([
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#include <stdio.h>
|
||||
#include <netdb.h>],
|
||||
[gethostbyname("www.dummysite.com");],
|
||||
[ dnl worked!
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
#include <netdb.h>
|
||||
]],[[
|
||||
gethostbyname("www.dummysite.com");
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_GETHOSTBYNAME="1"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||
then
|
||||
dnl gethostbyname in the network lib - for Haiku OS
|
||||
AC_CHECK_LIB(network, gethostbyname,
|
||||
[HAVE_GETHOSTBYNAME="1"
|
||||
LIBS="$LIBS -lnetwork"
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$HAVE_GETHOSTBYNAME" != "1"
|
||||
@@ -567,6 +705,12 @@ fi
|
||||
dnl socket lib?
|
||||
AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ])
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl In case that function clock_gettime with monotonic timer is available,
|
||||
dnl check for additional required libraries.
|
||||
dnl **********************************************************************
|
||||
CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl The preceding library checks are all potentially useful for test
|
||||
dnl servers (for providing networking support). Save the list of required
|
||||
@@ -674,36 +818,6 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Check for the presence of the winmm library.
|
||||
dnl **********************************************************************
|
||||
|
||||
case $host in
|
||||
*-*-cygwin*)
|
||||
dnl Under Cygwin, winmm exists but is not needed as WIN32 is not #defined
|
||||
dnl and gettimeofday() will be used regardless of the outcome of this test.
|
||||
dnl Skip this test, otherwise -lwinmm will be needlessly added to LIBS
|
||||
dnl (and recorded as such in the .la file, potentially affecting downstream
|
||||
dnl clients of the library.)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_CHECKING([for timeGetTime in winmm])
|
||||
my_ac_save_LIBS=$LIBS
|
||||
LIBS="-lwinmm $LIBS"
|
||||
AC_TRY_LINK([#include <windef.h>
|
||||
#include <mmsystem.h>
|
||||
],
|
||||
[timeGetTime();],
|
||||
[ dnl worked!
|
||||
AC_MSG_RESULT([yes])
|
||||
],
|
||||
[ dnl failed, restore LIBS
|
||||
LIBS=$my_ac_save_LIBS
|
||||
AC_MSG_RESULT(no)]
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Checks for IPv6
|
||||
dnl **********************************************************************
|
||||
@@ -983,15 +1097,14 @@ if test x"$want_gss" = xyes; then
|
||||
gnu_gss=yes
|
||||
],
|
||||
[
|
||||
dnl not found, check MIT
|
||||
AC_CHECK_HEADER(gssapi/gssapi.h,
|
||||
[
|
||||
dnl found in the given dirs
|
||||
AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries])
|
||||
],
|
||||
[
|
||||
dnl not found, check for Heimdal
|
||||
AC_CHECK_HEADER(gssapi.h,
|
||||
dnl not found, check Heimdal or MIT
|
||||
AC_CHECK_HEADERS(
|
||||
[gssapi/gssapi.h gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
|
||||
[],
|
||||
[not_mit=1])
|
||||
if test "x$not_mit" = "x1"; then
|
||||
dnl MIT not found, check for Heimdal
|
||||
AC_CHECK_HEADER(gssapi.h,
|
||||
[
|
||||
dnl found
|
||||
AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries])
|
||||
@@ -1002,8 +1115,31 @@ if test x"$want_gss" = xyes; then
|
||||
AC_MSG_WARN(disabling GSSAPI since no header files was found)
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
else
|
||||
dnl MIT found
|
||||
AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries])
|
||||
dnl check if we have a really old MIT kerberos (<= 1.2)
|
||||
AC_MSG_CHECKING([if gssapi headers declare GSS_C_NT_HOSTBASED_SERVICE])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#include <gssapi/gssapi.h>
|
||||
#include <gssapi/gssapi_generic.h>
|
||||
#include <gssapi/gssapi_krb5.h>
|
||||
]],[[
|
||||
gss_import_name(
|
||||
(OM_uint32 *)0,
|
||||
(gss_buffer_t)0,
|
||||
GSS_C_NT_HOSTBASED_SERVICE,
|
||||
(gss_name_t *)0);
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_DEFINE(HAVE_OLD_GSSMIT, 1,
|
||||
[if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE])
|
||||
])
|
||||
fi
|
||||
]
|
||||
)
|
||||
else
|
||||
@@ -1116,28 +1252,6 @@ if test X"$OPT_SSL" != Xno; then
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl This is for Msys/Mingw
|
||||
case $host in
|
||||
*-*-cygwin*)
|
||||
dnl Under Cygwin this is extraneous and causes an unnecessary -lgdi32
|
||||
dnl to be added to LIBS and recorded in the .la file.
|
||||
;;
|
||||
*)
|
||||
AC_MSG_CHECKING([for gdi32])
|
||||
my_ac_save_LIBS=$LIBS
|
||||
LIBS="-lgdi32 $LIBS"
|
||||
AC_TRY_LINK([#include <windef.h>
|
||||
#include <wingdi.h>],
|
||||
[GdiFlush();],
|
||||
[ dnl worked!
|
||||
AC_MSG_RESULT([yes])],
|
||||
[ dnl failed, restore LIBS
|
||||
LIBS=$my_ac_save_LIBS
|
||||
AC_MSG_RESULT(no)]
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_CHECK_LIB(crypto, CRYPTO_lock,[
|
||||
HAVECRYPTO="yes"
|
||||
LIBS="-lcrypto $LIBS"
|
||||
@@ -1241,21 +1355,23 @@ if test X"$OPT_SSL" != Xno; then
|
||||
dnl and acting like OpenSSL.
|
||||
|
||||
AC_MSG_CHECKING([for yaSSL using OpenSSL compatibility mode])
|
||||
AC_TRY_COMPILE([
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#include <openssl/ssl.h>
|
||||
],[
|
||||
]],[[
|
||||
#if defined(YASSL_VERSION) && defined(OPENSSL_VERSION_NUMBER)
|
||||
int dummy = SSL_ERROR_NONE;
|
||||
#else
|
||||
Not the yaSSL OpenSSL compatibility header.
|
||||
#endif
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1,
|
||||
[Define to 1 if using yaSSL in OpenSSL compatibility mode.])
|
||||
curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE_UNQUOTED(USE_YASSLEMUL, 1,
|
||||
[Define to 1 if using yaSSL in OpenSSL compatibility mode.])
|
||||
curl_ssl_msg="enabled (OpenSSL emulation by yaSSL)"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
fi
|
||||
|
||||
@@ -1623,9 +1739,6 @@ dnl **********************************************************************
|
||||
|
||||
CURL_CHECK_CA_BUNDLE
|
||||
|
||||
AM_CONDITIONAL(CABUNDLE, test x$ca != xno)
|
||||
AM_CONDITIONAL(CAPATH, test x$capath != xno)
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Check for the presence of IDN libraries and headers
|
||||
dnl **********************************************************************
|
||||
@@ -1746,28 +1859,6 @@ if test "x$RECENTAIX" = "xyes"; then
|
||||
|
||||
AC_DEFINE(_THREAD_SAFE, 1, [define this if you need it to compile thread-safe code])
|
||||
|
||||
dnl check if this is the IMB xlc compiler
|
||||
dnl Details thanks to => http://predef.sourceforge.net/
|
||||
AC_MSG_CHECKING([if this is the xlc compiler])
|
||||
AC_EGREP_CPP([^__xlC__], [__xlC__],
|
||||
dnl action if the text is found, this it has not been replaced by the
|
||||
dnl cpp
|
||||
XLC="no"
|
||||
AC_MSG_RESULT([no]),
|
||||
dnl the text was not found, it was replaced by the cpp
|
||||
XLC="yes"
|
||||
AC_MSG_RESULT([yes])
|
||||
CFLAGS="$CFLAGS -qthreaded"
|
||||
dnl AIX xlc has to have strict aliasing turned off. If not,
|
||||
dnl the optimizer assumes that pointers can only point to
|
||||
dnl an object of the same type.
|
||||
CFLAGS="$CFLAGS -qnoansialias"
|
||||
dnl Force AIX xlc to stop after the compilation phase, and not
|
||||
dnl generate object code, when the source compiles with errors.
|
||||
CFLAGS="$CFLAGS -qhalt=e"
|
||||
)
|
||||
|
||||
|
||||
dnl is there a localtime_r()
|
||||
CURL_CHECK_LOCALTIME_R()
|
||||
|
||||
@@ -1843,6 +1934,7 @@ AC_CHECK_HEADERS(
|
||||
arpa/inet.h \
|
||||
net/if.h \
|
||||
netinet/in.h \
|
||||
sys/un.h \
|
||||
netinet/tcp.h \
|
||||
netdb.h \
|
||||
sys/sockio.h \
|
||||
@@ -1889,6 +1981,9 @@ dnl default includes
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_UN_H
|
||||
#include <sys/un.h>
|
||||
#endif
|
||||
]
|
||||
)
|
||||
|
||||
@@ -1900,17 +1995,25 @@ AC_HEADER_TIME
|
||||
CURL_CHECK_STRUCT_TIMEVAL
|
||||
CURL_VERIFY_RUNTIMELIBS
|
||||
|
||||
AC_CHECK_SIZEOF(curl_off_t, ,[
|
||||
#include <stdio.h>
|
||||
#include "$srcdir/include/curl/curl.h"
|
||||
])
|
||||
AC_CHECK_SIZEOF(size_t)
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
CURL_CONFIGURE_LONG
|
||||
AC_CHECK_SIZEOF(time_t)
|
||||
AC_CHECK_SIZEOF(off_t)
|
||||
|
||||
soname_bump=no
|
||||
if test x"$ac_cv_native_windows" != "xyes" &&
|
||||
test $ac_cv_sizeof_off_t -ne $curl_sizeof_curl_off_t; then
|
||||
AC_MSG_WARN([This libcurl built is probably not ABI compatible with previous])
|
||||
AC_MSG_WARN([builds! You MUST read lib/README.curl_off_t to figure it out.])
|
||||
soname_bump=yes
|
||||
fi
|
||||
|
||||
|
||||
AC_CHECK_TYPE(long long,
|
||||
[AC_DEFINE(HAVE_LONGLONG, 1, [if your compiler supports long long])]
|
||||
[AC_DEFINE(HAVE_LONGLONG, 1,
|
||||
[Define to 1 if the compiler supports the 'long long' data type.])]
|
||||
longlong="yes"
|
||||
)
|
||||
|
||||
@@ -1952,12 +2055,11 @@ TYPE_SIG_ATOMIC_T
|
||||
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
CURL_CHECK_FUNC_SELECT
|
||||
|
||||
CURL_CHECK_FUNC_RECV
|
||||
|
||||
CURL_CHECK_FUNC_RECVFROM
|
||||
CURL_CHECK_FUNC_SEND
|
||||
|
||||
CURL_CHECK_MSG_NOSIGNAL
|
||||
|
||||
dnl Checks for library functions.
|
||||
@@ -1971,104 +2073,84 @@ case $host in
|
||||
AC_MSG_NOTICE([skip check for pipe on msdosdjgpp])
|
||||
;;
|
||||
esac
|
||||
AC_CHECK_FUNCS( strtoll \
|
||||
socket \
|
||||
select \
|
||||
strdup \
|
||||
strstr \
|
||||
strcasestr \
|
||||
strtok_r \
|
||||
uname \
|
||||
strcasecmp \
|
||||
stricmp \
|
||||
strcmpi \
|
||||
gethostbyaddr \
|
||||
gettimeofday \
|
||||
inet_addr \
|
||||
inet_ntoa \
|
||||
inet_pton \
|
||||
perror \
|
||||
closesocket \
|
||||
siginterrupt \
|
||||
sigaction \
|
||||
signal \
|
||||
getpass_r \
|
||||
strlcat \
|
||||
getpwuid \
|
||||
geteuid \
|
||||
getppid \
|
||||
utime \
|
||||
sigsetjmp \
|
||||
basename \
|
||||
setlocale \
|
||||
ftruncate \
|
||||
pipe \
|
||||
poll \
|
||||
getprotobyname \
|
||||
getrlimit \
|
||||
setrlimit \
|
||||
fork \
|
||||
setmode,
|
||||
dnl if found
|
||||
[],
|
||||
dnl if not found, $ac_func is the name we check for
|
||||
func="$ac_func"
|
||||
eval skipcheck=\$skipcheck_$func
|
||||
if test "x$skipcheck" != "xyes"; then
|
||||
AC_MSG_CHECKING([deeper for $func])
|
||||
AC_TRY_LINK( [],
|
||||
[ $func ();],
|
||||
AC_MSG_RESULT(yes!)
|
||||
eval "ac_cv_func_$func=yes"
|
||||
def=`echo "HAVE_$func" | tr 'a-z' 'A-Z'`
|
||||
AC_DEFINE_UNQUOTED($def, 1, [If you have $func]),
|
||||
AC_MSG_RESULT(but still no)
|
||||
)
|
||||
fi
|
||||
)
|
||||
|
||||
dnl For some reason, the check above doesn't properly detect select() with
|
||||
dnl Msys/Mingw
|
||||
if test "$ac_cv_func_select" = "no"; then
|
||||
AC_MSG_CHECKING([for select in ws2_32])
|
||||
AC_TRY_LINK([
|
||||
#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
|
||||
#endif
|
||||
],[
|
||||
select(0,(fd_set *)NULL,(fd_set *)NULL,(fd_set *)NULL,(struct timeval *)NULL);
|
||||
AC_CHECK_FUNCS([basename \
|
||||
closesocket \
|
||||
fork \
|
||||
ftruncate \
|
||||
geteuid \
|
||||
gethostbyaddr \
|
||||
getpass_r \
|
||||
getppid \
|
||||
getprotobyname \
|
||||
getpwuid \
|
||||
getrlimit \
|
||||
gettimeofday \
|
||||
inet_addr \
|
||||
inet_ntoa \
|
||||
inet_pton \
|
||||
perror \
|
||||
pipe \
|
||||
poll \
|
||||
setlocale \
|
||||
setmode \
|
||||
setrlimit \
|
||||
sigaction \
|
||||
siginterrupt \
|
||||
signal \
|
||||
sigsetjmp \
|
||||
socket \
|
||||
strcasecmp \
|
||||
strcasestr \
|
||||
strcmpi \
|
||||
strdup \
|
||||
stricmp \
|
||||
strlcat \
|
||||
strstr \
|
||||
strtok_r \
|
||||
strtoll \
|
||||
uname \
|
||||
utime
|
||||
],[
|
||||
],[
|
||||
func="$ac_func"
|
||||
eval skipcheck=\$skipcheck_$func
|
||||
if test "x$skipcheck" != "xyes"; then
|
||||
AC_MSG_CHECKING([deeper for $func])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
$func ();
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_SELECT="1"
|
||||
AC_DEFINE_UNQUOTED(HAVE_SELECT, 1,
|
||||
[Define to 1 if you have the select function.])
|
||||
eval "ac_cv_func_$func=yes"
|
||||
AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$func])], [1],
|
||||
[Define to 1 if you have the $func function.])
|
||||
],[
|
||||
AC_MSG_ERROR([You can't compile without a select])
|
||||
])
|
||||
fi
|
||||
AC_MSG_RESULT([but still no])
|
||||
])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl sigsetjmp() might be a macro and no function so if it isn't found already
|
||||
dnl we make an extra check here!
|
||||
if test "$ac_cv_func_sigsetjmp" != "yes"; then
|
||||
AC_MSG_CHECKING([for sigsetjmp defined as macro])
|
||||
AC_TRY_LINK( [#include <setjmp.h>],
|
||||
[sigjmp_buf jmpenv;
|
||||
sigsetjmp(jmpenv, 1);],
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SIGSETJMP, 1, [If you have sigsetjmp]),
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#include <setjmp.h>
|
||||
]],[[
|
||||
sigjmp_buf jmpenv;
|
||||
sigsetjmp(jmpenv, 1);
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_SIGSETJMP, 1, [If you have sigsetjmp])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
fi
|
||||
|
||||
AC_CHECK_DECL(basename, ,
|
||||
@@ -2242,25 +2324,26 @@ AC_HELP_STRING([--disable-ares],[Disable c-ares for name lookups]),
|
||||
dnl out and don't use the "embedded" ares dir (in which case we don't
|
||||
dnl check it because it might not have been built yet)
|
||||
AC_MSG_CHECKING([that c-ares is good and recent enough])
|
||||
AC_LINK_IFELSE( [
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
#include <ares.h>
|
||||
/* provide a set of dummy functions in case c-ares was built with debug */
|
||||
void curl_dofree() { }
|
||||
void curl_sclose() { }
|
||||
void curl_domalloc() { }
|
||||
|
||||
int main(void)
|
||||
{
|
||||
ares_channel channel;
|
||||
ares_cancel(channel); /* added in 1.2.0 */
|
||||
ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
|
||||
return 0;
|
||||
}
|
||||
],
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR([c-ares library defective or too old])
|
||||
)
|
||||
/* set of dummy functions in case c-ares was built with debug */
|
||||
void curl_dofree() { }
|
||||
void curl_sclose() { }
|
||||
void curl_domalloc() { }
|
||||
void curl_docalloc() { }
|
||||
void curl_socket() { }
|
||||
]],[[
|
||||
ares_channel channel;
|
||||
ares_cancel(channel); /* added in 1.2.0 */
|
||||
ares_process_fd(channel, 0, 0); /* added in 1.4.0 */
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([c-ares library defective or too old])
|
||||
])
|
||||
fi
|
||||
;;
|
||||
esac ],
|
||||
@@ -2286,8 +2369,6 @@ AC_HELP_STRING([--disable-verbose],[Disable verbose strings]),
|
||||
AC_MSG_RESULT(yes)
|
||||
)
|
||||
|
||||
CURL_CHECK_NATIVE_WINDOWS
|
||||
|
||||
dnl ************************************************************
|
||||
dnl enable SSPI support
|
||||
dnl
|
||||
@@ -2417,15 +2498,36 @@ AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibi
|
||||
)
|
||||
|
||||
dnl ************************************************************
|
||||
if test "x$ws2" = "xyes"; then
|
||||
dnl enforce SONAME bump
|
||||
dnl
|
||||
|
||||
AC_MSG_CHECKING([whether to enforce SONAME bump])
|
||||
AC_ARG_ENABLE(soname-bump,
|
||||
AC_HELP_STRING([--enable-soname-bump],[Enable enforced SONAME bump])
|
||||
AC_HELP_STRING([--disable-soname-bump],[Disable enforced SONAME bump]),
|
||||
[ case "$enableval" in
|
||||
yes) AC_MSG_RESULT(yes)
|
||||
soname_bump=yes
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
esac ],
|
||||
AC_MSG_RESULT($soname_bump)
|
||||
)
|
||||
AM_CONDITIONAL(SONAME_BUMP, test x$soname_bump = xyes)
|
||||
|
||||
|
||||
dnl ************************************************************
|
||||
if test ! -z "$winsock_LIB"; then
|
||||
|
||||
dnl If ws2_32 is wanted, make sure it is the _last_ lib in LIBS (makes
|
||||
dnl things work when built with c-ares). But we can't just move it last
|
||||
dnl since then other stuff (SSL) won't build. So we simply append it to the
|
||||
dnl end.
|
||||
|
||||
LIBS="$LIBS -lws2_32"
|
||||
TEST_SERVER_LIBS="$TEST_SERVER_LIBS -lws2_32"
|
||||
LIBS="$LIBS $winsock_LIB"
|
||||
TEST_SERVER_LIBS="$TEST_SERVER_LIBS $winsock_LIB"
|
||||
|
||||
fi
|
||||
|
||||
@@ -2498,5 +2600,16 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
|
||||
ca cert bundle: ${ca}
|
||||
ca cert path: ${capath}
|
||||
LDAP support: ${curl_ldap_msg}
|
||||
LDAPS support: ${curl_ldaps_msg}
|
||||
LDAPS support: ${curl_ldaps_msg}
|
||||
])
|
||||
|
||||
if test "x$soname_bump" = "xyes"; then
|
||||
|
||||
cat <<EOM
|
||||
SONAME bump: yes - WARNING: this library will be built with the SONAME
|
||||
number bumped due to (a detected) ABI breakage.
|
||||
See lib/README.curl_off_t for details on this.
|
||||
EOM
|
||||
|
||||
fi
|
||||
|
||||
|
@@ -60,16 +60,24 @@ Euphoria
|
||||
http://rays-web.com/eulibcurl.htm
|
||||
|
||||
Ferite
|
||||
|
||||
Written by Paul Querna
|
||||
http://www.ferite.org/
|
||||
|
||||
Gambas
|
||||
|
||||
http://gambas.sourceforge.net
|
||||
|
||||
glib/GTK+
|
||||
|
||||
Written by Richard Atterer
|
||||
http://atterer.net/glibcurl/
|
||||
|
||||
Haskell
|
||||
|
||||
Written by Galois, Inc
|
||||
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/curl
|
||||
|
||||
Java
|
||||
|
||||
Maintained by [blank]
|
||||
|
123
docs/INSTALL
123
docs/INSTALL
@@ -53,8 +53,12 @@ UNIX
|
||||
|
||||
./configure --with-ssl
|
||||
|
||||
If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL,)
|
||||
you can run configure like this:
|
||||
If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL)
|
||||
and you have pkg-config installed, set the pkg-config path first, like this:
|
||||
|
||||
env PKG_CONFIG_PATH=/opt/OpenSSL/lib/pkgconfig ./configure --with-ssl
|
||||
|
||||
Without pkg-config installed, use this:
|
||||
|
||||
./configure --with-ssl=/opt/OpenSSL
|
||||
|
||||
@@ -70,22 +74,23 @@ UNIX
|
||||
|
||||
(with the Bourne shell and its clones):
|
||||
|
||||
CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
|
||||
CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
|
||||
./configure
|
||||
|
||||
(with csh, tcsh and their clones):
|
||||
|
||||
env CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
|
||||
./configure
|
||||
env CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \
|
||||
./configure
|
||||
|
||||
If you have shared SSL libs installed in a directory where your run-time
|
||||
linker doesn't find them (which usually causes configure failures), you can
|
||||
provide the -R option to ld on some operating systems to set a hard-coded
|
||||
path to the run-time linker:
|
||||
|
||||
LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl
|
||||
env LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl
|
||||
|
||||
MORE OPTIONS
|
||||
------------
|
||||
|
||||
To force configure to use the standard cc compiler if both cc and gcc are
|
||||
present, run configure like
|
||||
@@ -127,7 +132,7 @@ UNIX
|
||||
To build with GnuTLS support instead of OpenSSL for SSL/TLS, note that
|
||||
you need to use both --without-ssl and --with-gnutls.
|
||||
|
||||
To build with yassl support instead of OpenSSL or GunTLS, you must build
|
||||
To build with yassl support instead of OpenSSL or GnuTLS, you must build
|
||||
yassl with its OpenSSL emulation enabled and point to that directory root
|
||||
with configure --with-ssl.
|
||||
|
||||
@@ -140,6 +145,16 @@ UNIX
|
||||
To get support for SCP and SFTP, build with --with-libssh2 and have
|
||||
libssh2 0.16 or later installed.
|
||||
|
||||
SPECIAL CASES
|
||||
-------------
|
||||
Some versions of uClibc require configuring with CPPFLAGS=-D_GNU_SOURCE=1
|
||||
to get correct large file support.
|
||||
|
||||
The Open Watcom C compiler on Linux requires configuring with the variables:
|
||||
|
||||
./configure CC=owcc AR="$WATCOM/binl/wlib" AR_FLAGS=-q \
|
||||
RANLIB=/bin/true STRIP="$WATCOM/binl/wstrip" CFLAGS=-Wextra
|
||||
|
||||
|
||||
Win32
|
||||
=====
|
||||
@@ -272,6 +287,37 @@ Win32
|
||||
at runtime.
|
||||
Run 'nmake vc-ssl-zlib' to build with both ssl and zlib support.
|
||||
|
||||
MSVC 6 IDE
|
||||
----------
|
||||
|
||||
A minimal VC++ 6.0 reference workspace (vc6curl.dsw) is available with the
|
||||
source distribution archive to allow proper building of the two included
|
||||
projects, the libcurl library and the curl tool.
|
||||
|
||||
1) Open the vc6curl.dsw workspace with MSVC6's IDE.
|
||||
2) Select 'Build' from top menu.
|
||||
3) Select 'Batch Build' from dropdown menu.
|
||||
4) Make sure that the eight project configurations are 'checked'.
|
||||
5) Click on the 'Build' button.
|
||||
6) Once the eight project configurations are built you are done.
|
||||
|
||||
Dynamic and static libcurl libraries are built in debug and release flavours,
|
||||
and can be located each one in its own subdirectory, DLL-Debug, DLL-Release,
|
||||
LIB-Debug and LIB-Release, all of them below the 'lib' subdirectory.
|
||||
|
||||
In the same way four curl executables are created, each using its respective
|
||||
library. The resulting curl executables are located in its own subdirectory,
|
||||
DLL-Debug, DLL-Release, LIB-Debug and LIB-Release, below the 'src' subdir.
|
||||
|
||||
These reference VC++ 6.0 configurations are generated using the dynamic CRT.
|
||||
|
||||
Intentionally, these reference VC++ 6.0 projects and configurations don't use
|
||||
third party libraries, such as OpenSSL or Zlib, to allow proper compilation
|
||||
and configuration for all new users without further requirements.
|
||||
|
||||
If you need something more 'involved' you might adjust them for your own use,
|
||||
or explore the world of makefiles described above 'MSVC from command line'.
|
||||
|
||||
Borland C++ compiler
|
||||
---------------------
|
||||
|
||||
@@ -300,9 +346,8 @@ Win32
|
||||
-L c:\openssl\out32\ssleay32.lib
|
||||
simplessl.c
|
||||
|
||||
|
||||
MSVC IDE
|
||||
--------
|
||||
OTHER MSVC IDEs
|
||||
---------------
|
||||
|
||||
If you use VC++, Borland or similar compilers. Include all lib source
|
||||
files in a static lib "project" (all .c and .h files that is).
|
||||
@@ -311,9 +356,6 @@ Win32
|
||||
Make the sources in the src/ drawer be a "win32 console application"
|
||||
project. Name it curl.
|
||||
|
||||
For VC++ 6, there's an included Makefile.vc6 that should be possible
|
||||
to use out-of-the-box.
|
||||
|
||||
|
||||
Disabling Specific Protocols in Win32 builds
|
||||
--------------------------------------------
|
||||
@@ -332,10 +374,12 @@ Win32
|
||||
CURL_DISABLE_DICT disables DICT
|
||||
CURL_DISABLE_FILE disables FILE
|
||||
CURL_DISABLE_TFTP disables TFTP
|
||||
CURL_DISABLE_HTTP disables HTTP
|
||||
|
||||
If you want to set any of these defines you have the following
|
||||
possibilities:
|
||||
|
||||
- Modify lib/config-win32.h
|
||||
- Modify lib/setup.h
|
||||
- Modify lib/Makefile.vc6
|
||||
- Add defines to Project/Settings/C/C++/General/Preprocessor Definitions
|
||||
@@ -618,49 +662,51 @@ eCos
|
||||
Minix
|
||||
=====
|
||||
curl can be compiled on Minix 3 using gcc or ACK (starting with
|
||||
ver. 3.1.3). The default heap size allocated to several required
|
||||
programs is inadequate for configuring and compiling curl and will
|
||||
result in strange errors unless fixed (which only needs to be done
|
||||
once).
|
||||
ver. 3.1.3).
|
||||
|
||||
ACK
|
||||
---
|
||||
Increase heap sizes with the commands:
|
||||
Increase the heap sizes of the compiler with the command:
|
||||
|
||||
chmem =1024000 /usr/lib/em_cemcom.ansi
|
||||
chmem =512000 /usr/lib/i386/as
|
||||
|
||||
If you have bash installed:
|
||||
|
||||
chmem =2048000 /usr/local/bin/bash
|
||||
binsizes xxl
|
||||
|
||||
Configure and compile with:
|
||||
|
||||
./configure CC=cc LD=cc GREP=grep CPPFLAGS=-D_POSIX_SOURCE=1
|
||||
./configure CONFIG_SHELL=/bin/bigsh CC=cc LD=cc AR=/usr/bin/aal \
|
||||
GREP=grep CPPFLAGS=-D_POSIX_SOURCE=1
|
||||
make
|
||||
|
||||
GCC
|
||||
---
|
||||
If you have bash installed:
|
||||
|
||||
chmem =2048000 /usr/local/bin/bash
|
||||
|
||||
Make sure gcc is in your PATH with the command:
|
||||
|
||||
export PATH=/usr/gnu/bin:$PATH
|
||||
|
||||
then configure and compile curl with:
|
||||
|
||||
./configure CC=gcc GREP=grep AR=/usr/gnu/bin/gar
|
||||
./configure CONFIG_SHELL=/bin/bigsh CC=gcc AR=/usr/gnu/bin/gar GREP=grep
|
||||
make
|
||||
|
||||
|
||||
Symbian OS
|
||||
==========
|
||||
The Symbian OS port uses the Symbian build system to compile. From the
|
||||
packages/Symbian/group/ directory, run:
|
||||
|
||||
bldmake bldfiles
|
||||
abld build
|
||||
|
||||
to compile and install curl and libcurl. If your Symbian SDK doesn't
|
||||
include support for P.I.P.S., you will need to contact your SDK vendor
|
||||
to obtain that first.
|
||||
|
||||
|
||||
CROSS COMPILE
|
||||
=============
|
||||
(This section was graciously brought to us by Jim Duey, with additions by
|
||||
Dan Fandrich)
|
||||
|
||||
Download and unpack the cURL package. Version should be 7.9.1 or later.
|
||||
Download and unpack the cURL package.
|
||||
|
||||
'cd' to the new directory. (e.g. cd curl-7.12.3)
|
||||
|
||||
@@ -709,13 +755,13 @@ REDUCING SIZE
|
||||
size of libcurl for embedded applications where binary size is an
|
||||
important factor. First, be sure to set the CFLAGS variable when
|
||||
configuring with any relevant compiler optimization flags to reduce the
|
||||
size of the binary. For gcc, this would mean at minimum the -Os option
|
||||
and probably the -march=X option as well, e.g.:
|
||||
size of the binary. For gcc, this would mean at minimum the -Os option,
|
||||
and potentially the -march=X and -mdynamic-no-pic options as well, e.g.
|
||||
|
||||
./configure CFLAGS='-Os' ...
|
||||
|
||||
Note that newer compilers often produce smaller code than older versions
|
||||
due to better optimization.
|
||||
due to improved optimization.
|
||||
|
||||
Be sure to specify as many --disable- and --without- flags on the configure
|
||||
command-line as you can to disable all the libcurl features that you
|
||||
@@ -774,10 +820,12 @@ PORTS
|
||||
- Pocket PC/Win CE 3.0
|
||||
- Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2
|
||||
- PowerPC Darwin 1.0
|
||||
- PowerPC INTEGRITY
|
||||
- PowerPC Linux
|
||||
- PowerPC Mac OS 9
|
||||
- PowerPC Mac OS X
|
||||
- SuperH4 Linux 2.6.X
|
||||
- SH4 Linux 2.6.X
|
||||
- SH4 OS21
|
||||
- SINIX-Z v5
|
||||
- Sparc Linux
|
||||
- Sparc Solaris 2.4, 2.5, 2.5.1, 2.6, 7, 8, 9, 10
|
||||
@@ -785,6 +833,8 @@ PORTS
|
||||
- StrongARM (and other ARM) RISC OS 3.1, 4.02
|
||||
- StrongARM/ARM7/ARM9 Linux 2.4, 2.6
|
||||
- StrongARM NetBSD 1.4.1
|
||||
- ARM INTEGRITY
|
||||
- Symbian OS (P.I.P.S.) 9.x
|
||||
- TPF
|
||||
- Ultrix 4.3a
|
||||
- UNICOS 9.0
|
||||
@@ -794,16 +844,17 @@ PORTS
|
||||
- i386 Esix 4.1
|
||||
- i386 FreeBSD
|
||||
- i386 HURD
|
||||
- i386 Haiku OS
|
||||
- i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6
|
||||
- i386 MINIX 3.1
|
||||
- i386 NetBSD
|
||||
- i386 Novell NetWare
|
||||
- i386 OS/2
|
||||
- i386 OpenBSD
|
||||
- i386 QNX 6
|
||||
- i386 SCO unix
|
||||
- i386 Solaris 2.7
|
||||
- i386 Windows 95, 98, ME, NT, 2000, XP, 2003
|
||||
- i386 QNX 6
|
||||
- i486 ncr-sysv4.3.03 (NCR MP-RAS)
|
||||
- ia64 Linux 2.3.99
|
||||
- m68k AmigaOS 3
|
||||
|
@@ -239,7 +239,7 @@ Linker Links
|
||||
checked.
|
||||
|
||||
3- Include in the white space immediately below the box referred in 2 -lcurl
|
||||
-lws2_32 -lwinmm.
|
||||
-lws2_32.
|
||||
|
||||
SSL Files
|
||||
---------
|
||||
|
@@ -22,6 +22,56 @@ CVS
|
||||
Tagging shall be used extensively, and by the time we release new archives we
|
||||
should tag the sources with a name similar to the released version number.
|
||||
|
||||
Portability
|
||||
===========
|
||||
|
||||
We write curl and libcurl to compile with C89 compilers. On 32bit and up
|
||||
machines. Most of libcurl assumes more or less POSIX compliance but that's
|
||||
not a requirement.
|
||||
|
||||
We write libcurl to build and work with lots of third party tools, and we
|
||||
want it to remain functional and buildable with these and later versions
|
||||
(older versions may still work but is not what we work hard to maintain):
|
||||
|
||||
OpenSSL 0.9.6
|
||||
GnuTLS 1.2
|
||||
zlib 1.1.4
|
||||
libssh2 0.16
|
||||
c-ares 1.5.0
|
||||
libidn 0.4.1
|
||||
*yassl 1.4.0 (http://curl.haxx.se/mail/lib-2008-02/0093.html)
|
||||
openldap 2.0
|
||||
MIT krb5 lib 1.2.4
|
||||
qsossl V5R2M0
|
||||
NSS 3.11.x
|
||||
Heimdal ?
|
||||
|
||||
* = only partly functional, but that's due to bugs in the third party lib, not
|
||||
because of libcurl code
|
||||
|
||||
On systems where configure runs, we aim at working on them all - if they have
|
||||
a suitable C compiler. On systems that don't run configure, we strive to keep
|
||||
curl running fine on:
|
||||
|
||||
Windows 98
|
||||
AS/400 V5R2M0
|
||||
Symbian 9.1
|
||||
Windows CE ?
|
||||
TPF ?
|
||||
|
||||
When writing code (mostly for generating stuff included in release tarballs)
|
||||
we use a few "build tools" and we make sure that we remain functional with
|
||||
these versions:
|
||||
|
||||
GNU Libtool 1.4.2
|
||||
GNU Autoconf 2.57
|
||||
GNU Automake 1.7 (we currently avoid 1.10 due to Solaris-related bugs)
|
||||
GNU M4 1.4
|
||||
perl 4
|
||||
roffit 0.5
|
||||
groff ? (any version that supports "groff -Tps -man [in] [out]")
|
||||
ps2pdf (gs) ?
|
||||
|
||||
Windows vs Unix
|
||||
===============
|
||||
|
||||
|
@@ -3,6 +3,33 @@ 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!
|
||||
|
||||
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
|
||||
not working: http://curl.haxx.se/mail/lib-2008-07/0295.html
|
||||
|
||||
57. On VMS-Alpha: When using an http-file-upload the file is not sent to the
|
||||
Server with the correct content-length. Sending a file with 511 or less
|
||||
bytes, content-length 512 is used. Sending a file with 513 - 1023 bytes,
|
||||
content-length 1024 is used. Files with a length of a multiple of 512 Bytes
|
||||
show the correct content-length. Only these files work for upload.
|
||||
http://curl.haxx.se/bug/view.cgi?id=2057858
|
||||
|
||||
56. When libcurl sends CURLOPT_POSTQUOTE commands when connected to a SFTP
|
||||
server using the multi interface, the commands are not being sent correctly
|
||||
and instead the connection is "cancelled" (the operation is considered done)
|
||||
prematurely. There is a half-baked (busy-looping) patch provided in the bug
|
||||
report but it cannot be accepted as-is. See
|
||||
http://curl.haxx.se/bug/view.cgi?id=2006544
|
||||
|
||||
55. libcurl fails to build with MIT Kerberos for Windows (KfW) due to KfW's
|
||||
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:
|
||||
@@ -12,7 +39,8 @@ may have been fixed since this was written!
|
||||
-y/-Y) the next attempt doesn't resume the transfer properly from what was
|
||||
downloaded in the previous attempt but will truncate and restart at the
|
||||
original position where it was at before the previous failed attempt. See
|
||||
http://curl.haxx.se/mail/lib-2008-01/0080.html
|
||||
http://curl.haxx.se/mail/lib-2008-01/0080.html and Mandriva bug report
|
||||
https://qa.mandriva.com/show_bug.cgi?id=22565
|
||||
|
||||
48. If a CONNECT response-headers are larger than BUFSIZE (16KB) when the
|
||||
connection is meant to be kept alive (like for NTLM proxy auth), the
|
||||
|
55
docs/MANUAL
55
docs/MANUAL
@@ -48,6 +48,9 @@ SIMPLE USAGE
|
||||
curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \
|
||||
scp://shell.example.com/~/personal.txt
|
||||
|
||||
Get the main page from an IPv6 web server:
|
||||
|
||||
curl -g "http://[2001:1890:1112:1::20]/"
|
||||
|
||||
DOWNLOAD TO A FILE
|
||||
|
||||
@@ -86,6 +89,13 @@ USING PASSWORDS
|
||||
standards while the recommended "explicit" way is done by using FTP:// and
|
||||
the --ftp-ssl option.
|
||||
|
||||
SFTP / SCP
|
||||
|
||||
This is similar to FTP, but you can specify a private key to use instead of
|
||||
a password. Note that the private key may itself be protected by a password
|
||||
that is unrelated to the login password of the remote system. If you
|
||||
provide a private key file you must also provide a public key file.
|
||||
|
||||
HTTP
|
||||
|
||||
Curl also supports user and password in HTTP URLs, thus you can pick a file
|
||||
@@ -154,9 +164,9 @@ RANGES
|
||||
|
||||
UPLOADING
|
||||
|
||||
FTP
|
||||
FTP / FTPS / SFTP / SCP
|
||||
|
||||
Upload all data on stdin to a specified ftp site:
|
||||
Upload all data on stdin to a specified server:
|
||||
|
||||
curl -T - ftp://ftp.upload.com/myfile
|
||||
|
||||
@@ -169,7 +179,7 @@ UPLOADING
|
||||
|
||||
curl -T uploadfile -u user:passwd ftp://ftp.upload.com/
|
||||
|
||||
Upload a local file to get appended to the remote file using ftp:
|
||||
Upload a local file to get appended to the remote file:
|
||||
|
||||
curl -T localfile -a ftp://ftp.upload.com/remotefile
|
||||
|
||||
@@ -331,7 +341,7 @@ REFERRER
|
||||
|
||||
curl -e www.coolsite.com http://www.showme.com/
|
||||
|
||||
NOTE: The referer field is defined in the HTTP spec to be a full URL.
|
||||
NOTE: The Referer: [sic] field is defined in the HTTP spec to be a full URL.
|
||||
|
||||
USER AGENT
|
||||
|
||||
@@ -496,7 +506,7 @@ CONFIG FILE
|
||||
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.
|
||||
|
||||
If you want the parameter to contain spaces, you must inclose the entire
|
||||
If you want the parameter to contain spaces, you must enclose the entire
|
||||
parameter within double quotes ("). Within those quotes, you specify a
|
||||
quote as \".
|
||||
|
||||
@@ -564,10 +574,18 @@ FTP and PATH NAMES
|
||||
|
||||
(I.e with an extra slash in front of the file name.)
|
||||
|
||||
SFTP and SCP and PATH NAMES
|
||||
|
||||
With sftp: and scp: URLs, the path name given is the absolute name on the
|
||||
server. To access a file relative to the remote user's home directory,
|
||||
prefix the file with /~/ , such as:
|
||||
|
||||
curl -u $USER sftp://home.example.com/~/.bashrc
|
||||
|
||||
FTP and firewalls
|
||||
|
||||
The FTP protocol requires one of the involved parties to open a second
|
||||
connction as soon as data is about to get transfered. There are two ways to
|
||||
connection as soon as data is about to get transfered. There are two ways to
|
||||
do this.
|
||||
|
||||
The default way for curl is to issue the PASV command which causes the
|
||||
@@ -875,7 +893,8 @@ MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE
|
||||
As is mentioned above, you can download multiple files with one command line
|
||||
by simply adding more URLs. If you want those to get saved to a local file
|
||||
instead of just printed to stdout, you need to add one save option for each
|
||||
URL you specify. Note that this also goes for the -O option.
|
||||
URL you specify. Note that this also goes for the -O option (but not
|
||||
--remote-name-all).
|
||||
|
||||
For example: get two files and use -O for the first and a custom file
|
||||
name for the second:
|
||||
@@ -886,6 +905,28 @@ MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE
|
||||
|
||||
curl -T local1 ftp://ftp.com/moo.exe -T local2 ftp://ftp.com/moo2.txt
|
||||
|
||||
IPv6
|
||||
|
||||
curl will connect to a server with IPv6 when a host lookup returns an IPv6
|
||||
address and fall back to IPv4 if the connection fails. The --ipv4 and --ipv6
|
||||
options can specify which address to use when both are available. IPv6
|
||||
addresses can also be specified directly in URLs using the syntax:
|
||||
|
||||
http://[2001:1890:1112:1::20]/overview.html
|
||||
|
||||
When this style is used, the -g option must be given to stop curl from
|
||||
interpreting the square brackets as special globbing characters. Link local
|
||||
and site local addresses including a scope identifier, such as fe80::1234%1,
|
||||
may also be used, but the scope portion must be numeric and the percent
|
||||
character must be URL escaped. The previous example in an SFTP URL might
|
||||
look like:
|
||||
|
||||
sftp://[fe80::1234%251]/
|
||||
|
||||
IPv6 addresses provided other than in URLs (e.g. to the --proxy, --interface
|
||||
or --ftp-port options) should not be URL encoded.
|
||||
|
||||
|
||||
MAILING LISTS
|
||||
|
||||
For your convenience, we have several open mailing lists to discuss curl,
|
||||
|
37
docs/THANKS
37
docs/THANKS
@@ -26,10 +26,12 @@ Alexey Simak
|
||||
Alexis Carvalho
|
||||
Allen Pulsifer
|
||||
Amol Pattekar
|
||||
Anatoli Tubman
|
||||
Anders Gustafsson
|
||||
Andi Jahja
|
||||
Andre Guibert de Bruet
|
||||
Andreas Damm
|
||||
Andreas Faerber
|
||||
Andreas Ntaflos
|
||||
Andreas Olsson
|
||||
Andreas Rieke
|
||||
@@ -53,8 +55,10 @@ Arve Knudsen
|
||||
Ates Goral
|
||||
Augustus Saunders
|
||||
Avery Fay
|
||||
Bart Whiteley
|
||||
Ben Greear
|
||||
Ben Madsen
|
||||
Ben Van Hof
|
||||
Benjamin Gerard
|
||||
Bernard Leak
|
||||
Bertrand Demiddelaer
|
||||
@@ -69,6 +73,8 @@ Brent Beardsley
|
||||
Brian Akins
|
||||
Brian Dessent
|
||||
Brian R Duffy
|
||||
Brian Ulm
|
||||
Brock Noland
|
||||
Bruce Mitchener
|
||||
Bryan Henderson
|
||||
Bryan Kemp
|
||||
@@ -85,6 +91,7 @@ Christian Robottom Reis
|
||||
Christian Vogt
|
||||
Christophe Demory
|
||||
Christophe Legry
|
||||
Christopher Palow
|
||||
Christopher R. Palmer
|
||||
Ciprian Badescu
|
||||
Clarence Gardner
|
||||
@@ -103,11 +110,13 @@ Dan Becker
|
||||
Dan C
|
||||
Dan Fandrich
|
||||
Dan Nelson
|
||||
Dan Petitt
|
||||
Dan Torop
|
||||
Dan Zitter
|
||||
Daniel Black
|
||||
Daniel Cater
|
||||
Daniel Egger
|
||||
Daniel Fandrich
|
||||
Daniel Johnson
|
||||
Daniel Stenberg
|
||||
Daniel at touchtunes
|
||||
@@ -130,6 +139,7 @@ David LeBlanc
|
||||
David McCreedy
|
||||
David Odin
|
||||
David Phillips
|
||||
David Rosenstrauch
|
||||
David Shaw
|
||||
David Tarendash
|
||||
David Thiel
|
||||
@@ -145,6 +155,7 @@ Dirk Manske
|
||||
Dmitriy Sergeyev
|
||||
Dmitry Bartsevich
|
||||
Dmitry Kurochkin
|
||||
Dmitry Popov
|
||||
Dmitry Rechkin
|
||||
Dolbneff A.V
|
||||
Domenico Andreoli
|
||||
@@ -161,6 +172,7 @@ Dylan Ellicott
|
||||
Dylan Salisbury
|
||||
Early Ehlinger
|
||||
Edin Kadribasic
|
||||
Eetu Ojanen
|
||||
Ellis Pritchard
|
||||
Emil Romanus
|
||||
Emiliano Ida
|
||||
@@ -193,6 +205,7 @@ Fred New
|
||||
Fred Noz
|
||||
Frederic Lepied
|
||||
Gary Maxwell
|
||||
Gautam Kachroo
|
||||
Gautam Mani
|
||||
Gavrie Philipson
|
||||
Gaz Iqbal
|
||||
@@ -267,6 +280,7 @@ Jayesh A Shah
|
||||
Jaz Fresh
|
||||
Jean Jacques Drouin
|
||||
Jean-Claude Chauve
|
||||
Jean-Francois Bertrand
|
||||
Jean-Louis Lemaire
|
||||
Jean-Marc Ranger
|
||||
Jean-Philippe Barrette-LaPierre
|
||||
@@ -274,8 +288,11 @@ Jeff Johnson
|
||||
Jeff Lawson
|
||||
Jeff Phillips
|
||||
Jeff Pohlmeyer
|
||||
Jeff Weber
|
||||
Jeffrey Pohlmeyer
|
||||
Jeremy Friesner
|
||||
Jerome Muffat-Meridol
|
||||
Jes Badwal
|
||||
Jesper Jensen
|
||||
Jesse Noller
|
||||
Jim Drash
|
||||
@@ -316,6 +333,7 @@ Kai-Uwe Rommel
|
||||
Kang-Jin Lee
|
||||
Karl Moerder
|
||||
Karol Pietrzak
|
||||
Kaspar Brand
|
||||
Katie Wang
|
||||
Kees Cook
|
||||
Keith MacDonald
|
||||
@@ -348,6 +366,7 @@ Lau Hang Kin
|
||||
Legoff Vincent
|
||||
Lehel Bernadt
|
||||
Len Krause
|
||||
Liam Healy
|
||||
Linas Vepstas
|
||||
Ling Thio
|
||||
Linus Nielsen Feltzing
|
||||
@@ -363,7 +382,7 @@ Maciej Karpiuk
|
||||
Maciej W. Rozycki
|
||||
Manfred Schwarb
|
||||
Marc Boucher
|
||||
Marcelo Juchem
|
||||
Marcelo Juchem
|
||||
Marcin Konicki
|
||||
Marco G. Salvagno
|
||||
Marcus Webster
|
||||
@@ -396,6 +415,7 @@ Maxim Perenesenko
|
||||
Mekonikum
|
||||
Mettgut Jamalla
|
||||
Michael Benedict
|
||||
Michael Calmer
|
||||
Michael Curtis
|
||||
Michael Jahn
|
||||
Michael Jerris
|
||||
@@ -408,6 +428,7 @@ Mihai Ionescu
|
||||
Mikael Sennerholm
|
||||
Mike Bytnar
|
||||
Mike Dobbs
|
||||
Mike Hommey
|
||||
Mike Protts
|
||||
Miklos Nemeth
|
||||
Mitz Wark
|
||||
@@ -431,9 +452,12 @@ Nicolas Fran
|
||||
Niels van Tongeren
|
||||
Nikita Schmidt
|
||||
Nikitinskit Dmitriy
|
||||
Niklas Angebrand
|
||||
Nikolai Kondrashov
|
||||
Nir Soffer
|
||||
Nis Jorgensen
|
||||
Nodak Sodak
|
||||
Norbert Frese
|
||||
Norbert Novotny
|
||||
Ofer
|
||||
Olaf Stueben
|
||||
@@ -472,8 +496,10 @@ Philippe Hameau
|
||||
Philippe Raoult
|
||||
Philippe Vaucher
|
||||
Pierre
|
||||
Pooyan McSporran
|
||||
Puneet Pawaia
|
||||
Quagmire
|
||||
Rafa Muyo
|
||||
Rafael Sagula
|
||||
Ralf S. Engelschall
|
||||
Ralph Beckmann
|
||||
@@ -524,13 +550,17 @@ Ryan Nelson
|
||||
S. Moonesamy
|
||||
Salvador D<>vila
|
||||
Salvatore Sorrentino
|
||||
Sam Listopad
|
||||
Sampo Kellomaki
|
||||
Samuel D<>az Garc<72>a
|
||||
Samuel Listopad
|
||||
Sander Gates
|
||||
Sandor Feldi
|
||||
Saul good
|
||||
Scott Barrett
|
||||
Scott Cantor
|
||||
Scott Davis
|
||||
Scott McCreary
|
||||
Sebastien Willemijns
|
||||
Sergio Ballestrero
|
||||
Seshubabu Pasam
|
||||
@@ -551,6 +581,7 @@ Stefan Esser
|
||||
Stefan Krause
|
||||
Stefan Ulrich
|
||||
Stephan Bergmann
|
||||
Stephen Collyer
|
||||
Stephen Kick
|
||||
Stephen More
|
||||
Sterling Hughes
|
||||
@@ -620,8 +651,10 @@ Wojciech Zwiefka
|
||||
Xavier Bouchoux
|
||||
Yang Tse
|
||||
Yarram Sunil
|
||||
Yuriy Sosov
|
||||
Yves Lejeune
|
||||
Zvi Har'El
|
||||
Zmey Petroff
|
||||
Zvi Har'El
|
||||
nk
|
||||
swalkaus at yahoo.com
|
||||
tommink[at]post.pl
|
||||
|
47
docs/TODO
47
docs/TODO
@@ -39,12 +39,14 @@
|
||||
|
||||
5. HTTP
|
||||
5.1 Other HTTP versions with CONNECT
|
||||
5.2 Better persistancy for HTTP 1.0
|
||||
5.2 Better persistency for HTTP 1.0
|
||||
5.3 support FF3 sqlite cookie files
|
||||
|
||||
6. TELNET
|
||||
6.1 ditch stdin
|
||||
6.2 ditch telnet-specific select
|
||||
6.3 feature negotiation debug data
|
||||
6.4 send data in chunks
|
||||
|
||||
7. SSL
|
||||
7.1 Disable specific versions
|
||||
@@ -53,19 +55,19 @@
|
||||
7.4 Evaluate SSL patches
|
||||
7.5 Cache OpenSSL contexts
|
||||
7.6 Export session ids
|
||||
7.7 Provide callback for cert verfication
|
||||
7.7 Provide callback for cert verification
|
||||
7.8 Support other SSL libraries
|
||||
7.9 Support SRP on the TLS layer
|
||||
7.10 improve configure --with-ssl
|
||||
|
||||
8. GnuTLS
|
||||
8.1 Make NTLM work without OpenSSL functions
|
||||
8.2 SSl engine stuff
|
||||
8.2 SSL engine stuff
|
||||
8.3 SRP
|
||||
8.4 non-blocking
|
||||
8.5 check connection
|
||||
|
||||
9. LDAP
|
||||
9. Other protocols
|
||||
9.1 ditch ldap-specific select
|
||||
|
||||
10. New protocols
|
||||
@@ -82,6 +84,8 @@
|
||||
11.6 simultaneous parallel transfers
|
||||
11.7 provide formpost headers
|
||||
11.8 url-specific options
|
||||
11.9 metalink support
|
||||
11.10 warning when setting an option
|
||||
|
||||
12. Build
|
||||
12.1 roffit
|
||||
@@ -111,7 +115,7 @@
|
||||
|
||||
1.1 Zero-copy interface
|
||||
|
||||
Introdue another callback interface for upload/download that makes one less
|
||||
Introduce another callback interface for upload/download that makes one less
|
||||
copy of data and thus a faster operation.
|
||||
[http://curl.haxx.se/dev/no_copy_callbacks.txt]
|
||||
|
||||
@@ -258,7 +262,7 @@
|
||||
never been reported as causing trouble to anyone, but should be considered to
|
||||
use the HTTP version the user has chosen.
|
||||
|
||||
5.2 Better persistancy for HTTP 1.0
|
||||
5.2 Better persistency for HTTP 1.0
|
||||
|
||||
"Better" support for persistent connections over HTTP 1.0
|
||||
http://curl.haxx.se/bug/feature.cgi?id=1089001
|
||||
@@ -283,6 +287,16 @@ to provide the data to send.
|
||||
into the main transfer loop. Until this is done, the multi interface won't
|
||||
work for telnet.
|
||||
|
||||
6.3 feature negotiation debug data
|
||||
|
||||
Add telnet feature negotiation data to the debug callback as header data.
|
||||
|
||||
6.4 send data in chunks
|
||||
|
||||
Currently, telnet sends data one byte at a time. This is fine for interactive
|
||||
use, but inefficient for any other. Sent data should be sent in larger
|
||||
chunks.
|
||||
|
||||
7. SSL
|
||||
|
||||
7.1 Disable specific versions
|
||||
@@ -324,7 +338,7 @@ to provide the data to send.
|
||||
the state from such a buffer at a later date - this is used by mod_ssl for
|
||||
apache to implement and SSL session ID cache".
|
||||
|
||||
7.7 Provide callback for cert verfication
|
||||
7.7 Provide callback for cert verification
|
||||
|
||||
OpenSSL supports a callback for customised verification of the peer
|
||||
certificate, but this doesn't seem to be exposed in the libcurl APIs. Could
|
||||
@@ -355,7 +369,7 @@ to provide the data to send.
|
||||
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
|
||||
8.2 SSL engine stuff
|
||||
|
||||
Is this even possible?
|
||||
|
||||
@@ -373,7 +387,7 @@ to provide the data to send.
|
||||
Add a way to check if the connection seems to be alive, to correspond to the
|
||||
SSL_peak() way we use with OpenSSL.
|
||||
|
||||
9. LDAP
|
||||
9. Other protocols
|
||||
|
||||
9.1 ditch ldap-specific select
|
||||
|
||||
@@ -381,6 +395,10 @@ to provide the data to send.
|
||||
lib/ldap.c source file and get moved to the main network code so that the
|
||||
multi interface and friends will work for LDAP as well.
|
||||
|
||||
9.2 stop TFTP blocking
|
||||
|
||||
Stop TFTP from being blocking and doing its own read loop in tftp_do.
|
||||
|
||||
10. New protocols
|
||||
|
||||
10.1 RTSP
|
||||
@@ -468,6 +486,17 @@ to provide the data to send.
|
||||
|
||||
The example would do a POST-GET-POST combination on a single command line.
|
||||
|
||||
11.9 metalink support
|
||||
|
||||
Add metalink support to curl (http://www.metalinker.org/). This is most useful
|
||||
with simultaneous parallel transfers (11.6) but not necessary.
|
||||
|
||||
11.10 warning when setting an option
|
||||
|
||||
Display a warning when libcurl returns an error when setting an option.
|
||||
This can be useful to tell when support for a particular feature hasn't been
|
||||
compiled into the library.
|
||||
|
||||
12. Build
|
||||
|
||||
12.1 roffit
|
||||
|
@@ -1,5 +1,5 @@
|
||||
Online: http://curl.haxx.se/docs/httpscripting.html
|
||||
Date: December 9, 2004
|
||||
Date: May 28, 2008
|
||||
|
||||
The Art Of Scripting HTTP Requests Using Curl
|
||||
=============================================
|
||||
@@ -137,6 +137,10 @@ Date: December 9, 2004
|
||||
you need to replace that space with %20 etc. Failing to comply with this
|
||||
will most likely cause your data to be received wrongly and messed up.
|
||||
|
||||
Recent curl versions can in fact url-encode POST data for you, like this:
|
||||
|
||||
curl --data-urlencode "name=I am Daniel" www.example.com
|
||||
|
||||
4.3 File Upload POST
|
||||
|
||||
Back in late 1995 they defined an additional way to post data over HTTP. It
|
||||
@@ -202,14 +206,14 @@ Date: December 9, 2004
|
||||
|
||||
curl -T uploadfile www.uploadhttp.com/receive.cgi
|
||||
|
||||
6. Authentication
|
||||
6. HTTP Authentication
|
||||
|
||||
Authentication is the ability to tell the server your username and password
|
||||
so that it can verify that you're allowed to do the request you're doing. The
|
||||
Basic authentication used in HTTP (which is the type curl uses by default) is
|
||||
*plain* *text* based, which means it sends username and password only
|
||||
slightly obfuscated, but still fully readable by anyone that sniffs on the
|
||||
network between you and the remote server.
|
||||
HTTP Authentication is the ability to tell the server your username and
|
||||
password so that it can verify that you're allowed to do the request you're
|
||||
doing. The Basic authentication used in HTTP (which is the type curl uses by
|
||||
default) is *plain* *text* based, which means it sends username and password
|
||||
only slightly obfuscated, but still fully readable by anyone that sniffs on
|
||||
the network between you and the remote server.
|
||||
|
||||
To tell curl to use a user and password for authentication:
|
||||
|
||||
@@ -237,6 +241,10 @@ Date: December 9, 2004
|
||||
able to watch your passwords if you pass them as plain command line
|
||||
options. There are ways to circumvent this.
|
||||
|
||||
It is worth noting that while this is how HTTP Authentication works, very
|
||||
many web sites will not use this concept when they provide logins etc. See
|
||||
the Web Login chapter further below for more details on that.
|
||||
|
||||
7. Referer
|
||||
|
||||
A HTTP request may include a 'referer' field (yes it is misspelled), which
|
||||
@@ -367,12 +375,11 @@ Date: December 9, 2004
|
||||
11.1 Certificates
|
||||
|
||||
In the HTTPS world, you use certificates to validate that you are the one
|
||||
you you claim to be, as an addition to normal passwords. Curl supports
|
||||
client-side certificates. All certificates are locked with a pass phrase,
|
||||
which you need to enter before the certificate can be used by curl. The pass
|
||||
phrase can be specified on the command line or if not, entered interactively
|
||||
when curl queries for it. Use a certificate with curl on a HTTPS server
|
||||
like:
|
||||
you claim to be, as an addition to normal passwords. Curl supports client-
|
||||
side certificates. All certificates are locked with a pass phrase, which you
|
||||
need to enter before the certificate can be used by curl. The pass phrase
|
||||
can be specified on the command line or if not, entered interactively when
|
||||
curl queries for it. Use a certificate with curl on a HTTPS server like:
|
||||
|
||||
curl -E mycert.pem https://that.secure.server.com
|
||||
|
||||
@@ -407,7 +414,37 @@ Date: December 9, 2004
|
||||
|
||||
curl -H "Destination: http://moo.com/nowhere" http://url.com
|
||||
|
||||
13. Debug
|
||||
13. Web Login
|
||||
|
||||
While not strictly just HTTP related, it still cause a lot of people problems
|
||||
so here's the executive run-down of how the vast majority of all login forms
|
||||
work and how to login to them using curl.
|
||||
|
||||
It can also be noted that to do this properly in an automated fashion, you
|
||||
will most certainly need to script things and do multiple curl invokes etc.
|
||||
|
||||
First, servers mostly use cookies to track the logged-in status of the
|
||||
client, so you will need to capture the cookies you receive in the
|
||||
responses. Then, many sites also set a special cookie on the login page (to
|
||||
make sure you got there through their login page) so you should make a habit
|
||||
of first getting the login-form page to capture the cookies set there.
|
||||
|
||||
Some web-based login systems features various amounts of javascript, and
|
||||
sometimes they use such code to set or modify cookie contents. Possibly they
|
||||
do that to prevent programmed logins, like this manual describes how to...
|
||||
Anyway, if reading the code isn't enough to let you repeat the behavior
|
||||
manually, capturing the HTTP requests done by your browers and analyzing the
|
||||
sent cookies is usually a working method to work out how to shortcut the
|
||||
javascript need.
|
||||
|
||||
In the actual <form> tag for the login, lots of sites fill-in random/session
|
||||
or otherwise secretly generated hidden tags and you may need to first capture
|
||||
the HTML code for the login form and extract all the hidden fields to be able
|
||||
to do a proper login POST. Remember that the contents need to be URL encoded
|
||||
when sent in a normal POST.
|
||||
|
||||
|
||||
14. Debug
|
||||
|
||||
Many times when you run curl on a site, you'll notice that the site doesn't
|
||||
seem to respond the same way to your curl requests as it does to your
|
||||
@@ -437,7 +474,7 @@ Date: December 9, 2004
|
||||
such as ethereal or tcpdump and check what headers that were sent and
|
||||
received by the browser. (HTTPS makes this technique inefficient.)
|
||||
|
||||
14. References
|
||||
15. References
|
||||
|
||||
RFC 2616 is a must to read if you want in-depth understanding of the HTTP
|
||||
protocol.
|
||||
|
193
docs/curl.1
193
docs/curl.1
@@ -21,7 +21,7 @@
|
||||
.\" * $Id$
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH curl 1 "5 Jan 2008" "Curl 7.18.0" "Curl Manual"
|
||||
.TH curl 1 "10 July 2008" "Curl 7.19.0" "Curl Manual"
|
||||
.SH NAME
|
||||
curl \- transfer a URL
|
||||
.SH SYNOPSIS
|
||||
@@ -99,11 +99,16 @@ any response data to the terminal.
|
||||
If you prefer a progress "bar" instead of the regular meter, \fI-#\fP is your
|
||||
friend.
|
||||
.SH OPTIONS
|
||||
In general, all boolean options are enabled with --option and yet again
|
||||
disabled with --\fBno-\fPoption. That is, you use the exact same option name
|
||||
but prefix it with "no-". However, in this list we mostly only list and show
|
||||
the --option version of them. (This concept with --no options was added in
|
||||
7.19.0. Previously most options were toggled on/off on repeated use of the
|
||||
same command line option.)
|
||||
.IP "-a/--append"
|
||||
(FTP) When used in an FTP upload, this will tell curl to append to the target
|
||||
(FTP/SFTP) When used in an upload, this will tell curl to append to the target
|
||||
file instead of overwriting it. If the file doesn't exist, it will be created.
|
||||
|
||||
If this option is used twice, the second one will disable append mode again.
|
||||
Note that this flag is ignored by some SSH servers (including OpenSSH).
|
||||
.IP "-A/--user-agent <agent string>"
|
||||
(HTTP) Specify the User-Agent string to send to the HTTP server. Some badly
|
||||
done CGIs fail if this field isn't set to "Mozilla/4.0". To encode blanks in
|
||||
@@ -124,9 +129,6 @@ Note that using --anyauth is not recommended if you do uploads from stdin,
|
||||
since it may require data to be sent twice and then the client must be able to
|
||||
rewind. If the need should arise when uploading from stdin, the upload
|
||||
operation will fail.
|
||||
|
||||
If this option is used several times, the following occurrences make no
|
||||
difference.
|
||||
.IP "-b/--cookie <name=data>"
|
||||
(HTTP)
|
||||
Pass the data to the HTTP server as a cookie. It is supposedly the
|
||||
@@ -152,16 +154,11 @@ used.
|
||||
Enable ASCII transfer when using FTP or LDAP. For FTP, this can also be
|
||||
enforced by using an URL that ends with ";type=A". This option causes data
|
||||
sent to stdout to be in text mode for win32 systems.
|
||||
|
||||
If this option is used twice, the second one will disable ASCII usage.
|
||||
.IP "--basic"
|
||||
(HTTP) Tells curl to use HTTP Basic authentication. This is the default and
|
||||
this option is usually pointless, unless you use it to override a previously
|
||||
set option that sets a different authentication method (such as \fI--ntlm\fP,
|
||||
\fI--digest\fP and \fI--negotiate\fP).
|
||||
|
||||
If this option is used several times, the following occurrences make no
|
||||
difference.
|
||||
.IP "--ciphers <list of ciphers>"
|
||||
(SSL) Specifies which ciphers to use in the connection. The list of ciphers
|
||||
must be using valid ciphers. Read up on SSL cipher list details on this URL:
|
||||
@@ -175,9 +172,7 @@ If this option is used several times, the last one will override the others.
|
||||
.IP "--compressed"
|
||||
(HTTP) Request a compressed response using one of the algorithms libcurl
|
||||
supports, and return the uncompressed document. If this option is used and
|
||||
the server sends an unsupported encoding, Curl will report an error.
|
||||
|
||||
If this option is used several times, each occurrence will toggle it on/off.
|
||||
the server sends an unsupported encoding, curl will report an error.
|
||||
.IP "--connect-timeout <seconds>"
|
||||
Maximum time in seconds that you allow the connection to the server to take.
|
||||
This only limits the connection phase, once curl has connected this option is
|
||||
@@ -220,9 +215,6 @@ To create remote directories when using FTP or SFTP, try
|
||||
\fI--ftp-create-dirs\fP.
|
||||
.IP "--crlf"
|
||||
(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).
|
||||
|
||||
If this option is used several times, the following occurrences make no
|
||||
difference.
|
||||
.IP "-d/--data <data>"
|
||||
(HTTP) Sends the specified data in a POST request to the HTTP server, in the
|
||||
same way that a browser does when a user has filled in an HTML form and
|
||||
@@ -298,13 +290,15 @@ away. EPRT and LPRT are extensions to the original FTP protocol, may not work
|
||||
on all servers but enable more functionality in a better way than the
|
||||
traditional PORT command.
|
||||
|
||||
If this option is used several times, each occurrence will toggle this on/off.
|
||||
Since curl 7.19.0, \fB--eprt\fP can be used to explicitly enable EPRT again
|
||||
and \fB--no-eprt\fP is an alias for \fB--disable-eprt\fP.
|
||||
.IP "--disable-epsv"
|
||||
(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
|
||||
transfers. Curl will normally always first attempt to use EPSV before PASV,
|
||||
but with this option, it will not try using EPSV.
|
||||
|
||||
If this option is used several times, each occurrence will toggle this on/off.
|
||||
Since curl 7.19.0, \fB--epsv\fP can be used to explicitly enable EPRT again
|
||||
and \fB--no-epsv\fP is an alias for \fB--disable-epsv\fP.
|
||||
.IP "-D/--dump-header <file>"
|
||||
Write the protocol headers to the specified file.
|
||||
|
||||
@@ -334,8 +328,6 @@ run-time.
|
||||
(RISC OS ONLY) Sets a range of environment variables, using the names the -w
|
||||
option supports, to easier allow extraction of useful information after having
|
||||
run curl.
|
||||
|
||||
If this option is used several times, each occurrence will toggle this on/off.
|
||||
.IP "--egd-file <file>"
|
||||
(SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket
|
||||
is used to seed the random engine for SSL connections. See also the
|
||||
@@ -400,8 +392,6 @@ will prevent curl from outputting that and return error 22.
|
||||
This method is not fail-safe and there are occasions where non-successful
|
||||
response codes will slip through, especially when authentication is involved
|
||||
(response codes 401 and 407).
|
||||
|
||||
If this option is used twice, the second will again disable silent failure.
|
||||
.IP "--ftp-account [data]"
|
||||
(FTP) When an FTP server asks for "account data" after user name and password
|
||||
has been provided, this data is sent off using the ACCT command. (Added in
|
||||
@@ -413,8 +403,6 @@ If this option is used twice, the second will override the previous use.
|
||||
currently exist on the server, the standard behavior of curl is to
|
||||
fail. Using this option, curl will instead attempt to create missing
|
||||
directories.
|
||||
|
||||
If this option is used twice, the second will again disable directory creation.
|
||||
.IP "--ftp-method [method]"
|
||||
(FTP) Control what method curl should use to reach a file on a FTP(S)
|
||||
server. The method argument should be one of the following alternatives:
|
||||
@@ -437,7 +425,8 @@ using this option can be used to override a previous --ftp-port option. (Added
|
||||
in 7.11.0)
|
||||
|
||||
If this option is used several times, the following occurrences make no
|
||||
difference.
|
||||
difference. Undoing an enforced PASV really isn't doable but you must then
|
||||
instead enforce the correct EPRT again.
|
||||
.IP "--ftp-alternative-to-user <command>"
|
||||
(FTP) If authenticating with the USER and PASS commands fails, send this
|
||||
command. When connecting to Tumbleweed's Secure Transport server over FTPS
|
||||
@@ -450,28 +439,19 @@ will re-use the same IP address it already uses for the control
|
||||
connection. (Added in 7.14.2)
|
||||
|
||||
This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
|
||||
|
||||
If this option is used twice, the second will again use the server's suggested
|
||||
address.
|
||||
.IP "--ftp-ssl"
|
||||
(FTP) Try to use SSL/TLS for the FTP connection. Reverts to a non-secure
|
||||
connection if the server doesn't support SSL/TLS. See also
|
||||
\fI--ftp-ssl-control\fP and \fI--ftp-ssl-reqd\fP for different levels of
|
||||
encryption required. (Added in 7.11.0)
|
||||
|
||||
If this option is used twice, the second will again disable this.
|
||||
.IP "--ftp-ssl-control"
|
||||
(FTP) Require SSL/TLS for the ftp login, clear for transfer. Allows secure
|
||||
authentication, but non-encrypted data transfers for efficiency. Fails the
|
||||
transfer if the server doesn't support SSL/TLS. (Added in 7.16.0)
|
||||
|
||||
If this option is used twice, the second will again disable this.
|
||||
.IP "--ftp-ssl-reqd"
|
||||
(FTP) Require SSL/TLS for the FTP connection.
|
||||
Terminates the connection if the server doesn't support SSL/TLS.
|
||||
(Added in 7.15.5)
|
||||
|
||||
If this option is used twice, the second will again disable this.
|
||||
.IP "--ftp-ssl-ccc"
|
||||
(FTP) Use CCC (Clear Command Channel)
|
||||
Shuts down the SSL/TLS layer after authenticating. The rest of the
|
||||
@@ -479,8 +459,6 @@ control channel communication will be unencrypted. This allows
|
||||
NAT routers to follow the FTP transaction. The default mode is
|
||||
passive. See --ftp-ssl-ccc-mode for other modes.
|
||||
(Added in 7.16.1)
|
||||
|
||||
If this option is used twice, the second will again disable this.
|
||||
.IP "--ftp-ssl-ccc-mode [active/passive]"
|
||||
(FTP) Use CCC (Clear Command Channel)
|
||||
Sets the CCC mode. The passive mode will not initiate the shutdown, but
|
||||
@@ -545,7 +523,8 @@ If used in combination with -I, the POST data will instead be appended to the
|
||||
URL with a HEAD request.
|
||||
|
||||
If this option is used several times, the following occurrences make no
|
||||
difference.
|
||||
difference. This is because undoing a GET doesn't make sense, but you should
|
||||
then instead enforce the alternative method you prefer.
|
||||
.IP "-h/--help"
|
||||
Usage help.
|
||||
.IP "-H/--header <header>"
|
||||
@@ -566,7 +545,7 @@ for you.
|
||||
See also the \fI-A/--user-agent\fP and \fI-e/--referer\fP options.
|
||||
|
||||
This option can be used multiple times to add/replace/remove multiple headers.
|
||||
.IP "--hostpubmd5"
|
||||
.IP "--hostpubmd5 <md5>"
|
||||
Pass a string containing 32 hexadecimal digits. The string should be the 128
|
||||
bit MD5 checksum of the remote host's public key, curl will refuse the
|
||||
connection with the host unless the md5sums match. This option is only for SCP
|
||||
@@ -577,11 +556,8 @@ Ignore the Content-Length header. This is particularly useful for servers
|
||||
running Apache 1.x, which will report incorrect Content-Length for files
|
||||
larger than 2 gigabytes.
|
||||
.IP "-i/--include"
|
||||
(HTTP)
|
||||
Include the HTTP-header in the output. The HTTP-header includes things
|
||||
(HTTP) Include the HTTP-header in the output. The HTTP-header includes things
|
||||
like server-name, date of the document, HTTP-version and more...
|
||||
|
||||
If this option is used twice, the second will again disable header include.
|
||||
.IP "--interface <name>"
|
||||
Perform an operation using a specified interface. You can enter interface
|
||||
name, IP address or host name. An example could look like:
|
||||
@@ -595,15 +571,11 @@ Fetch the HTTP-header only! HTTP-servers feature the command HEAD
|
||||
which this uses to get nothing but the header of a document. When used
|
||||
on a FTP or FILE file, curl displays the file size and last modification
|
||||
time only.
|
||||
|
||||
If this option is used twice, the second will again disable header only.
|
||||
.IP "-j/--junk-session-cookies"
|
||||
(HTTP) When curl is told to read cookies from a given file, this option will
|
||||
make it discard all "session cookies". This will basically have the same effect
|
||||
as if a new session is started. Typical browsers always discard session
|
||||
cookies when they're closed down.
|
||||
|
||||
If this option is used several times, each occurrence will toggle this on/off.
|
||||
.IP "-k/--insecure"
|
||||
(SSL) This option explicitly allows curl to perform "insecure" SSL connections
|
||||
and transfers. All SSL connections are attempted to be made secure by using
|
||||
@@ -612,8 +584,6 @@ considered "insecure" to fail unless \fI-k/--insecure\fP is used.
|
||||
|
||||
See this online resource for further details:
|
||||
\fBhttp://curl.haxx.se/docs/sslcerts.html\fP
|
||||
|
||||
If this option is used twice, the second time will again disable it.
|
||||
.IP "--keepalive-time <seconds>"
|
||||
This option sets the time a connection needs to remain idle before sending
|
||||
keepalive probes and the time between individual keepalive probes. It is
|
||||
@@ -738,7 +708,6 @@ This option causes an FTP NLST command to be sent. Some FTP servers
|
||||
list only files in their response to NLST; they do not include
|
||||
subdirectories and symbolic links.
|
||||
|
||||
If this option is used twice, the second will again disable list only.
|
||||
.IP "--local-port <num>[-num]"
|
||||
Set a preferred number or range of local port numbers to use for the
|
||||
connection(s). Note that port numbers by nature is a scarce resource that
|
||||
@@ -759,8 +728,6 @@ When curl follows a redirect and the request is not a plain GET (for example
|
||||
POST or PUT), it will do the following request with a GET if the HTTP response
|
||||
was 301, 302, or 303. If the response code was any other 3xx code, curl will
|
||||
re-send the following request using the same unmodified method.
|
||||
|
||||
If this option is used twice, the second will again disable location following.
|
||||
.IP "--location-trusted"
|
||||
(HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name +
|
||||
password to all hosts that the site may redirect to. This may or may not
|
||||
@@ -768,7 +735,6 @@ introduce a security breach if the site redirects you do a site to which
|
||||
you'll send your authentication info (which is plaintext in the case of HTTP
|
||||
Basic authentication).
|
||||
|
||||
If this option is used twice, the second will again disable location following.
|
||||
.IP "--max-filesize <bytes>"
|
||||
Specify the maximum size (in bytes) of a file to download. If the file
|
||||
requested is larger than this value, the transfer will not start and curl will
|
||||
@@ -786,9 +752,9 @@ If this option is used several times, the last one will be used.
|
||||
.IP "-M/--manual"
|
||||
Manual. Display the huge help text.
|
||||
.IP "-n/--netrc"
|
||||
Makes curl scan the \fI.netrc\fP file in the user's home directory for login
|
||||
name and password. This is typically used for ftp on unix. If used with http,
|
||||
curl will enable user authentication. See
|
||||
Makes curl scan the \fI.netrc\fP (\fI_netrc\fP on Windows) file in the user's
|
||||
home directory for login name and password. This is typically used for ftp on
|
||||
unix. If used with http, curl will enable user authentication. See
|
||||
.BR netrc(4)
|
||||
or
|
||||
.BR ftp(1)
|
||||
@@ -802,8 +768,6 @@ to ftp to the machine host.domain.com with user name \&'myself' and password
|
||||
\&'secret' should look similar to:
|
||||
|
||||
.B "machine host.domain.com login myself password secret"
|
||||
|
||||
If this option is used twice, the second will again disable netrc usage.
|
||||
.IP "--netrc-optional"
|
||||
Very similar to \fI--netrc\fP, but this option makes the .netrc usage
|
||||
\fBoptional\fP and not mandatory as the \fI--netrc\fP does.
|
||||
@@ -833,12 +797,14 @@ will use a standard buffered output stream that will have the effect that it
|
||||
will output the data in chunks, not necessarily exactly when the data arrives.
|
||||
Using this option will disable that buffering.
|
||||
|
||||
If this option is used twice, the second will again switch on buffering.
|
||||
Note that this is the negated option name documented. You can thus use
|
||||
\fI--buffer\fP to enforce the buffering.
|
||||
.IP "--no-keepalive"
|
||||
Disables the use of keepalive messages on the TCP connection, as by default
|
||||
curl enables them.
|
||||
|
||||
If this option is used twice, the second will again enable keepalive.
|
||||
Note that this is the negated option name documented. You can thus use
|
||||
\fI--keepalive\fP to enforce keepalive.
|
||||
.IP "--no-sessionid"
|
||||
(SSL) Disable curl's use of SSL session-ID caching. By default all transfers
|
||||
are done using the cache. Note that while nothing ever should get hurt by
|
||||
@@ -846,8 +812,8 @@ attempting to reuse SSL session-IDs, there seem to be broken SSL
|
||||
implementations in the wild that may require you to disable this in order for
|
||||
you to succeed. (Added in 7.16.0)
|
||||
|
||||
If this option is used twice, the second will again switch on use of the
|
||||
session cache.
|
||||
Note that this is the negated option name documented. You can thus use
|
||||
\fI--sessionid\fP to enforce session-ID caching.
|
||||
.IP "--ntlm"
|
||||
(HTTP) Enables NTLM authentication. The NTLM authentication method was
|
||||
designed by Microsoft and is used by IIS web servers. It is a proprietary
|
||||
@@ -888,6 +854,11 @@ The remote file name to use for saving is extracted from the given URL,
|
||||
nothing else.
|
||||
|
||||
You may use this option as many times as you have number of URLs.
|
||||
.IP "--remote-name-all"
|
||||
This option changes the default action for all given URLs to be dealt with as
|
||||
if \fI-O/--remote-name\fP were used for each one. So if you want to disable
|
||||
that for a specific URL after \fI--remote-name-all\fP has been used, you must
|
||||
use "-o -" or \fI--no-remote-name\fP. (Added in 7.19.0)
|
||||
.IP "--pass <phrase>"
|
||||
(SSL/SSH) Pass phrase for the private key
|
||||
|
||||
@@ -903,41 +874,26 @@ a redirection. This option is meaningful only when using \fI-L/--location\fP
|
||||
Tells curl to pick a suitable authentication method when communicating with
|
||||
the given proxy. This might cause an extra request/response round-trip. (Added
|
||||
in 7.13.2)
|
||||
|
||||
If this option is used twice, the second will again disable the proxy use-any
|
||||
authentication.
|
||||
.IP "--proxy-basic"
|
||||
Tells curl to use HTTP Basic authentication when communicating with the given
|
||||
proxy. Use \fI--basic\fP for enabling HTTP Basic with a remote host. Basic is
|
||||
the default authentication method curl uses with proxies.
|
||||
|
||||
If this option is used twice, the second will again disable proxy HTTP Basic
|
||||
authentication.
|
||||
.IP "--proxy-digest"
|
||||
Tells curl to use HTTP Digest authentication when communicating with the given
|
||||
proxy. Use \fI--digest\fP for enabling HTTP Digest with a remote host.
|
||||
|
||||
If this option is used twice, the second will again disable proxy HTTP Digest.
|
||||
.IP "--proxy-negotiate"
|
||||
Tells curl to use HTTP Negotiate authentication when communicating
|
||||
with the given proxy. Use \fI--negotiate\fP for enabling HTTP Negotiate
|
||||
with a remote host.
|
||||
|
||||
If this option is used twice, the second will again disable proxy HTTP
|
||||
Negotiate. (Added in 7.17.1)
|
||||
with a remote host. (Added in 7.17.1)
|
||||
.IP "--proxy-ntlm"
|
||||
Tells curl to use HTTP NTLM authentication when communicating with the given
|
||||
proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
|
||||
|
||||
If this option is used twice, the second will again disable proxy HTTP NTLM.
|
||||
.IP "-p/--proxytunnel"
|
||||
When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP
|
||||
protocols to attempt to tunnel through the proxy instead of merely using it to
|
||||
do HTTP-like operations. The tunnel approach is made with the HTTP proxy
|
||||
CONNECT request and requires that the proxy allows direct connect to the
|
||||
remote port number curl wants to tunnel through to.
|
||||
|
||||
If this option is used twice, the second will again disable proxy tunnel.
|
||||
.IP "--pubkey <key>"
|
||||
(SSH) Public key file name. Allows you to provide your public key in this
|
||||
separate file.
|
||||
@@ -978,11 +934,42 @@ just before the transfer command(s), prefix the command with '+' (this
|
||||
is only supported for FTP). You may specify any number of commands. If
|
||||
the server returns failure for one of the commands, the entire operation
|
||||
will be aborted. You must send syntactically correct FTP commands as
|
||||
RFC959 defines to FTP servers, or one of the following commands (with
|
||||
appropriate arguments) to SFTP servers: chgrp, chmod, chown, ln, mkdir,
|
||||
pwd, rename, rm, rmdir, symlink.
|
||||
RFC959 defines to FTP servers, or one of the commands listed below to
|
||||
SFTP servers. This option can be used multiple times.
|
||||
|
||||
This option can be used multiple times.
|
||||
SFTP is a binary protocol. Unlike for FTP, libcurl interprets SFTP quote
|
||||
commands before sending them to the server. Following is the list of
|
||||
all supported SFTP quote commands:
|
||||
.RS
|
||||
.IP "chgrp group file"
|
||||
The chgrp command sets the group ID of the file named by the file operand to the
|
||||
group ID specified by the group operand. The group operand is a decimal
|
||||
integer group ID.
|
||||
.IP "chmod mode file"
|
||||
The chmod command modifies the file mode bits of the specified file. The
|
||||
mode operand is an octal integer mode number.
|
||||
.IP "chown user file"
|
||||
The chown command sets the owner of the file named by the file operand to the
|
||||
user ID specified by the user operand. The user operand is a decimal
|
||||
integer user ID.
|
||||
.IP "ln source_file target_file"
|
||||
The ln and symlink commands create a symbolic link at the target_file location
|
||||
pointing to the source_file location.
|
||||
.IP "mkdir directory_name"
|
||||
The mkdir command creates the directory named by the directory_name operand.
|
||||
.IP "pwd"
|
||||
The pwd command returns the absolute pathname of the current working directory.
|
||||
.IP "rename source target"
|
||||
The rename command renames the file or directory named by the source
|
||||
operand to the destination path named by the target operand.
|
||||
.IP "rm file"
|
||||
The rm command removes the file specified by the file operand.
|
||||
.IP "rmdir directory"
|
||||
The rmdir command removes the directory entry specified by the directory
|
||||
operand, provided it is empty.
|
||||
.IP "symlink source_file target_file"
|
||||
See ln.
|
||||
.RE
|
||||
.IP "--random-file <file>"
|
||||
(SSL) Specify the path name to file containing what will be considered as
|
||||
random data. The data is used to seed the random engine for SSL connections.
|
||||
@@ -1033,14 +1020,10 @@ If this option is used several times, the last one will be used.
|
||||
.IP "--raw"
|
||||
When used, it disables all internal HTTP decoding of content or transfer
|
||||
encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
|
||||
|
||||
If this option is used several times, each occurrence toggles this on/off.
|
||||
.IP "-R/--remote-time"
|
||||
When used, this will make libcurl attempt to figure out the timestamp of the
|
||||
remote file, and if that is available make the local file get that same
|
||||
timestamp.
|
||||
|
||||
If this option is used twice, the second time disables this again.
|
||||
.IP "--retry <num>"
|
||||
If a transient error is returned when curl tries to perform a transfer, it
|
||||
will retry this number of times before giving up. Setting the number to 0
|
||||
@@ -1075,12 +1058,8 @@ If this option is used multiple times, the last occurrence decide the amount.
|
||||
.IP "-s/--silent"
|
||||
Silent mode. Don't show progress meter or error messages. Makes
|
||||
Curl mute.
|
||||
|
||||
If this option is used twice, the second will again disable silent mode.
|
||||
.IP "-S/--show-error"
|
||||
When used with -s it makes curl show error message if it fails.
|
||||
|
||||
If this option is used twice, the second will again disable show error.
|
||||
.IP "--socks4 <host[:port]>"
|
||||
Use the specified SOCKS4 proxy. If the port number is not specified, it is
|
||||
assumed at port 1080. (Added in 7.15.2)
|
||||
@@ -1127,8 +1106,6 @@ If this option is used several times, the last one will be used.
|
||||
.IP "--tcp-nodelay"
|
||||
Turn on the TCP_NODELAY option. See the \fIcurl_easy_setopt(3)\fP man page for
|
||||
details about this option. (Added in 7.11.2)
|
||||
|
||||
If this option is used several times, each occurrence toggles this on/off.
|
||||
.IP "-t/--telnet-option <OPT=val>"
|
||||
Pass options to the telnet protocol. Supported options are:
|
||||
|
||||
@@ -1181,8 +1158,6 @@ If this option is used several times, the last one will be used.
|
||||
.IP "--trace-time"
|
||||
Prepends a time stamp to each trace or verbose line that curl displays.
|
||||
(Added in 7.14.0)
|
||||
|
||||
If this option is used several times, each occurrence will toggle it on/off.
|
||||
.IP "-u/--user <user:password>"
|
||||
Specify user and password to use for server authentication. Overrides
|
||||
\fI-n/--netrc\fP and \fI--netrc-optional\fP.
|
||||
@@ -1222,8 +1197,6 @@ If you think this option still doesn't give you enough details, consider using
|
||||
\fI--trace\fP or \fI--trace-ascii\fP instead.
|
||||
|
||||
This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP.
|
||||
|
||||
If this option is used twice, the second will do nothing extra.
|
||||
.IP "-V/--version"
|
||||
Displays information about curl and the libcurl version it uses.
|
||||
|
||||
@@ -1288,7 +1261,9 @@ The URL that was fetched last. This is mostly meaningful if you've told curl
|
||||
to follow location: headers.
|
||||
.TP
|
||||
.B http_code
|
||||
The numerical code that was found in the last retrieved HTTP(S) page.
|
||||
The numerical response code that was found in the last retrieved HTTP(S) or
|
||||
FTP(s) transfer. In 7.18.2 the alias \fBresponse_code\fP was added to show the
|
||||
same info.
|
||||
.TP
|
||||
.B http_connect
|
||||
The numerical code that was found in the last response (from a proxy) to a
|
||||
@@ -1303,8 +1278,12 @@ The time, in seconds, it took from the start until the name resolving was
|
||||
completed.
|
||||
.TP
|
||||
.B time_connect
|
||||
The time, in seconds, it took from the start until the connect to the remote
|
||||
host (or proxy) was completed.
|
||||
The time, in seconds, it took from the start until the TCP connect to the
|
||||
remote host (or proxy) was completed.
|
||||
.TP
|
||||
.B time_appconnect
|
||||
The time, in seconds, it took from the start until the SSL/SSH/etc
|
||||
connect/handshake to the remote host was completed. (Added in 7.19.0)
|
||||
.TP
|
||||
.B time_pretransfer
|
||||
The time, in seconds, it took from the start until the file transfer is just
|
||||
@@ -1349,9 +1328,17 @@ Number of new connects made in the recent transfer. (Added in 7.12.3)
|
||||
.B num_redirects
|
||||
Number of redirects that were followed in the request. (Added in 7.12.3)
|
||||
.TP
|
||||
.B redirect_url
|
||||
When a HTTP request was made without -L to follow redirects, this variable
|
||||
will show the actual URL a redirect \fIwould\fP take you to. (Added in 7.18.2)
|
||||
.TP
|
||||
.B ftp_entry_path
|
||||
The initial path libcurl ended up in when logging on to the remote FTP
|
||||
server. (Added in 7.15.4)
|
||||
.TP
|
||||
.B ssl_verify_result
|
||||
The result of the SSL peer certificate verification that was requested. 0
|
||||
means the verification was successful. (Added in 7.19.0)
|
||||
.RE
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
@@ -1441,8 +1428,6 @@ IPv6 addresses only.
|
||||
.IP "-#/--progress-bar"
|
||||
Make curl display progress information as a progress bar instead of the
|
||||
default statistics.
|
||||
|
||||
If this option is used twice, the second will again disable the progress bar.
|
||||
.SH FILES
|
||||
.I ~/.curlrc
|
||||
.RS
|
||||
@@ -1607,6 +1592,10 @@ The resource referenced in the URL does not exist
|
||||
An unspecified error occurred during the SSH session
|
||||
.IP 80
|
||||
Failed to shut down the SSL connection
|
||||
.IP 82
|
||||
Could not load CRL file, missing or wrong format (added in 7.19.0)
|
||||
.IP 83
|
||||
Issuer check failed (added in 7.19.0)
|
||||
.IP XX
|
||||
There will appear more error codes here in future releases. The existing ones
|
||||
are meant to never change.
|
||||
|
@@ -16,11 +16,10 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <curl/multi.h>
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#ifndef WIN32
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <curl/multi.h>
|
||||
|
||||
static const char *urls[] = {
|
||||
"http://www.microsoft.com",
|
||||
@@ -90,10 +89,10 @@ static void init(CURLM *cm, int i)
|
||||
CURL *eh = curl_easy_init();
|
||||
|
||||
curl_easy_setopt(eh, CURLOPT_WRITEFUNCTION, cb);
|
||||
curl_easy_setopt(eh, CURLOPT_HEADER, 0);
|
||||
curl_easy_setopt(eh, CURLOPT_HEADER, 0L);
|
||||
curl_easy_setopt(eh, CURLOPT_URL, urls[i]);
|
||||
curl_easy_setopt(eh, CURLOPT_PRIVATE, urls[i]);
|
||||
curl_easy_setopt(eh, CURLOPT_VERBOSE, 0);
|
||||
curl_easy_setopt(eh, CURLOPT_VERBOSE, 0L);
|
||||
|
||||
curl_multi_add_handle(cm, eh);
|
||||
}
|
||||
|
@@ -7,7 +7,16 @@ AUTOMAKE_OPTIONS = foreign nostdinc
|
||||
EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \
|
||||
makefile.dj $(COMPLICATED_EXAMPLES)
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
# Specify our include paths here, and do it relative to $(top_srcdir) and
|
||||
# $(top_builddir), to ensure that these paths which belong to the library
|
||||
# being currently built and tested are searched before the library which
|
||||
# might possibly already be installed in the system.
|
||||
#
|
||||
# $(top_builddir)/include is for libcurl's generated curl/curlbuild.h file
|
||||
# $(top_srcdir)/include is for libcurl's external include files
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include \
|
||||
-I$(top_srcdir)/include
|
||||
|
||||
LIBDIR = $(top_builddir)/lib
|
||||
|
||||
@@ -21,7 +30,7 @@ CPPFLAGS = -DCURL_NO_OLDIES $(STATICCPPFLAGS)
|
||||
# Dependencies
|
||||
LDADD = $(LIBDIR)/libcurl.la
|
||||
|
||||
# Makefile.inc provides the noinst_PROGRAMS and COMPLICATED_EXAMPLES defines
|
||||
# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
|
||||
include Makefile.inc
|
||||
|
||||
|
||||
|
@@ -1,10 +1,11 @@
|
||||
# These are all libcurl example programs to be test compiled
|
||||
noinst_PROGRAMS = 10-at-a-time anyauthput cookie_interface \
|
||||
check_PROGRAMS = 10-at-a-time anyauthput cookie_interface \
|
||||
debug fileupload fopen ftpget ftpgetresp ftpupload \
|
||||
getinfo getinmemory http-post httpput \
|
||||
https multi-app multi-debugcallback multi-double \
|
||||
multi-post multi-single persistant post-callback \
|
||||
postit2 sepheaders simple simplepost simplessl
|
||||
postit2 sepheaders simple simplepost simplessl \
|
||||
sendrecv httpcustomheader
|
||||
|
||||
# These examples require external dependencies that may not be commonly
|
||||
# available on POSIX systems, so don't bother attempting to compile them here.
|
||||
|
@@ -51,7 +51,6 @@ CP = copy
|
||||
INCLUDES = -I. -I$(PROOT) -I$(PROOT)/include -I$(PROOT)/lib
|
||||
LINK = $(CC) $(LDFLAGS) -o $@
|
||||
|
||||
curl_PROGRAMS = curl.exe
|
||||
ifdef DYN
|
||||
curl_DEPENDENCIES = $(PROOT)/lib/libcurldll.a $(PROOT)/lib/libcurl.dll
|
||||
curl_LDADD = -L$(PROOT)/lib -lcurldll
|
||||
@@ -107,13 +106,13 @@ ifndef USE_LDAP_OPENLDAP
|
||||
curl_LDADD += -lwldap32
|
||||
endif
|
||||
endif
|
||||
curl_LDADD += -lws2_32 -lwinmm
|
||||
curl_LDADD += -lws2_32
|
||||
COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
|
||||
|
||||
# Makefile.inc provides the noinst_PROGRAMS and COMPLICATED_EXAMPLES defines
|
||||
# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
|
||||
include Makefile.inc
|
||||
|
||||
example_PROGRAMS := $(patsubst %,%.exe,$(strip $(noinst_PROGRAMS)))
|
||||
example_PROGRAMS := $(patsubst %,%.exe,$(strip $(check_PROGRAMS)))
|
||||
|
||||
.SUFFIXES: .rc .res .o .exe
|
||||
|
||||
|
@@ -10,8 +10,22 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#ifdef WIN32
|
||||
# include <io.h>
|
||||
#else
|
||||
# include <stdint.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# ifdef _WIN64
|
||||
typedef __int64 intptr_t;
|
||||
# else
|
||||
typedef int intptr_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
@@ -109,7 +123,7 @@ int main(int argc, char **argv)
|
||||
curl_easy_setopt(curl, CURLOPT_IOCTLDATA, (void*)hd);
|
||||
|
||||
/* enable "uploading" (which means PUT when doing HTTP) */
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ;
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L) ;
|
||||
|
||||
/* specify target URL, and note that this URL should also include a file
|
||||
name, not only a directory (as you can do with GTP uploads) */
|
||||
@@ -117,12 +131,13 @@ int main(int argc, char **argv)
|
||||
|
||||
/* and give the size of the upload, this supports large file sizes
|
||||
on systems that have general support for it */
|
||||
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, file_info.st_size);
|
||||
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
|
||||
(curl_off_t)file_info.st_size);
|
||||
|
||||
/* tell libcurl we can use "any" auth, which lets the lib pick one, but it
|
||||
also costs one extra round-trip and possibly sending of all the PUT
|
||||
data twice!!! */
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY);
|
||||
|
||||
/* set user name and password for the authentication */
|
||||
curl_easy_setopt(curl, CURLOPT_USERPWD, "user:password");
|
||||
|
@@ -102,16 +102,16 @@ int main(void)
|
||||
|
||||
rv=curl_global_init(CURL_GLOBAL_ALL);
|
||||
ch=curl_easy_init();
|
||||
rv=curl_easy_setopt(ch,CURLOPT_VERBOSE, 0);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_HEADER, 0);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_NOPROGRESS, 1);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_NOSIGNAL, 1);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_VERBOSE, 0L);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_HEADER, 0L);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_NOPROGRESS, 1L);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_NOSIGNAL, 1L);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_WRITEFUNCTION, *writefunction);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_WRITEDATA, stdout);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_HEADERFUNCTION, *writefunction);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_WRITEHEADER, stderr);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_SSLCERTTYPE,"PEM");
|
||||
rv=curl_easy_setopt(ch,CURLOPT_SSL_VERIFYPEER,1);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_SSL_VERIFYPEER,1L);
|
||||
rv=curl_easy_setopt(ch, CURLOPT_URL, "https://www.cacert.org/");
|
||||
|
||||
/* first try: retrieve page without cacerts' certificate -> will fail
|
||||
|
@@ -54,7 +54,7 @@ main(void)
|
||||
char nline[256];
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://www.google.com/"); /* google.com sets "PREF" cookie */
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); /* just to start the cookie engine */
|
||||
res = curl_easy_perform(curl);
|
||||
if (res != CURLE_OK) {
|
||||
|
@@ -29,7 +29,7 @@ size_t my_read_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
|
||||
return fread(ptr, size, nmemb, stream);
|
||||
}
|
||||
|
||||
int my_progress_func(GtkWidget *Bar,
|
||||
int my_progress_func(GtkWidget *bar,
|
||||
double t, /* dltotal */
|
||||
double d, /* dlnow */
|
||||
double ultotal,
|
||||
@@ -37,7 +37,7 @@ int my_progress_func(GtkWidget *Bar,
|
||||
{
|
||||
/* printf("%d / %d (%g %%)\n", d, t, d*100.0/t);*/
|
||||
gdk_threads_enter();
|
||||
gtk_progress_set_value(GTK_PROGRESS(Bar), d*100.0/t);
|
||||
gtk_progress_set_value(GTK_PROGRESS(bar), d*100.0/t);
|
||||
gdk_threads_leave();
|
||||
return 0;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ void *my_thread(void *ptr)
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_write_func);
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, my_read_func);
|
||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, FALSE);
|
||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
|
||||
curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, my_progress_func);
|
||||
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, Bar);
|
||||
|
||||
@@ -77,6 +77,9 @@ int main(int argc, char **argv)
|
||||
GtkWidget *Window, *Frame, *Frame2;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
/* Must initialize libcurl before any threads are started */
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
|
||||
/* Init thread */
|
||||
g_thread_init(NULL);
|
||||
|
||||
|
@@ -438,7 +438,7 @@ int main(int argc, char **argv) {
|
||||
/* Now specify the POST binary data */
|
||||
|
||||
curl_easy_setopt(p.curl, CURLOPT_POSTFIELDS, binaryptr);
|
||||
curl_easy_setopt(p.curl, CURLOPT_POSTFIELDSIZE,tabLength);
|
||||
curl_easy_setopt(p.curl, CURLOPT_POSTFIELDSIZE,(long)tabLength);
|
||||
|
||||
/* pass our list of custom made headers */
|
||||
|
||||
@@ -477,7 +477,7 @@ int main(int argc, char **argv) {
|
||||
/* Now specify the POST binary data */
|
||||
|
||||
curl_easy_setopt(p.curl, CURLOPT_POSTFIELDS, binaryptr);
|
||||
curl_easy_setopt(p.curl, CURLOPT_POSTFIELDSIZE,tabLength);
|
||||
curl_easy_setopt(p.curl, CURLOPT_POSTFIELDSIZE,(long)tabLength);
|
||||
|
||||
|
||||
/* Perform the request, res will get the return code */
|
||||
|
@@ -116,7 +116,7 @@ int main(void)
|
||||
curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &config);
|
||||
|
||||
/* the DEBUGFUNCTION has no effect until we enable VERBOSE */
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
|
||||
res = curl_easy_perform(curl);
|
||||
|
@@ -36,7 +36,7 @@ int main(void)
|
||||
"file:///home/dast/src/curl/debug/new");
|
||||
|
||||
/* tell it to "upload" to the URL */
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
|
||||
|
||||
/* set where to read from (on Windows you need to use READFUNCTION too) */
|
||||
curl_easy_setopt(curl, CURLOPT_READDATA, fd);
|
||||
@@ -46,7 +46,7 @@ int main(void)
|
||||
(curl_off_t)file_info.st_size);
|
||||
|
||||
/* enable verbose for easier tracing */
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
|
@@ -45,7 +45,9 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#ifndef WIN32
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -236,7 +238,7 @@ url_fopen(const char *url,const char *operation)
|
||||
|
||||
curl_easy_setopt(file->handle.curl, CURLOPT_URL, url);
|
||||
curl_easy_setopt(file->handle.curl, CURLOPT_WRITEDATA, file);
|
||||
curl_easy_setopt(file->handle.curl, CURLOPT_VERBOSE, 0);
|
||||
curl_easy_setopt(file->handle.curl, CURLOPT_VERBOSE, 0L);
|
||||
curl_easy_setopt(file->handle.curl, CURLOPT_WRITEFUNCTION, write_callback);
|
||||
|
||||
if(!multi_handle)
|
||||
@@ -488,7 +490,7 @@ main(int argc, char *argv[])
|
||||
handle = url_fopen(url, "r");
|
||||
if(!handle)
|
||||
{
|
||||
printf("couldn't url_fopen()\n");
|
||||
printf("couldn't url_fopen() %s\n", url);
|
||||
fclose(outf);
|
||||
return 2;
|
||||
}
|
||||
@@ -514,7 +516,7 @@ main(int argc, char *argv[])
|
||||
|
||||
handle = url_fopen("testfile", "r");
|
||||
if(!handle) {
|
||||
printf("couldn't url_fopen()\n");
|
||||
printf("couldn't url_fopen() testfile\n");
|
||||
fclose(outf);
|
||||
return 2;
|
||||
}
|
||||
@@ -539,7 +541,7 @@ main(int argc, char *argv[])
|
||||
|
||||
handle = url_fopen("testfile", "r");
|
||||
if(!handle) {
|
||||
printf("couldn't url_fopen()\n");
|
||||
printf("couldn't url_fopen() testfile\n");
|
||||
fclose(outf);
|
||||
return 2;
|
||||
}
|
||||
|
@@ -65,7 +65,7 @@ int main(void)
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
|
||||
|
||||
/* Switch on full protocol/debug output */
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
|
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <sys/types.h>
|
||||
@@ -83,7 +84,7 @@ int main(int argc, char **argv)
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
|
||||
|
||||
/* enable uploading */
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ;
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
|
||||
|
||||
/* specify target */
|
||||
curl_easy_setopt(curl,CURLOPT_URL, REMOTE_URL);
|
||||
|
@@ -21,6 +21,9 @@
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1300)
|
||||
# error _snscanf requires MSVC 7.0 or later.
|
||||
#endif
|
||||
|
||||
/* The MinGW headers are missing a few Win32 function definitions,
|
||||
you shouldn't need this if you use VC++ */
|
||||
@@ -77,7 +80,7 @@ int upload(CURL *curlhandle, const char * remotepath, const char * localpath,
|
||||
return 0;
|
||||
}
|
||||
|
||||
curl_easy_setopt(curlhandle, CURLOPT_UPLOAD, 1);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_UPLOAD, 1L);
|
||||
|
||||
curl_easy_setopt(curlhandle, CURLOPT_URL, remotepath);
|
||||
|
||||
@@ -93,9 +96,9 @@ int upload(CURL *curlhandle, const char * remotepath, const char * localpath,
|
||||
curl_easy_setopt(curlhandle, CURLOPT_READDATA, f);
|
||||
|
||||
curl_easy_setopt(curlhandle, CURLOPT_FTPPORT, "-"); /* disable passive mode */
|
||||
curl_easy_setopt(curlhandle, CURLOPT_FTP_CREATE_MISSING_DIRS, 1);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_FTP_CREATE_MISSING_DIRS, 1L);
|
||||
|
||||
curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, 1);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, 1L);
|
||||
|
||||
for (c = 0; (r != CURLE_OK) && (c < tries); c++) {
|
||||
/* are we resuming? */
|
||||
@@ -110,22 +113,22 @@ int upload(CURL *curlhandle, const char * remotepath, const char * localpath,
|
||||
* because HEADER will dump the headers to stdout
|
||||
* without it.
|
||||
*/
|
||||
curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 1);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_HEADER, 1);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 1L);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_HEADER, 1L);
|
||||
|
||||
r = curl_easy_perform(curlhandle);
|
||||
if (r != CURLE_OK)
|
||||
continue;
|
||||
|
||||
curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 0);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_HEADER, 0);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 0L);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_HEADER, 0L);
|
||||
|
||||
fseek(f, uploaded_len, SEEK_SET);
|
||||
|
||||
curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1L);
|
||||
}
|
||||
else { /* no */
|
||||
curl_easy_setopt(curlhandle, CURLOPT_APPEND, 0);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_APPEND, 0L);
|
||||
}
|
||||
|
||||
r = curl_easy_perform(curlhandle);
|
||||
|
@@ -325,16 +325,16 @@ static void new_conn(char *url, GlobalInfo *g )
|
||||
curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, &conn);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, SHOW_VERBOSE);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, (long)SHOW_VERBOSE);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, SHOW_PROGRESS?0:1);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, SHOW_PROGRESS?0L:1L);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_FOLLOWLOCATION, 1);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_CONNECTTIMEOUT, 30);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_LIMIT, 1);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_TIME, 30);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_CONNECTTIMEOUT, 30L);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_LIMIT, 1L);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_TIME, 30L);
|
||||
|
||||
MSG_OUT("Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
|
||||
rc =curl_multi_add_handle(g->multi, conn->easy);
|
||||
|
@@ -95,6 +95,7 @@ typedef struct _SockInfo {
|
||||
static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
|
||||
{
|
||||
struct timeval timeout;
|
||||
(void)multi; /* unused */
|
||||
|
||||
timeout.tv_sec = timeout_ms/1000;
|
||||
timeout.tv_usec = (timeout_ms%1000)*1000;
|
||||
@@ -103,12 +104,11 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Die if we get a bad CURLMcode somewhere */
|
||||
void mcode_or_die(char *where, CURLMcode code) {
|
||||
static void mcode_or_die(const char *where, CURLMcode code)
|
||||
{
|
||||
if ( CURLM_OK != code ) {
|
||||
char *s;
|
||||
const char *s;
|
||||
switch (code) {
|
||||
case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break;
|
||||
case CURLM_OK: s="CURLM_OK"; break;
|
||||
@@ -116,10 +116,14 @@ void mcode_or_die(char *where, CURLMcode code) {
|
||||
case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break;
|
||||
case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break;
|
||||
case CURLM_INTERNAL_ERROR: s="CURLM_INTERNAL_ERROR"; break;
|
||||
case CURLM_BAD_SOCKET: s="CURLM_BAD_SOCKET"; break;
|
||||
case CURLM_UNKNOWN_OPTION: s="CURLM_UNKNOWN_OPTION"; break;
|
||||
case CURLM_LAST: s="CURLM_LAST"; break;
|
||||
default: s="CURLM_unknown";
|
||||
break;
|
||||
case CURLM_BAD_SOCKET: s="CURLM_BAD_SOCKET";
|
||||
fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s);
|
||||
/* ignore this error */
|
||||
return;
|
||||
}
|
||||
fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s);
|
||||
exit(code);
|
||||
@@ -176,6 +180,7 @@ static void event_cb(int fd, short kind, void *userp)
|
||||
{
|
||||
GlobalInfo *g = (GlobalInfo*) userp;
|
||||
CURLMcode rc;
|
||||
(void)kind; /* unused */
|
||||
|
||||
do {
|
||||
rc = curl_multi_socket(g->multi, fd, &g->still_running);
|
||||
@@ -195,10 +200,10 @@ static void event_cb(int fd, short kind, void *userp)
|
||||
/* Called by libevent when our timeout expires */
|
||||
static void timer_cb(int fd, short kind, void *userp)
|
||||
{
|
||||
(void)fd;
|
||||
(void)kind;
|
||||
GlobalInfo *g = (GlobalInfo *)userp;
|
||||
CURLMcode rc;
|
||||
(void)fd;
|
||||
(void)kind;
|
||||
|
||||
do {
|
||||
rc = curl_multi_socket(g->multi, CURL_SOCKET_TIMEOUT, &g->still_running);
|
||||
@@ -212,9 +217,11 @@ static void timer_cb(int fd, short kind, void *userp)
|
||||
/* Clean up the SockInfo structure */
|
||||
static void remsock(SockInfo *f)
|
||||
{
|
||||
if (!f) { return; }
|
||||
if (f->evset) { event_del(&f->ev); }
|
||||
free(f);
|
||||
if (f) {
|
||||
if (f->evset)
|
||||
event_del(&f->ev);
|
||||
free(f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -228,8 +235,9 @@ static void setsock(SockInfo*f, curl_socket_t s, CURL*e, int act, GlobalInfo*g)
|
||||
f->sockfd = s;
|
||||
f->action = act;
|
||||
f->easy = e;
|
||||
if (f->evset) { event_del(&f->ev); }
|
||||
event_set( &f->ev, f->sockfd, kind, event_cb, g);
|
||||
if (f->evset)
|
||||
event_del(&f->ev);
|
||||
event_set(&f->ev, f->sockfd, kind, event_cb, g);
|
||||
f->evset=1;
|
||||
event_add(&f->ev, NULL);
|
||||
}
|
||||
@@ -245,8 +253,6 @@ static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g) {
|
||||
curl_multi_assign(g->multi, s, fdp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* CURLMOPT_SOCKETFUNCTION */
|
||||
static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
|
||||
{
|
||||
@@ -259,16 +265,16 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
|
||||
if (what == CURL_POLL_REMOVE) {
|
||||
fprintf(MSG_OUT, "\n");
|
||||
remsock(fdp);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (!fdp) {
|
||||
fprintf(MSG_OUT, "Adding data: %s%s\n",
|
||||
what&CURL_POLL_IN?"READ":"",
|
||||
what&CURL_POLL_OUT?"WRITE":"" );
|
||||
fprintf(MSG_OUT, "Adding data: %s\n", whatstr[what]);
|
||||
addsock(s, e, what, g);
|
||||
}
|
||||
else {
|
||||
fprintf(MSG_OUT,
|
||||
"Changing action from %d to %d\n", fdp->action, what);
|
||||
"Changing action from %s to %s\n",
|
||||
whatstr[fdp->action], whatstr[what]);
|
||||
setsock(fdp, s, e, what, g);
|
||||
}
|
||||
}
|
||||
@@ -289,16 +295,21 @@ static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
|
||||
|
||||
/* CURLOPT_PROGRESSFUNCTION */
|
||||
int prog_cb (void *p, double dltotal, double dlnow, double ult, double uln)
|
||||
static int prog_cb (void *p, double dltotal, double dlnow, double ult,
|
||||
double uln)
|
||||
{
|
||||
ConnInfo *conn = (ConnInfo *)p;
|
||||
(void)ult;
|
||||
(void)uln;
|
||||
|
||||
fprintf(MSG_OUT, "Progress: %s (%g/%g)\n", conn->url, dlnow, dltotal);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Create a new easy handle, and add it to the global curl_multi */
|
||||
void new_conn(char *url, GlobalInfo *g ) {
|
||||
static void new_conn(char *url, GlobalInfo *g )
|
||||
{
|
||||
ConnInfo *conn;
|
||||
CURLMcode rc;
|
||||
|
||||
@@ -316,10 +327,10 @@ void new_conn(char *url, GlobalInfo *g ) {
|
||||
curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, &conn);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 0);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, 0);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, 0L);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
|
||||
curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);
|
||||
fprintf(MSG_OUT,
|
||||
@@ -333,14 +344,15 @@ void new_conn(char *url, GlobalInfo *g ) {
|
||||
check_run_count(g);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* This gets called whenever data is received from the fifo */
|
||||
void fifo_cb(int fd, short event, void *arg) {
|
||||
static void fifo_cb(int fd, short event, void *arg)
|
||||
{
|
||||
char s[1024];
|
||||
long int rv=0;
|
||||
int n=0;
|
||||
GlobalInfo *g = (GlobalInfo *)arg;
|
||||
(void)fd; /* unused */
|
||||
(void)event; /* unused */
|
||||
|
||||
do {
|
||||
s[0]='\0';
|
||||
@@ -352,13 +364,12 @@ void fifo_cb(int fd, short event, void *arg) {
|
||||
} while ( rv != EOF);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Create a named pipe and tell libevent to monitor it */
|
||||
int init_fifo (GlobalInfo *g) {
|
||||
static int init_fifo (GlobalInfo *g)
|
||||
{
|
||||
struct stat st;
|
||||
static const char *fifo = "hiper.fifo";
|
||||
int socket;
|
||||
int sockfd;
|
||||
|
||||
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
|
||||
if (lstat (fifo, &st) == 0) {
|
||||
@@ -373,25 +384,25 @@ int init_fifo (GlobalInfo *g) {
|
||||
perror("mkfifo");
|
||||
exit (1);
|
||||
}
|
||||
socket = open(fifo, O_RDWR | O_NONBLOCK, 0);
|
||||
if (socket == -1) {
|
||||
perror("open");
|
||||
exit (1);
|
||||
sockfd = open(fifo, O_RDWR | O_NONBLOCK, 0);
|
||||
if (sockfd == -1) {
|
||||
perror("open");
|
||||
exit (1);
|
||||
}
|
||||
g->input = fdopen(socket, "r");
|
||||
g->input = fdopen(sockfd, "r");
|
||||
|
||||
fprintf(MSG_OUT, "Now, pipe some URL's into > %s\n", fifo);
|
||||
event_set(&g->fifo_event, socket, EV_READ | EV_PERSIST, fifo_cb, g);
|
||||
event_set(&g->fifo_event, sockfd, EV_READ | EV_PERSIST, fifo_cb, g);
|
||||
event_add(&g->fifo_event, NULL);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
GlobalInfo g;
|
||||
CURLMcode rc;
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
memset(&g, 0, sizeof(GlobalInfo));
|
||||
event_init();
|
||||
|
@@ -75,8 +75,8 @@ int main(int argc, char **argv )
|
||||
curl = curl_easy_init();
|
||||
curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
|
||||
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_errbuf);
|
||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, no);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, yes);
|
||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
|
||||
|
||||
tdoc = tidyCreate();
|
||||
|
@@ -100,7 +100,7 @@ static bool init(CURL *&conn, char *url)
|
||||
return false;
|
||||
}
|
||||
|
||||
code = curl_easy_setopt(conn, CURLOPT_FOLLOWLOCATION, 1);
|
||||
code = curl_easy_setopt(conn, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
if (code != CURLE_OK)
|
||||
{
|
||||
fprintf(stderr, "Failed to set redirect option [%s]\n", errorBuffer);
|
||||
|
38
docs/examples/httpcustomheader.c
Normal file
38
docs/examples/httpcustomheader.c
Normal file
@@ -0,0 +1,38 @@
|
||||
/*****************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
struct curl_slist *chunk = NULL;
|
||||
|
||||
chunk = curl_slist_append(chunk, "Accept: moo");
|
||||
|
||||
/* request with the built-in Accept: */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "localhost");
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
/* redo request with our own custom Accept: */
|
||||
res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
return 0;
|
||||
}
|
@@ -76,14 +76,14 @@ int main(int argc, char **argv)
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
|
||||
|
||||
/* enable uploading */
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ;
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
|
||||
|
||||
/* HTTP PUT please */
|
||||
curl_easy_setopt(curl, CURLOPT_PUT, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_PUT, 1L);
|
||||
|
||||
/* specify target URL, and note that this URL should include a file
|
||||
name, not only a directory */
|
||||
curl_easy_setopt(curl,CURLOPT_URL, url);
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||
|
||||
/* now specify which file to upload */
|
||||
curl_easy_setopt(curl, CURLOPT_READDATA, hd_src);
|
||||
|
@@ -31,7 +31,7 @@ int main(void)
|
||||
* default bundle, then the CURLOPT_CAPATH option might come handy for
|
||||
* you.
|
||||
*/
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
|
||||
#endif
|
||||
|
||||
#ifdef SKIP_HOSTNAME_VERFICATION
|
||||
@@ -41,7 +41,7 @@ int main(void)
|
||||
* subjectAltName) fields, libcurl will refuse to connect. You can skip
|
||||
* this check, but this will make the connection less secure.
|
||||
*/
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
|
||||
#endif
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
|
@@ -16,16 +16,15 @@ ifeq ($(USE_SSL),1)
|
||||
LIBS += $(OPENSSL_ROOT)/lib/libssl.a $(OPENSSL_ROOT)/lib/libcrypt.a
|
||||
endif
|
||||
|
||||
ifeq ($(USE_IDNA),1)
|
||||
LIBS += $(LIBIDN_ROOT)/lib/dj_obj/libidn.a -liconv
|
||||
endif
|
||||
|
||||
LIBS += $(WATT32_ROOT)/lib/libwatt.a $(ZLIB_ROOT)/libz.a
|
||||
|
||||
CSOURCES = fopen.c ftpget.c ftpgetresp.c ftpupload.c getinmemory.c \
|
||||
http-post.c httpput.c https.c multi-app.c multi-double.c \
|
||||
multi-post.c multi-single.c persistant.c post-callback.c \
|
||||
postit2.c sepheaders.c simple.c simplepost.c simplessl.c \
|
||||
multi-debugcallback.c fileupload.c getinfo.c anyauthput.c \
|
||||
10-at-a-time.c # ftpuploadresume.c cookie_interface.c
|
||||
include Makefile.inc
|
||||
|
||||
PROGRAMS = $(CSOURCES:.c=.exe)
|
||||
PROGRAMS = $(patsubst %,%.exe,$(check_PROGRAMS))
|
||||
|
||||
all: $(PROGRAMS)
|
||||
@echo Welcome to libcurl example program
|
||||
|
@@ -47,7 +47,7 @@ int main(int argc, char **argv)
|
||||
curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "http://website.com");
|
||||
|
||||
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://ftpsite.com");
|
||||
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_UPLOAD, 1);
|
||||
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_UPLOAD, 1L);
|
||||
|
||||
/* init a multi stack */
|
||||
multi_handle = curl_multi_init();
|
||||
|
@@ -121,7 +121,7 @@ int main(int argc, char **argv)
|
||||
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.haxx.se/");
|
||||
|
||||
curl_easy_setopt(http_handle, CURLOPT_DEBUGFUNCTION, my_trace);
|
||||
curl_easy_setopt(http_handle, CURLOPT_VERBOSE, TRUE);
|
||||
curl_easy_setopt(http_handle, CURLOPT_VERBOSE, 1L);
|
||||
|
||||
/* init a multi stack */
|
||||
multi_handle = curl_multi_init();
|
||||
|
@@ -61,7 +61,7 @@ int main(int argc, char *argv[])
|
||||
/* what URL that receives this POST */
|
||||
curl_easy_setopt(curl, CURLOPT_URL,
|
||||
"http://www.fillinyoururl.com/upload.cgi");
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user