Compare commits
812 Commits
curl-7_20_
...
curl-7_21_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
827f0a318c | ||
![]() |
b66eeb8bf8 | ||
![]() |
c3a6116dc9 | ||
![]() |
f19ace8d33 | ||
![]() |
c2dff28c41 | ||
![]() |
e36c039a07 | ||
![]() |
96ea650ec7 | ||
![]() |
3bb1291fbd | ||
![]() |
61fc9044c7 | ||
![]() |
311bd4c7b1 | ||
![]() |
39d0d787d2 | ||
![]() |
3cffcba3d0 | ||
![]() |
ae7fe3b7f4 | ||
![]() |
b370fcd300 | ||
![]() |
5348e8f276 | ||
![]() |
266bcb06d7 | ||
![]() |
fe165c69de | ||
![]() |
4e2ac742c9 | ||
![]() |
0696260122 | ||
![]() |
54d9f060b4 | ||
![]() |
2cacd82661 | ||
![]() |
ec7978c512 | ||
![]() |
0e9626ba39 | ||
![]() |
73eb9965cf | ||
![]() |
08a77025c6 | ||
![]() |
7a4b5079c6 | ||
![]() |
7a53c77cb5 | ||
![]() |
b89122a2bf | ||
![]() |
99dcb11ed8 | ||
![]() |
819dfddc58 | ||
![]() |
32a050ec7e | ||
![]() |
76ac6b94ed | ||
![]() |
28c830efd8 | ||
![]() |
7ba5e88053 | ||
![]() |
ef19e30985 | ||
![]() |
2d356ba168 | ||
![]() |
dc0a7161f8 | ||
![]() |
77cbfe2274 | ||
![]() |
20690e412d | ||
![]() |
dbcaa00657 | ||
![]() |
4b837a7e15 | ||
![]() |
73b518f269 | ||
![]() |
3427bece89 | ||
![]() |
e79c1e39e9 | ||
![]() |
77f0fcae0e | ||
![]() |
03be2c99ba | ||
![]() |
b77a3b9a35 | ||
![]() |
c0a2ee65a4 | ||
![]() |
4ba3d8bd00 | ||
![]() |
511031c8d8 | ||
![]() |
59cf93ccdb | ||
![]() |
4f13340ab8 | ||
![]() |
b0940753c6 | ||
![]() |
b35622f387 | ||
![]() |
ce24fdaa2c | ||
![]() |
02c99899a2 | ||
![]() |
7fcbdd68b9 | ||
![]() |
fc77790bcd | ||
![]() |
ef46fcdd90 | ||
![]() |
0243aa9eb0 | ||
![]() |
8fa7b8cb9b | ||
![]() |
fd6b4b3e9b | ||
![]() |
1da65c3d4d | ||
![]() |
d541085407 | ||
![]() |
c73e5e839d | ||
![]() |
db2e425346 | ||
![]() |
6aa5206042 | ||
![]() |
61623b74e3 | ||
![]() |
5f7d34811a | ||
![]() |
42f5e8a0f1 | ||
![]() |
c5d9cd5c1b | ||
![]() |
b5cc77bd25 | ||
![]() |
3d81320426 | ||
![]() |
308db9d780 | ||
![]() |
03ea06b8e3 | ||
![]() |
08a65b10fb | ||
![]() |
1238edaeaf | ||
![]() |
a9cd4f4ed4 | ||
![]() |
1d28efb9d1 | ||
![]() |
9ba42a023d | ||
![]() |
ebb9c7ae04 | ||
![]() |
53014175e8 | ||
![]() |
651c0bcdf2 | ||
![]() |
d45ed0ecf5 | ||
![]() |
e21b103c3e | ||
![]() |
0029b2f042 | ||
![]() |
7c5d888ea6 | ||
![]() |
adb49ad8bb | ||
![]() |
a2c8966d50 | ||
![]() |
d8f6d1c334 | ||
![]() |
1e52ea92eb | ||
![]() |
28888a0b41 | ||
![]() |
1022e754f4 | ||
![]() |
703573c72b | ||
![]() |
7af54ef9a5 | ||
![]() |
1602ed6ba1 | ||
![]() |
9e46318a03 | ||
![]() |
c0c89cd44e | ||
![]() |
6cf35852ad | ||
![]() |
83e9fb21aa | ||
![]() |
5c42b2ceae | ||
![]() |
82aa386732 | ||
![]() |
c43ad0f972 | ||
![]() |
53640a3ce0 | ||
![]() |
35e1d6538a | ||
![]() |
45cea71968 | ||
![]() |
569202c9a4 | ||
![]() |
2b3fbc8cdb | ||
![]() |
1ad5764feb | ||
![]() |
ae29142198 | ||
![]() |
cd045e24a0 | ||
![]() |
0dc8479b89 | ||
![]() |
420eac5542 | ||
![]() |
15aeb94f3f | ||
![]() |
b6a3e2be8e | ||
![]() |
9f64bbd6d8 | ||
![]() |
879914def3 | ||
![]() |
6076549304 | ||
![]() |
49465fffdb | ||
![]() |
5825aa149d | ||
![]() |
7dc9393d3b | ||
![]() |
2dded8fedb | ||
![]() |
be16b227b7 | ||
![]() |
e6d99f4ba7 | ||
![]() |
16c4314a21 | ||
![]() |
375aa41ba1 | ||
![]() |
5f829456c1 | ||
![]() |
a834e00454 | ||
![]() |
0e944fb24e | ||
![]() |
f37d681166 | ||
![]() |
30bd7427ea | ||
![]() |
71ab0ceaa0 | ||
![]() |
9acac91960 | ||
![]() |
af54fbbcb5 | ||
![]() |
1e739e781e | ||
![]() |
8d569c7bb0 | ||
![]() |
7f3b87d878 | ||
![]() |
6b5dc72575 | ||
![]() |
8ab137b2bc | ||
![]() |
bcfb9ea34c | ||
![]() |
f0aad0089e | ||
![]() |
d2395f962d | ||
![]() |
476b1a079b | ||
![]() |
9583b4af90 | ||
![]() |
8219bc9e19 | ||
![]() |
57523e3578 | ||
![]() |
37a22d4749 | ||
![]() |
1df74d886d | ||
![]() |
76c54bd129 | ||
![]() |
8f50a404f9 | ||
![]() |
f6ebae65d6 | ||
![]() |
a0a70dc21d | ||
![]() |
5e37689a1a | ||
![]() |
c75a9fef59 | ||
![]() |
9035709e25 | ||
![]() |
b88ead62e7 | ||
![]() |
b998b04c02 | ||
![]() |
68b2a9818b | ||
![]() |
a7cf30f808 | ||
![]() |
be312336f6 | ||
![]() |
6761cf49f2 | ||
![]() |
108d7693a4 | ||
![]() |
00a5bd41be | ||
![]() |
6d7d0eba6d | ||
![]() |
a865bd9fba | ||
![]() |
0fd439ebac | ||
![]() |
012f9b7f04 | ||
![]() |
573a2900cd | ||
![]() |
c28443c551 | ||
![]() |
0b5901bec6 | ||
![]() |
5965d4554d | ||
![]() |
34127c7adc | ||
![]() |
315e5277dc | ||
![]() |
5c7c9a768d | ||
![]() |
bf1c102b80 | ||
![]() |
2271b60b71 | ||
![]() |
c2bfe60086 | ||
![]() |
63598059cd | ||
![]() |
c1901f7ed0 | ||
![]() |
9c4ff4874e | ||
![]() |
46a0062dff | ||
![]() |
d97fa56fd4 | ||
![]() |
d534cd0027 | ||
![]() |
afd6e738f7 | ||
![]() |
de670efeab | ||
![]() |
421d918da3 | ||
![]() |
99a07a1fdf | ||
![]() |
81c16c2e30 | ||
![]() |
dd5d3518e4 | ||
![]() |
07f60235b0 | ||
![]() |
5580fb2b9c | ||
![]() |
7e3f0bffe5 | ||
![]() |
5d47bf3776 | ||
![]() |
11cddb68e0 | ||
![]() |
1b2b93e074 | ||
![]() |
c328214a2d | ||
![]() |
f6f5d7874f | ||
![]() |
5db0a412ff | ||
![]() |
cbe67a1b71 | ||
![]() |
23245ca83a | ||
![]() |
3590874999 | ||
![]() |
e39ab6f203 | ||
![]() |
c9081a8280 | ||
![]() |
5088e3709d | ||
![]() |
c2ba8ca81f | ||
![]() |
ef24ecde68 | ||
![]() |
e8bc33d0a3 | ||
![]() |
5087f89ac8 | ||
![]() |
b3d39275f5 | ||
![]() |
1d75d30816 | ||
![]() |
6fe18add71 | ||
![]() |
d212fe43af | ||
![]() |
13d537e404 | ||
![]() |
46041ee918 | ||
![]() |
1bb05ac16f | ||
![]() |
091c52fef7 | ||
![]() |
a83870ef9d | ||
![]() |
a768e39b2d | ||
![]() |
1c4fa240be | ||
![]() |
5046dd02b9 | ||
![]() |
4d6c0bdf74 | ||
![]() |
cbf4961bf3 | ||
![]() |
add5766dd4 | ||
![]() |
8d59d69449 | ||
![]() |
465865c3cb | ||
![]() |
c539b83138 | ||
![]() |
0a2edfc348 | ||
![]() |
64520e43d4 | ||
![]() |
c79f816c32 | ||
![]() |
c8a7df108f | ||
![]() |
8636742256 | ||
![]() |
a1f32ffee5 | ||
![]() |
fec5f03e22 | ||
![]() |
2b2ac9068e | ||
![]() |
890425ecd7 | ||
![]() |
1df1032444 | ||
![]() |
b1e4dce671 | ||
![]() |
0b20de0194 | ||
![]() |
d596a523b9 | ||
![]() |
592df29f9c | ||
![]() |
f1db21218b | ||
![]() |
892cacef43 | ||
![]() |
12b2412c52 | ||
![]() |
7d8343934b | ||
![]() |
7cebf22d57 | ||
![]() |
c6b97a8278 | ||
![]() |
f96a2641fc | ||
![]() |
fc6c4c10f9 | ||
![]() |
152578fb33 | ||
![]() |
0a41318f1d | ||
![]() |
4bde456f73 | ||
![]() |
689ee8345c | ||
![]() |
5d4355f19b | ||
![]() |
710ecb6946 | ||
![]() |
1b24b89cca | ||
![]() |
dc3e7df1c9 | ||
![]() |
1171bc5c8a | ||
![]() |
3adb68c605 | ||
![]() |
34498c13be | ||
![]() |
517d3eb0a4 | ||
![]() |
6a07e704ca | ||
![]() |
95719fbea6 | ||
![]() |
fbf51696ef | ||
![]() |
1786950759 | ||
![]() |
87374a47c9 | ||
![]() |
368f5a8547 | ||
![]() |
68a485b00a | ||
![]() |
7b823badbc | ||
![]() |
b0fd03f5b8 | ||
![]() |
4b2fbe1e97 | ||
![]() |
afecd1aa13 | ||
![]() |
68cde058f6 | ||
![]() |
809a748124 | ||
![]() |
542318b113 | ||
![]() |
909e711e74 | ||
![]() |
d95b67f409 | ||
![]() |
96945c98d5 | ||
![]() |
1db61aca3b | ||
![]() |
bbb6eb3aaa | ||
![]() |
a4765b0551 | ||
![]() |
29de7dd288 | ||
![]() |
52e3c60c86 | ||
![]() |
282b41c69b | ||
![]() |
13e9571dd0 | ||
![]() |
36420330de | ||
![]() |
cc87913294 | ||
![]() |
ca9f9cb875 | ||
![]() |
0c8e5f7e6a | ||
![]() |
59db31902c | ||
![]() |
c36b00a166 | ||
![]() |
59f07ddf28 | ||
![]() |
e214cd4a73 | ||
![]() |
5997f54a71 | ||
![]() |
e8c442952d | ||
![]() |
98d9dc7840 | ||
![]() |
6164d40fce | ||
![]() |
65ca4b547b | ||
![]() |
d09a905751 | ||
![]() |
0152dbbe23 | ||
![]() |
2261ddf9db | ||
![]() |
295496fa34 | ||
![]() |
09a2d93a0f | ||
![]() |
b0ccd24a72 | ||
![]() |
11e131c9f9 | ||
![]() |
4b0c411ce6 | ||
![]() |
0f2e35b305 | ||
![]() |
0cb3d7913c | ||
![]() |
7e46061cac | ||
![]() |
7b79c8bf96 | ||
![]() |
04ae23afff | ||
![]() |
987168d6b9 | ||
![]() |
ea07fde40b | ||
![]() |
e3df610ada | ||
![]() |
72d9c96ad5 | ||
![]() |
d371458348 | ||
![]() |
ecd624b8e7 | ||
![]() |
81f151c912 | ||
![]() |
b804906414 | ||
![]() |
2869b6ea2b | ||
![]() |
2d3c7b7e01 | ||
![]() |
edf9566c3b | ||
![]() |
331531f70e | ||
![]() |
51b8d30dc4 | ||
![]() |
450c994a49 | ||
![]() |
6a43ffa0d5 | ||
![]() |
6a90aa3f3d | ||
![]() |
1998de9993 | ||
![]() |
61f4cdb73a | ||
![]() |
cda02fb78b | ||
![]() |
a5f96b49d1 | ||
![]() |
18e7b52e8e | ||
![]() |
6d272e53a2 | ||
![]() |
9bce615f46 | ||
![]() |
81e107010e | ||
![]() |
70e8814e44 | ||
![]() |
fc137ee272 | ||
![]() |
79cd7ef9ab | ||
![]() |
4b69f641a6 | ||
![]() |
2ae6c47d5d | ||
![]() |
15622e69a9 | ||
![]() |
8500586251 | ||
![]() |
3aef3ed8f6 | ||
![]() |
488f9545a2 | ||
![]() |
588402585b | ||
![]() |
750c9179ca | ||
![]() |
5f0ae7a062 | ||
![]() |
8fa519dce4 | ||
![]() |
5fb4279ec7 | ||
![]() |
67c83eb9eb | ||
![]() |
9e1083488f | ||
![]() |
dfaaa99ded | ||
![]() |
87badbef84 | ||
![]() |
e3811ed7c3 | ||
![]() |
dacc44ddc2 | ||
![]() |
fc9f369829 | ||
![]() |
bfbc4c7e00 | ||
![]() |
05b72a6af2 | ||
![]() |
1e2056fecb | ||
![]() |
5df13c3173 | ||
![]() |
ed4eecc05e | ||
![]() |
7e1a45e224 | ||
![]() |
e329586489 | ||
![]() |
397e61128f | ||
![]() |
578e833d3b | ||
![]() |
4d58f97f60 | ||
![]() |
33c3bb057b | ||
![]() |
6bf2014745 | ||
![]() |
a10f5b34ff | ||
![]() |
b1df37c60e | ||
![]() |
31d59fb2cc | ||
![]() |
562d40e671 | ||
![]() |
612832e4c0 | ||
![]() |
3c69a08e3b | ||
![]() |
5ea9e78bd7 | ||
![]() |
69d7c48072 | ||
![]() |
7d4f8c2809 | ||
![]() |
d23c59ecfc | ||
![]() |
1d95a48fe9 | ||
![]() |
512a82d395 | ||
![]() |
fbb38de415 | ||
![]() |
0006cdddee | ||
![]() |
b684ccd8b1 | ||
![]() |
3f64d05d34 | ||
![]() |
e4128f90ba | ||
![]() |
e991a3536d | ||
![]() |
8665d4e593 | ||
![]() |
0e36bb71f2 | ||
![]() |
19f45eaa79 | ||
![]() |
70a025f3df | ||
![]() |
95e230c591 | ||
![]() |
5fcc4332d6 | ||
![]() |
7d84113e1d | ||
![]() |
f3df524b62 | ||
![]() |
c47148f142 | ||
![]() |
8a00c94b0f | ||
![]() |
9de4b26643 | ||
![]() |
3208757c1a | ||
![]() |
fae19aed8d | ||
![]() |
c59dba338e | ||
![]() |
a76f852ca4 | ||
![]() |
3880dd3741 | ||
![]() |
d8041a7ea5 | ||
![]() |
abde4c9d84 | ||
![]() |
6d88d58dd5 | ||
![]() |
fbefd816e4 | ||
![]() |
296b246b9c | ||
![]() |
5393f08df8 | ||
![]() |
b5da54e6c9 | ||
![]() |
22085f7d6e | ||
![]() |
2c1b4e74e4 | ||
![]() |
aca67e2775 | ||
![]() |
8e2f16e66f | ||
![]() |
a7f6747019 | ||
![]() |
c3c4626fab | ||
![]() |
9808480860 | ||
![]() |
6ce76e6996 | ||
![]() |
64f12a3b9f | ||
![]() |
18a758d907 | ||
![]() |
7aea2d522d | ||
![]() |
f3e3f5f1b2 | ||
![]() |
62ef465262 | ||
![]() |
c6fa1952a1 | ||
![]() |
d47bd396ce | ||
![]() |
6882ae8dee | ||
![]() |
a00297158e | ||
![]() |
413cbdce3c | ||
![]() |
864d5add0d | ||
![]() |
3238ef5b69 | ||
![]() |
ca10e28f06 | ||
![]() |
5e92015711 | ||
![]() |
ce00c2ef5d | ||
![]() |
0db9140747 | ||
![]() |
55c266de6d | ||
![]() |
3af696f7c4 | ||
![]() |
09cee1633b | ||
![]() |
8d121b6f8f | ||
![]() |
892d6930e7 | ||
![]() |
200e9b5dd1 | ||
![]() |
b0873cb657 | ||
![]() |
19d2bf4ee4 | ||
![]() |
ae467115bb | ||
![]() |
f43ecac175 | ||
![]() |
d2a7fd2fe6 | ||
![]() |
29439acfeb | ||
![]() |
a049528e94 | ||
![]() |
2fbbddbe85 | ||
![]() |
ecb3fe63d7 | ||
![]() |
6ed72fd7fa | ||
![]() |
40e1623649 | ||
![]() |
53151db167 | ||
![]() |
cb64c987a0 | ||
![]() |
67d1616018 | ||
![]() |
65629f2915 | ||
![]() |
795107453d | ||
![]() |
201637d468 | ||
![]() |
6b6a3bcb61 | ||
![]() |
0cbdcd07a8 | ||
![]() |
d106189a47 | ||
![]() |
ddb810ab70 | ||
![]() |
77ba147e76 | ||
![]() |
bed311eda2 | ||
![]() |
9a0b6e42af | ||
![]() |
cfdc4aca45 | ||
![]() |
ab6681c2c8 | ||
![]() |
eeb2cb05a1 | ||
![]() |
daa96f9928 | ||
![]() |
f37affab8c | ||
![]() |
dc4adc484f | ||
![]() |
d0dea8f869 | ||
![]() |
ab81f6c7c4 | ||
![]() |
ebbe694e78 | ||
![]() |
70baf46d8d | ||
![]() |
280d2cff2e | ||
![]() |
ac20f52ed3 | ||
![]() |
59842d4d5f | ||
![]() |
2b6208a6de | ||
![]() |
2f0532a072 | ||
![]() |
6b490ed33c | ||
![]() |
4d703ee100 | ||
![]() |
13b8fc46a3 | ||
![]() |
9f4a174698 | ||
![]() |
8f6189600f | ||
![]() |
41572648db | ||
![]() |
b980c9a027 | ||
![]() |
9124bfba45 | ||
![]() |
232ad6549a | ||
![]() |
03da3ba1c0 | ||
![]() |
4d53dc5d80 | ||
![]() |
5907777153 | ||
![]() |
72da720b4a | ||
![]() |
a6e088e855 | ||
![]() |
4342a2087a | ||
![]() |
8249b0522d | ||
![]() |
a43201e578 | ||
![]() |
3c2ee9c341 | ||
![]() |
8d31d70114 | ||
![]() |
9754b20adb | ||
![]() |
17c1e3bcba | ||
![]() |
6cf90c6a7b | ||
![]() |
67d76dd520 | ||
![]() |
8348dd96dd | ||
![]() |
2596eb6d19 | ||
![]() |
625932d398 | ||
![]() |
37201e3c36 | ||
![]() |
06869597c3 | ||
![]() |
517f3a1b8f | ||
![]() |
495d3e07d4 | ||
![]() |
44e5e37f38 | ||
![]() |
1d594772fd | ||
![]() |
ff26895b5c | ||
![]() |
d7134036b2 | ||
![]() |
7115245f88 | ||
![]() |
dc2157a087 | ||
![]() |
5d5dd08e77 | ||
![]() |
cfbdbf9783 | ||
![]() |
b24e872502 | ||
![]() |
50a1d5ee1c | ||
![]() |
6ccbd1bee4 | ||
![]() |
1267719735 | ||
![]() |
c49e9683b8 | ||
![]() |
6ea043a504 | ||
![]() |
af4eae77ac | ||
![]() |
7d342c723c | ||
![]() |
5c2b6b2d3e | ||
![]() |
11958ed331 | ||
![]() |
15201da4ca | ||
![]() |
59bad26bb2 | ||
![]() |
f91d578674 | ||
![]() |
9df8257301 | ||
![]() |
992ceae386 | ||
![]() |
364fd2f1ad | ||
![]() |
1cbe66fbc8 | ||
![]() |
f8cf037ecf | ||
![]() |
6028fdb305 | ||
![]() |
45456135d5 | ||
![]() |
52beeb2c9f | ||
![]() |
544f15af98 | ||
![]() |
000ac0c975 | ||
![]() |
fc308282ac | ||
![]() |
e9f3513264 | ||
![]() |
a1a5ba3d0a | ||
![]() |
687df5c8c3 | ||
![]() |
40253e32fe | ||
![]() |
f97a7eb400 | ||
![]() |
3cf658fc24 | ||
![]() |
5247266df6 | ||
![]() |
dfa6ee890d | ||
![]() |
bd5df39a29 | ||
![]() |
6f3dc2a726 | ||
![]() |
b01fb30f9c | ||
![]() |
f38e52071e | ||
![]() |
811fcccfc9 | ||
![]() |
b552ca223e | ||
![]() |
a93522f68d | ||
![]() |
425060fed1 | ||
![]() |
fbee86a9e2 | ||
![]() |
2f0c118577 | ||
![]() |
53e47ca947 | ||
![]() |
314117cbf1 | ||
![]() |
d296dd4ee8 | ||
![]() |
04eff9beb9 | ||
![]() |
b5c3feda17 | ||
![]() |
01c309e186 | ||
![]() |
d873c820bd | ||
![]() |
41cf1f4090 | ||
![]() |
6ad0acb608 | ||
![]() |
cfbb351e22 | ||
![]() |
11f53b9a18 | ||
![]() |
eb33f5d1f8 | ||
![]() |
cef30e0924 | ||
![]() |
a13128596c | ||
![]() |
6d2ccfed48 | ||
![]() |
7738b15977 | ||
![]() |
0fa4b41c2b | ||
![]() |
7d166b0ef6 | ||
![]() |
affff47b3d | ||
![]() |
d6981cb508 | ||
![]() |
40ecd6c9b8 | ||
![]() |
181b08babb | ||
![]() |
7abf3b97fe | ||
![]() |
4a1384a8b4 | ||
![]() |
d76874a665 | ||
![]() |
c8d42b2f1c | ||
![]() |
84332b60b9 | ||
![]() |
bc0699f226 | ||
![]() |
157e6d4e7e | ||
![]() |
d4e6404135 | ||
![]() |
3992309285 | ||
![]() |
241b704e1f | ||
![]() |
1dbb9a0ba4 | ||
![]() |
e7743aa7b4 | ||
![]() |
915032ea02 | ||
![]() |
e01cc7737c | ||
![]() |
bd36927f18 | ||
![]() |
0417d34533 | ||
![]() |
a57611e308 | ||
![]() |
12533bb184 | ||
![]() |
9be951a415 | ||
![]() |
7239538d9a | ||
![]() |
18a9ee6bdf | ||
![]() |
f3b77e5611 | ||
![]() |
89924a897d | ||
![]() |
bcefe839c7 | ||
![]() |
458dd4550b | ||
![]() |
f7ae7b3623 | ||
![]() |
31dd8ab1d6 | ||
![]() |
8da56e12c6 | ||
![]() |
0a04078916 | ||
![]() |
1182c8bdcd | ||
![]() |
55d2460fc3 | ||
![]() |
a89d7997b7 | ||
![]() |
d8383220ec | ||
![]() |
8e7ec794f5 | ||
![]() |
bd5d478dd4 | ||
![]() |
1b15b31c86 | ||
![]() |
e6d85923c1 | ||
![]() |
614bae813e | ||
![]() |
bd6a695545 | ||
![]() |
d63bdba097 | ||
![]() |
43edcc4a2e | ||
![]() |
01c2b397aa | ||
![]() |
51a757c11b | ||
![]() |
7a99672042 | ||
![]() |
7eecfb536a | ||
![]() |
a09814138a | ||
![]() |
42432d67cc | ||
![]() |
e91d167ff8 | ||
![]() |
88af6fbf98 | ||
![]() |
6b6fe2a4d5 | ||
![]() |
54aca3c5ec | ||
![]() |
0a9cf4365a | ||
![]() |
343c4c7072 | ||
![]() |
6a0d3233ff | ||
![]() |
d3714b016d | ||
![]() |
da6e992e1d | ||
![]() |
bb60fe0c1a | ||
![]() |
feecf63a96 | ||
![]() |
cbdd1cbcde | ||
![]() |
b3d7161642 | ||
![]() |
3b47d231ac | ||
![]() |
7977bc3dfa | ||
![]() |
00fdafb0a1 | ||
![]() |
f737e94164 | ||
![]() |
a0dd9df9ab | ||
![]() |
4724b9d966 | ||
![]() |
8098d9417c | ||
![]() |
605207a3a6 | ||
![]() |
43d20d81a5 | ||
![]() |
bc0f3dd15e | ||
![]() |
475c19c42b | ||
![]() |
c072bd4609 | ||
![]() |
684830cb2a | ||
![]() |
51248a9bdd | ||
![]() |
3b24076c3b | ||
![]() |
077125e4a2 | ||
![]() |
df06182d86 | ||
![]() |
d939e0f410 | ||
![]() |
69d07feb14 | ||
![]() |
1c4538610b | ||
![]() |
2c72732ebf | ||
![]() |
e1c2c9be1a | ||
![]() |
89da532445 | ||
![]() |
b38189c7b4 | ||
![]() |
1bb04927f3 | ||
![]() |
3fd01be648 | ||
![]() |
5ae6db321f | ||
![]() |
0546d448ce | ||
![]() |
b4fa27ae4b | ||
![]() |
12043e3c9c | ||
![]() |
a324fa7b97 | ||
![]() |
a9483b1f4a | ||
![]() |
40f8aaedb7 | ||
![]() |
374f48675b | ||
![]() |
20ae9d4f71 | ||
![]() |
35955179c6 | ||
![]() |
b1c1b9bb76 | ||
![]() |
123f80ae54 | ||
![]() |
c54ab4dca7 | ||
![]() |
233ec511db | ||
![]() |
4b96e5c70f | ||
![]() |
75743b009b | ||
![]() |
01459828ef | ||
![]() |
99179da4cc | ||
![]() |
645bdd837a | ||
![]() |
c03cbb38ad | ||
![]() |
63661d8e83 | ||
![]() |
4a0493f789 | ||
![]() |
eadeb5bd9a | ||
![]() |
9190e2876e | ||
![]() |
b4f0e1291f | ||
![]() |
dd8568739c | ||
![]() |
97b497a75f | ||
![]() |
d3c813e726 | ||
![]() |
9e480973eb | ||
![]() |
2e056353b0 | ||
![]() |
606b933a4f | ||
![]() |
d17709da31 | ||
![]() |
0bb6deda72 | ||
![]() |
0a29e2445c | ||
![]() |
700335103e | ||
![]() |
368fd5d27b | ||
![]() |
81239edb89 | ||
![]() |
22f3b01478 | ||
![]() |
5f53c9d94a | ||
![]() |
04cfef24a1 | ||
![]() |
1d26151d5f | ||
![]() |
aabd27d9aa | ||
![]() |
dcc061543a | ||
![]() |
2ffe834bff | ||
![]() |
027ceb37a1 | ||
![]() |
510836f80b | ||
![]() |
e4af5d6efc | ||
![]() |
43b816538f | ||
![]() |
77cfeadfa6 | ||
![]() |
ea521cf617 | ||
![]() |
a82c5a39c4 | ||
![]() |
7764795c06 | ||
![]() |
d6706294e0 | ||
![]() |
83305cbf9f | ||
![]() |
76255cfdc9 | ||
![]() |
ad6bc4d82e | ||
![]() |
147609ca6e | ||
![]() |
7871fbad4d | ||
![]() |
46b9719bbb | ||
![]() |
a1a98d5908 | ||
![]() |
a799162bc7 | ||
![]() |
d62ce21249 | ||
![]() |
0825cd80a6 | ||
![]() |
04cb15ae9d | ||
![]() |
bc8fc9803f | ||
![]() |
016ce4b1da | ||
![]() |
3e759f4fb6 | ||
![]() |
2e8b21833a | ||
![]() |
54b0e87796 | ||
![]() |
a784ed6065 | ||
![]() |
d2621445f1 | ||
![]() |
adaf87530d | ||
![]() |
8914857092 | ||
![]() |
aca0fff4e1 | ||
![]() |
d64bd82bdc | ||
![]() |
cb6647ce1c | ||
![]() |
51427e1947 | ||
![]() |
1de6b97a76 | ||
![]() |
f09340de8b | ||
![]() |
82b55efdba | ||
![]() |
16f575ee6c | ||
![]() |
38d2afcefb | ||
![]() |
7f616eb513 | ||
![]() |
fe818c8076 | ||
![]() |
a7b9452a6b | ||
![]() |
2c1b0624ac | ||
![]() |
107146676e | ||
![]() |
79dc74e84d | ||
![]() |
6be508dcc2 | ||
![]() |
82e9b78a38 | ||
![]() |
07f45946b5 | ||
![]() |
7fb7f24131 | ||
![]() |
5b40c11c2f | ||
![]() |
9d6a394c44 | ||
![]() |
d7b82baf97 | ||
![]() |
36e245658b | ||
![]() |
d487ade72c | ||
![]() |
71be565cf4 | ||
![]() |
81512cc02b | ||
![]() |
32236dad5e | ||
![]() |
b30ce34d84 | ||
![]() |
2164b6b463 | ||
![]() |
7af5e3c39e | ||
![]() |
42930155ab | ||
![]() |
e5b3246d0a | ||
![]() |
47dda4a1d4 | ||
![]() |
a5b7e3205d | ||
![]() |
dfce37da23 | ||
![]() |
14bfcb96f5 | ||
![]() |
87fbcb4494 | ||
![]() |
4bfe07640c | ||
![]() |
5d93525f30 | ||
![]() |
b7848e4a72 | ||
![]() |
99ec359b4d | ||
![]() |
dfad8a6dad | ||
![]() |
d841ab82b8 | ||
![]() |
d6be52d80e | ||
![]() |
c0111460b0 | ||
![]() |
93981bb9b5 | ||
![]() |
8f136288c5 | ||
![]() |
9799dbebd6 | ||
![]() |
b025ac16a6 | ||
![]() |
5d43c75c66 | ||
![]() |
15fa5dcfe6 | ||
![]() |
516dfd1705 | ||
![]() |
743bd81e64 | ||
![]() |
520cee3fb7 | ||
![]() |
fa7341143a | ||
![]() |
313a5b05c2 | ||
![]() |
01fc53e027 | ||
![]() |
0a4ccce054 | ||
![]() |
c2888604d7 | ||
![]() |
6632d957e7 | ||
![]() |
c5e539c312 | ||
![]() |
0338994c6a | ||
![]() |
2056ca9fea | ||
![]() |
cca192e58f | ||
![]() |
f3d4b17a9c | ||
![]() |
5bd38b70dd | ||
![]() |
44f1bef668 | ||
![]() |
f38510f4b5 | ||
![]() |
689b6929c3 | ||
![]() |
68aae7f579 | ||
![]() |
a76fa17681 | ||
![]() |
72411118ec | ||
![]() |
5a16df5e04 | ||
![]() |
5a814f6f2c |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -5,6 +5,7 @@
|
||||
*.dll
|
||||
*.exe
|
||||
*.obj
|
||||
*.asc
|
||||
.*.swp
|
||||
Debug
|
||||
Release
|
||||
@@ -26,6 +27,9 @@ curl-config
|
||||
libcurl.pc
|
||||
missing
|
||||
curl-*.tar.gz
|
||||
curl-*.tar.bz2
|
||||
curl-*.tar.lzma
|
||||
curl-*.zip
|
||||
INSTALL
|
||||
install-sh
|
||||
*.o
|
||||
@@ -36,3 +40,4 @@ tags
|
||||
TAGS
|
||||
*~
|
||||
aclocal.m4.bak
|
||||
CHANGES.dist
|
||||
|
49
Android.mk
49
Android.mk
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Place the curl source (including this makefile) into external/curl/ in the
|
||||
# Android source tree. Then build them with 'make curl' or just 'make libcurl'
|
||||
# from the Android root. Tested with Android 1.5
|
||||
# from the Android root. Tested with Android 1.5 and 2.1
|
||||
#
|
||||
# Note: you must first create a curl_config.h file by running configure in the
|
||||
# Android environment. The only way I've found to do this is tricky. Perform a
|
||||
@@ -12,26 +12,37 @@
|
||||
# shown. Now, from the external/curl/ directory, run curl's normal configure
|
||||
# command with flags that match what Android itself uses. This will mean
|
||||
# putting the compiler directory into the PATH, putting the -I, -isystem and
|
||||
# -D options into CPPFLAGS, putting the -m, -f, -O and -nostdlib options into
|
||||
# CFLAGS, and putting the -Wl, -L and -l options into LIBS, along with the path
|
||||
# to the files libgcc.a, crtbegin_dynamic.o, and ccrtend_android.o. Remember
|
||||
# that the paths must be absolute since you will not be running configure from
|
||||
# the same directory as the Android make. The normal cross-compiler options
|
||||
# must also be set.
|
||||
# -D options into CPPFLAGS, putting the -W, -m, -f, -O and -nostdlib options
|
||||
# into CFLAGS, and putting the -Wl, -L and -l options into LIBS, along with the
|
||||
# path to the files libgcc.a, crtbegin_dynamic.o, and ccrtend_android.o.
|
||||
# Remember that the paths must be absolute since you will not be running
|
||||
# configure from the same directory as the Android make. The normal
|
||||
# cross-compiler options must also be set. Note that the -c, -o, -MD and
|
||||
# similar flags must not be set.
|
||||
#
|
||||
# To see all the LIBS options, you'll need to do the "showcommands" trick on an
|
||||
# executable that's already buildable and watch what flags Android uses to link
|
||||
# it (dhcpcd is a good choice to watch). You'll also want to add -L options to
|
||||
# LIBS that point to the out/.../obj/lib/ and out/.../obj/system/lib/
|
||||
# directories so that additional libraries can be found and used by curl.
|
||||
#
|
||||
# The end result will be a configure command that looks something like this
|
||||
# (the environment variable A is set to the Android root path):
|
||||
# (the environment variable A is set to the Android root path which makes the
|
||||
# command shorter):
|
||||
#
|
||||
# A=`realpath ../..` && \
|
||||
# PATH="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/bin:$PATH" \
|
||||
# ./configure --host=arm-linux CC=arm-eabi-gcc \
|
||||
# CPPFLAGS="-I $A/system/core/include ..." \
|
||||
# CFLAGS="-fno-exceptions -Wno-multichar ..." \
|
||||
# LIB="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/lib/gcc/arm-eabi/X\
|
||||
# /interwork/libgcc.a ..." \
|
||||
# CFLAGS="-nostdlib -fno-exceptions -Wno-multichar ..." \
|
||||
# LIBS="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/lib/gcc/arm-eabi/X\
|
||||
# /interwork/libgcc.a ..."
|
||||
#
|
||||
# Finally, copy the file COPYING to NOTICE so that the curl license gets put
|
||||
# into the right place (but see the note about this below).
|
||||
#
|
||||
# Dan Fandrich
|
||||
# September 2009
|
||||
# August 2010
|
||||
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
|
||||
@@ -63,6 +74,14 @@ LOCAL_COPY_HEADERS := $(addprefix include/curl/,$(CURL_HEADERS))
|
||||
|
||||
LOCAL_MODULE:= libcurl
|
||||
|
||||
# Copy the licence to a place where Android will find it.
|
||||
# Actually, this doesn't quite work because the build system searches
|
||||
# for NOTICE files before it gets to this point, so it will only be seen
|
||||
# on subsequent builds.
|
||||
ALL_PREBUILT += $(LOCAL_PATH)/NOTICE
|
||||
$(LOCAL_PATH)/NOTICE: $(LOCAL_PATH)/COPYING | $(ACP)
|
||||
$(copy-file-to-target)
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
||||
@@ -71,7 +90,7 @@ include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
include $(LOCAL_PATH)/src/Makefile.inc
|
||||
LOCAL_SRC_FILES := $(addprefix src/,$(CURL_SOURCES))
|
||||
LOCAL_SRC_FILES := $(addprefix src/,$(CURL_CFILES))
|
||||
|
||||
LOCAL_MODULE := curl
|
||||
LOCAL_STATIC_LIBRARIES := libcurl
|
||||
@@ -79,8 +98,8 @@ LOCAL_SYSTEM_SHARED_LIBRARIES := libc
|
||||
|
||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/lib
|
||||
|
||||
# This will also need to include $(CURLX_ONES) in order to correctly build
|
||||
# a dynamic library
|
||||
# This may also need to include $(CURLX_ONES) in order to correctly link
|
||||
# if libcurl is changed to be built as a dynamic library
|
||||
LOCAL_CFLAGS += $(common_CFLAGS)
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
@@ -1,44 +0,0 @@
|
||||
#cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@
|
||||
#ifdef CHECK_TYPE_SIZE_TYPE
|
||||
|
||||
@CHECK_TYPE_SIZE_PREINCLUDE@
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif /* HAVE_SYS_TYPES_H */
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif /* HAVE_STDINT_H */
|
||||
|
||||
#ifdef HAVE_STDDEF_H
|
||||
# include <stddef.h>
|
||||
#endif /* HAVE_STDDEF_H */
|
||||
|
||||
@CHECK_TYPE_SIZE_PREMAIN@
|
||||
|
||||
#ifdef __CLASSIC_C__
|
||||
int main(){
|
||||
int ac;
|
||||
char*av[];
|
||||
#else
|
||||
int main(int ac, char*av[]){
|
||||
#endif
|
||||
if(ac > 1000){return *av[0];}
|
||||
return sizeof(CHECK_TYPE_SIZE_TYPE);
|
||||
}
|
||||
|
||||
#else /* CHECK_TYPE_SIZE_TYPE */
|
||||
|
||||
# error "CHECK_TYPE_SIZE_TYPE has to specify the type"
|
||||
|
||||
#endif /* CHECK_TYPE_SIZE_TYPE */
|
@@ -1,57 +0,0 @@
|
||||
# - Check sizeof a type
|
||||
# CHECK_TYPE_SIZE(TYPE VARIABLE)
|
||||
# Check if the type exists and determine size of type. if the type
|
||||
# exists, the size will be stored to the variable.
|
||||
#
|
||||
# VARIABLE - variable to store size if the type exists.
|
||||
# HAVE_${VARIABLE} - does the variable exists or not
|
||||
|
||||
macro(CHECK_TYPE_SIZE TYPE VARIABLE)
|
||||
set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
|
||||
if(NOT DEFINED ${VARIABLE})
|
||||
if("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
||||
set(CHECK_TYPE_SIZE_TYPE "${TYPE}")
|
||||
set(MACRO_CHECK_TYPE_SIZE_FLAGS
|
||||
"${CMAKE_REQUIRED_FLAGS}")
|
||||
foreach(def HAVE_SYS_TYPES_H
|
||||
HAVE_STDINT_H HAVE_STDDEF_H HAVE_SYS_SOCKET_H)
|
||||
if("${def}")
|
||||
set(MACRO_CHECK_TYPE_SIZE_FLAGS
|
||||
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
|
||||
endif("${def}")
|
||||
endforeach(def)
|
||||
set(CHECK_TYPE_SIZE_PREMAIN)
|
||||
foreach(def ${CMAKE_EXTRA_INCLUDE_FILES})
|
||||
set(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
||||
endforeach(def)
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
||||
IMMEDIATE @ONLY)
|
||||
file(READ
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
||||
CHECK_TYPE_SIZE_FILE_CONTENT)
|
||||
message(STATUS "Check size of ${TYPE}")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CHECK_TYPE_SIZE_ADD_LIBRARIES
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
endif(CMAKE_REQUIRED_LIBRARIES)
|
||||
try_run(${VARIABLE} HAVE_${VARIABLE}
|
||||
${CMAKE_BINARY_DIR}
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
|
||||
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
if(HAVE_${VARIABLE})
|
||||
message(STATUS "Check size of ${TYPE} - done")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
|
||||
else(HAVE_${VARIABLE})
|
||||
message(STATUS "Check size of ${TYPE} - failed")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSize.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n")
|
||||
endif(HAVE_${VARIABLE})
|
||||
endif("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
||||
endif(NOT DEFINED ${VARIABLE})
|
||||
set(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS )
|
||||
endmacro(CHECK_TYPE_SIZE)
|
@@ -120,16 +120,11 @@ if(WIN32)
|
||||
if( NOT HAVE_WLDAP32)
|
||||
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
|
||||
message(STATUS "wldap32 not found CURL_DISABLE_LDAP set ON")
|
||||
option(CURL_LDAP_WIN "Use W$ LDAP implementation" OFF)
|
||||
option(CURL_LDAP_WIN "Use Windows LDAP implementation" OFF)
|
||||
else()
|
||||
option(CURL_LDAP_WIN "Use W$ LDAP implementation" ON)
|
||||
option(CURL_LDAP_WIN "Use Windows LDAP implementation" ON)
|
||||
endif()
|
||||
mark_as_advanced(CURL_LDAP_WIN)
|
||||
set(CURL_LDAP_HYBRID OFF)
|
||||
else()
|
||||
option(CURL_LDAP_HYBRID "W$ LDAP with non-W$ compiler" OFF)
|
||||
mark_as_advanced(CURL_LDAP_HYBRID)
|
||||
set(CURL_LDAP_WIN OFF)
|
||||
endif()
|
||||
|
||||
if(HTTP_ONLY)
|
||||
@@ -188,13 +183,7 @@ include (CheckIncludeFile)
|
||||
include (CheckIncludeFiles)
|
||||
include (CheckLibraryExists)
|
||||
include (CheckSymbolExists)
|
||||
# if crosscompiling is on, the CHECK_TYPE_SIZE macro coming with cmake uses
|
||||
# TRY_COMPILE instead of TRY_RUN which makes crosscompiling easier, Alex
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
include ("${CMAKE_MODULE_PATH}/CheckTypeSize.cmake")
|
||||
else(CMAKE_CROSSCOMPILING)
|
||||
include (CheckTypeSize)
|
||||
endif(CMAKE_CROSSCOMPILING)
|
||||
include (CheckTypeSize)
|
||||
|
||||
# On windows preload settings
|
||||
if(WIN32)
|
||||
@@ -786,7 +775,13 @@ endif(CMAKE_COMPILER_IS_GNUCC AND APPLE)
|
||||
|
||||
if(HAVE_SOCKLEN_T)
|
||||
set(CURL_TYPEOF_CURL_SOCKLEN_T "socklen_t")
|
||||
if(WIN32)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES "winsock2.h;ws2tcpip.h")
|
||||
elseif(HAVE_SYS_SOCKET_H)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h")
|
||||
endif()
|
||||
check_type_size("socklen_t" CURL_SIZEOF_CURL_SOCKLEN_T)
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES)
|
||||
if(NOT HAVE_CURL_SIZEOF_CURL_SOCKLEN_T)
|
||||
message(FATAL_ERROR
|
||||
"Check for sizeof socklen_t failed, see CMakeFiles/CMakerror.log")
|
||||
@@ -836,7 +831,7 @@ function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE)
|
||||
string(REPLACE "$(top_builddir)" "\${CURL_BINARY_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
|
||||
string(REGEX REPLACE "\\\\\n" "<22>!<21>" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
string(REGEX REPLACE "([a-zA-Z_][a-zA-Z0-9_]*)[\t ]*=[\t ]*([^\n]*\n)" "SET(\\1 \\2)\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
string(REGEX REPLACE "([a-zA-Z_][a-zA-Z0-9_]*)[\t ]*=[\t ]*([^\n]*)" "SET(\\1 \\2)" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
string(REPLACE "<22>!<21>" "\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
|
||||
|
||||
string(REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace $() with ${}
|
||||
|
2
COPYING
2
COPYING
@@ -1,6 +1,6 @@
|
||||
COPYRIGHT AND PERMISSION NOTICE
|
||||
|
||||
Copyright (c) 1996 - 2010, Daniel Stenberg, <daniel@haxx.se>.
|
||||
Copyright (c) 1996 - 2011, Daniel Stenberg, <daniel@haxx.se>.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
118
MacOSX-Framework
118
MacOSX-Framework
@@ -1,26 +1,76 @@
|
||||
#!/bin/bash
|
||||
# This script performs all of the steps needed to build a
|
||||
# universal binary libcurl.framework for Mac OS X 10.4 or greater.
|
||||
#
|
||||
# Hendrik Visage:
|
||||
# Generalizations added since Snowleopard (10.6) do not include
|
||||
# the 10.4u SDK.
|
||||
#
|
||||
# Also note:
|
||||
# 10.5 is the *ONLY* SDK that support PPC64 :( -- 10.6 do not have ppc64 support
|
||||
#If you need to have PPC64 support then change below to 1
|
||||
PPC64_NEEDED=0
|
||||
|
||||
# For me the default is to develop for the platform I am on, and if you
|
||||
#desire compatibility with older versions then change USE_OLD to 1 :)
|
||||
USE_OLD=0
|
||||
|
||||
VERSION=`/usr/bin/sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' include/curl/curlver.h`
|
||||
FRAMEWORK_VERSION=Versions/Release-$VERSION
|
||||
|
||||
SDK32='/Developer/SDKs/MacOSX10.4u.sdk'
|
||||
#I also wanted to "copy over" the system, and thus the reason I added the
|
||||
# version to Versions/Release-7.20.1 etc.
|
||||
# now a simple rsync -vaP libcurl.framework /Library/Frameworks will install it
|
||||
# and setup the right paths to this version, leaving the system version
|
||||
# "intact", so you can "fix" it later with the links to Versions/A/...
|
||||
|
||||
MINVER32='-mmacosx-version-min=10.4'
|
||||
|
||||
ARCHES32='-arch ppc -arch i386'
|
||||
OLD_SDK=`ls /Developer/SDKs|head -1`
|
||||
NEW_SDK=`ls -r /Developer/SDKs|head -1`
|
||||
|
||||
SDK64='/Developer/SDKs/MacOSX10.5.sdk'
|
||||
if test "0"$USE_OLD -gt 0
|
||||
then
|
||||
SDK32=$OLD_SDK
|
||||
else
|
||||
SDK32=$NEW_SDK
|
||||
fi
|
||||
|
||||
MINVER64='-mmacosx-version-min=10.5'
|
||||
MACVER=`echo $SDK32|sed -e s/[a-zA-Z]//g -e s/.\$//`
|
||||
|
||||
ARCHES64='-arch ppc64 -arch x86_64'
|
||||
SDK32_DIR='/Developer/SDKs/'$SDK32
|
||||
MINVER32='-mmacosx-version-min='$MACVER
|
||||
ARCHES32='-arch i386 -arch ppc'
|
||||
|
||||
if test -d $SDK32; then
|
||||
|
||||
if test $PPC64_NEEDED -gt 0
|
||||
then
|
||||
SDK64=10.5
|
||||
ARCHES64='-arch x86_64 -arch ppc64'
|
||||
SDK64=`ls /Developer/SDKs|grep 10.5|head -1`
|
||||
else
|
||||
ARCHES64='-arch x86_64'
|
||||
#We "know" that 10.4 and earlier do not support 64bit
|
||||
OLD_SDK64=`ls /Developer/SDKs|egrep -v "10.[0-4]"|head -1`
|
||||
NEW_SDK64=`ls -r /Developer/SDKs|egrep -v "10.[0-4]"|head -1`
|
||||
if test $USE_OLD -gt 0
|
||||
then
|
||||
SDK64=$OLD_SDK64
|
||||
else
|
||||
SDK64=$NEW_SDK64
|
||||
fi
|
||||
fi
|
||||
|
||||
SDK64_DIR='/Developer/SDKs/'$SDK64
|
||||
MACVER64=`echo $SDK64|sed -e s/[a-zA-Z]//g -e s/.\$//`
|
||||
|
||||
MINVER64='-mmacosx-version-min='$MACVER64
|
||||
|
||||
if test ! -z $SDK32; then
|
||||
echo "----Configuring libcurl for 32 bit universal framework..."
|
||||
make clean
|
||||
./configure --disable-dependency-tracking --disable-static --with-gssapi \
|
||||
CFLAGS="-Os -isysroot $SDK32 $ARCHES32 $MINVER32" \
|
||||
LDFLAGS="-Wl,-syslibroot,$SDK32 $ARCHES32 $MINVER32 -Wl,-headerpad_max_install_names" \
|
||||
CFLAGS="-Os -isysroot $SDK32_DIR $ARCHES32 $MINVER32" \
|
||||
LDFLAGS="-Wl,-syslibroot,$SDK32_DIR $ARCHES32 $MINVER32 -Wl,-headerpad_max_install_names" \
|
||||
CC=$CC
|
||||
|
||||
echo "----Building 32 bit libcurl..."
|
||||
@@ -28,40 +78,43 @@ if test -d $SDK32; then
|
||||
|
||||
echo "----Creating 32 bit framework..."
|
||||
rm -r libcurl.framework
|
||||
mkdir -p libcurl.framework/Versions/A/Resources
|
||||
cp lib/.libs/libcurl.dylib libcurl.framework/Versions/A/libcurl
|
||||
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/Versions/A/libcurl libcurl.framework/Versions/A/libcurl
|
||||
/usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/Versions/A/Resources/Info.plist
|
||||
mkdir -p libcurl.framework/Versions/A/Headers/curl
|
||||
cp include/curl/*.h libcurl.framework/Versions/A/Headers/curl
|
||||
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Resources
|
||||
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||
/usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/${FRAMEWORK_VERSION}/Resources/Info.plist
|
||||
mkdir -p libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
|
||||
cp include/curl/*.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl
|
||||
pushd libcurl.framework
|
||||
ln -fs Versions/A/libcurl libcurl
|
||||
ln -fs Versions/A/Resources Resources
|
||||
ln -fs Versions/A/Headers Headers
|
||||
ln -fs ${FRAMEWORK_VERSION}/libcurl libcurl
|
||||
ln -fs ${FRAMEWORK_VERSION}/Resources Resources
|
||||
ln -fs ${FRAMEWORK_VERSION}/Headers Headers
|
||||
cd Versions
|
||||
ln -fs A Current
|
||||
ln -fs ${FRAMEWORK_VERSION} Current
|
||||
|
||||
if test -d $SDK64; then
|
||||
echo TEsting for SDK64
|
||||
if test -d $SDK64_DIR; then
|
||||
echo entering...
|
||||
popd
|
||||
make clean
|
||||
echo "----Configuring libcurl for 64 bit universal framework..."
|
||||
./configure --disable-dependency-tracking --disable-static --with-gssapi \
|
||||
CFLAGS="-Os -isysroot $SDK64 $ARCHES64 $MINVER64" \
|
||||
LDFLAGS="-Wl,-syslibroot,$SDK64 $ARCHES64 $MINVER64 -Wl,-headerpad_max_install_names" \
|
||||
CFLAGS="-Os -isysroot $SDK64_DIR $ARCHES64 $MINVER64" \
|
||||
LDFLAGS="-Wl,-syslibroot,$SDK64_DIR $ARCHES64 $MINVER64 -Wl,-headerpad_max_install_names" \
|
||||
CC=$CC
|
||||
|
||||
echo "----Building 64 bit libcurl..."
|
||||
make
|
||||
|
||||
echo "----Appending 64 bit framework to 32 bit framework..."
|
||||
cp lib/.libs/libcurl.dylib libcurl.framework/Versions/A/libcurl64
|
||||
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/Versions/A/libcurl libcurl.framework/Versions/A/libcurl64
|
||||
cp libcurl.framework/Versions/A/libcurl libcurl.framework/Versions/A/libcurl32
|
||||
lipo libcurl.framework/Versions/A/libcurl32 libcurl.framework/Versions/A/libcurl64 -create -output libcurl.framework/Versions/A/libcurl
|
||||
rm libcurl.framework/Versions/A/libcurl32 libcurl.framework/Versions/A/libcurl64
|
||||
cp libcurl.framework/Versions/A/Headers/curl/curlbuild.h libcurl.framework/Versions/A/Headers/curl/curlbuild32.h
|
||||
cp include/curl/curlbuild.h libcurl.framework/Versions/A/Headers/curl/curlbuild64.h
|
||||
cat >libcurl.framework/Versions/A/Headers/curl/curlbuild.h <<EOF
|
||||
cp lib/.libs/libcurl.dylib libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||
cp libcurl.framework/${FRAMEWORK_VERSION}/libcurl libcurl.framework/${FRAMEWORK_VERSION}/libcurl32
|
||||
pwd
|
||||
lipo libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64 -create -output libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||
rm libcurl.framework/${FRAMEWORK_VERSION}/libcurl32 libcurl.framework/${FRAMEWORK_VERSION}/libcurl64
|
||||
cp libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild32.h
|
||||
cp include/curl/curlbuild.h libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild64.h
|
||||
cat >libcurl.framework/${FRAMEWORK_VERSION}/Headers/curl/curlbuild.h <<EOF
|
||||
#ifdef __LP64__
|
||||
#include "curl/curlbuild64.h"
|
||||
#else
|
||||
@@ -70,9 +123,10 @@ if test -d $SDK32; then
|
||||
EOF
|
||||
fi
|
||||
|
||||
lipo -info libcurl.framework/Versions/A/libcurl
|
||||
pwd
|
||||
lipo -info libcurl.framework/${FRAMEWORK_VERSION}/libcurl
|
||||
echo "libcurl.framework is built and can now be included in other projects."
|
||||
echo "Copy libcurl.framework to your bundle's Contents/Frameworks folder, ~/Library/Frameworks or /Library/Frameworks."
|
||||
else
|
||||
echo "Building libcurl.framework requires Mac OS X 10.4 or later with the MacOSX10.4u SDK installed."
|
||||
echo "Building libcurl.framework requires Mac OS X 10.4 or later with the MacOSX10.4/5/6 SDK installed."
|
||||
fi
|
||||
|
16
Makefile.am
16
Makefile.am
@@ -5,7 +5,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2011, 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
|
||||
@@ -24,15 +24,19 @@ AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
CMAKE_DIST = CMakeLists.txt CMake/CheckTypeSize.c.in CMake/CheckTypeSize.cmake \
|
||||
CMake/CMakeConfigurableFile.in CMake/CurlCheckCSourceCompiles.cmake \
|
||||
CMake/CurlCheckCSourceRuns.cmake CMake/CurlTests.c CMake/FindOpenSSL.cmake \
|
||||
CMake/FindZLIB.cmake CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \
|
||||
CMAKE_DIST = CMakeLists.txt CMake/CMakeConfigurableFile.in \
|
||||
CMake/CurlCheckCSourceCompiles.cmake CMake/CurlCheckCSourceRuns.cmake \
|
||||
CMake/CurlTests.c CMake/FindOpenSSL.cmake CMake/FindZLIB.cmake \
|
||||
CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \
|
||||
CMake/Utilities.cmake include/curl/curlbuild.h.cmake
|
||||
|
||||
WINBUILD_DIST = winbuild/BUILD.WINDOWS.txt winbuild/gen_resp_file.bat \
|
||||
winbuild/MakefileBuild.vc winbuild/Makefile.vc
|
||||
|
||||
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
|
||||
curl-style.el sample.emacs RELEASE-NOTES buildconf \
|
||||
libcurl.pc.in vc6curl.dsw MacOSX-Framework Android.mk $(CMAKE_DIST)
|
||||
libcurl.pc.in vc6curl.dsw MacOSX-Framework Android.mk $(CMAKE_DIST) \
|
||||
Makefile.msvc.names $(WINBUILD_DIST)
|
||||
|
||||
bin_SCRIPTS = curl-config
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2010, 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
|
||||
@@ -32,39 +32,39 @@ ssl:
|
||||
|
||||
borland:
|
||||
cd lib
|
||||
make -f Makefile.b32
|
||||
$(MAKE) -f Makefile.b32
|
||||
cd ..\src
|
||||
make -f Makefile.b32
|
||||
$(MAKE) -f Makefile.b32
|
||||
|
||||
borland-ssl:
|
||||
cd lib
|
||||
make -f Makefile.b32 WITH_SSL=1
|
||||
$(MAKE) -f Makefile.b32 WITH_SSL=1
|
||||
cd ..\src
|
||||
make -f Makefile.b32 WITH_SSL=1
|
||||
$(MAKE) -f Makefile.b32 WITH_SSL=1
|
||||
|
||||
borland-ssl-zlib:
|
||||
cd lib
|
||||
make -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
|
||||
$(MAKE) -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
|
||||
cd ..\src
|
||||
make -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
|
||||
$(MAKE) -f Makefile.b32 WITH_SSL=1 WITH_ZLIB=1
|
||||
|
||||
borland-clean:
|
||||
cd lib
|
||||
make -f Makefile.b32 clean
|
||||
$(MAKE) -f Makefile.b32 clean
|
||||
cd ..\src
|
||||
make -f Makefile.b32 clean
|
||||
$(MAKE) -f Makefile.b32 clean
|
||||
|
||||
watcom:
|
||||
cd lib
|
||||
wmake -f Makefile.Watcom
|
||||
cd ..\src
|
||||
wmake -f Makefile.Watcom
|
||||
watcom: .SYMBOLIC
|
||||
cd lib && $(MAKE) -u -f Makefile.Watcom
|
||||
cd src && $(MAKE) -u -f Makefile.Watcom
|
||||
|
||||
watcom-clean:
|
||||
cd lib
|
||||
wmake -f Makefile.Watcom clean
|
||||
cd ..\src
|
||||
wmake -f Makefile.Watcom clean
|
||||
watcom-clean: .SYMBOLIC
|
||||
cd lib && $(MAKE) -u -f Makefile.Watcom clean
|
||||
cd src && $(MAKE) -u -f Makefile.Watcom clean
|
||||
|
||||
watcom-vclean: .SYMBOLIC
|
||||
cd lib && $(MAKE) -u -f Makefile.Watcom vclean
|
||||
cd src && $(MAKE) -u -f Makefile.Watcom vclean
|
||||
|
||||
mingw32:
|
||||
$(MAKE) -C lib -f Makefile.m32
|
||||
@@ -86,17 +86,21 @@ mingw32-ssh2-ssl-sspi-zlib:
|
||||
$(MAKE) -C lib -f Makefile.m32 SSH2=1 SSL=1 SSPI=1 ZLIB=1
|
||||
$(MAKE) -C src -f Makefile.m32 SSH2=1 SSL=1 SSPI=1 ZLIB=1
|
||||
|
||||
mingw32-rtmp-ssh2-ssl-sspi-zlib:
|
||||
$(MAKE) -C lib -f Makefile.m32 RTMP=1 SSH2=1 SSL=1 SSPI=1 ZLIB=1
|
||||
$(MAKE) -C src -f Makefile.m32 RTMP=1 SSH2=1 SSL=1 SSPI=1 ZLIB=1
|
||||
|
||||
mingw32-clean:
|
||||
$(MAKE) -C lib -f Makefile.m32 clean
|
||||
$(MAKE) -C src -f Makefile.m32 clean
|
||||
|
||||
vc-clean:
|
||||
vc-clean: $(VC)
|
||||
cd lib
|
||||
nmake -f Makefile.$(VC) clean
|
||||
cd ..\src
|
||||
nmake -f Makefile.$(VC) clean
|
||||
|
||||
vc-all:
|
||||
vc-all: $(VC)
|
||||
cd lib
|
||||
nmake -f Makefile.$(VC) cfg=release
|
||||
nmake -f Makefile.$(VC) cfg=release-ssl
|
||||
@@ -121,85 +125,85 @@ vc-all:
|
||||
nmake -f Makefile.$(VC) cfg=debug-dll-zlib-dll
|
||||
nmake -f Makefile.$(VC) cfg=debug-dll-ssl-dll-zlib-dll
|
||||
|
||||
vc:
|
||||
vc: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC)
|
||||
|
||||
vc-x64:
|
||||
vc-x64: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release
|
||||
|
||||
vc-zlib:
|
||||
vc-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib
|
||||
|
||||
vc-ssl:
|
||||
vc-ssl: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl
|
||||
|
||||
vc-ssl-zlib:
|
||||
vc-ssl-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-zlib
|
||||
|
||||
vc-x64-ssl-zlib:
|
||||
vc-x64-ssl-zlib: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) MACHINE=x64 cfg=release-ssl-zlib
|
||||
|
||||
vc-ssl-dll:
|
||||
vc-ssl-dll: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-dll
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-dll
|
||||
|
||||
vc-dll-ssl-dll:
|
||||
vc-dll-ssl-dll: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll
|
||||
|
||||
vc-dll:
|
||||
vc-dll: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-dll
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-dll
|
||||
|
||||
vc-dll-zlib-dll:
|
||||
vc-dll-zlib-dll: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-dll-zlib-dll
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-dll-zlib-dll
|
||||
|
||||
vc-dll-ssl-dll-zlib-dll:
|
||||
vc-dll-ssl-dll-zlib-dll: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll-zlib-dll
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-dll-ssl-dll-zlib-dll
|
||||
|
||||
vc-ssl-dll-zlib-dll:
|
||||
vc-ssl-dll-zlib-dll: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-dll-zlib-dll
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-ssl-dll-zlib-dll
|
||||
|
||||
vc-zlib-dll:
|
||||
vc-zlib-dll: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib-dll
|
||||
cd ..\src
|
||||
nmake /f Makefile.$(VC) cfg=release-zlib-dll
|
||||
|
||||
vc-sspi:
|
||||
vc-sspi: $(VC)
|
||||
cd lib
|
||||
nmake /f Makefile.$(VC) cfg=release WINDOWS_SSPI=1
|
||||
cd ..\src
|
||||
@@ -261,27 +265,40 @@ linux: all
|
||||
|
||||
linux-ssl: ssl
|
||||
|
||||
# We don't need to do anything for vc6.
|
||||
vc6:
|
||||
|
||||
vc8: lib/Makefile.vc8 src/Makefile.vc8
|
||||
|
||||
lib/Makefile.vc8: lib/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/wsock32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" lib/Makefile.vc6 > lib/Makefile.vc8
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" lib/Makefile.vc6 > lib/Makefile.vc8
|
||||
|
||||
src/Makefile.vc8: src/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/wsock32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" src/Makefile.vc6 > src/Makefile.vc8
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" src/Makefile.vc6 > src/Makefile.vc8
|
||||
|
||||
# VC9 makefiles are for use with VS2008
|
||||
vc9: lib/Makefile.vc9 src/Makefile.vc9
|
||||
|
||||
lib/Makefile.vc9: lib/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" lib/Makefile.vc6 > lib/Makefile.vc9
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" lib/Makefile.vc6 > lib/Makefile.vc9
|
||||
|
||||
src/Makefile.vc9: src/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" src/Makefile.vc6 > src/Makefile.vc9
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" src/Makefile.vc6 > src/Makefile.vc9
|
||||
|
||||
# VC10 makefiles are for use with VS2010
|
||||
vc10: lib/Makefile.vc10 src/Makefile.vc10
|
||||
|
||||
lib/Makefile.vc10: lib/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc10/g" -e "s/VC6/VC10/g" lib/Makefile.vc6 > lib/Makefile.vc10
|
||||
|
||||
src/Makefile.vc10: src/Makefile.vc6
|
||||
@echo "generate $@"
|
||||
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/ws2_32.lib/ws2_32.lib/g" -e "s/vc6/vc10/g" -e "s/VC6/VC10/g" src/Makefile.vc6 > src/Makefile.vc10
|
||||
|
||||
ca-bundle: lib/mk-ca-bundle.pl
|
||||
@echo "generate a fresh ca-bundle.crt"
|
||||
|
81
Makefile.msvc.names
Normal file
81
Makefile.msvc.names
Normal file
@@ -0,0 +1,81 @@
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1999 - 2010, 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
|
||||
# are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
#
|
||||
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
# copies of the Software, and permit persons to whom the Software is
|
||||
# furnished to do so, under the terms of the COPYING file.
|
||||
#
|
||||
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
# KIND, either express or implied.
|
||||
#
|
||||
#***************************************************************************
|
||||
|
||||
#
|
||||
# This file is included from MSVC makefiles located in lib and src,
|
||||
# providing libcurl common file names required by these makefiles.
|
||||
#
|
||||
|
||||
# ------------------
|
||||
# libcurl base name
|
||||
# ------------------
|
||||
|
||||
!IF !DEFINED(LIB_NAME) || "$(LIB_NAME)" == ""
|
||||
LIB_NAME = libcurl
|
||||
!ENDIF
|
||||
|
||||
# -------------------------------------------------
|
||||
# libcurl static and dynamic libraries common base
|
||||
# file names for release and debug configurations
|
||||
# -------------------------------------------------
|
||||
|
||||
!IF !DEFINED(LIB_NAME_STA_REL) || "$(LIB_NAME_STA_REL)" == ""
|
||||
LIB_NAME_STA_REL = $(LIB_NAME)
|
||||
!ENDIF
|
||||
|
||||
!IF !DEFINED(LIB_NAME_STA_DBG) || "$(LIB_NAME_STA_DBG)" == ""
|
||||
LIB_NAME_STA_DBG = $(LIB_NAME_STA_REL)d
|
||||
!ENDIF
|
||||
|
||||
!IF !DEFINED(LIB_NAME_DYN_REL) || "$(LIB_NAME_DYN_REL)" == ""
|
||||
LIB_NAME_DYN_REL = $(LIB_NAME)
|
||||
!ENDIF
|
||||
|
||||
!IF !DEFINED(LIB_NAME_DYN_DBG) || "$(LIB_NAME_DYN_DBG)" == ""
|
||||
LIB_NAME_DYN_DBG = $(LIB_NAME_DYN_REL)d
|
||||
!ENDIF
|
||||
|
||||
# --------------------------------------------
|
||||
# Base names for libcurl DLL import libraries
|
||||
# --------------------------------------------
|
||||
|
||||
!IF !DEFINED(LIB_NAME_IMP_REL) || "$(LIB_NAME_IMP_REL)" == ""
|
||||
LIB_NAME_IMP_REL = $(LIB_NAME_DYN_REL)_imp
|
||||
!ENDIF
|
||||
|
||||
!IF !DEFINED(LIB_NAME_IMP_DBG) || "$(LIB_NAME_IMP_DBG)" == ""
|
||||
LIB_NAME_IMP_DBG = $(LIB_NAME_DYN_DBG)_imp
|
||||
!ENDIF
|
||||
|
||||
# --------------------------------------
|
||||
# File names with extension and no path
|
||||
# --------------------------------------
|
||||
|
||||
LIBCURL_STA_LIB_REL = $(LIB_NAME_STA_REL).lib
|
||||
LIBCURL_STA_LIB_DBG = $(LIB_NAME_STA_DBG).lib
|
||||
LIBCURL_DYN_LIB_REL = $(LIB_NAME_DYN_REL).dll
|
||||
LIBCURL_DYN_LIB_DBG = $(LIB_NAME_DYN_DBG).dll
|
||||
LIBCURL_IMP_LIB_REL = $(LIB_NAME_IMP_REL).lib
|
||||
LIBCURL_IMP_LIB_DBG = $(LIB_NAME_IMP_DBG).lib
|
||||
LIBCURL_DYN_LIB_PDB = $(LIB_NAME_IMP_DBG).pdb
|
||||
|
||||
# End of Makefile.msvc.names
|
@@ -1,51 +1,54 @@
|
||||
Curl and libcurl 7.20.1
|
||||
Curl and libcurl 7.21.4
|
||||
|
||||
Public curl releases: 115
|
||||
Command line options: 136
|
||||
curl_easy_setopt() options: 174
|
||||
Public curl releases: 120
|
||||
Command line options: 143
|
||||
curl_easy_setopt() options: 185
|
||||
Public functions in libcurl: 58
|
||||
Known libcurl bindings: 39
|
||||
Contributors: 776
|
||||
Contributors: 834
|
||||
|
||||
This release includes the following changes:
|
||||
|
||||
o The 'ares' subtree has been removed from the source repository
|
||||
o smoother rate limiting
|
||||
o allow user+password in the URL for all protocols
|
||||
o POP3: Get message listing if no mailbox in URL
|
||||
o CURLINFO_FTP_ENTRY_PATH now supports SFTP
|
||||
o introduced new framework for unit-testing
|
||||
o IDN: use win32 API if told to
|
||||
o ares: ask for both IPv4 and IPv6 addresses
|
||||
o HTTP: do Negotiate authentication using SSPI on windows
|
||||
o Windows build: alternative makefile
|
||||
o TLS-SRP: support added when using GnuTLS
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
o VMS builder bad behavior when used in a batch job
|
||||
o multiple recepients with SMTP
|
||||
o fixed the CURL_FORMAT_* defines when building with cmake
|
||||
o missing quote in libcurl.m4
|
||||
o SMTP: now waits for 250 after the DATA transfer
|
||||
o SMTP: use angle brackets in RCPT TO
|
||||
o curl --trace-time not using local time
|
||||
o off-by-one in the chunked encoding trailer parser
|
||||
o superfluous blocking for OpenSSL-based SSL connects and multi interface
|
||||
o TFTP upload
|
||||
o FTP timeouts after file transferred completely
|
||||
o skip poll() on Interix
|
||||
o CURLOPT_CERTINFO memory leak
|
||||
o sub-second timeouts improvements
|
||||
o configure fixes for GSSAPI
|
||||
o threaded resolver double free when closing curl handle
|
||||
o configure fixes for building with the clang compiler
|
||||
o easy interix rate limiting logic
|
||||
o curl_multi_remove_handle() caused use after free
|
||||
o TFTP improved error codes
|
||||
o TFTP fixed TSIZE handling for uploads
|
||||
o SSL possible double free when reusing curl handle
|
||||
o alarm()-based DNS timeout bug
|
||||
o re-used FTP connection multi interface crash
|
||||
o chunked-encoding with Content-Length: header problem
|
||||
o multi interface HTTP POST over a proxy using PROXYTUNNEL
|
||||
o RTSP GET_PARAMETER
|
||||
o timeout after last data chunk was handled
|
||||
o SFTP download hang
|
||||
o FTP quote commands prefixed with '*' now can fail without aborting
|
||||
o SMTP: add brackets for MAIL FROM
|
||||
o ossl_seed: no more RAND_screen (on Windows)
|
||||
o multi: connect fail => use next IP address
|
||||
o use the timeout when using multiple IP addresses similar to how
|
||||
the easy interface does it
|
||||
o cookies: tricked dotcounter fixed
|
||||
o pubkey_show: allocate buffer to fit any-size result
|
||||
o Curl_nss_connect: avoid PATH_MAX
|
||||
o Curl_do: avoid using stale conn pointer
|
||||
o tftpd test server: avoid buffer overflow report from glibc
|
||||
o nss: avoid CURLE_OUT_OF_MEMORY given a file name without any slash
|
||||
o nss: fix a bug in handling of CURLOPT_CAPATH
|
||||
o CMake: Use upstream CheckTypeSize module
|
||||
o OpenSSL get_cert_chain: support larger data sets
|
||||
o SCP/SFTP transfers: acknowledge speedcheck
|
||||
o GnuTLS builds: fix memory leak
|
||||
o connect problem: use UDP correctly
|
||||
o Borland C++ makefile tweaks
|
||||
o OpenSSL: improved error message on SSL_CTX_new failures
|
||||
o HTTP: memory leak on multiple Location:
|
||||
o ares_query_completed_cb: don't touch invalid data
|
||||
o ares: memory leak fix
|
||||
o mk-ca-bundle: use new cacert url
|
||||
o Curl_gmtime: added a portable gmtime and check for NULL
|
||||
o curl.1: typo in -v description
|
||||
o CURLOPT_SOCKOPTFUNCTION: return proper error code
|
||||
o --keepalive-time: warn if not supported properly
|
||||
o file: add support for CURLOPT_TIMECONDITION
|
||||
o nss: avoid memory leaks and failure of NSS shutdown
|
||||
o multi: fix CURLM_STATE_TOOFAST for multi_socket
|
||||
|
||||
This release includes the following known bugs:
|
||||
|
||||
@@ -54,11 +57,11 @@ This release includes the following known bugs:
|
||||
This release would not have looked like this without help, code, reports and
|
||||
advice from friends like these:
|
||||
|
||||
Steven M. Schweda, Yang Tse, Jack Zhang, Tom Donovan, Martin Hager,
|
||||
Daniel Fandrich, Patrick Monnerat, Pat Ray, Wesley Miaw, Ben Greear,
|
||||
Ryan Chan, Markus Duft, Andrei Benea, Jacob Moshenko, Daniel Johnson,
|
||||
Constantine Sapuntzakis, Douglas Steinwand, Thomas Lopatic, Hauke Duden,
|
||||
Akos Pasztory, Kenny To, Christopher Conroy, Massimo Callegari,
|
||||
Bob Richmond, Matt Wixson
|
||||
Amr Shahin, Andreas Olsson, Bjoern Sikora, Brad Hards, Brad King,
|
||||
Dan Fandrich, Daniel Mentz, Darshan Mody, Dave Reisner, Eric Hu,
|
||||
Guenter Knauf, Ian D Allen, John Bradshaw, Julien Chaffraix, Kamil Dudka,
|
||||
Luke Amery, Marcel Roelofs, Martin Lemke, Nicholas Maniscalco,
|
||||
Pasha Kuznetsov, Patrick Monnerat, Paul Howarth, Pedro Larroy, Pierre Joye,
|
||||
Quinn Slack, Samuel Thibault, Tommie Gannert, Vsevolod Novikov, Yang Tse
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
||||
|
10
TODO-RELEASE
10
TODO-RELEASE
@@ -1,4 +1,10 @@
|
||||
To be addressed in 7.20.1 (planned release: April 2010)
|
||||
To be addressed in 7.21.3
|
||||
=========================
|
||||
|
||||
261 -
|
||||
263 - Support binding DNS to local interface/IP
|
||||
|
||||
265 - 1. FTP cmd channel and data channel validation
|
||||
|
||||
267 - 2. Cert chain for data channel
|
||||
|
||||
271 -
|
||||
|
44
acinclude.m4
44
acinclude.m4
@@ -2145,6 +2145,7 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
|
||||
else
|
||||
LIBS="$curl_cv_gclk_LIBS $curl_cv_save_LIBS"
|
||||
fi
|
||||
CURL_LIBS="$CURL_LIBS $curl_cv_gclk_LIBS"
|
||||
AC_MSG_RESULT([$curl_cv_gclk_LIBS])
|
||||
ac_cv_func_clock_gettime="yes"
|
||||
;;
|
||||
@@ -3180,7 +3181,7 @@ AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [
|
||||
;;
|
||||
win32_small_files)
|
||||
AC_MSG_RESULT([yes (large file disabled)])
|
||||
AC_DEFINE_UNQUOTED(USE_WIN32_LARGE_FILES, 1,
|
||||
AC_DEFINE_UNQUOTED(USE_WIN32_SMALL_FILES, 1,
|
||||
[Define to 1 if you are building a Windows target without large file support.])
|
||||
;;
|
||||
*)
|
||||
@@ -3245,3 +3246,44 @@ AC_DEFUN([CURL_CHECK_PKGCONFIG], [
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_GENERATE_CONFIGUREHELP_PM
|
||||
dnl -------------------------------------------------
|
||||
dnl Generate test harness configurehelp.pm module, defining and
|
||||
dnl initializing some perl variables with values which are known
|
||||
dnl when the configure script runs. For portability reasons, test
|
||||
dnl harness needs information on how to run the C preprocessor.
|
||||
|
||||
AC_DEFUN([CURL_GENERATE_CONFIGUREHELP_PM], [
|
||||
AC_REQUIRE([AC_PROG_CPP])dnl
|
||||
tmp_cpp=`eval echo "$ac_cpp" 2>/dev/null`
|
||||
if test -z "$tmp_cpp"; then
|
||||
tmp_cpp='cpp'
|
||||
fi
|
||||
cat >./tests/configurehelp.pm <<_EOF
|
||||
[@%:@] This is a generated file. Do not edit.
|
||||
|
||||
package configurehelp;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Exporter;
|
||||
|
||||
use vars qw(
|
||||
@ISA
|
||||
@EXPORT_OK
|
||||
\$Cpreprocessor
|
||||
);
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
|
||||
@EXPORT_OK = qw(
|
||||
\$Cpreprocessor
|
||||
);
|
||||
|
||||
\$Cpreprocessor = '$tmp_cpp';
|
||||
|
||||
1;
|
||||
_EOF
|
||||
])
|
||||
|
26
buildconf
26
buildconf
@@ -6,7 +6,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2010, 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
|
||||
@@ -33,6 +33,17 @@ die(){
|
||||
findtool(){
|
||||
file="$1"
|
||||
|
||||
if { echo $file | grep "/" >/dev/null 2>&1; } then
|
||||
# we only check for the explicit file name if the file is given
|
||||
# including a slash. Use ./ for current dir. Previously this would
|
||||
# otherwise always cause findtool to search the local dir first, which
|
||||
# is wrong.
|
||||
if test -f "$file"; then
|
||||
echo "$file"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
old_IFS=$IFS; IFS=':'
|
||||
for path in $PATH
|
||||
do
|
||||
@@ -237,13 +248,17 @@ fi
|
||||
#--------------------------------------------------------------------------
|
||||
# m4 check
|
||||
#
|
||||
m4=`${M4:-m4} --version 2>/dev/null|head -n 1`;
|
||||
m4=`(${M4:-m4} --version || ${M4:-gm4} --version) 2>/dev/null | head -n 1`;
|
||||
m4_version=`echo $m4 | sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//'`
|
||||
|
||||
if { echo $m4 | grep "GNU" >/dev/null 2>&1; } then
|
||||
echo "buildconf: GNU m4 version $m4_version (ok)"
|
||||
else
|
||||
if test -z "$m4"; then
|
||||
echo "buildconf: m4 version not recognized. You need a GNU m4 installed!"
|
||||
else
|
||||
echo "buildconf: m4 version $m4 found. You need a GNU m4 installed!"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -278,6 +293,7 @@ for fname in .deps \
|
||||
config.status \
|
||||
config.sub \
|
||||
configure \
|
||||
configurehelp.pm \
|
||||
curl-config \
|
||||
curlbuild.h \
|
||||
depcomp \
|
||||
@@ -349,6 +365,12 @@ if test ! -f ./config.guess; then
|
||||
else
|
||||
buildhost=`./config.guess 2>/dev/null|head -n 1`
|
||||
case $buildhost in
|
||||
*-*-darwin*)
|
||||
need_lt_major=1
|
||||
need_lt_minor=5
|
||||
need_lt_patch=26
|
||||
need_lt_check="yes"
|
||||
;;
|
||||
*-*-hpux*)
|
||||
need_lt_major=1
|
||||
need_lt_minor=5
|
||||
|
516
configure.ac
516
configure.ac
@@ -5,7 +5,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2011, 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
|
||||
@@ -24,7 +24,7 @@ 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/])
|
||||
|
||||
CURL_OVERRIDE_AUTOCONF
|
||||
|
||||
@@ -40,6 +40,7 @@ AM_MAINTAINER_MODE
|
||||
CURL_CHECK_OPTION_DEBUG
|
||||
CURL_CHECK_OPTION_OPTIMIZE
|
||||
CURL_CHECK_OPTION_WARNINGS
|
||||
CURL_CHECK_OPTION_WERROR
|
||||
CURL_CHECK_OPTION_CURLDEBUG
|
||||
CURL_CHECK_OPTION_ARES
|
||||
|
||||
@@ -51,33 +52,48 @@ CURL_CHECK_PATH_SEPARATOR_REQUIRED
|
||||
CONFIGURE_OPTIONS="\"$ac_configure_args\""
|
||||
AC_SUBST(CONFIGURE_OPTIONS)
|
||||
|
||||
CURL_CFLAG_EXTRAS=""
|
||||
if test X"$want_werror" = Xyes; then
|
||||
CURL_CFLAG_EXTRAS="-Werror"
|
||||
fi
|
||||
AC_SUBST(CURL_CFLAG_EXTRAS)
|
||||
|
||||
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],
|
||||
if test -z "$SED"; then
|
||||
dnl allow it to be overridden
|
||||
AC_PATH_PROG([SED], [sed], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
if test -z "$SED" || test "$SED" = "not_found"; then
|
||||
if test -z "$SED" || test "$SED" = "not_found"; then
|
||||
AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
|
||||
fi
|
||||
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],
|
||||
if test -z "$GREP"; then
|
||||
dnl allow it to be overridden
|
||||
AC_PATH_PROG([GREP], [grep], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
if test -z "$GREP" || test "$GREP" = "not_found"; then
|
||||
if test -z "$GREP" || test "$GREP" = "not_found"; then
|
||||
AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
|
||||
fi
|
||||
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
|
||||
if test -z "$EGREP"; then
|
||||
dnl allow it to be overridden
|
||||
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
|
||||
else
|
||||
AC_PATH_PROG([EGREP], [egrep], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
fi
|
||||
fi
|
||||
if test -z "$EGREP" || test "$EGREP" = "not_found"; then
|
||||
AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
|
||||
@@ -86,10 +102,13 @@ AC_SUBST([EGREP])
|
||||
|
||||
dnl AR is mandatory for configure process and libtool.
|
||||
dnl This is target dependent, so check it as a tool.
|
||||
AC_PATH_TOOL([AR], [ar], [not_found],
|
||||
if test -z "$AR"; then
|
||||
dnl allow it to be overridden
|
||||
AC_PATH_TOOL([AR], [ar], [not_found],
|
||||
[$PATH:/usr/bin:/usr/local/bin])
|
||||
if test -z "$AR" || test "$AR" = "not_found"; then
|
||||
if test -z "$AR" || test "$AR" = "not_found"; then
|
||||
AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([AR])
|
||||
|
||||
@@ -121,13 +140,14 @@ AC_SUBST(PKGADD_VENDOR)
|
||||
|
||||
dnl
|
||||
dnl initialize all the info variables
|
||||
curl_ssl_msg="no (--with-ssl / --with-gnutls / --with-nss)"
|
||||
curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl,axtls} )"
|
||||
curl_ssh_msg="no (--with-libssh2)"
|
||||
curl_zlib_msg="no (--with-zlib)"
|
||||
curl_krb4_msg="no (--with-krb4*)"
|
||||
curl_gss_msg="no (--with-gssapi)"
|
||||
curl_spnego_msg="no (--with-spnego)"
|
||||
curl_ares_msg="no (--enable-ares)"
|
||||
curl_tls_srp_msg="no (--enable-tls-srp)"
|
||||
curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
|
||||
curl_ipv6_msg="no (--enable-ipv6)"
|
||||
curl_idn_msg="no (--with-libidn)"
|
||||
curl_manual_msg="no (--enable-manual)"
|
||||
@@ -136,6 +156,8 @@ curl_verbose_msg="enabled (--disable-verbose)"
|
||||
curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
|
||||
curl_ldaps_msg="no (--enable-ldaps)"
|
||||
curl_rtsp_msg="no (--enable-rtsp)"
|
||||
curl_rtmp_msg="no (--with-librtmp)"
|
||||
init_ssl_msg=${curl_ssl_msg}
|
||||
|
||||
dnl
|
||||
dnl Save anything in $LIBS for later
|
||||
@@ -208,6 +230,9 @@ case $host in
|
||||
esac
|
||||
AC_MSG_RESULT($mimpure)
|
||||
AM_CONDITIONAL(MIMPURE, test x$mimpure = xyes)
|
||||
|
||||
dnl 'STATICLIB' is, in spite of its name, not generic but only for static-only
|
||||
dnl builds on Windows
|
||||
AM_CONDITIONAL(STATICLIB, false)
|
||||
|
||||
AC_MSG_CHECKING([if we need BUILDING_LIBCURL])
|
||||
@@ -369,29 +394,11 @@ AC_HELP_STRING([--disable-ldap],[Disable LDAP support]),
|
||||
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
|
||||
AC_SUBST(CURL_DISABLE_LDAP, [1])
|
||||
;;
|
||||
*)
|
||||
case $host in
|
||||
*-*-cygwin*)
|
||||
# Force no ldap. config/build process is broken for cygwin
|
||||
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
|
||||
AC_SUBST(CURL_DISABLE_LDAP, [1])
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(yes)
|
||||
esac
|
||||
;;
|
||||
esac ],[
|
||||
case $host in
|
||||
*-*-cygwin*)
|
||||
# Force no ldap. config/build process is broken for cygwin
|
||||
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
|
||||
AC_SUBST(CURL_DISABLE_LDAP, [1])
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(yes)
|
||||
esac ]
|
||||
AC_MSG_RESULT(yes) ]
|
||||
)
|
||||
AC_MSG_CHECKING([whether to support ldaps])
|
||||
AC_ARG_ENABLE(ldaps,
|
||||
@@ -403,20 +410,26 @@ AC_HELP_STRING([--disable-ldaps],[Disable LDAPS support]),
|
||||
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
|
||||
AC_SUBST(CURL_DISABLE_LDAPS, [1])
|
||||
;;
|
||||
*) if test x$CURL_DISABLE_LDAP = x1 ; then
|
||||
AC_MSG_RESULT(LDAP support needs to be enabled in order to enable LDAPS support!)
|
||||
*) if test "x$CURL_DISABLE_LDAP" = "x1" ; then
|
||||
AC_MSG_RESULT(LDAP needs to be enabled to support LDAPS)
|
||||
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
|
||||
AC_SUBST(CURL_DISABLE_LDAPS, [1])
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
|
||||
curl_ldaps_msg="enabled"
|
||||
AC_SUBST(HAVE_LDAP_SSL, [1])
|
||||
fi
|
||||
;;
|
||||
esac ],
|
||||
esac ],[
|
||||
if test "x$CURL_DISABLE_LDAP" = "x1" ; then
|
||||
AC_MSG_RESULT(no)
|
||||
AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
|
||||
AC_SUBST(CURL_DISABLE_LDAPS, [1])
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
|
||||
AC_SUBST(HAVE_LDAP_SSL, [1])
|
||||
fi ]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([whether to support rtsp])
|
||||
@@ -557,6 +570,22 @@ AC_HELP_STRING([--disable-smtp],[Disable SMTP support]),
|
||||
AC_MSG_RESULT(yes)
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([whether to support gopher])
|
||||
AC_ARG_ENABLE(gopher,
|
||||
AC_HELP_STRING([--enable-gopher],[Enable Gopher support])
|
||||
AC_HELP_STRING([--disable-gopher],[Disable Gopher support]),
|
||||
[ case "$enableval" in
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable Gopher])
|
||||
AC_SUBST(CURL_DISABLE_GOPHER, [1])
|
||||
;;
|
||||
*) AC_MSG_RESULT(yes)
|
||||
;;
|
||||
esac ],
|
||||
AC_MSG_RESULT(yes)
|
||||
)
|
||||
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Check for built-in manual
|
||||
@@ -751,6 +780,8 @@ ac_cv_func_strcasecmp="no"
|
||||
|
||||
CURL_CHECK_LIBS_CONNECT
|
||||
|
||||
CURL_NETWORK_LIBS=$LIBS
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl In case that function clock_gettime with monotonic timer is available,
|
||||
dnl check for additional required libraries.
|
||||
@@ -801,13 +832,11 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
|
||||
CURL_CHECK_HEADER_LDAP_SSL
|
||||
|
||||
if test -z "$LDAPLIBNAME" ; then
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32*)
|
||||
dnl Windows uses a single and unique OpenLDAP DLL name
|
||||
if test "$ac_cv_native_windows" = "yes"; then
|
||||
dnl Windows uses a single and unique LDAP library name
|
||||
LDAPLIBNAME="wldap32"
|
||||
LBERLIBNAME="no"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$LDAPLIBNAME" ; then
|
||||
@@ -849,19 +878,22 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
|
||||
fi
|
||||
|
||||
if test x$CURL_DISABLE_LDAP != x1 ; then
|
||||
AC_CHECK_FUNCS([ldap_url_parse])
|
||||
AC_CHECK_FUNCS([ldap_url_parse ldap_init_fd])
|
||||
|
||||
if test "$LDAPLIBNAME" = "wldap32"; then
|
||||
curl_ldap_msg="enabled (winldap)"
|
||||
AC_DEFINE(CURL_LDAP_WIN, 1, [Use W$ LDAP implementation])
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-pw32*)
|
||||
AC_DEFINE(CURL_LDAP_HYBRID, 1, [W$ LDAP with non-W$ compiler])
|
||||
;;
|
||||
esac
|
||||
AC_DEFINE(CURL_LDAP_WIN, 1, [Use Windows LDAP implementation])
|
||||
else
|
||||
curl_ldap_msg="enabled (OpenLDAP)"
|
||||
if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
|
||||
AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code])
|
||||
AC_SUBST(USE_OPENLDAP, [1])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$CURL_DISABLE_LDAPS != x1 ; then
|
||||
curl_ldaps_msg="enabled"
|
||||
fi
|
||||
|
||||
dnl **********************************************************************
|
||||
@@ -925,16 +957,19 @@ dnl Check if the operating system allows programs to write to their own argv[]
|
||||
dnl **********************************************************************
|
||||
|
||||
AC_MSG_CHECKING([if argv can be written to])
|
||||
AC_CACHE_VAL(curl_cv_writable_argv, [
|
||||
AC_RUN_IFELSE([[
|
||||
AC_RUN_IFELSE([
|
||||
AC_LANG_SOURCE([[
|
||||
int main(int argc, char ** argv) {
|
||||
argv[0][0] = ' ';
|
||||
return (argv[0][0] == ' ')?0:1;
|
||||
}
|
||||
]],
|
||||
curl_cv_writable_argv=yes,
|
||||
curl_cv_writable_argv=no,
|
||||
curl_cv_writable_argv=cross)
|
||||
]])
|
||||
],[
|
||||
curl_cv_writable_argv=yes
|
||||
],[
|
||||
curl_cv_writable_argv=no
|
||||
],[
|
||||
curl_cv_writable_argv=cross
|
||||
])
|
||||
case $curl_cv_writable_argv in
|
||||
yes)
|
||||
@@ -1137,10 +1172,17 @@ if test x"$want_gss" = xyes; then
|
||||
],
|
||||
[
|
||||
dnl not found, check Heimdal or MIT
|
||||
AC_CHECK_HEADERS([gssapi/gssapi.h], [], [not_mit=1])
|
||||
AC_CHECK_HEADERS(
|
||||
[gssapi/gssapi.h gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
|
||||
[gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
|
||||
[],
|
||||
[not_mit=1])
|
||||
[not_mit=1],
|
||||
[
|
||||
AC_INCLUDES_DEFAULT
|
||||
#ifdef HAVE_GSSAPI_GSSAPI_H
|
||||
#include <gssapi/gssapi.h>
|
||||
#endif
|
||||
])
|
||||
if test "x$not_mit" = "x1"; then
|
||||
dnl MIT not found, check for Heimdal
|
||||
AC_CHECK_HEADER(gssapi.h,
|
||||
@@ -1699,6 +1741,115 @@ if test "$OPENSSL_ENABLED" != "1"; then
|
||||
|
||||
fi dnl OPENSSL != 1
|
||||
|
||||
dnl ---
|
||||
dnl If GnuTLS is enabled, we MUST verify that it uses libgcrypt since
|
||||
dnl curl code relies on that but recent GnuTLS versions can in fact build
|
||||
dnl with different crypto libraries which curl right now cannot handle
|
||||
dnl ---
|
||||
|
||||
if test "$GNUTLS_ENABLED" = "1"; then
|
||||
AC_CHECK_LIB(gcrypt,
|
||||
gcry_control, ,
|
||||
[
|
||||
AC_MSG_ERROR([need GnuTLS built with gcrypt to function with GnuTLS])
|
||||
])
|
||||
fi
|
||||
|
||||
dnl ---
|
||||
dnl We require GnuTLS with SRP support.
|
||||
dnl ---
|
||||
if test "$GNUTLS_ENABLED" = "1"; then
|
||||
AC_CHECK_LIB(gnutls, gnutls_srp_verifier,
|
||||
[
|
||||
AC_DEFINE(HAVE_GNUTLS_SRP, 1, [if you have the function gnutls_srp_verifier])
|
||||
AC_SUBST(HAVE_GNUTLS_SRP, [1])
|
||||
])
|
||||
fi
|
||||
|
||||
dnl ----------------------------------------------------
|
||||
dnl check for PolarSSL
|
||||
dnl ----------------------------------------------------
|
||||
|
||||
dnl Default to compiler & linker defaults for PolarSSL files & libraries.
|
||||
OPT_POLARSSL=no
|
||||
|
||||
_cppflags=$CPPFLAGS
|
||||
_ldflags=$LDFLAGS
|
||||
AC_ARG_WITH(polarssl,dnl
|
||||
AC_HELP_STRING([--with-polarssl=PATH],[where to look for PolarSSL, PATH points to the installation root (default: /usr/local/)])
|
||||
AC_HELP_STRING([--without-polarssl], [disable PolarSSL detection]),
|
||||
OPT_POLARSSL=$withval)
|
||||
|
||||
if test "$OPENSSL_ENABLED" != "1"; then
|
||||
|
||||
if test X"$OPT_POLARSSL" != Xno; then
|
||||
|
||||
if test "$OPT_POLARSSL" = "yes"; then
|
||||
OPT_POLARSSL=""
|
||||
fi
|
||||
|
||||
if test -z "$OPT_POLARSSL" ; then
|
||||
dnl check for lib first without setting any new path
|
||||
|
||||
AC_CHECK_LIB(polarssl, havege_init,
|
||||
dnl libpolarssl found, set the variable
|
||||
[
|
||||
AC_DEFINE(USE_POLARSSL, 1, [if PolarSSL is enabled])
|
||||
AC_SUBST(USE_POLARSSL, [1])
|
||||
POLARSSL_ENABLED=1
|
||||
USE_POLARSSL="yes"
|
||||
curl_ssl_msg="enabled (PolarSSL)"
|
||||
])
|
||||
fi
|
||||
|
||||
if test "x$USE_POLARSSL" != "xyes"; then
|
||||
dnl add the path and test again
|
||||
addld=-L$OPT_POLARSSL/lib$libsuff
|
||||
addcflags=-I$OPT_POLARSSL/include
|
||||
polarssllib=$OPT_POLARSSL/lib$libsuff
|
||||
|
||||
LDFLAGS="$LDFLAGS $addld"
|
||||
if test "$addcflags" != "-I/usr/include"; then
|
||||
CPPFLAGS="$CPPFLAGS $addcflags"
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(polarssl, ssl_init,
|
||||
[
|
||||
AC_DEFINE(USE_POLARSSL, 1, [if PolarSSL is enabled])
|
||||
AC_SUBST(USE_POLARSSL, [1])
|
||||
POLARSSL_ENABLED=1
|
||||
USE_POLARSSL="yes"
|
||||
curl_ssl_msg="enabled (PolarSSL)"
|
||||
],
|
||||
[
|
||||
CPPFLAGS=$_cppflags
|
||||
LDFLAGS=$_ldflags
|
||||
])
|
||||
fi
|
||||
|
||||
if test "x$USE_POLARSSL" = "xyes"; then
|
||||
AC_MSG_NOTICE([detected PolarSSL])
|
||||
|
||||
CURL_LIBS="$CURL_LIBS -lpolarssl"
|
||||
LIBS="$LIBS -lpolarssl"
|
||||
|
||||
if test -n "$polarssllib"; then
|
||||
dnl when shared libs were found in a path that the run-time
|
||||
dnl linker doesn't search through, we need to add it to
|
||||
dnl LD_LIBRARY_PATH to prevent further configure tests to fail
|
||||
dnl due to this
|
||||
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$polarssllib"
|
||||
export LD_LIBRARY_PATH
|
||||
AC_MSG_NOTICE([Added $polarssllib to LD_LIBRARY_PATH])
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
fi dnl PolarSSL not disabled
|
||||
|
||||
fi dnl OPENSSL != 1
|
||||
|
||||
dnl ----------------------------------------------------
|
||||
dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
|
||||
dnl ----------------------------------------------------
|
||||
@@ -1795,9 +1946,64 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
|
||||
|
||||
fi dnl OPENSSL != 1 -a GNUTLS_ENABLED != 1
|
||||
|
||||
if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED" = "x"; then
|
||||
OPT_AXTLS=off
|
||||
|
||||
AC_ARG_WITH(axtls,dnl
|
||||
AC_HELP_STRING([--with-axtls=PATH],[Where to look for axTLS, PATH points to the axTLS installation prefix (default: /usr/local). Ignored if another SSL engine is selected.])
|
||||
AC_HELP_STRING([--without-axtls], [disable axTLS]),
|
||||
OPT_AXTLS=$withval)
|
||||
|
||||
if test "$curl_ssl_msg" = "$init_ssl_msg"; then
|
||||
if test X"$OPT_AXTLS" != Xno; then
|
||||
dnl backup the pre-axtls variables
|
||||
CLEANLDFLAGS="$LDFLAGS"
|
||||
CLEANCPPFLAGS="$CPPFLAGS"
|
||||
CLEANLIBS="$LIBS"
|
||||
|
||||
case "$OPT_AXTLS" in
|
||||
yes)
|
||||
dnl --with-axtls (without path) used
|
||||
PREFIX_AXTLS=/usr/local
|
||||
LIB_AXTLS="$PREFIX_AXTLS/lib"
|
||||
LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
|
||||
CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
|
||||
;;
|
||||
off)
|
||||
dnl no --with-axtls option given, just check default places
|
||||
PREFIX_AXTLS=
|
||||
;;
|
||||
*)
|
||||
dnl check the given --with-axtls spot
|
||||
PREFIX_AXTLS=$OPT_AXTLS
|
||||
LIB_AXTLS="$PREFIX_AXTLS/lib"
|
||||
LDFLAGS="$LDFLAGS -L$LIB_AXTLS"
|
||||
CPPFLAGS="$CPPFLAGS -I$PREFIX_AXTLS/include"
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_CHECK_LIB(axtls, ssl_version,[
|
||||
LIBS="-laxtls $LIBS"
|
||||
AC_DEFINE(USE_AXTLS, 1, [if axTLS is enabled])
|
||||
AC_SUBST(USE_AXTLS, [1])
|
||||
AXTLS_ENABLED=1
|
||||
USE_AXTLS="yes"
|
||||
curl_ssl_msg="enabled (axTLS)"
|
||||
|
||||
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_AXTLS"
|
||||
export LD_LIBRARY_PATH
|
||||
AC_MSG_NOTICE([Added $LIB_AXTLS to LD_LIBRARY_PATH])
|
||||
],[
|
||||
LDFLAGS="$CLEANLDFLAGS"
|
||||
CPPFLAGS="$CLEANCPPFLAGS"
|
||||
LIBS="$CLEANLIBS"
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$AXTLS_ENABLED" = "x"; then
|
||||
AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
|
||||
AC_MSG_WARN([Use --with-ssl, --with-gnutls or --with-nss to address this.])
|
||||
AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-nss or --with-axtls to address this.])
|
||||
else
|
||||
# SSL is enabled, genericly
|
||||
AC_SUBST(SSL_ENABLED)
|
||||
@@ -1882,7 +2088,11 @@ if test X"$OPT_LIBSSH2" != Xno; then
|
||||
dnl to prevent further configure tests to fail due to this
|
||||
|
||||
dnl libssh2_version is a post 1.0 addition
|
||||
AC_CHECK_FUNCS( libssh2_version )
|
||||
dnl libssh2_init and libssh2_exit were added in 1.2.5
|
||||
dnl libssh2_scp_send64 was added in 1.2.6
|
||||
dnl libssh2_session_handshake was added in 1.2.8
|
||||
AC_CHECK_FUNCS( libssh2_version libssh2_init libssh2_exit \
|
||||
libssh2_scp_send64 libssh2_session_handshake)
|
||||
|
||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
|
||||
export LD_LIBRARY_PATH
|
||||
@@ -1896,6 +2106,84 @@ if test X"$OPT_LIBSSH2" != Xno; then
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Check for the presence of LIBRTMP libraries and headers
|
||||
dnl **********************************************************************
|
||||
|
||||
dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
|
||||
OPT_LIBRTMP=off
|
||||
AC_ARG_WITH(librtmp,dnl
|
||||
AC_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation (default: /usr/local/lib); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
|
||||
AC_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
|
||||
OPT_LIBRTMP=$withval)
|
||||
|
||||
if test X"$OPT_LIBRTMP" != Xno; then
|
||||
dnl backup the pre-librtmp variables
|
||||
CLEANLDFLAGS="$LDFLAGS"
|
||||
CLEANCPPFLAGS="$CPPFLAGS"
|
||||
CLEANLIBS="$LIBS"
|
||||
|
||||
case "$OPT_LIBRTMP" in
|
||||
yes)
|
||||
dnl --with-librtmp (without path) used
|
||||
CURL_CHECK_PKGCONFIG(librtmp)
|
||||
|
||||
if test "$PKGCONFIG" != "no" ; then
|
||||
LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp`
|
||||
LD_RTMP=`$PKGCONFIG --libs-only-L librtmp`
|
||||
CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp`
|
||||
version=`$PKGCONFIG --modversion librtmp`
|
||||
DIR_RTMP=`echo $LD_RTMP | $SED -e 's/-L//'`
|
||||
else
|
||||
dnl To avoid link errors, we do not allow --librtmp without
|
||||
dnl a pkgconfig file
|
||||
AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.])
|
||||
fi
|
||||
|
||||
;;
|
||||
off)
|
||||
dnl no --with-librtmp option given, just check default places
|
||||
LIB_RTMP="-lrtmp"
|
||||
;;
|
||||
*)
|
||||
dnl use the given --with-librtmp spot
|
||||
PREFIX_RTMP=$OPT_LIBRTMP
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl if given with a prefix, we set -L and -I based on that
|
||||
if test -n "$PREFIX_RTMP"; then
|
||||
LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff
|
||||
CPP_RTMP=-I${PREFIX_RTMP}/include
|
||||
DIR_RTMP=${PREFIX_RTMP}/lib$libsuff
|
||||
fi
|
||||
|
||||
LDFLAGS="$LDFLAGS $LD_RTMP"
|
||||
CPPFLAGS="$CPPFLAGS $CPP_RTMP"
|
||||
LIBS="$LIBS $LIB_RTMP"
|
||||
|
||||
AC_CHECK_LIB(rtmp, RTMP_Init,
|
||||
[
|
||||
AC_CHECK_HEADERS(librtmp/rtmp.h,
|
||||
curl_rtmp_msg="enabled (librtmp)"
|
||||
LIBRTMP_ENABLED=1
|
||||
AC_DEFINE(USE_LIBRTMP, 1, [if librtmp is in use])
|
||||
AC_SUBST(USE_LIBRTMP, [1])
|
||||
)
|
||||
],
|
||||
dnl not found, revert back to clean variables
|
||||
LDFLAGS=$CLEANLDFLAGS
|
||||
CPPFLAGS=$CLEANCPPFLAGS
|
||||
LIBS=$CLEANLIBS
|
||||
)
|
||||
|
||||
if test X"$OPT_LIBRTMP" != Xoff &&
|
||||
test "$LIBRTMP_ENABLED" != "1"; then
|
||||
AC_MSG_ERROR([librtmp libs and/or directories were not found where specified!])
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Check for the presence of IDN libraries and headers
|
||||
dnl **********************************************************************
|
||||
@@ -2065,11 +2353,17 @@ AC_CHECK_TYPE(long long,
|
||||
|
||||
if test "xyes" = "x$longlong"; then
|
||||
AC_MSG_CHECKING([if numberLL works])
|
||||
AC_COMPILE_IFELSE([long long val = 1000LL;],
|
||||
[AC_DEFINE(HAVE_LL, 1, [if your compiler supports LL])]
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
long long val = 1000LL;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_LL, 1, [if your compiler supports LL])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
fi
|
||||
|
||||
|
||||
@@ -2116,6 +2410,7 @@ CURL_CHECK_FUNC_FCNTL
|
||||
CURL_CHECK_FUNC_FDOPEN
|
||||
CURL_CHECK_FUNC_FREEADDRINFO
|
||||
CURL_CHECK_FUNC_FREEIFADDRS
|
||||
CURL_CHECK_FUNC_FSETXATTR
|
||||
CURL_CHECK_FUNC_FTRUNCATE
|
||||
CURL_CHECK_FUNC_GETADDRINFO
|
||||
CURL_CHECK_FUNC_GETHOSTBYADDR
|
||||
@@ -2156,10 +2451,6 @@ CURL_CHECK_FUNC_STRTOK_R
|
||||
CURL_CHECK_FUNC_STRTOLL
|
||||
CURL_CHECK_FUNC_WRITEV
|
||||
|
||||
dnl Checks for library functions.
|
||||
dnl AC_PROG_GCC_TRADITIONAL
|
||||
|
||||
dnl AC_FUNC_VPRINTF
|
||||
case $host in
|
||||
*msdosdjgpp)
|
||||
ac_cv_func_pipe=no
|
||||
@@ -2282,6 +2573,36 @@ AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
|
||||
CURL_CHECK_LIB_ARES
|
||||
AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
|
||||
|
||||
if test "x$ac_cv_native_windows" != "xyes" &&
|
||||
test "x$enable_shared" = "xyes"; then
|
||||
build_libhostname=yes
|
||||
else
|
||||
build_libhostname=no
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_LIBHOSTNAME, test x$build_libhostname = xyes)
|
||||
|
||||
CURL_CHECK_OPTION_THREADED_RESOLVER
|
||||
|
||||
if test "x$want_thres" = xyes && test "x$want_ares" = xyes; then
|
||||
AC_MSG_ERROR(
|
||||
[Options --enable-threaded-resolver and --enable-ares are mutually exclusive])
|
||||
fi
|
||||
|
||||
if test "$want_thres" = "yes"; then
|
||||
AC_CHECK_HEADER(pthread.h,
|
||||
[ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -pthread"
|
||||
AC_CHECK_LIB(pthread, pthread_create,
|
||||
[ AC_MSG_NOTICE([using POSIX threaded DNS lookup])
|
||||
AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup])
|
||||
USE_THREADS_POSIX=1
|
||||
curl_res_msg="threaded"
|
||||
],
|
||||
[ CFLAGS="$save_CFLAGS"])
|
||||
])
|
||||
fi
|
||||
|
||||
dnl ************************************************************
|
||||
dnl disable verbose text strings
|
||||
dnl
|
||||
@@ -2345,6 +2666,33 @@ AC_HELP_STRING([--disable-crypto-auth],[Disable cryptographic authentication]),
|
||||
AC_MSG_RESULT(yes)
|
||||
)
|
||||
|
||||
dnl ************************************************************
|
||||
dnl disable TLS-SRP authentication
|
||||
dnl
|
||||
AC_MSG_CHECKING([whether to enable TLS-SRP authentication])
|
||||
AC_ARG_ENABLE(tls-srp,
|
||||
AC_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication])
|
||||
AC_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
|
||||
[ case "$enableval" in
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
AC_DEFINE(CURL_DISABLE_TLS_SRP, 1, [to disable TLS-SRP authentication])
|
||||
want_tls_srp=no
|
||||
;;
|
||||
*) AC_MSG_RESULT(yes)
|
||||
want_tls_srp=yes
|
||||
;;
|
||||
esac ],
|
||||
AC_MSG_RESULT(yes)
|
||||
want_tls_srp=yes
|
||||
)
|
||||
|
||||
if test "$want_tls_srp" = "yes" && test "x$HAVE_GNUTLS_SRP" = "x1"; then
|
||||
AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication])
|
||||
USE_TLS_SRP=1
|
||||
curl_tls_srp_msg="enabled"
|
||||
fi
|
||||
|
||||
dnl ************************************************************
|
||||
dnl disable cookies support
|
||||
dnl
|
||||
@@ -2452,10 +2800,15 @@ LIBCURL_LIBS=$LIBS
|
||||
AC_SUBST(LIBCURL_LIBS)
|
||||
AC_SUBST(CURL_LIBS)
|
||||
AC_SUBST(TEST_SERVER_LIBS)
|
||||
AC_SUBST(CURL_NETWORK_LIBS)
|
||||
LIBS=$ALL_LIBS dnl LIBS is a magic variable that's used for every link
|
||||
|
||||
AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
|
||||
|
||||
dnl yes or no
|
||||
ENABLE_SHARED="$enable_shared"
|
||||
AC_SUBST(ENABLE_SHARED)
|
||||
|
||||
dnl
|
||||
dnl For keeping supported features and protocols also in pkg-config file
|
||||
dnl since it is more cross-compile frient than curl-config
|
||||
@@ -2475,7 +2828,7 @@ fi
|
||||
if test "x$HAVE_LIBZ" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
|
||||
fi
|
||||
if test "x$USE_ARES" = "x1"; then
|
||||
if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
|
||||
fi
|
||||
if test "x$IDN_ENABLED" = "x1"; then
|
||||
@@ -2484,9 +2837,13 @@ fi
|
||||
if test "x$USE_WINDOWS_SSPI" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
|
||||
fi
|
||||
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" -o "x$GNUTLS_ENABLED" = "x1"; then
|
||||
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
|
||||
-o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
|
||||
fi
|
||||
if test "x$USE_TLS_SRP" = "x1"; then
|
||||
SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
|
||||
fi
|
||||
|
||||
AC_SUBST(SUPPORT_FEATURES)
|
||||
|
||||
@@ -2511,9 +2868,12 @@ if test "x$CURL_DISABLE_TELNET" != "x1"; then
|
||||
fi
|
||||
if test "x$CURL_DISABLE_LDAP" != "x1"; then
|
||||
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP"
|
||||
fi
|
||||
if test "x$CURL_DISABLE_LDAPS" != "x1"; then
|
||||
if test "x$CURL_DISABLE_LDAPS" != "x1"; then
|
||||
if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") ||
|
||||
(test "x$USE_OPENLDAP" != "x1" && test "x$HAVE_LDAP_SSL" = "x1"); then
|
||||
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "x$CURL_DISABLE_DICT" != "x1"; then
|
||||
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT"
|
||||
@@ -2521,6 +2881,9 @@ fi
|
||||
if test "x$CURL_DISABLE_TFTP" != "x1"; then
|
||||
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP"
|
||||
fi
|
||||
if test "x$CURL_DISABLE_GOPHER" != "x1"; then
|
||||
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER"
|
||||
fi
|
||||
if test "x$CURL_DISABLE_POP3" != "x1"; then
|
||||
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3"
|
||||
if test "x$SSL_ENABLED" = "x1"; then
|
||||
@@ -2546,6 +2909,9 @@ fi
|
||||
if test "x$CURL_DISABLE_RTSP" != "x1"; then
|
||||
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP"
|
||||
fi
|
||||
if test "x$USE_LIBRTMP" = "x1"; then
|
||||
SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP"
|
||||
fi
|
||||
|
||||
dnl replace spaces with newlines
|
||||
dnl sort the lines
|
||||
@@ -2565,6 +2931,7 @@ squeeze LIBS
|
||||
squeeze CURL_LIBS
|
||||
squeeze LIBCURL_LIBS
|
||||
squeeze TEST_SERVER_LIBS
|
||||
squeeze CURL_NETWORK_LIBS
|
||||
|
||||
squeeze SUPPORT_FEATURES
|
||||
squeeze SUPPORT_PROTOCOLS
|
||||
@@ -2586,6 +2953,7 @@ AC_CONFIG_FILES([Makefile \
|
||||
tests/data/Makefile \
|
||||
tests/server/Makefile \
|
||||
tests/libtest/Makefile \
|
||||
tests/unit/Makefile \
|
||||
packages/Makefile \
|
||||
packages/Win32/Makefile \
|
||||
packages/Win32/cygwin/Makefile \
|
||||
@@ -2605,6 +2973,8 @@ AC_CONFIG_FILES([Makefile \
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
||||
CURL_GENERATE_CONFIGUREHELP_PM
|
||||
|
||||
AC_MSG_NOTICE([Configured to build curl/libcurl:
|
||||
|
||||
curl version: ${VERSION}
|
||||
@@ -2617,7 +2987,8 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
|
||||
krb4 support: ${curl_krb4_msg}
|
||||
GSSAPI support: ${curl_gss_msg}
|
||||
SPNEGO support: ${curl_spnego_msg}
|
||||
c-ares support: ${curl_ares_msg}
|
||||
TLS-SRP support: ${curl_tls_srp_msg}
|
||||
resolver: ${curl_res_msg}
|
||||
ipv6 support: ${curl_ipv6_msg}
|
||||
IDN support: ${curl_idn_msg}
|
||||
Build libcurl: Shared=${enable_shared}, Static=${enable_static}
|
||||
@@ -2629,6 +3000,7 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
|
||||
LDAP support: ${curl_ldap_msg}
|
||||
LDAPS support: ${curl_ldaps_msg}
|
||||
RTSP support: ${curl_rtsp_msg}
|
||||
RTMP support: ${curl_rtmp_msg}
|
||||
Protocols: ${SUPPORT_PROTOCOLS}
|
||||
])
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 2001 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 2001 - 2010, 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
|
||||
@@ -32,6 +32,7 @@ Usage: curl-config [OPTION]
|
||||
|
||||
Available values for OPTION include:
|
||||
|
||||
--built-shared says 'yes' if libcurl was built shared
|
||||
--ca ca bundle install path
|
||||
--cc compiler
|
||||
--cflags pre-processor and compiler flags
|
||||
@@ -64,6 +65,10 @@ while test $# -gt 0; do
|
||||
esac
|
||||
|
||||
case "$1" in
|
||||
--built-shared)
|
||||
echo @ENABLE_SHARED@
|
||||
;;
|
||||
|
||||
--ca)
|
||||
echo "@CURL_CA_BUNDLE@"
|
||||
;;
|
||||
@@ -87,6 +92,7 @@ while test $# -gt 0; do
|
||||
echo "$protocol"
|
||||
done
|
||||
;;
|
||||
|
||||
--version)
|
||||
echo libcurl @VERSION@
|
||||
exit 0
|
||||
|
2
docs/.gitignore
vendored
Normal file
2
docs/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.html
|
||||
*.pdf
|
@@ -29,9 +29,11 @@
|
||||
2.11 Test Cases
|
||||
|
||||
3. Pushing Out Your Changes
|
||||
3.1 Write Access to git Repository
|
||||
3.2 How To Make a Patch with git
|
||||
3.3 How To Make a Patch without git
|
||||
3.4 How to get your changes into the main sources
|
||||
3.5 Write good commit messages
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -114,7 +116,7 @@
|
||||
|
||||
2.4 Line Lengths
|
||||
|
||||
We try to keep source lines shorter than 80 columns.
|
||||
We write source lines shorter than 80 columns.
|
||||
|
||||
2.5 General Style
|
||||
|
||||
@@ -187,7 +189,7 @@
|
||||
|
||||
3.2 How To Make a Patch with git
|
||||
|
||||
You need to first checkout the respository:
|
||||
You need to first checkout the repository:
|
||||
|
||||
git clone git://github.com/bagder/curl.git
|
||||
|
||||
@@ -197,7 +199,8 @@
|
||||
git commit [file]
|
||||
|
||||
As usual, group your commits so that you commit all changes that at once that
|
||||
constitutes a logical change.
|
||||
constitutes a logical change. See also section "3.5 Write good commit
|
||||
messages".
|
||||
|
||||
Once you have done all your commits and you're happy with what you see, you
|
||||
can make patches out of your changes that are suitable for mailing:
|
||||
@@ -255,3 +258,22 @@
|
||||
5. If you've followed the above mentioned paragraphs and your patch still
|
||||
hasn't been incorporated after some weeks, consider resubmitting it to the
|
||||
list.
|
||||
|
||||
3.5 Write good commit messages
|
||||
|
||||
A short guide to how to do fine commit messages in the curl project.
|
||||
|
||||
---- start ----
|
||||
[area]: [short line describing the main effect]
|
||||
|
||||
[separate the above single line from the rest with an empty line]
|
||||
|
||||
[full description, no wider than 72 columns that describe as much as
|
||||
possible as to why this change is made, and possibly what things
|
||||
it fixes and everything else that is related]
|
||||
---- stop ----
|
||||
|
||||
Don't forget to use commit --author="" if you commit someone else's work,
|
||||
and make sure that you have your own user and email setup correctly in git
|
||||
before you commit
|
||||
|
||||
|
182
docs/FAQ
182
docs/FAQ
@@ -1,4 +1,4 @@
|
||||
Updated: Nov 7, 2009 (http://curl.haxx.se/docs/faq.html)
|
||||
Updated: January 29, 2011 (http://curl.haxx.se/docs/faq.html)
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
@@ -20,6 +20,8 @@ FAQ
|
||||
1.10 How many are using curl?
|
||||
1.11 Why don't you update ca-bundle.crt
|
||||
1.12 I have a problem who can I chat with?
|
||||
1.13 curl's ECCN number?
|
||||
1.14 How do I submit my patch?
|
||||
|
||||
2. Install Related Problems
|
||||
2.1 configure doesn't find OpenSSL even when it is installed
|
||||
@@ -48,6 +50,7 @@ FAQ
|
||||
3.16 What certificates do I need when I use SSL?
|
||||
3.17 How do I list the root dir of an FTP server?
|
||||
3.18 Can I use curl to send a POST/PUT and not wait for a response?
|
||||
3.19 How do I get HTTP from a host using a specific IP address?
|
||||
|
||||
4. Running Problems
|
||||
4.1 Problems connecting to SSL servers.
|
||||
@@ -74,6 +77,7 @@ FAQ
|
||||
4.16 My HTTP POST or PUT requests are slow!
|
||||
4.17 Non-functional connect timeouts on Windows
|
||||
4.18 file:// URLs containing drive letters (Windows, NetWare)
|
||||
4.19 Why doesn't cURL return an error when the network cable is unplugged?
|
||||
|
||||
5. libcurl Issues
|
||||
5.1 Is libcurl thread-safe?
|
||||
@@ -83,7 +87,7 @@ FAQ
|
||||
5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ?
|
||||
5.6 What about Keep-Alive or persistent connections?
|
||||
5.7 Link errors when building libcurl on Windows!
|
||||
5.8 libcurl.so.3: open failed: No such file or directory
|
||||
5.8 libcurl.so.X: open failed: No such file or directory
|
||||
5.9 How does libcurl resolve host names?
|
||||
5.10 How do I prevent libcurl from writing the response to stdout?
|
||||
5.11 How do I make libcurl not receive the whole HTTP response?
|
||||
@@ -122,8 +126,10 @@ FAQ
|
||||
|
||||
libcurl
|
||||
|
||||
A free and easy-to-use client-side URL transfer library, supporting FTP,
|
||||
FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, FILE, LDAP and LDAPS.
|
||||
A free and easy-to-use client-side URL transfer library, supporting DICT,
|
||||
FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3,
|
||||
POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP.
|
||||
|
||||
libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading,
|
||||
kerberos, HTTP form based upload, proxies, cookies, user+password
|
||||
authentication, file transfer resume, http proxy tunneling and more!
|
||||
@@ -141,9 +147,8 @@ FAQ
|
||||
|
||||
A command line tool for getting or sending files using URL syntax.
|
||||
|
||||
Since curl uses libcurl, it supports a range of common Internet protocols,
|
||||
currently including HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, LDAP, LDAPS,
|
||||
DICT, TELNET and FILE.
|
||||
Since curl uses libcurl, curl supports the same wide range of common
|
||||
Internet protocols that libcurl does.
|
||||
|
||||
We pronounce curl and cURL with an initial k sound: [kurl].
|
||||
|
||||
@@ -307,9 +312,9 @@ FAQ
|
||||
as used by numerous applications that include libcurl binaries in their
|
||||
distribution packages (like Adobe Acrobat Reader and Google Earth).
|
||||
|
||||
More than 90 known named companies use curl in commercial environments and
|
||||
products. More than 100 known named open source projects depend on
|
||||
(lib)curl.
|
||||
More than a hundred known named companies use curl in commercial
|
||||
environments and products and more than a hundred known named open source
|
||||
projects depend on (lib)curl.
|
||||
|
||||
In a poll on the curl web site mid-2005, more than 50% of the 300+ answers
|
||||
estimated a user base of one million users or more.
|
||||
@@ -319,6 +324,12 @@ FAQ
|
||||
based web servers. A guess is that a fair amount of these Linux
|
||||
installations have curl installed.
|
||||
|
||||
The Debian project maintains statistics on packages installed by people
|
||||
who have voluntarily run their package counting application. In mid-2010,
|
||||
libcurl3 was installed on over 55000 such systems (62% of reporting systems)
|
||||
and was one of the 320 most popular installed packages (out of about 107000
|
||||
possible packages).
|
||||
|
||||
All this taken together, there is no doubt that there are millions of
|
||||
(lib)curl users.
|
||||
|
||||
@@ -327,6 +338,7 @@ FAQ
|
||||
http://curl.haxx.se/libcurl/using/apps.html
|
||||
http://counter.li.org/estimates.php
|
||||
http://news.netcraft.com/archives/2005/03/14/fedora_makes_rapid_progress.html
|
||||
http://qa.debian.org/popcon.php?package=curl
|
||||
|
||||
1.11 Why don't you update ca-bundle.crt
|
||||
|
||||
@@ -357,6 +369,41 @@ FAQ
|
||||
IRC network irc.freenode.net. If you're polite and nice, chances are big
|
||||
that you can get -- or provide -- help instantly.
|
||||
|
||||
1.13 curl's ECCN number?
|
||||
|
||||
The US government restricts exports of software that contains or uses
|
||||
cryptography. When doing so, the Export Control Classification Number (ECCN)
|
||||
is used to identify the level of export control etc.
|
||||
|
||||
ASF gives a good explanation at http://www.apache.org/dev/crypto.html
|
||||
|
||||
We believe curl's number might be ECCN 5D002, another possibility is
|
||||
5D992. It seems necessary to write them, asking to confirm.
|
||||
|
||||
Comprehensible explanations of the meaning of such numbers and how to
|
||||
obtain them (resp.) are here
|
||||
|
||||
http://www.bis.doc.gov/licensing/exportingbasics.htm
|
||||
http://www.bis.doc.gov/licensing/do_i_needaneccn.html
|
||||
|
||||
An incomprehensible description of the two numbers above is here
|
||||
http://www.access.gpo.gov/bis/ear/pdf/ccl5-pt2.pdf
|
||||
|
||||
1.14 How do I submit my patch?
|
||||
|
||||
When you have made a patch or a change of whatever sort, and want to submit
|
||||
that to the project, there are a few different ways we prefer:
|
||||
|
||||
o send a patch to the curl-library mailing list. We're many subscribers
|
||||
there and there are lots of people who can review patches, comment on them
|
||||
and "receive" them properly.
|
||||
|
||||
o if your patch changes or fixes a bug, you can also opt to submit a bug
|
||||
report in the bug tracker and attach your patch there. There are less
|
||||
people involved there.
|
||||
|
||||
Lots of more details are found in the CONTRIBUTE and INTERNALS docs.
|
||||
|
||||
|
||||
2. Install Related Problems
|
||||
|
||||
@@ -399,10 +446,10 @@ FAQ
|
||||
|
||||
2.2 Does curl work/build with other SSL libraries?
|
||||
|
||||
Curl has been written to use OpenSSL, GnuTLS, yassl or NSS, although there
|
||||
should not be many problems using a different library. If anyone does "port"
|
||||
curl to use a different SSL library, we are of course very interested in
|
||||
getting the patch!
|
||||
Curl has been written to use OpenSSL, GnuTLS, yassl, NSS, PolarSSL, axTLS or
|
||||
qssl, although there should not be many problems using a different
|
||||
library. If anyone does "port" curl to use a different SSL library, we are
|
||||
of course very interested in getting the patch!
|
||||
|
||||
2.3 Where can I find a copy of LIBEAY32.DLL?
|
||||
|
||||
@@ -614,6 +661,9 @@ FAQ
|
||||
provide this in order to prove that you actually are who you claim to be.
|
||||
If the server doesn't require this, you don't need a client certificate.
|
||||
|
||||
A client certificate is always used together with a private key, and the
|
||||
private key has a pass phrase that protects it.
|
||||
|
||||
- Server certificate. The server you communicate with has a server
|
||||
certificate. You can and should verify this certificate to make sure that
|
||||
you are truly talking to the real server and not a server impersonating
|
||||
@@ -621,8 +671,9 @@ FAQ
|
||||
|
||||
- Certificate Authority certificate ("CA cert"). You often have several CA
|
||||
certs in a CA cert bundle that can be used to verify a server certificate
|
||||
that was signed by one of the authorities in the bundle. curl comes with a
|
||||
default CA cert bundle. You can override the default.
|
||||
that was signed by one of the authorities in the bundle. curl does not
|
||||
come with a CA cert bundle but most curl installs provide one. You can
|
||||
also override the default.
|
||||
|
||||
The server certificate verification process is made by using a Certificate
|
||||
Authority certificate ("CA cert") that was used to sign the server
|
||||
@@ -653,6 +704,17 @@ FAQ
|
||||
|
||||
But you could easily write your own program using libcurl to do such stunts.
|
||||
|
||||
3.19 How do I get HTTP from a host using a specific IP address?
|
||||
|
||||
For example, you may be trying out a web site installation that isn't yet in
|
||||
the DNS. Or you have a site using multiple IP addresses for a given host
|
||||
name and you want to address a specific one out of the set.
|
||||
|
||||
Set a custom Host: header that identifies the server name you want to reach
|
||||
but use the target IP address in the URL:
|
||||
|
||||
curl --header "Host: www.example.com" http://127.0.0.1/
|
||||
|
||||
|
||||
4. Running Problems
|
||||
|
||||
@@ -801,10 +863,8 @@ FAQ
|
||||
|
||||
4.9 Curl can't authenticate to the server that requires NTLM?
|
||||
|
||||
This is supported in curl 7.10.6 or later. No earlier curl version knows
|
||||
of this magic. Later versions require the OpenSSL, GnuTLS or Microsoft
|
||||
Windows libraries to provide this functionality. Using the NSS library
|
||||
will not provide NTLM authentication functionality in curl.
|
||||
NTLM support requires OpenSSL, GnuTLS, NSS or Microsoft Windows libraries at
|
||||
build-time to provide this functionality.
|
||||
|
||||
NTLM is a Microsoft proprietary protocol. Proprietary formats are evil. You
|
||||
should not use such ones.
|
||||
@@ -944,6 +1004,31 @@ FAQ
|
||||
|
||||
In either case, cURL should now be looking for the correct file.
|
||||
|
||||
4.19 Why doesn't cURL return an error when the network cable is unplugged?
|
||||
|
||||
Unplugging the cable is not an error situation. The TCP/IP protocol stack
|
||||
was designed to be fault tolerant, so even though there may be a physical
|
||||
break somewhere the connection shouldn't be affected, just possibly
|
||||
delayed. Eventually, the physical break will be fixed or the data will be
|
||||
re-routed around the physical problem.
|
||||
|
||||
In such cases, the TCP/IP stack is responsible for detecting when the
|
||||
network connection is irrevocably lost. Since with some protocols it is
|
||||
perfectly legal for the client wait indefinitely for data, the stack may
|
||||
never report a problem, and even when it does, it can take up to 20 minutes
|
||||
for it to detect an issue. The curl option --keepalive-time enables
|
||||
keep-alive support in the TCP/IP stack which makes it periodically probe the
|
||||
connection to make sure it is still available to send data. That should
|
||||
reliably detect any TCP/IP network failure.
|
||||
|
||||
But even that won't detect the network going down before the TCP/IP
|
||||
connection is established (e.g. during a DNS lookup) or using protocols that
|
||||
don't use TCP. To handle those situations, curl offers a number of timeouts
|
||||
on its own. --speed-limit/--speed-time will abort if the data transfer rate
|
||||
falls too low, and --connect-timeout and --max-time can be used to put an
|
||||
overall timeout on the connection phase or the entire transfer.
|
||||
|
||||
|
||||
5. libcurl Issues
|
||||
|
||||
5.1 Is libcurl thread-safe?
|
||||
@@ -1044,11 +1129,14 @@ FAQ
|
||||
|
||||
When building an application that uses the static libcurl library, you must
|
||||
add -DCURL_STATICLIB to your CFLAGS. Otherwise the linker will look for
|
||||
dynamic import symbols. If you get linker error like "unknown symbol
|
||||
__imp__curl_easy_init ..." you have linked against the wrong (static)
|
||||
library. If you want to use the libcurl.dll and import lib, you don't need
|
||||
any extra CFLAGS, but use one of the import libraries below. These are the
|
||||
libraries produced by the various lib/Makefile.* files:
|
||||
dynamic import symbols. If you're using Visual Studio, you need to instead
|
||||
add CURL_STATICLIB in the "Preprocessor Definitions" section.
|
||||
|
||||
If you get linker error like "unknown symbol __imp__curl_easy_init ..." you
|
||||
have linked against the wrong (static) library. If you want to use the
|
||||
libcurl.dll and import lib, you don't need any extra CFLAGS, but use one of
|
||||
the import libraries below. These are the libraries produced by the various
|
||||
lib/Makefile.* files:
|
||||
|
||||
Target: static lib. import lib for libcurl*.dll.
|
||||
-----------------------------------------------------------
|
||||
@@ -1058,13 +1146,14 @@ FAQ
|
||||
Borland: libcurl.lib libcurl_imp.lib
|
||||
|
||||
|
||||
5.8 libcurl.so.3: open failed: No such file or directory
|
||||
5.8 libcurl.so.X: open failed: No such file or directory
|
||||
|
||||
This is an error message you might get when you try to run a program linked
|
||||
with a shared version of libcurl and your run-time linker (ld.so) couldn't
|
||||
find the shared library named libcurl.so.3.
|
||||
find the shared library named libcurl.so.X. (Where X is the number of the
|
||||
current libcurl ABI, typically 3 or 4).
|
||||
|
||||
You need to make sure that ld.so finds libcurl.so.3. You can do that
|
||||
You need to make sure that ld.so finds libcurl.so.X. You can do that
|
||||
multiple ways, and it differs somewhat between different operating systems,
|
||||
but they are usually:
|
||||
|
||||
@@ -1100,10 +1189,10 @@ FAQ
|
||||
Using this offers asynchronous name resolves but it currently has no IPv6
|
||||
support.
|
||||
|
||||
- The Windows threaded resolver. It use:
|
||||
- The threaded resolver (default option on Windows). It uses:
|
||||
|
||||
A - gethostbyname() on plain ipv4 windows hosts
|
||||
B - getaddrinfo() on ipv6-enabled windows hosts
|
||||
A - gethostbyname() on plain ipv4 hosts
|
||||
B - getaddrinfo() on ipv6-enabled hosts
|
||||
|
||||
Also note that libcurl never resolves or reverse-lookups addresses given as
|
||||
pure numbers, such as 127.0.0.1 or ::1.
|
||||
@@ -1135,16 +1224,18 @@ FAQ
|
||||
|
||||
5.13 How do I stop an ongoing transfer?
|
||||
|
||||
There are several ways, but none of them are instant. There is no function
|
||||
you can call from another thread or similar that will stop it immediately.
|
||||
With the easy interface you make sure to return the correct error code from
|
||||
one of the callbacks, but none of them are instant. There is no function you
|
||||
can call from another thread or similar that will stop it immediately.
|
||||
Instead you need to make sure that one of the callbacks you use return an
|
||||
appropriate value that will stop the transfer.
|
||||
|
||||
Suitable callbacks that you can do this with include the progress callback,
|
||||
the read callback and the write callback.
|
||||
|
||||
If you're using the multi interface, you also stop a transfer by removing
|
||||
the particular easy handle from the multi stack.
|
||||
If you're using the multi interface, you can also stop a transfer by
|
||||
removing the particular easy handle from the multi stack. At any moment you
|
||||
think the transfer is done.
|
||||
|
||||
5.14 Using C++ non-static functions for callbacks?
|
||||
|
||||
@@ -1182,7 +1273,9 @@ FAQ
|
||||
to do "LIST -a" or similar to see them.
|
||||
|
||||
The application thus needs to parse the LIST output. One such existing
|
||||
list parser is available at http://cr.yp.to/ftpparse.html
|
||||
list parser is available at http://cr.yp.to/ftpparse.html Versions of
|
||||
libcurl since 7.21.0 also provide the ability to specify a wildcard to
|
||||
download multiple files from one FTP directory.
|
||||
|
||||
|
||||
6. License Issues
|
||||
@@ -1193,7 +1286,10 @@ FAQ
|
||||
this section was much enhanced by Bjorn Reese.)
|
||||
|
||||
We are not lawyers and this is not legal advice. You should probably consult
|
||||
one if you want true and accurate legal insights without our prejudice.
|
||||
one if you want true and accurate legal insights without our prejudice. Note
|
||||
especially that this section concerns the libcurl license only; compiling in
|
||||
features of libcurl that depend on other libraries (e.g. OpenSSL) may affect
|
||||
the licensing obligations of your application.
|
||||
|
||||
6.1 I have a GPL program, can I use the libcurl library?
|
||||
|
||||
@@ -1251,12 +1347,16 @@ FAQ
|
||||
You do not have to reveal or make public any changes to the libcurl source
|
||||
code.
|
||||
|
||||
You do not have to reveal or make public that you are using libcurl within
|
||||
You do not have to broadcast to the world that you are using libcurl within
|
||||
your app.
|
||||
|
||||
As can be seen here: http://curl.haxx.se/docs/companies.html and
|
||||
elsewhere, more and more companies are discovering the power
|
||||
of libcurl and take advantage of it even in commercial environments.
|
||||
All we ask is that you disclose "the copyright notice and this permission
|
||||
notice" somewhere. Most probably like in the documentation or in the section
|
||||
where other third party dependencies already are mentioned and acknowledged.
|
||||
|
||||
As can be seen here: http://curl.haxx.se/docs/companies.html and elsewhere,
|
||||
more and more companies are discovering the power of libcurl and take
|
||||
advantage of it even in commercial environments.
|
||||
|
||||
|
||||
7. PHP/CURL Issues
|
||||
|
@@ -43,7 +43,7 @@ HTTP
|
||||
- POST
|
||||
- Pipelining
|
||||
- multipart formpost (RFC1867-style)
|
||||
- authentication: Basic, Digest, NTLM(*1), GSS-Negotiate/Negotiate(*3) and
|
||||
- authentication: Basic, Digest, NTLM(*9), GSS-Negotiate/Negotiate(*3) and
|
||||
SPNEGO (*4) to server and proxy
|
||||
- resume (both GET and PUT)
|
||||
- follow redirects
|
||||
@@ -125,7 +125,7 @@ FILE
|
||||
FOOTNOTES
|
||||
=========
|
||||
|
||||
*1 = requires OpenSSL, GnuTLS, NSS or yassl
|
||||
*1 = requires OpenSSL, GnuTLS, NSS, yassl, axTLS or PolarSSL
|
||||
*2 = requires OpenLDAP
|
||||
*3 = requires a GSSAPI-compliant library, such as Heimdal or similar.
|
||||
*4 = requires FBopenssl
|
||||
@@ -133,3 +133,4 @@ FOOTNOTES
|
||||
*6 = requires c-ares
|
||||
*7 = requires OpenSSL or NSS, as GnuTLS only supports SSLv3 and TLSv1
|
||||
*8 = requires libssh2
|
||||
*9 = requires OpenSSL, GnuTLS, NSS or yassl
|
||||
|
58
docs/HISTORY
58
docs/HISTORY
@@ -157,6 +157,20 @@ September 2005:
|
||||
|
||||
More than 100,000 unique visitors of the curl web site. 25 mirrors.
|
||||
|
||||
December 2005:
|
||||
|
||||
security vulnerability: libcurl URL Buffer Overflow
|
||||
|
||||
January 2006:
|
||||
|
||||
We dropped support for Gopher. We found bugs in the implementation that
|
||||
turned out having been introduced years ago, so with the conclusion that
|
||||
nobody had found out in all this time we removed it instead of fixing it.
|
||||
|
||||
March 2006:
|
||||
|
||||
security vulnerability: libcurl TFTP Packet Buffer Overflow
|
||||
|
||||
April 2006:
|
||||
|
||||
Added the multi_socket() API
|
||||
@@ -174,6 +188,10 @@ February 2007:
|
||||
|
||||
Added support for the Mozilla NSS library to do the SSL/TLS stuff
|
||||
|
||||
July 2007:
|
||||
|
||||
security vulnerability: libcurl GnuTLS insufficient cert verification
|
||||
|
||||
November 2008:
|
||||
|
||||
Command line options: 128
|
||||
@@ -184,3 +202,43 @@ November 2008:
|
||||
|
||||
145,000 unique visitors. >100 GB downloaded.
|
||||
|
||||
March 2009:
|
||||
|
||||
security vulnerability: libcurl Arbitrary File Access
|
||||
|
||||
August 2009:
|
||||
|
||||
security vulnerability: libcurl embedded zero in cert name
|
||||
|
||||
December 2009:
|
||||
|
||||
Added support for IMAP, POP3 and SMTP
|
||||
|
||||
January 2010:
|
||||
|
||||
Added support for RTSP
|
||||
|
||||
February 2010:
|
||||
|
||||
security vulnerability: libcurl data callback excessive length
|
||||
|
||||
March 2010:
|
||||
|
||||
The project switched over to use git instead of CVS for source code control
|
||||
|
||||
May 2010:
|
||||
|
||||
Added support for RTMP
|
||||
|
||||
Added support for PolarSSL to do the SSL/TLS stuff
|
||||
|
||||
August 2010:
|
||||
|
||||
Public curl releases: 117
|
||||
Command line options: 138
|
||||
curl_easy_setopt() options: 180
|
||||
Public functions in libcurl: 58
|
||||
Known libcurl bindings: 39
|
||||
Contributors: 808
|
||||
|
||||
Gopher support added (re-added actually)
|
||||
|
103
docs/INSTALL
103
docs/INSTALL
@@ -139,6 +139,12 @@ UNIX
|
||||
To build with NSS support instead of OpenSSL for SSL/TLS, note that
|
||||
you need to use both --without-ssl and --with-nss.
|
||||
|
||||
To build with PolarSSL support instead of OpenSSL for SSL/TLS, note that
|
||||
you need to use both --without-ssl and --with-polarssl.
|
||||
|
||||
To build with axTLS support instead of OpenSSL for TLS, note that you
|
||||
need to use both --without-ssl and --with-axtls.
|
||||
|
||||
To get GSSAPI support, build with --with-gssapi and have the MIT or
|
||||
Heimdal Kerberos 5 packages installed.
|
||||
|
||||
@@ -205,9 +211,9 @@ Win32
|
||||
adjust as necessary. It is also possible to override these paths with
|
||||
environment variables, for example:
|
||||
|
||||
set ZLIB_PATH=c:\zlib-1.2.3
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8k
|
||||
set LIBSSH2_PATH=c:\libssh2-1.1
|
||||
set ZLIB_PATH=c:\zlib-1.2.5
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8r
|
||||
set LIBSSH2_PATH=c:\libssh2-1.2.7
|
||||
|
||||
ATTENTION: if you want to build with libssh2 support you have to use latest
|
||||
version 0.17 - previous versions will NOT work with 7.17.0 and later!
|
||||
@@ -226,7 +232,7 @@ Win32
|
||||
|
||||
If you want to enable LDAPS support then set LDAPS=1.
|
||||
|
||||
- optional MingW32-built OpenlDAP SDK available from:
|
||||
- optional MingW32-built OpenLDAP SDK available from:
|
||||
http://www.gknw.net/mirror/openldap/
|
||||
- optional recent Novell CLDAP SDK available from:
|
||||
http://developer.novell.com/ndk/cldap.htm
|
||||
@@ -308,7 +314,7 @@ Win32
|
||||
documentation on how to compile zlib. Define the ZLIB_PATH environment
|
||||
variable to the location of zlib.h and zlib.lib, for example:
|
||||
|
||||
set ZLIB_PATH=c:\zlib-1.2.3
|
||||
set ZLIB_PATH=c:\zlib-1.2.5
|
||||
|
||||
Then run 'nmake vc-zlib' in curl's root directory.
|
||||
|
||||
@@ -322,7 +328,7 @@ Win32
|
||||
Before running nmake define the OPENSSL_PATH environment variable with
|
||||
the root/base directory of OpenSSL, for example:
|
||||
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8k
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8q
|
||||
|
||||
Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root
|
||||
directory. 'nmake vc-ssl' will create a libcurl static and dynamic
|
||||
@@ -371,30 +377,49 @@ Win32
|
||||
Borland C++ compiler
|
||||
---------------------
|
||||
|
||||
compile openssl
|
||||
Ensure that your build environment is properly set up to use the compiler
|
||||
and associated tools. PATH environment variable must include the path to
|
||||
bin subdirectory of your compiler installation, eg: c:\Borland\BCC55\bin
|
||||
|
||||
Make sure you include the paths to curl/include and openssl/inc32 in
|
||||
your bcc32.cnf file
|
||||
It is advisable to set environment variable BCCDIR to the base path of
|
||||
the compiler installation.
|
||||
|
||||
eg : -I"c:\Bcc55\include;c:\path_curl\include;c:\path_openssl\inc32"
|
||||
set BCCDIR=c:\Borland\BCC55
|
||||
|
||||
Check to make sure that all of the sources listed in lib/Makefile.b32
|
||||
are present in the /path_to_curl/lib directory. (Check the src
|
||||
directory for missing ones.)
|
||||
In order to build a plain vanilla version of curl and libcurl run the
|
||||
following command from curl's root directory:
|
||||
|
||||
Make sure the environment variable "BCCDIR" is set to the install
|
||||
location for the compiler eg : c:\Borland\BCC55
|
||||
make borland
|
||||
|
||||
command line:
|
||||
make -f /path_to_curl/lib/Makefile-ssl.b32
|
||||
To build curl and libcurl with zlib and OpenSSL support set environment
|
||||
variables ZLIB_PATH and OPENSSL_PATH to the base subdirectories of the
|
||||
already built zlib and OpenSSL libraries and from curl's root directory
|
||||
run command:
|
||||
|
||||
compile simplessl.c with appropriate links
|
||||
make borland-ssl-zlib
|
||||
|
||||
libcurl library will be built in 'lib' subdirectory while curl tool
|
||||
is built in 'src' subdirectory. In order to use libcurl library it is
|
||||
advisable to modify compiler's configuration file bcc32.cfg located
|
||||
in c:\Borland\BCC55\bin to reflect the location of libraries include
|
||||
paths for example the '-I' line could result in something like:
|
||||
|
||||
-I"c:\Borland\BCC55\include;c:\curl\include;c:\openssl\inc32"
|
||||
|
||||
bcc3.cfg '-L' line could also be modified to reflect the location of
|
||||
of libcurl library resulting for example:
|
||||
|
||||
-L"c:\Borland\BCC55\lib;c:\curl\lib;c:\openssl\out32"
|
||||
|
||||
In order to build sample program 'simple.c' from the docs\examples
|
||||
subdirectory run following command from mentioned subdirectory:
|
||||
|
||||
bcc32 simple.c libcurl.lib cw32mt.lib
|
||||
|
||||
In order to build sample program simplessl.c an SSL enabled libcurl
|
||||
is required, as well as the OpenSSL libeay32.lib and ssleay32.lib
|
||||
libraries.
|
||||
|
||||
c:\curl\docs\examples\> bcc32 -L c:\path_to_curl\lib\libcurl.lib
|
||||
-L c:\borland\bcc55\lib\psdk\ws2_32.lib
|
||||
-L c:\openssl\out32\libeay32.lib
|
||||
-L c:\openssl\out32\ssleay32.lib
|
||||
simplessl.c
|
||||
|
||||
OTHER MSVC IDEs
|
||||
---------------
|
||||
@@ -635,7 +660,7 @@ NetWare
|
||||
Builds automatically created 8 times a day from current git are here:
|
||||
http://www.gknw.net/mirror/curl/autobuilds/
|
||||
the status of these builds can be viewed at the autobuild table:
|
||||
http://curl.haxx.se/auto/
|
||||
http://curl.haxx.se/dev/builds.html
|
||||
|
||||
|
||||
eCos
|
||||
@@ -779,6 +804,11 @@ VxWorks
|
||||
To clean the build results type 'make -f ./Makefile.vxworks clean'.
|
||||
|
||||
|
||||
Android
|
||||
=======
|
||||
See the build notes in the Android.mk file.
|
||||
|
||||
|
||||
CROSS COMPILE
|
||||
=============
|
||||
(This section was graciously brought to us by Jim Duey, with additions by
|
||||
@@ -908,7 +938,7 @@ PORTS
|
||||
- Alpha OpenVMS V7.1-1H2
|
||||
- Alpha Tru64 v5.0 5.1
|
||||
- AVR32 Linux
|
||||
- ARM Android 1.5
|
||||
- ARM Android 1.5, 2.1
|
||||
- ARM INTEGRITY
|
||||
- ARM iPhone OS
|
||||
- Cell Linux
|
||||
@@ -972,10 +1002,21 @@ PORTS
|
||||
Useful URLs
|
||||
===========
|
||||
|
||||
OpenSSL http://www.openssl.org
|
||||
MingW http://www.mingw.org
|
||||
OpenLDAP http://www.openldap.org
|
||||
Zlib http://www.gzip.org/zlib/
|
||||
libssh2 http://www.libssh2.org
|
||||
|
||||
axTLS http://axtls.sourceforge.net/
|
||||
c-ares http://c-ares.haxx.se/
|
||||
GNU GSS http://www.gnu.org/software/gss/
|
||||
GnuTLS http://www.gnu.org/software/gnutls/
|
||||
Heimdal http://www.pdc.kth.se/heimdal/
|
||||
libidn http://www.gnu.org/software/libidn/
|
||||
libssh2 http://www.libssh2.org/
|
||||
MIT Kerberos http://web.mit.edu/kerberos/www/dist/
|
||||
NSS http://www.mozilla.org/projects/security/pki/nss/
|
||||
OpenLDAP http://www.openldap.org/
|
||||
OpenSSL http://www.openssl.org/
|
||||
PolarSSL http://polarssl.org/
|
||||
yassl http://www.yassl.com/
|
||||
Zlib http://www.zlib.net/
|
||||
|
||||
MingW http://www.mingw.org/
|
||||
MinGW-w64 http://mingw-w64.sourceforge.net/
|
||||
OpenWatcom http://www.openwatcom.org/
|
||||
|
@@ -15,7 +15,7 @@ INTERNALS
|
||||
GIT
|
||||
===
|
||||
All changes to the sources are committed to the git repository as soon as
|
||||
they're somewhat verified to work. Changes shall be commited as independently
|
||||
they're somewhat verified to work. Changes shall be committed as independently
|
||||
as possible so that individual changes can be easier spotted and tracked
|
||||
afterwards.
|
||||
|
||||
@@ -37,13 +37,14 @@ Portability
|
||||
GnuTLS 1.2
|
||||
zlib 1.1.4
|
||||
libssh2 0.16
|
||||
c-ares 1.5.0
|
||||
c-ares 1.6.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
|
||||
axTLS 1.2.7
|
||||
Heimdal ?
|
||||
|
||||
* = only partly functional, but that's due to bugs in the third party lib, not
|
||||
@@ -90,7 +91,7 @@ Windows vs Unix
|
||||
do it etc there might be reasons for applications to alter that behaviour.
|
||||
|
||||
3. The file descriptors for network communication and file operations are
|
||||
not easily interchangable as in unix.
|
||||
not easily interchangeable as in unix.
|
||||
|
||||
We avoid this by not trying any funny tricks on file descriptors.
|
||||
|
||||
@@ -182,7 +183,7 @@ Library
|
||||
|
||||
Some time during the DO function, the Curl_setup_transfer() function must
|
||||
be called with some basic info about the upcoming transfer: what socket(s)
|
||||
to read/write and the expected file tranfer sizes (if known).
|
||||
to read/write and the expected file transfer sizes (if known).
|
||||
|
||||
o Transfer()
|
||||
|
||||
@@ -224,15 +225,15 @@ Library
|
||||
A quick roundup on internal function sequences (many of these call
|
||||
protocol-specific function-pointers):
|
||||
|
||||
curl_connect - connects to a remote site and does initial connect fluff
|
||||
Curl_connect - connects to a remote site and does initial connect fluff
|
||||
This also checks for an existing connection to the requested site and uses
|
||||
that one if it is possible.
|
||||
|
||||
curl_do - starts a transfer
|
||||
curl_transfer() - transfers data
|
||||
curl_done - ends a transfer
|
||||
Curl_do - starts a transfer
|
||||
Curl_handler::do_it() - transfers data
|
||||
Curl_done - ends a transfer
|
||||
|
||||
curl_disconnect - disconnects from a remote site. This is called when the
|
||||
Curl_disconnect - disconnects from a remote site. This is called when the
|
||||
disconnect is really requested, which doesn't necessarily have to be
|
||||
exactly after curl_done in case we want to keep the connection open for
|
||||
a while.
|
||||
@@ -249,13 +250,13 @@ Library
|
||||
HTTPS uses in almost every means the same procedure as HTTP, with only two
|
||||
exceptions: the connect procedure is different and the function used to read
|
||||
or write from the socket is different, although the latter fact is hidden in
|
||||
the source by the use of curl_read() for reading and curl_write() for writing
|
||||
the source by the use of Curl_read() for reading and Curl_write() for writing
|
||||
data to the remote server.
|
||||
|
||||
http_chunks.c contains functions that understands HTTP 1.1 chunked transfer
|
||||
encoding.
|
||||
|
||||
An interesting detail with the HTTP(S) request, is the add_buffer() series of
|
||||
An interesting detail with the HTTP(S) request, is the Curl_add_buffer() series of
|
||||
functions we use. They append data to one single buffer, and when the
|
||||
building is done the entire request is sent off in one single write. This is
|
||||
done this way to overcome problems with flawed firewalls and lame servers.
|
||||
@@ -291,7 +292,7 @@ Library
|
||||
URL encoding and decoding, called escaping and unescaping in the source code,
|
||||
is found in lib/escape.c.
|
||||
|
||||
While transfering data in Transfer() a few functions might get used.
|
||||
While transferring data in Transfer() a few functions might get used.
|
||||
curl_getdate() in lib/parsedate.c is for HTTP date comparisons (and more).
|
||||
|
||||
lib/getenv.c offers curl_getenv() which is for reading environment variables
|
||||
@@ -303,7 +304,7 @@ Library
|
||||
lib/netrc.c holds the .netrc parser
|
||||
|
||||
lib/timeval.c features replacement functions for systems that don't have
|
||||
gettimeofday() and a few support functions for timeval convertions.
|
||||
gettimeofday() and a few support functions for timeval conversions.
|
||||
|
||||
A function named curl_version() that returns the full curl version string is
|
||||
found in lib/version.c.
|
||||
@@ -356,8 +357,10 @@ multi interface/non-blocking
|
||||
|
||||
The FTP and the SFTP/SCP protocols are thus perfect examples of how we adapt
|
||||
and adjust the code to allow non-blocking operations even on multi-stage
|
||||
protocols. The DICT, TELNET and TFTP are crappy examples and they are subject
|
||||
for rewrite in the future to better fit the libcurl protocol family.
|
||||
protocols. They are built around state machines that return when they could
|
||||
block waiting for data. The DICT, LDAP and TELNET protocols are crappy
|
||||
examples and they are subject for rewrite in the future to better fit the
|
||||
libcurl protocol family.
|
||||
|
||||
SSL libraries
|
||||
=============
|
||||
@@ -379,7 +382,9 @@ Library Symbols
|
||||
All symbols used internally in libcurl must use a 'Curl_' prefix if they're
|
||||
used in more than a single file. Single-file symbols must be made static.
|
||||
Public ("exported") symbols must use a 'curl_' prefix. (There are exceptions,
|
||||
but they are to be changed to follow this pattern in future versions.)
|
||||
but they are to be changed to follow this pattern in future versions.) Public
|
||||
API functions are marked with CURL_EXTERN in the public header files so that
|
||||
all others can be hidden on platforms where this is possible.
|
||||
|
||||
Return Codes and Informationals
|
||||
===============================
|
||||
@@ -462,15 +467,15 @@ Test Suite
|
||||
subdirectory directly off the root in the curl archive tree, and it contains
|
||||
a bunch of scripts and a lot of test case data.
|
||||
|
||||
The main test script is runtests.pl that will invoke the two servers
|
||||
The main test script is runtests.pl that will invoke test servers like
|
||||
httpserver.pl and ftpserver.pl before all the test cases are performed. The
|
||||
test suite currently only runs on unix-like platforms.
|
||||
|
||||
You'll find a complete description of the test case data files in the
|
||||
tests/README file.
|
||||
You'll find a description of the test suite in the tests/README file, and the
|
||||
test case data files in the tests/FILEFORMAT file.
|
||||
|
||||
The test suite automatically detects if curl was built with the memory
|
||||
debugging enabled, and if it was it will detect memory leaks too.
|
||||
debugging enabled, and if it was it will detect memory leaks, too.
|
||||
|
||||
Building Releases
|
||||
=================
|
||||
|
@@ -3,6 +3,11 @@ 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!
|
||||
|
||||
76. The SOCKET type in Win64 is 64 bits large (and thus so is curl_socket_t on
|
||||
that platform), and long is only 32 bits. It makes it impossible for
|
||||
curl_easy_getinfo() to return a socket properly with the CURLINFO_LASTSOCKET
|
||||
option as for all other operating systems.
|
||||
|
||||
75. NTLM authentication involving unicode user name or password.
|
||||
http://curl.haxx.se/mail/lib-2009-10/0024.html
|
||||
http://curl.haxx.se/bug/view.cgi?id=2944325
|
||||
@@ -49,11 +54,6 @@ may have been fixed since this was written!
|
||||
handle with curl_easy_cleanup() and create a new. Some more details:
|
||||
http://curl.haxx.se/mail/lib-2009-04/0300.html
|
||||
|
||||
62. CURLOPT_TIMEOUT does not work properly with the regular multi and
|
||||
multi_socket interfaces. The work-around for apps is to simply remove the
|
||||
easy handle once the time is up. See also:
|
||||
http://curl.haxx.se/bug/view.cgi?id=2501457
|
||||
|
||||
61. If an upload using Expect: 100-continue receives an HTTP 417 response,
|
||||
it ought to be automatically resent without the Expect:. A workaround is
|
||||
for the client application to redo the transfer after disabling Expect:.
|
||||
@@ -63,10 +63,6 @@ may have been fixed since this was written!
|
||||
is waiting for the the 100-continue response.
|
||||
http://curl.haxx.se/mail/lib-2008-08/0462.html
|
||||
|
||||
59. If the CURLOPT_PORT option is used on an FTP URL like
|
||||
"ftp://example.com/file;type=A" using a proxy, the ";type=A" is stripped off.
|
||||
See the comment in parse_remote_port()
|
||||
|
||||
58. It seems sensible to be able to use CURLOPT_NOBODY and
|
||||
CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is
|
||||
not working: http://curl.haxx.se/mail/lib-2008-07/0295.html
|
||||
@@ -91,7 +87,7 @@ may have been fixed since this was written!
|
||||
|
||||
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:
|
||||
SSL-negotiated:
|
||||
http://curl.haxx.se/mail/lib-2008-01/0277.html
|
||||
|
||||
49. If using --retry and the transfer timeouts (possibly due to using -m or
|
||||
@@ -141,12 +137,13 @@ may have been fixed since this was written!
|
||||
30. You need to use -g to the command line tool in order to use RFC2732-style
|
||||
IPv6 numerical addresses in URLs.
|
||||
|
||||
29. IPv6 URLs with zone ID is not supported.
|
||||
29. IPv6 URLs with zone ID is not nicely supported.
|
||||
http://www.ietf.org/internet-drafts/draft-fenner-literal-zone-02.txt (expired)
|
||||
specifies the use of a plus sign instead of a percent when specifying zone
|
||||
IDs in URLs to get around the problem of percent signs being
|
||||
special. According to the reporter, Firefox deals with the URL _with_ a
|
||||
percent letter (which seems like a blatant URL spec violation).
|
||||
libcurl supports zone IDs where the percent sign is URL-escaped (i.e. %25).
|
||||
|
||||
See http://curl.haxx.se/bug/view.cgi?id=1371118
|
||||
|
||||
@@ -189,7 +186,7 @@ may have been fixed since this was written!
|
||||
would not meaningfully support NUL characters within RFC 959 <string>,
|
||||
anyway (e.g., UNIX pathnames may not contain NUL).
|
||||
|
||||
14. Test case 165 might fail on system which has libidn present, but with an
|
||||
14. Test case 165 might fail on a system which has libidn present, but with an
|
||||
old iconv version (2.1.3 is a known bad version), since it doesn't recognize
|
||||
the charset when named ISO8859-1. Changing the name to ISO-8859-1 makes the
|
||||
test pass, but instead makes it fail on Solaris hosts that use its native
|
||||
|
@@ -55,6 +55,10 @@ NSS http://www.mozilla.org/projects/security/pki/nss/
|
||||
grant you different permissions and impose different obligations. You
|
||||
should select the license that best meets your needs.
|
||||
|
||||
axTLS http://axtls.sourceforge.net/
|
||||
|
||||
(May be used for SSL/TLS support) Uses a Modified BSD-style license.
|
||||
|
||||
c-ares http://daniel.haxx.se/projects/c-ares/license.html
|
||||
|
||||
(Used for asynchronous name resolves) Uses an MIT license that is very
|
||||
|
@@ -32,12 +32,16 @@ This document lists documents and standards used by curl.
|
||||
|
||||
RFC 2068 - HTTP 1.1 (obsoleted by RFC 2616)
|
||||
|
||||
RFC 2104 - Keyed-Hashing for Message Authentication
|
||||
|
||||
RFC 2109 - HTTP State Management Mechanism (cookie stuff)
|
||||
- Also, read Netscape's specification at
|
||||
http://curl.haxx.se/rfc/cookie_spec.html
|
||||
|
||||
RFC 2183 - The Content-Disposition Header Field
|
||||
|
||||
RFC 2195 - CRAM-MD5 authentication
|
||||
|
||||
RFC 2229 - A Dictionary Server Protocol
|
||||
|
||||
RFC 2255 - Newer LDAP URL syntax document.
|
||||
@@ -73,3 +77,7 @@ This document lists documents and standards used by curl.
|
||||
RFC 2965 - HTTP State Management Mechanism. Cookies. Obsoletes RFC2109
|
||||
|
||||
RFC 3207 - SMTP over TLS
|
||||
|
||||
RFC 4616 - PLAIN authentication
|
||||
|
||||
RFC 4954 - SMTP Authentication
|
||||
|
58
docs/THANKS
58
docs/THANKS
@@ -6,14 +6,17 @@
|
||||
|
||||
Aaron Oneal
|
||||
Adam D. Moss
|
||||
Adam Light
|
||||
Adam Piggott
|
||||
Adrian Schuur
|
||||
Akos Pasztory
|
||||
Alan Pinstein
|
||||
Albert Chin-A-Young
|
||||
Albert Choy
|
||||
Ale Vesely
|
||||
Aleksandar Milivojevic
|
||||
Alessandro Vesely
|
||||
Alex Bligh
|
||||
Alex Fishman
|
||||
Alex Neblett
|
||||
Alex Suykov
|
||||
@@ -27,6 +30,7 @@ Alexey Borzov
|
||||
Alexey Pesternikov
|
||||
Alexey Simak
|
||||
Alexis Carvalho
|
||||
Alfred Gebert
|
||||
Allen Pulsifer
|
||||
Amol Pattekar
|
||||
Anatoli Tubman
|
||||
@@ -41,6 +45,7 @@ Andreas Olsson
|
||||
Andreas Rieke
|
||||
Andreas Schuldei
|
||||
Andreas Wurf
|
||||
Andrei Benea
|
||||
Andres Garcia
|
||||
Andrew Benham
|
||||
Andrew Biggs
|
||||
@@ -69,6 +74,7 @@ Axel Tillequin
|
||||
Balint Szilakszi
|
||||
Bart Whiteley
|
||||
Bas Mevissen
|
||||
Ben Darnell
|
||||
Ben Greear
|
||||
Ben Madsen
|
||||
Ben Van Hof
|
||||
@@ -81,6 +87,7 @@ Bill Hoffman
|
||||
Bjorn Augustsson
|
||||
Bjorn Reese
|
||||
Bj<EFBFBD>rn Stenberg
|
||||
Bob Richmond
|
||||
Bob Schader
|
||||
Bogdan Nicula
|
||||
Brad Burdick
|
||||
@@ -96,6 +103,7 @@ Brock Noland
|
||||
Bruce Mitchener
|
||||
Bryan Henderson
|
||||
Bryan Kemp
|
||||
Cameron Kaiser
|
||||
Camille Moncelier
|
||||
Caolan McNamara
|
||||
Carsten Lange
|
||||
@@ -118,6 +126,7 @@ Christian Schmitz
|
||||
Christian Vogt
|
||||
Christophe Demory
|
||||
Christophe Legry
|
||||
Christopher Conroy
|
||||
Christopher Palow
|
||||
Christopher R. Palmer
|
||||
Ciprian Badescu
|
||||
@@ -140,6 +149,7 @@ Damien Adant
|
||||
Dan Becker
|
||||
Dan C
|
||||
Dan Fandrich
|
||||
Dan Locks
|
||||
Dan Nelson
|
||||
Dan Petitt
|
||||
Dan Torop
|
||||
@@ -185,10 +195,12 @@ Detlef Schmier
|
||||
Didier Brisebourg
|
||||
Diego Casorran
|
||||
Dima Barsky
|
||||
Dimitre Dimitrov
|
||||
Dimitris Sarris
|
||||
Dinar
|
||||
Dirk Eddelbuettel
|
||||
Dirk Manske
|
||||
Dmitri Shubin
|
||||
Dmitriy Sergeyev
|
||||
Dmitry Bartsevich
|
||||
Dmitry Kurochkin
|
||||
@@ -200,7 +212,9 @@ Dominick Meglio
|
||||
Doug Kaufman
|
||||
Doug Porter
|
||||
Douglas E. Wegscheid
|
||||
Douglas Kilpatrick
|
||||
Douglas R. Horner
|
||||
Douglas Steinwand
|
||||
Dov Murik
|
||||
Duane Cathey
|
||||
Duncan Mac-Vicar Prett
|
||||
@@ -222,6 +236,7 @@ Eric Cooper
|
||||
Eric Landes
|
||||
Eric Lavigne
|
||||
Eric Melville
|
||||
Eric Mertens
|
||||
Eric Rautman
|
||||
Eric Thelin
|
||||
Eric Vergnaud
|
||||
@@ -243,6 +258,7 @@ Forrest Cahoon
|
||||
Frank Hempel
|
||||
Frank Keeney
|
||||
Frank McGeough
|
||||
Frank Meier
|
||||
Frank Ticheler
|
||||
Fred Machado
|
||||
Fred New
|
||||
@@ -291,9 +307,15 @@ Hans Steegers
|
||||
Hans-Jurgen May
|
||||
Hardeep Singh
|
||||
Harshal Pradhan
|
||||
Hauke Duden
|
||||
Heikki Korpela
|
||||
Heinrich Ko
|
||||
Hendrik Visage
|
||||
Henrik Storner
|
||||
Hidemoto Nakada
|
||||
Hoi-Ho Chan
|
||||
Hongli Lai
|
||||
Howard Chu
|
||||
Hzhijun
|
||||
Ian Ford
|
||||
Ian Gulliver
|
||||
@@ -310,8 +332,10 @@ Immanuel Gregoire
|
||||
Ingmar Runge
|
||||
Ingo Ralf Blum
|
||||
Ingo Wilken
|
||||
Jack Zhang
|
||||
Jacky Lam
|
||||
Jacob Meuser
|
||||
Jacob Moshenko
|
||||
Jad Chamcham
|
||||
James Bursa
|
||||
James Cheng
|
||||
@@ -325,8 +349,10 @@ Jamie Lokier
|
||||
Jamie Newton
|
||||
Jamie Wilkinson
|
||||
Jan Kunder
|
||||
Jan Van Boghout
|
||||
Jared Lundell
|
||||
Jari Sundell
|
||||
Jason McDonald
|
||||
Jason S. Priebe
|
||||
Jay Austin
|
||||
Jayesh A Shah
|
||||
@@ -345,6 +371,7 @@ Jeff Weber
|
||||
Jeffrey Pohlmeyer
|
||||
Jeremy Friesner
|
||||
Jerome Muffat-Meridol
|
||||
Jerome Vouillon
|
||||
Jes Badwal
|
||||
Jesper Jensen
|
||||
Jesse Noller
|
||||
@@ -369,9 +396,11 @@ John Lightsey
|
||||
John McGowan
|
||||
John P. McCaskey
|
||||
John Wilkinson
|
||||
John-Mark Bell
|
||||
Johnny Luong
|
||||
Jon Grubbs
|
||||
Jon Nelson
|
||||
Jon Sargeant
|
||||
Jon Travis
|
||||
Jon Turner
|
||||
Jonas Forsman
|
||||
@@ -396,6 +425,7 @@ J
|
||||
J<EFBFBD>rn Hartroth
|
||||
Kai Sommerfeld
|
||||
Kai-Uwe Rommel
|
||||
Kalle Vahlman
|
||||
Kamil Dudka
|
||||
Kang-Jin Lee
|
||||
Karl Moerder
|
||||
@@ -408,6 +438,7 @@ Keith McGuigan
|
||||
Keith Mok
|
||||
Ken Hirsch
|
||||
Ken Rastatter
|
||||
Kenny To
|
||||
Kent Boortz
|
||||
Keshav Krity
|
||||
Kevin Baughman
|
||||
@@ -471,27 +502,33 @@ Mark Eichin
|
||||
Mark Incley
|
||||
Mark Karpeles
|
||||
Mark Lentczner
|
||||
Markus Duft
|
||||
Markus Koetter
|
||||
Markus Moeller
|
||||
Markus Oberhumer
|
||||
Martijn Koster
|
||||
Martin C. Martin
|
||||
Martin Drasar
|
||||
Martin Hager
|
||||
Martin Hedenfalk
|
||||
Martin Skinner
|
||||
Martin Storsjo
|
||||
Marty Kuhrt
|
||||
Maruko
|
||||
Massimiliano Ziccardi
|
||||
Massimo Callegari
|
||||
Mateusz Loskot
|
||||
Mathias Axelsson
|
||||
Mats Lidell
|
||||
Matt Kraai
|
||||
Matt Veenstra
|
||||
Matt Witherspoon
|
||||
Matt Wixson
|
||||
Matthew Blain
|
||||
Matthew Clarke
|
||||
Matthias Bolte
|
||||
Maurice Barnum
|
||||
Mauro Iorio
|
||||
Max Katsev
|
||||
Maxim Ivanov
|
||||
Maxim Perenesenko
|
||||
@@ -509,14 +546,17 @@ Michael Smith
|
||||
Michael Stillwell
|
||||
Michael Wallner
|
||||
Michal Bonino
|
||||
Michal Gorny
|
||||
Michal Marek
|
||||
Michele Bini
|
||||
Mihai Ionescu
|
||||
Mikael Johansson
|
||||
Mikael Sennerholm
|
||||
Mike Bytnar
|
||||
Mike Crowe
|
||||
Mike Dobbs
|
||||
Mike Hommey
|
||||
Mike Power
|
||||
Mike Protts
|
||||
Mike Revi
|
||||
Miklos Nemeth
|
||||
@@ -543,6 +583,7 @@ Nikita Schmidt
|
||||
Nikitinskit Dmitriy
|
||||
Niklas Angebrand
|
||||
Nikolai Kondrashov
|
||||
Ning Dong
|
||||
Nir Soffer
|
||||
Nis Jorgensen
|
||||
Nodak Sodak
|
||||
@@ -554,18 +595,21 @@ Olaf St
|
||||
Oren Tirosh
|
||||
P R Schaffner
|
||||
Pascal Terjan
|
||||
Pat Ray
|
||||
Patrick Bihan-Faou
|
||||
Patrick Monnerat
|
||||
Patrick Scott
|
||||
Patrick Smith
|
||||
Patrik Thunstrom
|
||||
Paul Harrington
|
||||
Paul Howarth
|
||||
Paul Marquis
|
||||
Paul Moore
|
||||
Paul Nolan
|
||||
Paul Querna
|
||||
Pavel Cenek
|
||||
Pavel Orehov
|
||||
Pavel Raiskup
|
||||
Pawel A. Gajda
|
||||
Pawel Kierski
|
||||
Pedro Neves
|
||||
@@ -595,12 +639,15 @@ Philippe Raoult
|
||||
Philippe Vaucher
|
||||
Pierre
|
||||
Pierre Brico
|
||||
Pierre Joye
|
||||
Pooyan McSporran
|
||||
Pramod Sharma
|
||||
Puneet Pawaia
|
||||
Quagmire
|
||||
Quanah Gibson-Mount
|
||||
Rafa Muyo
|
||||
Rafael Sagula
|
||||
Rainer Canavan
|
||||
Rainer Koenig
|
||||
Ralf S. Engelschall
|
||||
Ralph Beckmann
|
||||
@@ -638,6 +685,7 @@ Robert Foreman
|
||||
Robert Iakobashvili
|
||||
Robert Olson
|
||||
Robert Weaver
|
||||
Robin Cornelius
|
||||
Robin Johnson
|
||||
Robin Kay
|
||||
Robson Braga Araujo
|
||||
@@ -651,6 +699,9 @@ Ron Zapp
|
||||
Rosimildo da Silva
|
||||
Roy Shan
|
||||
Rune Kleveland
|
||||
Ruslan Gazizov
|
||||
Rutger Hofman
|
||||
Ryan Chan
|
||||
Ryan Nelson
|
||||
S. Moonesamy
|
||||
Salvador D<>vila
|
||||
@@ -676,6 +727,7 @@ Shard
|
||||
Shawn Poulson
|
||||
Shmulik Regev
|
||||
Siddhartha Prakash Jain
|
||||
Sidney San Martin
|
||||
Siegfried Gyuricsko
|
||||
Simon Dick
|
||||
Simon Josefsson
|
||||
@@ -689,6 +741,7 @@ Stan van de Burgt
|
||||
Stefan Esser
|
||||
Stefan Krause
|
||||
Stefan Teleman
|
||||
Stefan Tomanek
|
||||
Stefan Ulrich
|
||||
Stephan Bergmann
|
||||
Stephen Collyer
|
||||
@@ -703,6 +756,7 @@ Steve Oliphant
|
||||
Steve Roskowski
|
||||
Steven Bazyl
|
||||
Steven G. Johnson
|
||||
Steven M. Schweda
|
||||
Stoned Elipot
|
||||
Sven Anders
|
||||
Sven Neuhaus
|
||||
@@ -714,6 +768,7 @@ Tanguy Fautre
|
||||
Temprimus
|
||||
Thomas J. Moore
|
||||
Thomas Klausner
|
||||
Thomas Lopatic
|
||||
Thomas Schwinge
|
||||
Thomas Tonino
|
||||
Tim Ansell
|
||||
@@ -721,12 +776,14 @@ Tim Baker
|
||||
Tim Bartley
|
||||
Tim Chen
|
||||
Tim Costello
|
||||
Tim Newsome
|
||||
Tim Sneddon
|
||||
Tobias Rundstr<74>m
|
||||
Toby Peterson
|
||||
Todd Kulesza
|
||||
Todd Vierling
|
||||
Tom Benoist
|
||||
Tom Donovan
|
||||
Tom Lee
|
||||
Tom Mattison
|
||||
Tom Moers
|
||||
@@ -758,6 +815,7 @@ Vincent Le Normand
|
||||
Vincent Penquerc'h
|
||||
Vincent Sanders
|
||||
Vlad Grachov
|
||||
Vlad Ureche
|
||||
Vladimir Lazarenko
|
||||
Vojtech Janota
|
||||
Vojtech Minarik
|
||||
|
126
docs/TODO
126
docs/TODO
@@ -16,6 +16,7 @@
|
||||
1.2 More data sharing
|
||||
1.3 struct lifreq
|
||||
1.4 signal-based resolver timeouts
|
||||
1.5 get rid of PATH_MAX
|
||||
|
||||
2. libcurl - multi interface
|
||||
2.1 More non-blocking
|
||||
@@ -27,7 +28,7 @@
|
||||
3.1 More and better
|
||||
|
||||
4. FTP
|
||||
4.1 PRET
|
||||
4.1 HOST
|
||||
4.2 Alter passive/active on failure and retry
|
||||
4.3 Earlier bad letter detection
|
||||
4.4 REST for large files
|
||||
@@ -55,33 +56,27 @@
|
||||
7.7 Support other SSL libraries
|
||||
7.8 Support SRP on the TLS layer
|
||||
7.9 improve configure --with-ssl
|
||||
7.10 Make NTLM work with other crypto functions
|
||||
|
||||
8. GnuTLS
|
||||
8.1 SSL engine stuff
|
||||
8.2 SRP
|
||||
8.3 non-blocking
|
||||
8.4 check connection
|
||||
8.3 check connection
|
||||
8.4 non-gcrypt
|
||||
|
||||
9. Other protocols
|
||||
9.1 ditch ldap-specific select
|
||||
|
||||
10. New protocols
|
||||
10.1 RTSP
|
||||
10.2 RSYNC
|
||||
10.3 RTMP
|
||||
10.1 RSYNC
|
||||
|
||||
11. Client
|
||||
11.1 Content-Disposition
|
||||
11.2 sync
|
||||
11.3 glob posts
|
||||
11.4 prevent file overwriting
|
||||
11.5 ftp wildcard download
|
||||
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
|
||||
11.1 sync
|
||||
11.2 glob posts
|
||||
11.3 prevent file overwriting
|
||||
11.4 simultaneous parallel transfers
|
||||
11.5 provide formpost headers
|
||||
11.6 url-specific options
|
||||
11.7 metalink support
|
||||
11.8 warning when setting an option
|
||||
|
||||
12. Build
|
||||
12.1 roffit
|
||||
@@ -140,6 +135,15 @@
|
||||
Also, alarm() provides timeout resolution only to the nearest second. alarm
|
||||
ought to be replaced by setitimer on systems that support it.
|
||||
|
||||
1.5 get rid of PATH_MAX
|
||||
|
||||
Having code use and rely on PATH_MAX is not nice:
|
||||
http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
|
||||
|
||||
Currently the SSH based code uses it a bit, but to remove PATH_MAX from there
|
||||
we need libssh2 to properly tell us when we pass in a too small buffer and
|
||||
its current API (as of libssh2 1.2.7) doesn't.
|
||||
|
||||
2. libcurl - multi interface
|
||||
|
||||
2.1 More non-blocking
|
||||
@@ -148,7 +152,6 @@
|
||||
EWOULDBLOCK or similar. Blocking cases include:
|
||||
|
||||
- Name resolves on non-windows unless c-ares is used
|
||||
- GnuTLS SSL connections
|
||||
- NSS SSL connections
|
||||
- Active FTP connections
|
||||
- HTTP proxy CONNECT operations
|
||||
@@ -190,7 +193,6 @@
|
||||
serial requests and currently libcurl only supports that for HEAD and GET
|
||||
requests but it should also be possible for PUT.
|
||||
|
||||
|
||||
3. Documentation
|
||||
|
||||
3.1 More and better
|
||||
@@ -199,12 +201,12 @@
|
||||
|
||||
4. FTP
|
||||
|
||||
4.1 PRET
|
||||
4.1 HOST
|
||||
|
||||
PRET is a command that primarily "drftpd" supports, which could be useful
|
||||
when using libcurl against such a server. It is a non-standard and a rather
|
||||
oddly designed command, but...
|
||||
http://curl.haxx.se/bug/feature.cgi?id=1729967
|
||||
HOST is a suggested command in the works for a client to tell which host name
|
||||
to use, to offer FTP servers named-based virtual hosting:
|
||||
|
||||
http://tools.ietf.org/html/draft-hethmon-mcmurray-ftp-hosts-11
|
||||
|
||||
4.2 Alter passive/active on failure and retry
|
||||
|
||||
@@ -343,14 +345,6 @@ to provide the data to send.
|
||||
make the configure --with-ssl option first check for OpenSSL, then GnuTLS,
|
||||
then NSS...
|
||||
|
||||
7.10 Make NTLM work with other crypto functions
|
||||
|
||||
Get NTLM working using the functions provided by NSS etc. Not strictly
|
||||
SSL/TLS related, but hey... Another option is to get available DES and MD4
|
||||
source code from the cryptopp library. They are fine license-wise, but are
|
||||
C++. NTLM currenly only works when libcurl is built with OpenSSL or GnuTLS
|
||||
support.
|
||||
|
||||
8. GnuTLS
|
||||
|
||||
8.1 SSL engine stuff
|
||||
@@ -362,54 +356,34 @@ to provide the data to send.
|
||||
Work out a common method with Peter Sylvester's OpenSSL-patch for SRP on the
|
||||
TLS to provide name and password. GnuTLS already supports it...
|
||||
|
||||
8.3 non-blocking
|
||||
|
||||
Fix the connection phase to be non-blocking when multi interface is used
|
||||
|
||||
8.4 check connection
|
||||
8.3 check connection
|
||||
|
||||
Add a way to check if the connection seems to be alive, to correspond to the
|
||||
SSL_peak() way we use with OpenSSL.
|
||||
|
||||
8.4 non-gcrypt
|
||||
|
||||
libcurl assumes that there are gcrypt functions available when
|
||||
GnuTLS is.
|
||||
|
||||
GnuTLS can be built to use libnettle instead as crypto library,
|
||||
which breaks the previously mentioned assumption
|
||||
|
||||
The correct fix would be to detect which crypto layer that is in use and
|
||||
adapt our code to use that instead of blindly assuming gcrypt.
|
||||
|
||||
9. Other protocols
|
||||
|
||||
9.1 ditch ldap-specific select
|
||||
|
||||
* Look over the implementation. The looping will have to "go away" from the
|
||||
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
|
||||
|
||||
RFC2326 (protocol - very HTTP-like, also contains URL description)
|
||||
|
||||
10.2 RSYNC
|
||||
10.1 RSYNC
|
||||
|
||||
There's no RFC for protocol nor URI/URL format. An implementation should
|
||||
most probably use an existing rsync library, such as librsync.
|
||||
|
||||
10.3 RTMP
|
||||
|
||||
There exists a patch that claims to introduce this protocol:
|
||||
http://osdir.com/ml/gnu.gnash.devel2/2006-11/msg00278.html, further details
|
||||
in the feature-request: http://curl.haxx.se/bug/feature.cgi?id=1843469
|
||||
|
||||
11. Client
|
||||
|
||||
11.1 Content-Disposition
|
||||
|
||||
Add option that is similar to -O but that takes the output file name from the
|
||||
Content-Disposition: header, and/or uses the local file name used in
|
||||
redirections for the cases the server bounces the request further to a
|
||||
different file (name): http://curl.haxx.se/bug/feature.cgi?id=1364676
|
||||
|
||||
11.2 sync
|
||||
11.1 sync
|
||||
|
||||
"curl --sync http://example.com/feed[1-100].rss" or
|
||||
"curl --sync http://example.net/{index,calendar,history}.html"
|
||||
@@ -418,12 +392,12 @@ to provide the data to send.
|
||||
remote file is newer than the local file. A Last-Modified HTTP date header
|
||||
should also be used to set the mod date on the downloaded file.
|
||||
|
||||
11.3 glob posts
|
||||
11.2 glob posts
|
||||
|
||||
Globbing support for -d and -F, as in 'curl -d "name=foo[0-9]" URL'.
|
||||
This is easily scripted though.
|
||||
|
||||
11.4 prevent file overwriting
|
||||
11.3 prevent file overwriting
|
||||
|
||||
Add an option that prevents cURL from overwriting existing local files. When
|
||||
used, and there already is an existing file with the target file name
|
||||
@@ -431,18 +405,14 @@ to provide the data to send.
|
||||
existing). So that index.html becomes first index.html.1 and then
|
||||
index.html.2 etc.
|
||||
|
||||
11.5 ftp wildcard download
|
||||
|
||||
"curl ftp://site.com/*.txt"
|
||||
|
||||
11.6 simultaneous parallel transfers
|
||||
11.4 simultaneous parallel transfers
|
||||
|
||||
The client could be told to use maximum N simultaneous parallel transfers and
|
||||
then just make sure that happens. It should of course not make more than one
|
||||
connection to the same remote host. This would require the client to use the
|
||||
multi interface. http://curl.haxx.se/bug/feature.cgi?id=1558595
|
||||
|
||||
11.7 provide formpost headers
|
||||
11.5 provide formpost headers
|
||||
|
||||
Extending the capabilities of the multipart formposting. How about leaving
|
||||
the ';type=foo' syntax as it is and adding an extra tag (headers) which
|
||||
@@ -456,7 +426,7 @@ to provide the data to send.
|
||||
which should overwrite the program reasonable defaults (plain/text,
|
||||
8bit...)
|
||||
|
||||
11.8 url-specific options
|
||||
11.6 url-specific options
|
||||
|
||||
Provide a way to make options bound to a specific URL among several on the
|
||||
command line. Possibly by letting ':' separate options between URLs,
|
||||
@@ -470,12 +440,12 @@ to provide the data to send.
|
||||
|
||||
The example would do a POST-GET-POST combination on a single command line.
|
||||
|
||||
11.9 metalink support
|
||||
11.7 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
|
||||
11.8 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
|
||||
|
@@ -1,5 +1,5 @@
|
||||
Online: http://curl.haxx.se/docs/httpscripting.html
|
||||
Date: May 28, 2008
|
||||
Date: Jan 19, 2011
|
||||
|
||||
The Art Of Scripting HTTP Requests Using Curl
|
||||
=============================================
|
||||
@@ -38,10 +38,26 @@ Date: May 28, 2008
|
||||
request a particular action, and then the server replies a few text lines
|
||||
before the actual requested content is sent to the client.
|
||||
|
||||
Using curl's option -v will display what kind of commands curl sends to the
|
||||
server, as well as a few other informational texts. -v is the single most
|
||||
useful option when it comes to debug or even understand the curl<->server
|
||||
interaction.
|
||||
The client, curl, sends a HTTP request. The request contains a method (like
|
||||
GET, POST, HEAD etc), a number of request headers and sometimes a request
|
||||
body. The HTTP server responds with a status line (indicating if things went
|
||||
well), response headers and most often also a response body. The "body" part
|
||||
is the plain data you requested, like the actual HTML or the image etc.
|
||||
|
||||
1.1 See the Protocol
|
||||
|
||||
Using curl's option --verbose (-v as a short option) will display what kind
|
||||
of commands curl sends to the server, as well as a few other informational
|
||||
texts.
|
||||
|
||||
--verbose is the single most useful option when it comes to debug or even
|
||||
understand the curl<->server interaction.
|
||||
|
||||
Sometimes even --verbose is not enough. Then --trace and --trace-ascii offer
|
||||
even more details as they show EVERYTHING curl sends and receives. Use it
|
||||
like this:
|
||||
|
||||
curl --trace-ascii debugdump.txt http://www.example.com/
|
||||
|
||||
2. URL
|
||||
|
||||
@@ -61,10 +77,10 @@ Date: May 28, 2008
|
||||
you get a web page returned in your terminal window. The entire HTML document
|
||||
that that URL holds.
|
||||
|
||||
All HTTP replies contain a set of headers that are normally hidden, use
|
||||
curl's -i option to display them as well as the rest of the document. You can
|
||||
also ask the remote server for ONLY the headers by using the -I option (which
|
||||
will make curl issue a HEAD request).
|
||||
All HTTP replies contain a set of response headers that are normally hidden,
|
||||
use curl's --include (-i) option to display them as well as the rest of the
|
||||
document. You can also ask the remote server for ONLY the headers by using
|
||||
the --head (-I) option (which will make curl issue a HEAD request).
|
||||
|
||||
4. Forms
|
||||
|
||||
@@ -103,7 +119,7 @@ Date: May 28, 2008
|
||||
To make curl do the GET form post for you, just enter the expected created
|
||||
URL:
|
||||
|
||||
curl "www.hotmail.com/when/junk.cgi?birthyear=1905&press=OK"
|
||||
curl "http://www.hotmail.com/when/junk.cgi?birthyear=1905&press=OK"
|
||||
|
||||
4.2 POST
|
||||
|
||||
@@ -127,7 +143,8 @@ Date: May 28, 2008
|
||||
And to use curl to post this form with the same data filled in as before, we
|
||||
could do it like:
|
||||
|
||||
curl -d "birthyear=1905&press=%20OK%20" www.hotmail.com/when/junk.cgi
|
||||
curl --data "birthyear=1905&press=%20OK%20" \
|
||||
http://www.example.com/when.cgi
|
||||
|
||||
This kind of POST will use the Content-Type
|
||||
application/x-www-form-urlencoded and is the most widely used POST kind.
|
||||
@@ -139,7 +156,7 @@ Date: May 28, 2008
|
||||
|
||||
Recent curl versions can in fact url-encode POST data for you, like this:
|
||||
|
||||
curl --data-urlencode "name=I am Daniel" www.example.com
|
||||
curl --data-urlencode "name=I am Daniel" http://www.example.com
|
||||
|
||||
4.3 File Upload POST
|
||||
|
||||
@@ -160,7 +177,7 @@ Date: May 28, 2008
|
||||
|
||||
To post to a form like this with curl, you enter a command line like:
|
||||
|
||||
curl -F upload=@localfilename -F press=OK [URL]
|
||||
curl --form upload=@localfilename --form press=OK [URL]
|
||||
|
||||
4.4 Hidden Fields
|
||||
|
||||
@@ -181,7 +198,7 @@ Date: May 28, 2008
|
||||
To post this with curl, you won't have to think about if the fields are
|
||||
hidden or not. To curl they're all the same:
|
||||
|
||||
curl -d "birthyear=1905&press=OK&person=daniel" [URL]
|
||||
curl --data "birthyear=1905&press=OK&person=daniel" [URL]
|
||||
|
||||
4.5 Figure Out What A POST Looks Like
|
||||
|
||||
@@ -204,7 +221,7 @@ Date: May 28, 2008
|
||||
|
||||
Put a file to a HTTP server with curl:
|
||||
|
||||
curl -T uploadfile www.uploadhttp.com/receive.cgi
|
||||
curl --upload-file uploadfile http://www.example.com/receive.cgi
|
||||
|
||||
6. HTTP Authentication
|
||||
|
||||
@@ -217,7 +234,7 @@ Date: May 28, 2008
|
||||
|
||||
To tell curl to use a user and password for authentication:
|
||||
|
||||
curl -u name:password www.secrets.com
|
||||
curl --user name:password http://www.example.com
|
||||
|
||||
The site might require a different authentication method (check the headers
|
||||
returned by the server), and then --ntlm, --digest, --negotiate or even
|
||||
@@ -228,7 +245,7 @@ Date: May 28, 2008
|
||||
may require its own user and password to allow the client to get through to
|
||||
the Internet. To specify those with curl, run something like:
|
||||
|
||||
curl -U proxyuser:proxypassword curl.haxx.se
|
||||
curl --proxy-user proxyuser:proxypassword curl.haxx.se
|
||||
|
||||
If your proxy requires the authentication to be done using the NTLM method,
|
||||
use --proxy-ntlm, if it requires Digest use --proxy-digest.
|
||||
@@ -257,7 +274,7 @@ Date: May 28, 2008
|
||||
|
||||
Use curl to set the referer field with:
|
||||
|
||||
curl -e http://curl.haxx.se daniel.haxx.se
|
||||
curl --referer http://www.example.come http://www.example.com
|
||||
|
||||
8. User Agent
|
||||
|
||||
@@ -273,13 +290,13 @@ Date: May 28, 2008
|
||||
is time to set the User Agent field to fool the server into thinking you're
|
||||
one of those browsers.
|
||||
|
||||
To make curl look like Internet Explorer on a Windows 2000 box:
|
||||
To make curl look like Internet Explorer 5 on a Windows 2000 box:
|
||||
|
||||
curl -A "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]
|
||||
curl --user-agent "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL]
|
||||
|
||||
Or why not look like you're using Netscape 4.73 on a Linux (PIII) box:
|
||||
Or why not look like you're using Netscape 4.73 on an old Linux box:
|
||||
|
||||
curl -A "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL]
|
||||
curl --user-agent "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL]
|
||||
|
||||
9. Redirects
|
||||
|
||||
@@ -294,11 +311,12 @@ Date: May 28, 2008
|
||||
|
||||
To tell curl to follow a Location:
|
||||
|
||||
curl -L www.sitethatredirects.com
|
||||
curl --location http://www.example.com
|
||||
|
||||
If you use curl to POST to a site that immediately redirects you to another
|
||||
page, you can safely use -L and -d/-F together. Curl will only use POST in
|
||||
the first request, and then revert to GET in the following operations.
|
||||
page, you can safely use --location (-L) and --data/--form together. Curl will
|
||||
only use POST in the first request, and then revert to GET in the following
|
||||
operations.
|
||||
|
||||
10. Cookies
|
||||
|
||||
@@ -320,16 +338,16 @@ Date: May 28, 2008
|
||||
The simplest way to send a few cookies to the server when getting a page with
|
||||
curl is to add them on the command line like:
|
||||
|
||||
curl -b "name=Daniel" www.cookiesite.com
|
||||
curl --cookie "name=Daniel" http://www.example.com
|
||||
|
||||
Cookies are sent as common HTTP headers. This is practical as it allows curl
|
||||
to record cookies simply by recording headers. Record cookies with curl by
|
||||
using the -D option like:
|
||||
using the --dump-header (-D) option like:
|
||||
|
||||
curl -D headers_and_cookies www.cookiesite.com
|
||||
curl --dump-header headers_and_cookies http://www.example.com
|
||||
|
||||
(Take note that the -c option described below is a better way to store
|
||||
cookies.)
|
||||
(Take note that the --cookie-jar option described below is a better way to
|
||||
store cookies.)
|
||||
|
||||
Curl has a full blown cookie parsing engine built-in that comes to use if you
|
||||
want to reconnect to a server and use cookies that were stored from a
|
||||
@@ -337,24 +355,25 @@ Date: May 28, 2008
|
||||
believing you had a previous connection). To use previously stored cookies,
|
||||
you run curl like:
|
||||
|
||||
curl -b stored_cookies_in_file www.cookiesite.com
|
||||
curl --cookie stored_cookies_in_file http://www.example.com
|
||||
|
||||
Curl's "cookie engine" gets enabled when you use the -b option. If you only
|
||||
want curl to understand received cookies, use -b with a file that doesn't
|
||||
exist. Example, if you want to let curl understand cookies from a page and
|
||||
follow a location (and thus possibly send back cookies it received), you can
|
||||
invoke it like:
|
||||
Curl's "cookie engine" gets enabled when you use the --cookie option. If you
|
||||
only want curl to understand received cookies, use --cookie with a file that
|
||||
doesn't exist. Example, if you want to let curl understand cookies from a
|
||||
page and follow a location (and thus possibly send back cookies it received),
|
||||
you can invoke it like:
|
||||
|
||||
curl -b nada -L www.cookiesite.com
|
||||
curl --cookie nada --location http://www.example.com
|
||||
|
||||
Curl has the ability to read and write cookie files that use the same file
|
||||
format that Netscape and Mozilla do. It is a convenient way to share cookies
|
||||
between browsers and automatic scripts. The -b switch automatically detects
|
||||
if a given file is such a cookie file and parses it, and by using the
|
||||
-c/--cookie-jar option you'll make curl write a new cookie file at the end of
|
||||
an operation:
|
||||
between browsers and automatic scripts. The --cookie (-b) switch
|
||||
automatically detects if a given file is such a cookie file and parses it,
|
||||
and by using the --cookie-jar (-c) option you'll make curl write a new cookie
|
||||
file at the end of an operation:
|
||||
|
||||
curl -b cookies.txt -c newcookies.txt www.cookiesite.com
|
||||
curl --cookie cookies.txt --cookie-jar newcookies.txt \
|
||||
http://www.example.com
|
||||
|
||||
11. HTTPS
|
||||
|
||||
@@ -370,7 +389,7 @@ Date: May 28, 2008
|
||||
Curl supports encrypted fetches thanks to the freely available OpenSSL
|
||||
libraries. To get a page from a HTTPS server, simply run curl like:
|
||||
|
||||
curl https://that.secure.server.com
|
||||
curl https://secure.example.com
|
||||
|
||||
11.1 Certificates
|
||||
|
||||
@@ -381,13 +400,13 @@ Date: May 28, 2008
|
||||
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
|
||||
curl --cert mycert.pem https://secure.example.com
|
||||
|
||||
curl also tries to verify that the server is who it claims to be, by
|
||||
verifying the server's certificate against a locally stored CA cert
|
||||
bundle. Failing the verification will cause curl to deny the connection. You
|
||||
must then use -k in case you want to tell curl to ignore that the server
|
||||
can't be verified.
|
||||
must then use --insecure (-k) in case you want to tell curl to ignore that
|
||||
the server can't be verified.
|
||||
|
||||
More about server certificate verification and ca cert bundles can be read
|
||||
in the SSLCERTS document, available online here:
|
||||
@@ -402,17 +421,18 @@ Date: May 28, 2008
|
||||
For example, you can change the POST request to a PROPFIND and send the data
|
||||
as "Content-Type: text/xml" (instead of the default Content-Type) like this:
|
||||
|
||||
curl -d "<xml>" -H "Content-Type: text/xml" -X PROPFIND url.com
|
||||
curl --data "<xml>" --header "Content-Type: text/xml" \
|
||||
--request PROPFIND url.com
|
||||
|
||||
You can delete a default header by providing one without content. Like you
|
||||
can ruin the request by chopping off the Host: header:
|
||||
|
||||
curl -H "Host:" http://mysite.com
|
||||
curl --header "Host:" http://www.example.com
|
||||
|
||||
You can add headers the same way. Your server may want a "Destination:"
|
||||
header, and you can add it:
|
||||
|
||||
curl -H "Destination: http://moo.com/nowhere" http://url.com
|
||||
curl --header "Destination: http://nowhere" http://example.com
|
||||
|
||||
13. Web Login
|
||||
|
||||
@@ -443,7 +463,6 @@ Date: May 28, 2008
|
||||
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
|
||||
@@ -456,8 +475,8 @@ Date: May 28, 2008
|
||||
* Use the --trace-ascii option to store fully detailed logs of the requests
|
||||
for easier analyzing and better understanding
|
||||
|
||||
* Make sure you check for and use cookies when needed (both reading with -b
|
||||
and writing with -c)
|
||||
* Make sure you check for and use cookies when needed (both reading with
|
||||
--cookie and writing with --cookie-jar)
|
||||
|
||||
* Set user-agent to one like a recent popular browser does
|
||||
|
||||
@@ -479,12 +498,10 @@ Date: May 28, 2008
|
||||
RFC 2616 is a must to read if you want in-depth understanding of the HTTP
|
||||
protocol.
|
||||
|
||||
RFC 2396 explains the URL syntax.
|
||||
RFC 3986 explains the URL syntax.
|
||||
|
||||
RFC 2109 defines how cookies are supposed to work.
|
||||
|
||||
RFC 1867 defines the HTTP post upload format.
|
||||
|
||||
http://www.openssl.org is the home of the OpenSSL project
|
||||
|
||||
http://curl.haxx.se is the home of the cURL project
|
||||
|
170
docs/curl.1
170
docs/curl.1
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2011, 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
|
||||
@@ -20,7 +20,7 @@
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH curl 1 "28 November 2009" "Curl 7.20.0" "Curl Manual"
|
||||
.TH curl 1 "28 November 2009" "Curl 7.21.4" "Curl Manual"
|
||||
.SH NAME
|
||||
curl \- transfer a URL
|
||||
.SH SYNOPSIS
|
||||
@@ -29,8 +29,9 @@ curl \- transfer a URL
|
||||
.SH DESCRIPTION
|
||||
.B curl
|
||||
is a tool to transfer data from or to a server, using one of the supported
|
||||
protocols (HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, DICT, TELNET, LDAP or
|
||||
FILE). The command is designed to work without user interaction.
|
||||
protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP,
|
||||
LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP). The
|
||||
command is designed to work without user interaction.
|
||||
|
||||
curl offers a busload of useful tricks like proxy support, user
|
||||
authentication, FTP upload, HTTP post, SSL connections, cookies, file transfer
|
||||
@@ -55,16 +56,16 @@ or you can get sequences of alphanumeric series by using [] as in:
|
||||
ftp://ftp.numericals.com/file[001-100].txt (with leading zeros)
|
||||
ftp://ftp.letters.com/file[a-z].txt
|
||||
|
||||
No nesting of the sequences is supported at the moment, but you can use
|
||||
several ones next to each other:
|
||||
Nested sequences are not supported, but you can use several ones next to each
|
||||
other:
|
||||
|
||||
http://any.org/archive[1996-1999]/vol[1-4]/part{a,b,c}.html
|
||||
|
||||
You can specify any amount of URLs on the command line. They will be fetched
|
||||
in a sequential manner in the specified order.
|
||||
|
||||
Since curl 7.15.1 you can also specify a step counter for the ranges, so that
|
||||
you can get every Nth number or letter:
|
||||
You can specify a step counter for the ranges to get every Nth number or
|
||||
letter:
|
||||
|
||||
http://www.numericals.com/file[1-100:10].txt
|
||||
http://www.letters.com/file[a-z:2].txt
|
||||
@@ -87,8 +88,8 @@ invokes.
|
||||
curl normally displays a progress meter during operations, indicating the amount
|
||||
of transferred data, transfer speeds and estimated time left, etc.
|
||||
|
||||
However, since curl displays this data to the terminal by default, if you invoke
|
||||
curl to do an operation and it is about to write data to the terminal, it
|
||||
curl displays this data to the terminal by default, so if you invoke curl to
|
||||
do an operation and it is about to write data to the terminal, it
|
||||
\fIdisables\fP the progress meter as otherwise it would mess up the output
|
||||
mixing progress meter and response data.
|
||||
|
||||
@@ -300,8 +301,8 @@ away. EPRT and LPRT are extensions to the original FTP protocol, and may not wor
|
||||
on all servers, but they enable more functionality in a better way than the
|
||||
traditional PORT command.
|
||||
|
||||
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.
|
||||
\fB--eprt\fP can be used to explicitly enable EPRT again and \fB--no-eprt\fP
|
||||
is an alias for \fB--disable-eprt\fP.
|
||||
|
||||
Disabling EPRT only changes the active behavior. If you want to switch to
|
||||
passive mode you need to not use \fI-P/--ftp-port\fP or force it with
|
||||
@@ -311,8 +312,8 @@ passive mode you need to not use \fI-P/--ftp-port\fP or force it with
|
||||
transfers. Curl will normally always first attempt to use EPSV before PASV,
|
||||
but with this option, it will not try using EPSV.
|
||||
|
||||
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.
|
||||
\fB--epsv\fP can be used to explicitly enable EPRT again and \fB--no-epsv\fP
|
||||
is an alias for \fB--disable-epsv\fP.
|
||||
|
||||
Disabling EPSV only changes the passive behavior. If you want to switch to
|
||||
active mode you need to use \fI-P/--ftp-port\fP.
|
||||
@@ -357,11 +358,12 @@ this option assumes a \&"certificate" file that is the private key and the
|
||||
private certificate concatenated! See \fI--cert\fP and \fI--key\fP to specify
|
||||
them independently.
|
||||
|
||||
If curl is built against the NSS SSL library then this option tells
|
||||
If curl is built against the NSS SSL library then this option can tell
|
||||
curl the nickname of the certificate to use within the NSS database defined
|
||||
by the environment variable SSL_DIR (or by default /etc/pki/nssdb). If the
|
||||
NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be
|
||||
loaded.
|
||||
loaded. If you want to use a file from the current directory, please precede
|
||||
it with "./" prefix, in order to avoid confusion with a nickname.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "--cert-type <type>"
|
||||
@@ -392,11 +394,11 @@ may be loaded.
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "--capath <CA certificate directory>"
|
||||
(SSL) Tells curl to use the specified certificate directory to verify the
|
||||
peer. The certificates must be in PEM format, and the directory must have been
|
||||
processed using the c_rehash utility supplied with openssl. Using
|
||||
\fI--capath\fP can allow curl to make SSL-connections much more efficiently
|
||||
than using \fI--cacert\fP if the \fI--cacert\fP file contains many CA
|
||||
certificates.
|
||||
peer. The certificates must be in PEM format, and if curl is built against
|
||||
OpenSSL, the directory must have been processed using the c_rehash utility
|
||||
supplied with OpenSSL. Using \fI--capath\fP can allow OpenSSL-powered curl to
|
||||
make SSL-connections much more efficiently than using \fI--cacert\fP if the
|
||||
\fI--cacert\fP file contains many CA certificates.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "-f/--fail"
|
||||
@@ -426,7 +428,7 @@ server. The method argument should be one of the following alternatives:
|
||||
.RS
|
||||
.IP multicwd
|
||||
curl does a single CWD operation for each path part in the given URL. For deep
|
||||
hierarchies this means very many commands. This is how RFC1738 says it should
|
||||
hierarchies this means very many commands. This is how RFC 1738 says it should
|
||||
be done. This is the default but the slowest behavior.
|
||||
.IP nocwd
|
||||
curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full
|
||||
@@ -438,7 +440,7 @@ compliant than 'nocwd' but without the full penalty of 'multicwd'.
|
||||
.RE
|
||||
(Added in 7.15.1)
|
||||
.IP "--ftp-pasv"
|
||||
(FTP) Use passive mode for the data conection. Passive is the internal default
|
||||
(FTP) Use passive mode for the data connection. Passive is the internal default
|
||||
behavior, but using this option can be used to override a previous
|
||||
\fI-P/-ftp-port\fP option. (Added in 7.11.0)
|
||||
|
||||
@@ -500,7 +502,7 @@ waits for a reply from the server.
|
||||
.IP "-F/--form <name=content>"
|
||||
(HTTP) This lets curl emulate a filled-in form in which a user has pressed the
|
||||
submit button. This causes curl to POST data using the Content-Type
|
||||
multipart/form-data according to RFC2388. This enables uploading of binary
|
||||
multipart/form-data according to RFC 2388. This enables uploading of binary
|
||||
files etc. To force the 'content' part to be a file, prefix the file name
|
||||
with an @ sign. To just get the content part from a file, prefix the file name
|
||||
with the symbol <. The difference between @ and < is then that @ makes a file
|
||||
@@ -513,8 +515,8 @@ input:
|
||||
|
||||
\fBcurl\fP -F password=@/etc/passwd www.mypasswords.com
|
||||
|
||||
To read the file's content from stdin instead of a file, use - where the file
|
||||
name should've been. This goes for both @ and < constructs.
|
||||
To read content from stdin instead of a file, use - as the filename. This goes
|
||||
for both @ and < constructs.
|
||||
|
||||
You can also tell curl what Content-Type to use by using 'type=', in a manner
|
||||
similar to:
|
||||
@@ -525,8 +527,8 @@ or
|
||||
|
||||
\fBcurl\fP -F "name=daniel;type=text/foo" url.com
|
||||
|
||||
You can also explicitly change the name field of an file upload part by
|
||||
setting filename=, like this:
|
||||
You can also explicitly change the name field of a file upload part by setting
|
||||
filename=, like this:
|
||||
|
||||
\fBcurl\fP -F "file=@localfile;filename=nameinpost" url.com
|
||||
|
||||
@@ -927,6 +929,52 @@ in web browsers, so curl does the conversion by default to maintain
|
||||
consistency. However, a server may require a POST to remain a POST after such
|
||||
a redirection. This option is meaningful only when using \fI-L/--location\fP
|
||||
(Added in 7.19.1)
|
||||
.IP "--proto <protocols>"
|
||||
Tells curl to use the listed protocols for its initial retrieval. Protocols
|
||||
are evaluated left to right, are comma separated, and are each a protocol
|
||||
name or 'all', optionally prefixed by zero or more modifiers. Available
|
||||
modifiers are:
|
||||
.RS
|
||||
.TP 3
|
||||
.B +
|
||||
Permit this protocol in addition to protocols already permitted (this is
|
||||
the default if no modifier is used).
|
||||
.TP
|
||||
.B -
|
||||
Deny this protocol, removing it from the list of protocols already permitted.
|
||||
.TP
|
||||
.B =
|
||||
Permit only this protocol (ignoring the list already permitted), though
|
||||
subject to later modification by subsequent entries in the comma separated
|
||||
list.
|
||||
.RE
|
||||
.IP
|
||||
For example:
|
||||
.RS
|
||||
.TP 15
|
||||
.B --proto -ftps
|
||||
uses the default protocols, but disables ftps
|
||||
.TP
|
||||
.B --proto -all,https,+http
|
||||
only enables http and https
|
||||
.TP
|
||||
.B --proto =http,https
|
||||
also only enables http and https
|
||||
.RE
|
||||
.IP
|
||||
Unknown protocols produce a warning. This allows scripts to safely rely on
|
||||
being able to disable potentially dangerous protocols, without relying upon
|
||||
support for that protocol being built into curl to avoid an error.
|
||||
|
||||
This option can be used multiple times, in which case the effect is the same
|
||||
as concatenating the protocols into one instance of the option.
|
||||
|
||||
(Added in 7.20.2)
|
||||
.IP "--proto-redir <protocols>"
|
||||
Tells curl to use the listed protocols after a redirect. See --proto for
|
||||
how protocols are represented.
|
||||
|
||||
(Added in 7.20.2)
|
||||
.IP "--proxy-anyauth"
|
||||
Tells curl to pick a suitable authentication method when communicating with
|
||||
the given proxy. This might cause an extra request/response round-trip. (Added
|
||||
@@ -1004,11 +1052,12 @@ just before the transfer command(s), prefix the command with a '+' (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 commands listed below to
|
||||
RFC 959 defines to FTP servers, or one of the commands listed below to
|
||||
SFTP servers. 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
|
||||
commands itself before sending them to the server. File names may be quoted
|
||||
shell-style to embed spaces or special characters. Following is the list of
|
||||
all supported SFTP quote commands:
|
||||
.RS
|
||||
.IP "chgrp group file"
|
||||
@@ -1095,6 +1144,18 @@ encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2)
|
||||
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.
|
||||
.IP "--resolve <host:port:address>"
|
||||
Provide a custom address for a specific host and port pair. Using this, you
|
||||
can make the curl requests(s) use a specified address and prevent the
|
||||
otherwise normally resolved address to be used. Consider it a sort of
|
||||
/etc/hosts alternative provided on the command line. The port number should be
|
||||
the number used for the specific protocol the host will be used for. It means
|
||||
you need several entries if you want to provide address for the same host but
|
||||
different ports.
|
||||
|
||||
This option can be used many times to add many host names to resolve.
|
||||
|
||||
(Added in 7.21.3)
|
||||
.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
|
||||
@@ -1175,14 +1236,12 @@ This option (as well as \fI--socks4\fP) does not work with IPV6, FTPS or LDAP.
|
||||
The default service name for a socks server is rcmd/server-fqdn. This option
|
||||
allows you to change it.
|
||||
|
||||
Examples:
|
||||
--socks5 proxy-name \fI--socks5-gssapi-service\fP sockd would use
|
||||
sockd/proxy-name
|
||||
--socks5 proxy-name \fI--socks5-gssapi-service\fP sockd/real-name would use
|
||||
sockd/real-name for cases where the proxy-name does not match the princpal name.
|
||||
(Added in 7.19.4).
|
||||
Examples: --socks5 proxy-name \fI--socks5-gssapi-service\fP sockd would use
|
||||
sockd/proxy-name --socks5 proxy-name \fI--socks5-gssapi-service\fP
|
||||
sockd/real-name would use sockd/real-name for cases where the proxy-name does
|
||||
not match the principal name. (Added in 7.19.4).
|
||||
.IP "--socks5-gssapi-nec"
|
||||
As part of the gssapi negotiation a protection mode is negotiated. The rfc1961
|
||||
As part of the gssapi negotiation a protection mode is negotiated. RFC 1961
|
||||
says in section 4.3/4.4 it should be protected, but the NEC reference
|
||||
implementation does not. The option \fI--socks5-gssapi-nec\fP allows the
|
||||
unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
|
||||
@@ -1205,12 +1264,25 @@ XDISPLOC=<X display> Sets the X display location.
|
||||
NEW_ENV=<var,val> Sets an environment variable.
|
||||
.IP "--tftp-blksize <value>"
|
||||
(TFTP) Set TFTP BLKSIZE option (must be >512). This is the block size that
|
||||
curl will try to use when tranferring data to or from a TFTP server. By
|
||||
curl will try to use when transferring data to or from a TFTP server. By
|
||||
default 512 bytes will be used.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
|
||||
(Added in 7.20.0)
|
||||
.IP "--tlsauthtype <authtype>"
|
||||
Set TLS authentication type. Currently, the only supported option is "SRP",
|
||||
for TLS-SRP (RFC 5054). If \fI--tlsuser\fP and \fI--tlspassword\fP are
|
||||
specified but \fI--tlsauthtype\fP is not, then this option defaults to "SRP".
|
||||
(Added in 7.21.4)
|
||||
.IP "--tlsuser <user>"
|
||||
Set username for use with the TLS authentication method specified with
|
||||
\fI--tlsauthtype\fP. Requires that \fI--tlspassword\fP also be set. (Added in
|
||||
7.21.4)
|
||||
.IP "--tlspassword <password>"
|
||||
Set password for use with the TLS authentication method specified with
|
||||
\fI--tlsauthtype\fP. Requires that \fI--tlsuser\fP also be set. (Added in
|
||||
7.21.4)
|
||||
.IP "-T/--upload-file <file>"
|
||||
This transfers the specified local file to the remote URL. If there is no file
|
||||
part in the specified URL, Curl will append the local file name. NOTE that you
|
||||
@@ -1298,7 +1370,7 @@ If you think this option still doesn't give you enough details, consider using
|
||||
|
||||
This option overrides previous uses of \fI--trace-ascii\fP or \fI--trace\fP.
|
||||
|
||||
Use \fI-S/--silent\fP to make curl quiet.
|
||||
Use \fI-s/--silent\fP to make curl quiet.
|
||||
.IP "-V/--version"
|
||||
Displays information about curl and the libcurl version it uses.
|
||||
|
||||
@@ -1337,6 +1409,8 @@ This curl supports IDN - international domain names.
|
||||
.IP "SSPI"
|
||||
SSPI is supported. If you use NTLM and set a blank user name, curl will
|
||||
authenticate with your current user and password.
|
||||
.IP "TLS-SRP"
|
||||
SRP (Secure Remote Password) authentication is supported for TLS.
|
||||
.RE
|
||||
.IP "-w/--write-out <format>"
|
||||
Defines what to display on stdout after a completed and successful
|
||||
@@ -1493,9 +1567,9 @@ not set.
|
||||
|
||||
If this option is used several times, the last one will be used.
|
||||
.IP "-z/--time-cond <date expression>"
|
||||
(HTTP/FTP) Request a file that has been modified later than the given time and
|
||||
date, or one that has been modified before that time. The date expression can
|
||||
be all sorts of date strings or if it doesn't match any internal ones, it
|
||||
(HTTP/FTP/FILE) Request a file that has been modified later than the given time
|
||||
and date, or one that has been modified before that time. The date expression
|
||||
can be all sorts of date strings or if it doesn't match any internal ones, it
|
||||
tries to get the time from a given file name instead! See the
|
||||
\fIcurl_getdate(3)\fP man pages for date expression details.
|
||||
|
||||
@@ -1643,7 +1717,7 @@ Unknown TELNET option specified.
|
||||
.IP 49
|
||||
Malformed telnet option.
|
||||
.IP 51
|
||||
The peer's SSL certificate or SSH MD5 fingerprint was not ok.
|
||||
The peer's SSL certificate or SSH MD5 fingerprint was not OK.
|
||||
.IP 52
|
||||
The server didn't reply anything, which here is considered an error.
|
||||
.IP 53
|
||||
@@ -1704,6 +1778,16 @@ Failed to shut down the SSL connection.
|
||||
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 84
|
||||
The FTP PRET command failed
|
||||
.IP 85
|
||||
RTSP: mismatch of CSeq numbers
|
||||
.IP 86
|
||||
RTSP: mismatch of Session Identifiers
|
||||
.IP 87
|
||||
unable to parse FTP file list
|
||||
.IP 88
|
||||
FTP chunk callback reported error
|
||||
.IP XX
|
||||
More error codes will appear here in future releases. The existing ones
|
||||
are meant to never change.
|
||||
|
35
docs/examples/.gitignore
vendored
Normal file
35
docs/examples/.gitignore
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
10-at-a-time
|
||||
anyauthput
|
||||
certinfo
|
||||
chkspeed
|
||||
cookie_interface
|
||||
debug
|
||||
fileupload
|
||||
fopen
|
||||
ftp-wildcard
|
||||
ftpget
|
||||
ftpgetinfo
|
||||
ftpgetresp
|
||||
ftpupload
|
||||
getinfo
|
||||
getinmemory
|
||||
http-post
|
||||
httpcustomheader
|
||||
httpput
|
||||
https
|
||||
multi-app
|
||||
multi-debugcallback
|
||||
multi-double
|
||||
multi-post
|
||||
multi-single
|
||||
persistant
|
||||
post-callback
|
||||
postit2
|
||||
sendrecv
|
||||
sepheaders
|
||||
simple
|
||||
simplepost
|
||||
simplesmtp
|
||||
simplessl
|
||||
smtp-multi
|
||||
smtp-tls
|
@@ -119,7 +119,7 @@ int main(void)
|
||||
}
|
||||
|
||||
while (U) {
|
||||
while (CURLM_CALL_MULTI_PERFORM == curl_multi_perform(cm, &U));
|
||||
curl_multi_perform(cm, &U);
|
||||
|
||||
if (U) {
|
||||
FD_ZERO(&R);
|
||||
|
@@ -34,4 +34,4 @@ LDADD = $(LIBDIR)/libcurl.la
|
||||
# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
|
||||
include Makefile.inc
|
||||
|
||||
|
||||
all: $(check_PROGRAMS)
|
||||
|
@@ -1,16 +1,14 @@
|
||||
# These are all libcurl example programs to be test compiled
|
||||
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 \
|
||||
sendrecv httpcustomheader certinfo chkspeed ftpgetinfo
|
||||
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 \
|
||||
sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard \
|
||||
smtp-multi simplesmtp smtp-tls
|
||||
|
||||
# These examples require external dependencies that may not be commonly
|
||||
# available on POSIX systems, so don't bother attempting to compile them here.
|
||||
COMPLICATED_EXAMPLES = \
|
||||
curlgtk.c curlx.c htmltitle.cc cacertinmem.c ftpuploadresume.c \
|
||||
ghiper.c hiperfifo.c htmltidy.c multithread.c \
|
||||
opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c
|
||||
|
||||
COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cc cacertinmem.c \
|
||||
ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c \
|
||||
opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \
|
||||
smooth-gtk-thread.c version-check.pl
|
||||
|
@@ -111,7 +111,7 @@ int main(void)
|
||||
rv=curl_easy_setopt(ch,CURLOPT_WRITEHEADER, stderr);
|
||||
rv=curl_easy_setopt(ch,CURLOPT_SSLCERTTYPE,"PEM");
|
||||
rv=curl_easy_setopt(ch,CURLOPT_SSL_VERIFYPEER,1L);
|
||||
rv=curl_easy_setopt(ch, CURLOPT_URL, "https://www.cacert.org/");
|
||||
rv=curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/");
|
||||
|
||||
/* first try: retrieve page without cacerts' certificate -> will fail
|
||||
*/
|
||||
|
@@ -9,9 +9,12 @@
|
||||
|
||||
static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||
{
|
||||
(void)stream;
|
||||
(void)ptr;
|
||||
return size * nmemb;
|
||||
}
|
||||
int main(int argc, char **argv)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
@@ -20,7 +23,7 @@ int main(int argc, char **argv)
|
||||
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://www.networking4all.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, wrfu);
|
||||
|
||||
|
@@ -40,6 +40,8 @@ static size_t WriteCallback(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
{
|
||||
/* we are not interested in the downloaded bytes itself,
|
||||
so we only return the size we would have saved ... */
|
||||
(void)ptr; /* unused */
|
||||
(void)data; /* unused */
|
||||
return (size_t)(size * nmemb);
|
||||
}
|
||||
|
||||
@@ -48,7 +50,7 @@ int main(int argc, char *argv[])
|
||||
CURL *curl_handle;
|
||||
CURLcode res;
|
||||
int prtsep = 0, prttime = 0;
|
||||
char *url = URL_1M;
|
||||
const char *url = URL_1M;
|
||||
char *appname = argv[0];
|
||||
|
||||
if (argc > 1) {
|
||||
@@ -69,7 +71,7 @@ int main(int argc, char *argv[])
|
||||
} else if (strncasecmp(*argv, "-T", 2) == 0) {
|
||||
prttime = 1;
|
||||
} else if (strncasecmp(*argv, "-M=", 3) == 0) {
|
||||
int m = atoi(*argv + 3);
|
||||
long m = strtol((*argv)+3, NULL, 10);
|
||||
switch(m) {
|
||||
case 1: url = URL_1M;
|
||||
break;
|
||||
@@ -135,17 +137,17 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* check for bytes downloaded */
|
||||
res = curl_easy_getinfo(curl_handle, CURLINFO_SIZE_DOWNLOAD, &val);
|
||||
if((CURLE_OK == res) && val)
|
||||
if((CURLE_OK == res) && (val>0))
|
||||
printf("Data downloaded: %0.0f bytes.\n", val);
|
||||
|
||||
/* check for total download time */
|
||||
res = curl_easy_getinfo(curl_handle, CURLINFO_TOTAL_TIME, &val);
|
||||
if((CURLE_OK == res) && val)
|
||||
if((CURLE_OK == res) && (val>0))
|
||||
printf("Total download time: %0.3f sec.\n", val);
|
||||
|
||||
/* check for average download speed */
|
||||
res = curl_easy_getinfo(curl_handle, CURLINFO_SPEED_DOWNLOAD, &val);
|
||||
if((CURLE_OK == res) && val)
|
||||
if((CURLE_OK == res) && (val>0))
|
||||
printf("Average download speed: %0.3f kbyte/sec.\n", val / 1024);
|
||||
|
||||
} else {
|
||||
|
@@ -53,7 +53,7 @@ main(void)
|
||||
if (curl) {
|
||||
char nline[256];
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://www.google.com/"); /* google.com sets "PREF" cookie */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); /* just to start the cookie engine */
|
||||
res = curl_easy_perform(curl);
|
||||
|
@@ -28,12 +28,12 @@ void dump(const char *text,
|
||||
/* without the hex output, we can fit more on screen */
|
||||
width = 0x40;
|
||||
|
||||
fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
|
||||
fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
|
||||
text, (long)size, (long)size);
|
||||
|
||||
for(i=0; i<size; i+= width) {
|
||||
|
||||
fprintf(stream, "%04.4lx: ", (long)i);
|
||||
fprintf(stream, "%4.4lx: ", (long)i);
|
||||
|
||||
if(!nohex) {
|
||||
/* hex not disabled, show it */
|
||||
@@ -118,7 +118,7 @@ int main(void)
|
||||
/* the DEBUGFUNCTION has no effect until we enable VERBOSE */
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
/* always cleanup */
|
||||
|
@@ -68,7 +68,6 @@ typedef struct _GlobalInfo
|
||||
struct ev_io fifo_event;
|
||||
struct ev_timer timer_event;
|
||||
CURLM *multi;
|
||||
int prev_running;
|
||||
int still_running;
|
||||
FILE* input;
|
||||
} GlobalInfo;
|
||||
@@ -122,7 +121,6 @@ static void mcode_or_die(const char *where, CURLMcode code)
|
||||
switch ( code )
|
||||
{
|
||||
case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break;
|
||||
case CURLM_OK: s="CURLM_OK"; break;
|
||||
case CURLM_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break;
|
||||
case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break;
|
||||
case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break;
|
||||
@@ -144,39 +142,20 @@ static void mcode_or_die(const char *where, CURLMcode code)
|
||||
|
||||
|
||||
/* Check for completed transfers, and remove their easy handles */
|
||||
static void check_run_count(GlobalInfo *g)
|
||||
static void check_multi_info(GlobalInfo *g)
|
||||
{
|
||||
DPRINT("%s prev %i still %i\n", __PRETTY_FUNCTION__,
|
||||
g->prev_running, g->still_running);
|
||||
if ( g->prev_running > g->still_running )
|
||||
{
|
||||
char *eff_url=NULL;
|
||||
char *eff_url;
|
||||
CURLMsg *msg;
|
||||
int msgs_left;
|
||||
ConnInfo *conn=NULL;
|
||||
CURL*easy;
|
||||
ConnInfo *conn;
|
||||
CURL *easy;
|
||||
CURLcode res;
|
||||
|
||||
fprintf(MSG_OUT, "REMAINING: %d\n", g->still_running);
|
||||
/*
|
||||
I am still uncertain whether it is safe to remove an easy
|
||||
handle from inside the curl_multi_info_read loop, so here I
|
||||
will search for completed transfers in the inner "while"
|
||||
loop, and then remove them in the outer "do-while" loop...
|
||||
*/
|
||||
do
|
||||
{
|
||||
easy=NULL;
|
||||
while ( (msg = curl_multi_info_read(g->multi, &msgs_left)) )
|
||||
{
|
||||
if ( msg->msg == CURLMSG_DONE )
|
||||
{
|
||||
easy=msg->easy_handle;
|
||||
res=msg->data.result;
|
||||
}
|
||||
|
||||
if ( easy )
|
||||
{
|
||||
while ((msg = curl_multi_info_read(g->multi, &msgs_left))) {
|
||||
if (msg->msg == CURLMSG_DONE) {
|
||||
easy = msg->easy_handle;
|
||||
res = msg->data.result;
|
||||
curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
|
||||
curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
|
||||
fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
|
||||
@@ -186,12 +165,10 @@ static void check_run_count(GlobalInfo *g)
|
||||
free(conn);
|
||||
}
|
||||
}
|
||||
} while ( easy );
|
||||
}
|
||||
g->prev_running = g->still_running;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Called by libevent when we get action on a multi socket */
|
||||
static void event_cb(EV_P_ struct ev_io *w, int revents)
|
||||
{
|
||||
@@ -201,12 +178,9 @@ static void event_cb(EV_P_ struct ev_io *w, int revents)
|
||||
|
||||
int action = (revents&EV_READ?CURL_POLL_IN:0)|
|
||||
(revents&EV_WRITE?CURL_POLL_OUT:0);
|
||||
do
|
||||
{
|
||||
rc = curl_multi_socket_action(g->multi, w->fd, action, &g->still_running);
|
||||
} while ( rc == CURLM_CALL_MULTI_PERFORM );
|
||||
mcode_or_die("event_cb: curl_multi_socket", rc);
|
||||
check_run_count(g);
|
||||
mcode_or_die("event_cb: curl_multi_socket_action", rc);
|
||||
check_multi_info(g);
|
||||
if ( g->still_running <= 0 )
|
||||
{
|
||||
fprintf(MSG_OUT, "last transfer done, kill timeout\n");
|
||||
@@ -222,12 +196,9 @@ static void timer_cb(EV_P_ struct ev_timer *w, int revents)
|
||||
GlobalInfo *g = (GlobalInfo *)w->data;
|
||||
CURLMcode rc;
|
||||
|
||||
do
|
||||
{
|
||||
rc = curl_multi_socket_action(g->multi, CURL_SOCKET_TIMEOUT, 0, &g->still_running);
|
||||
} while ( rc == CURLM_CALL_MULTI_PERFORM );
|
||||
mcode_or_die("timer_cb: curl_multi_socket", rc);
|
||||
check_run_count(g);
|
||||
mcode_or_die("timer_cb: curl_multi_socket_action", rc);
|
||||
check_multi_info(g);
|
||||
}
|
||||
|
||||
/* Clean up the SockInfo structure */
|
||||
@@ -364,11 +335,11 @@ static void new_conn(char *url, GlobalInfo *g )
|
||||
|
||||
fprintf(MSG_OUT,
|
||||
"Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
|
||||
rc =curl_multi_add_handle(g->multi, conn->easy);
|
||||
rc = curl_multi_add_handle(g->multi, conn->easy);
|
||||
mcode_or_die("new_conn: curl_multi_add_handle", rc);
|
||||
|
||||
mcode_or_die("new_conn: curl_multi_socket_all", rc);
|
||||
check_run_count(g);
|
||||
/* note that the add_handle() will set a time-out to trigger very soon so
|
||||
that the necessary socket_action() call will be called by this app */
|
||||
}
|
||||
|
||||
/* This gets called whenever data is received from the fifo */
|
||||
@@ -396,7 +367,7 @@ static int init_fifo (GlobalInfo *g)
|
||||
{
|
||||
struct stat st;
|
||||
static const char *fifo = "hiper.fifo";
|
||||
int sockfd;
|
||||
curl_socket_t sockfd;
|
||||
|
||||
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
|
||||
if ( lstat (fifo, &st) == 0 )
|
||||
@@ -448,10 +419,9 @@ int main(int argc, char **argv)
|
||||
curl_multi_setopt(g.multi, CURLMOPT_SOCKETDATA, &g);
|
||||
curl_multi_setopt(g.multi, CURLMOPT_TIMERFUNCTION, multi_timer_cb);
|
||||
curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);
|
||||
do
|
||||
{
|
||||
rc = curl_multi_socket_all(g.multi, &g.still_running);
|
||||
} while ( CURLM_CALL_MULTI_PERFORM == rc );
|
||||
|
||||
/* we don't call any curl_multi_socket*() function yet as we have no handles
|
||||
added! */
|
||||
|
||||
ev_loop(g.loop, 0);
|
||||
curl_multi_cleanup(g.multi);
|
||||
|
@@ -53,7 +53,11 @@
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
enum fcurl_type_e { CFTYPE_NONE=0, CFTYPE_FILE=1, CFTYPE_CURL=2 };
|
||||
enum fcurl_type_e {
|
||||
CFTYPE_NONE=0,
|
||||
CFTYPE_FILE=1,
|
||||
CFTYPE_CURL=2
|
||||
};
|
||||
|
||||
struct fcurl_data
|
||||
{
|
||||
@@ -64,8 +68,8 @@ struct fcurl_data
|
||||
} handle; /* handle */
|
||||
|
||||
char *buffer; /* buffer to store cached data*/
|
||||
int buffer_len; /* currently allocated buffers length */
|
||||
int buffer_pos; /* end of data in buffer*/
|
||||
size_t buffer_len; /* currently allocated buffers length */
|
||||
size_t buffer_pos; /* end of data in buffer*/
|
||||
int still_running; /* Is background url fetch still in progress */
|
||||
};
|
||||
|
||||
@@ -76,62 +80,52 @@ URL_FILE *url_fopen(const char *url,const char *operation);
|
||||
int url_fclose(URL_FILE *file);
|
||||
int url_feof(URL_FILE *file);
|
||||
size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file);
|
||||
char * url_fgets(char *ptr, int size, URL_FILE *file);
|
||||
char * url_fgets(char *ptr, size_t size, URL_FILE *file);
|
||||
void url_rewind(URL_FILE *file);
|
||||
|
||||
/* we use a global one for convenience */
|
||||
CURLM *multi_handle;
|
||||
|
||||
/* curl calls this routine to get more data */
|
||||
static size_t
|
||||
write_callback(char *buffer,
|
||||
static size_t write_callback(char *buffer,
|
||||
size_t size,
|
||||
size_t nitems,
|
||||
void *userp)
|
||||
{
|
||||
char *newbuff;
|
||||
int rembuff;
|
||||
size_t rembuff;
|
||||
|
||||
URL_FILE *url = (URL_FILE *)userp;
|
||||
size *= nitems;
|
||||
|
||||
rembuff=url->buffer_len - url->buffer_pos; /* remaining space in buffer */
|
||||
|
||||
if(size > rembuff)
|
||||
{
|
||||
if(size > rembuff) {
|
||||
/* not enough space in buffer */
|
||||
newbuff=realloc(url->buffer,url->buffer_len + (size - rembuff));
|
||||
if(newbuff==NULL)
|
||||
{
|
||||
if(newbuff==NULL) {
|
||||
fprintf(stderr,"callback buffer grow failed\n");
|
||||
size=rembuff;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
/* realloc suceeded increase buffer size*/
|
||||
url->buffer_len+=size - rembuff;
|
||||
url->buffer=newbuff;
|
||||
|
||||
/*printf("Callback buffer grown to %d bytes\n",url->buffer_len);*/
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(&url->buffer[url->buffer_pos], buffer, size);
|
||||
url->buffer_pos += size;
|
||||
|
||||
/*fprintf(stderr, "callback %d size bytes\n", size);*/
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
/* use to attempt to fill the read buffer up to requested number of bytes */
|
||||
static int
|
||||
fill_buffer(URL_FILE *file,int want,int waittime)
|
||||
static int fill_buffer(URL_FILE *file, size_t want)
|
||||
{
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
fd_set fdexcep;
|
||||
int maxfd;
|
||||
struct timeval timeout;
|
||||
int rc;
|
||||
|
||||
@@ -142,8 +136,10 @@ fill_buffer(URL_FILE *file,int want,int waittime)
|
||||
return 0;
|
||||
|
||||
/* attempt to fill buffer */
|
||||
do
|
||||
{
|
||||
do {
|
||||
int maxfd = -1;
|
||||
long curl_timeo = -1;
|
||||
|
||||
FD_ZERO(&fdread);
|
||||
FD_ZERO(&fdwrite);
|
||||
FD_ZERO(&fdexcep);
|
||||
@@ -152,12 +148,23 @@ fill_buffer(URL_FILE *file,int want,int waittime)
|
||||
timeout.tv_sec = 60; /* 1 minute */
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||
if(curl_timeo >= 0) {
|
||||
timeout.tv_sec = curl_timeo / 1000;
|
||||
if(timeout.tv_sec > 1)
|
||||
timeout.tv_sec = 1;
|
||||
else
|
||||
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls, *and* you make sure that maxfd is bigger than -1
|
||||
so that the call to select() below makes sense! */
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially
|
||||
in case of (maxfd == -1), we call select(0, ...), which is basically
|
||||
equal to sleep. */
|
||||
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
|
||||
@@ -167,16 +174,9 @@ fill_buffer(URL_FILE *file,int want,int waittime)
|
||||
break;
|
||||
|
||||
case 0:
|
||||
break;
|
||||
|
||||
default:
|
||||
/* timeout or readable/writable sockets */
|
||||
/* note we *could* be more efficient and not wait for
|
||||
* CURLM_CALL_MULTI_PERFORM to clear here and check it on re-entry
|
||||
* but that gets messy */
|
||||
while(curl_multi_perform(multi_handle, &file->still_running) ==
|
||||
CURLM_CALL_MULTI_PERFORM);
|
||||
|
||||
curl_multi_perform(multi_handle, &file->still_running);
|
||||
break;
|
||||
}
|
||||
} while(file->still_running && (file->buffer_pos < want));
|
||||
@@ -184,12 +184,10 @@ fill_buffer(URL_FILE *file,int want,int waittime)
|
||||
}
|
||||
|
||||
/* use to remove want bytes from the front of a files buffer */
|
||||
static int
|
||||
use_buffer(URL_FILE *file,int want)
|
||||
static int use_buffer(URL_FILE *file,int want)
|
||||
{
|
||||
/* sort out buffer */
|
||||
if((file->buffer_pos - want) <=0)
|
||||
{
|
||||
if((file->buffer_pos - want) <=0) {
|
||||
/* ditch buffer - write will recreate */
|
||||
if(file->buffer)
|
||||
free(file->buffer);
|
||||
@@ -198,8 +196,7 @@ use_buffer(URL_FILE *file,int want)
|
||||
file->buffer_pos=0;
|
||||
file->buffer_len=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
/* move rest down make it available for later */
|
||||
memmove(file->buffer,
|
||||
&file->buffer[want],
|
||||
@@ -210,10 +207,7 @@ use_buffer(URL_FILE *file,int want)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
URL_FILE *
|
||||
url_fopen(const char *url,const char *operation)
|
||||
URL_FILE *url_fopen(const char *url,const char *operation)
|
||||
{
|
||||
/* this code could check for URLs or types in the 'url' and
|
||||
basicly use the real fopen() for standard files */
|
||||
@@ -228,11 +222,9 @@ url_fopen(const char *url,const char *operation)
|
||||
memset(file, 0, sizeof(URL_FILE));
|
||||
|
||||
if((file->handle.file=fopen(url,operation)))
|
||||
{
|
||||
file->type = CFTYPE_FILE; /* marked as URL */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
else {
|
||||
file->type = CFTYPE_CURL; /* marked as URL */
|
||||
file->handle.curl = curl_easy_init();
|
||||
|
||||
@@ -247,11 +239,9 @@ url_fopen(const char *url,const char *operation)
|
||||
curl_multi_add_handle(multi_handle, file->handle.curl);
|
||||
|
||||
/* lets start the fetch */
|
||||
while(curl_multi_perform(multi_handle, &file->still_running) ==
|
||||
CURLM_CALL_MULTI_PERFORM );
|
||||
curl_multi_perform(multi_handle, &file->still_running);
|
||||
|
||||
if((file->buffer_pos == 0) && (!file->still_running))
|
||||
{
|
||||
if((file->buffer_pos == 0) && (!file->still_running)) {
|
||||
/* if still_running is 0 now, we should return NULL */
|
||||
|
||||
/* make sure the easy handle is not in the multi handle anymore */
|
||||
@@ -268,13 +258,11 @@ url_fopen(const char *url,const char *operation)
|
||||
return file;
|
||||
}
|
||||
|
||||
int
|
||||
url_fclose(URL_FILE *file)
|
||||
int url_fclose(URL_FILE *file)
|
||||
{
|
||||
int ret=0;/* default is good return */
|
||||
|
||||
switch(file->type)
|
||||
{
|
||||
switch(file->type) {
|
||||
case CFTYPE_FILE:
|
||||
ret=fclose(file->handle.file); /* passthrough */
|
||||
break;
|
||||
@@ -291,7 +279,6 @@ url_fclose(URL_FILE *file)
|
||||
ret=EOF;
|
||||
errno=EBADF;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if(file->buffer)
|
||||
@@ -302,13 +289,11 @@ url_fclose(URL_FILE *file)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
url_feof(URL_FILE *file)
|
||||
int url_feof(URL_FILE *file)
|
||||
{
|
||||
int ret=0;
|
||||
|
||||
switch(file->type)
|
||||
{
|
||||
switch(file->type) {
|
||||
case CFTYPE_FILE:
|
||||
ret=feof(file->handle.file);
|
||||
break;
|
||||
@@ -317,6 +302,7 @@ url_feof(URL_FILE *file)
|
||||
if((file->buffer_pos == 0) && (!file->still_running))
|
||||
ret = 1;
|
||||
break;
|
||||
|
||||
default: /* unknown or supported type - oh dear */
|
||||
ret=-1;
|
||||
errno=EBADF;
|
||||
@@ -325,13 +311,11 @@ url_feof(URL_FILE *file)
|
||||
return ret;
|
||||
}
|
||||
|
||||
size_t
|
||||
url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file)
|
||||
size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file)
|
||||
{
|
||||
size_t want;
|
||||
|
||||
switch(file->type)
|
||||
{
|
||||
switch(file->type) {
|
||||
case CFTYPE_FILE:
|
||||
want=fread(ptr,size,nmemb,file->handle.file);
|
||||
break;
|
||||
@@ -339,7 +323,7 @@ url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file)
|
||||
case CFTYPE_CURL:
|
||||
want = nmemb * size;
|
||||
|
||||
fill_buffer(file,want,1);
|
||||
fill_buffer(file,want);
|
||||
|
||||
/* check if theres data in the buffer - if not fill_buffer()
|
||||
* either errored or EOF */
|
||||
@@ -355,10 +339,7 @@ url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file)
|
||||
|
||||
use_buffer(file,want);
|
||||
|
||||
want = want / size; /* number of items - nb correct op - checked
|
||||
* with glibc code*/
|
||||
|
||||
/*printf("(fread) return %d bytes %d left\n", want,file->buffer_pos);*/
|
||||
want = want / size; /* number of items */
|
||||
break;
|
||||
|
||||
default: /* unknown or supported type - oh dear */
|
||||
@@ -370,20 +351,18 @@ url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file)
|
||||
return want;
|
||||
}
|
||||
|
||||
char *
|
||||
url_fgets(char *ptr, int size, URL_FILE *file)
|
||||
char *url_fgets(char *ptr, size_t size, URL_FILE *file)
|
||||
{
|
||||
int want = size - 1;/* always need to leave room for zero termination */
|
||||
int loop;
|
||||
size_t want = size - 1;/* always need to leave room for zero termination */
|
||||
size_t loop;
|
||||
|
||||
switch(file->type)
|
||||
{
|
||||
switch(file->type) {
|
||||
case CFTYPE_FILE:
|
||||
ptr = fgets(ptr,size,file->handle.file);
|
||||
break;
|
||||
|
||||
case CFTYPE_CURL:
|
||||
fill_buffer(file,want,1);
|
||||
fill_buffer(file,want);
|
||||
|
||||
/* check if theres data in the buffer - if not fill either errored or
|
||||
* EOF */
|
||||
@@ -396,10 +375,8 @@ url_fgets(char *ptr, int size, URL_FILE *file)
|
||||
|
||||
/*buffer contains data */
|
||||
/* look for newline or eof */
|
||||
for(loop=0;loop < want;loop++)
|
||||
{
|
||||
if(file->buffer[loop] == '\n')
|
||||
{
|
||||
for(loop=0;loop < want;loop++) {
|
||||
if(file->buffer[loop] == '\n') {
|
||||
want=loop+1;/* include newline */
|
||||
break;
|
||||
}
|
||||
@@ -411,7 +388,6 @@ url_fgets(char *ptr, int size, URL_FILE *file)
|
||||
|
||||
use_buffer(file,want);
|
||||
|
||||
/*printf("(fgets) return %d bytes %d left\n", want,file->buffer_pos);*/
|
||||
break;
|
||||
|
||||
default: /* unknown or supported type - oh dear */
|
||||
@@ -423,11 +399,9 @@ url_fgets(char *ptr, int size, URL_FILE *file)
|
||||
return ptr;/*success */
|
||||
}
|
||||
|
||||
void
|
||||
url_rewind(URL_FILE *file)
|
||||
void url_rewind(URL_FILE *file)
|
||||
{
|
||||
switch(file->type)
|
||||
{
|
||||
switch(file->type) {
|
||||
case CFTYPE_FILE:
|
||||
rewind(file->handle.file); /* passthrough */
|
||||
break;
|
||||
@@ -451,17 +425,13 @@ url_rewind(URL_FILE *file)
|
||||
|
||||
default: /* unknown or supported type - oh dear */
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Small main program to retrive from a url using fgets and fread saving the
|
||||
* output to two test files (note the fgets method will corrupt binary files if
|
||||
* they contain 0 chars */
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
URL_FILE *handle;
|
||||
FILE *outf;
|
||||
@@ -471,32 +441,25 @@ main(int argc, char *argv[])
|
||||
const char *url;
|
||||
|
||||
if(argc < 2)
|
||||
{
|
||||
url="http://192.168.7.3/testfile";/* default to testurl */
|
||||
}
|
||||
else
|
||||
{
|
||||
url=argv[1];/* use passed url */
|
||||
}
|
||||
|
||||
/* copy from url line by line with fgets */
|
||||
outf=fopen("fgets.test","w+");
|
||||
if(!outf)
|
||||
{
|
||||
if(!outf) {
|
||||
perror("couldn't open fgets output file\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
handle = url_fopen(url, "r");
|
||||
if(!handle)
|
||||
{
|
||||
if(!handle) {
|
||||
printf("couldn't url_fopen() %s\n", url);
|
||||
fclose(outf);
|
||||
return 2;
|
||||
}
|
||||
|
||||
while(!url_feof(handle))
|
||||
{
|
||||
while(!url_feof(handle)) {
|
||||
url_fgets(buffer,sizeof(buffer),handle);
|
||||
fwrite(buffer,1,strlen(buffer),outf);
|
||||
}
|
||||
@@ -508,8 +471,7 @@ main(int argc, char *argv[])
|
||||
|
||||
/* Copy from url with fread */
|
||||
outf=fopen("fread.test","w+");
|
||||
if(!outf)
|
||||
{
|
||||
if(!outf) {
|
||||
perror("couldn't open fread output file\n");
|
||||
return 1;
|
||||
}
|
||||
@@ -533,8 +495,7 @@ main(int argc, char *argv[])
|
||||
|
||||
/* Test rewind */
|
||||
outf=fopen("rewind.test","w+");
|
||||
if(!outf)
|
||||
{
|
||||
if(!outf) {
|
||||
perror("couldn't open fread output file\n");
|
||||
return 1;
|
||||
}
|
||||
|
135
docs/examples/ftp-wildcard.c
Normal file
135
docs/examples/ftp-wildcard.c
Normal file
@@ -0,0 +1,135 @@
|
||||
/*****************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
*/
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
struct callback_data {
|
||||
FILE *output;
|
||||
};
|
||||
|
||||
static long file_is_comming(struct curl_fileinfo *finfo,
|
||||
struct callback_data *data,
|
||||
int remains);
|
||||
|
||||
static long file_is_downloaded(struct callback_data *data);
|
||||
|
||||
static size_t write_it(char *buff, size_t size, size_t nmemb,
|
||||
struct callback_data *data);
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int rc = CURLE_OK;
|
||||
|
||||
/* curl easy handle */
|
||||
CURL *handle;
|
||||
|
||||
/* help data */
|
||||
struct callback_data data = { 0 };
|
||||
|
||||
/* global initialization */
|
||||
rc = curl_global_init(CURL_GLOBAL_ALL);
|
||||
if(rc)
|
||||
return rc;
|
||||
|
||||
/* initialization of easy handle */
|
||||
handle = curl_easy_init();
|
||||
if(!handle) {
|
||||
curl_global_cleanup();
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
/* turn on wildcard matching */
|
||||
curl_easy_setopt(handle, CURLOPT_WILDCARDMATCH, 1L);
|
||||
|
||||
/* callback is called before download of concrete file started */
|
||||
curl_easy_setopt(handle, CURLOPT_CHUNK_BGN_FUNCTION, file_is_comming);
|
||||
|
||||
/* callback is called after data from the file have been transferred */
|
||||
curl_easy_setopt(handle, CURLOPT_CHUNK_END_FUNCTION, file_is_downloaded);
|
||||
|
||||
/* this callback will write contents into files */
|
||||
curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, write_it);
|
||||
|
||||
/* put transfer data into callbacks */
|
||||
curl_easy_setopt(handle, CURLOPT_CHUNK_DATA, &data);
|
||||
curl_easy_setopt(handle, CURLOPT_WRITEDATA, &data);
|
||||
|
||||
/* curl_easy_setopt(handle, CURLOPT_VERBOSE, 1L); */
|
||||
|
||||
/* set an URL containing wildcard pattern (only in the last part) */
|
||||
if(argc == 2)
|
||||
curl_easy_setopt(handle, CURLOPT_URL, argv[1]);
|
||||
else
|
||||
curl_easy_setopt(handle, CURLOPT_URL, "ftp://example.com/test/*");
|
||||
|
||||
/* and start transfer! */
|
||||
rc = curl_easy_perform(handle);
|
||||
|
||||
curl_easy_cleanup(handle);
|
||||
curl_global_cleanup();
|
||||
return rc;
|
||||
}
|
||||
|
||||
static long file_is_comming(struct curl_fileinfo *finfo,
|
||||
struct callback_data *data,
|
||||
int remains)
|
||||
{
|
||||
printf("%3d %40s %10luB ", remains, finfo->filename,
|
||||
(unsigned long)finfo->size);
|
||||
|
||||
switch(finfo->filetype) {
|
||||
case CURLFILETYPE_DIRECTORY:
|
||||
printf(" DIR\n");
|
||||
break;
|
||||
case CURLFILETYPE_FILE:
|
||||
printf("FILE ");
|
||||
break;
|
||||
default:
|
||||
printf("OTHER\n");
|
||||
break;
|
||||
}
|
||||
|
||||
if(finfo->filetype == CURLFILETYPE_FILE) {
|
||||
/* do not transfer files >= 50B */
|
||||
if(finfo->size > 50) {
|
||||
printf("SKIPPED\n");
|
||||
return CURL_CHUNK_BGN_FUNC_SKIP;
|
||||
}
|
||||
|
||||
data->output = fopen(finfo->filename, "w");
|
||||
if(!data->output) {
|
||||
return CURL_CHUNK_BGN_FUNC_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return CURL_CHUNK_BGN_FUNC_OK;
|
||||
}
|
||||
|
||||
static long file_is_downloaded(struct callback_data *data)
|
||||
{
|
||||
if(data->output) {
|
||||
printf("DOWNLOADED\n");
|
||||
fclose(data->output);
|
||||
data->output = 0x0;
|
||||
}
|
||||
return CURL_CHUNK_END_FUNC_OK;
|
||||
}
|
||||
|
||||
static size_t write_it(char *buff, size_t size, size_t nmemb,
|
||||
struct callback_data *data)
|
||||
{
|
||||
size_t written = 0;
|
||||
if(data->output)
|
||||
written = fwrite(buff, size, nmemb, data->output);
|
||||
else
|
||||
/* listing output */
|
||||
written = fwrite(buff, size, nmemb, stdout);
|
||||
return written;
|
||||
}
|
@@ -52,12 +52,10 @@ int main(void)
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
/*
|
||||
* Get curl 7.9.2 from sunet.se's FTP site. curl 7.9.2 is most likely not
|
||||
* present there by the time you read this, so you'd better replace the
|
||||
* URL with one that works!
|
||||
* You better replace the URL with one that works!
|
||||
*/
|
||||
curl_easy_setopt(curl, CURLOPT_URL,
|
||||
"ftp://ftp.sunet.se/pub/www/utilities/curl/curl-7.9.2.tar.gz");
|
||||
"ftp://ftp.example.com/pub/www/utilities/curl/curl-7.9.2.tar.gz");
|
||||
/* Define our callback to get called when there's data to be written */
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
|
||||
/* Set a pointer to our struct to pass to the callback */
|
||||
|
@@ -21,6 +21,8 @@
|
||||
|
||||
static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
{
|
||||
(void)ptr;
|
||||
(void)data;
|
||||
/* we are not interested in the headers itself,
|
||||
so we only return the size we would have saved ... */
|
||||
return (size_t)(size * nmemb);
|
||||
@@ -28,8 +30,7 @@ static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
/* Check for binutils 2.19.1 from ftp.gnu.org's FTP site. */
|
||||
char ftpurl[] = "ftp://ftp.gnu.org/gnu/binutils/binutils-2.19.1.tar.bz2";
|
||||
char ftpurl[] = "ftp://ftp.example.com/gnu/binutils/binutils-2.19.1.tar.bz2";
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
const time_t filetime;
|
||||
@@ -59,7 +60,7 @@ int main(void)
|
||||
if((CURLE_OK == res) && filetime)
|
||||
printf("filetime %s: %s", filename, ctime(&filetime));
|
||||
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &filesize);
|
||||
if((CURLE_OK == res) && filesize)
|
||||
if((CURLE_OK == res) && (filesize>0))
|
||||
printf("filesize %s: %0.0f bytes\n", filename, filesize);
|
||||
} else {
|
||||
/* we failed */
|
||||
|
@@ -27,7 +27,7 @@ write_response(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
return fwrite(ptr, size, nmemb, writehere);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
@@ -43,7 +43,7 @@ int main(int argc, char **argv)
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
/* Get a file listing from sunet */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.sunet.se/");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.example.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, ftpfile);
|
||||
/* If you intend to use this on windows with a libcurl DLL, you must use
|
||||
CURLOPT_WRITEFUNCTION as well */
|
||||
|
@@ -30,7 +30,7 @@
|
||||
|
||||
#define LOCAL_FILE "/tmp/uploadthis.txt"
|
||||
#define UPLOAD_FILE_AS "while-uploading.txt"
|
||||
#define REMOTE_URL "ftp://localhost/" UPLOAD_FILE_AS
|
||||
#define REMOTE_URL "ftp://example.com/" UPLOAD_FILE_AS
|
||||
#define RENAME_FILE_TO "renamed-and-fine.txt"
|
||||
|
||||
/* NOTE: if you want this example to work on Windows with libcurl as a
|
||||
@@ -48,7 +48,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||
return retcode;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
|
@@ -32,7 +32,8 @@ int __cdecl _snscanf(const char * input, size_t length, const char * format, ...
|
||||
|
||||
|
||||
/* parse headers for Content-Length */
|
||||
size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream) {
|
||||
size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||
{
|
||||
int r;
|
||||
long len = 0;
|
||||
|
||||
@@ -46,7 +47,8 @@ size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||
}
|
||||
|
||||
/* discard downloaded data */
|
||||
size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream) {
|
||||
size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||
{
|
||||
return size * nmemb;
|
||||
}
|
||||
|
||||
@@ -143,13 +145,14 @@ int upload(CURL *curlhandle, const char * remotepath, const char * localpath,
|
||||
}
|
||||
}
|
||||
|
||||
int main(int c, char **argv) {
|
||||
int main(int c, char **argv)
|
||||
{
|
||||
CURL *curlhandle = NULL;
|
||||
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
curlhandle = curl_easy_init();
|
||||
|
||||
upload(curlhandle, "ftp://user:pass@host/path/file", "C:\\file", 0, 3);
|
||||
upload(curlhandle, "ftp://user:pass@example.com/path/file", "C:\\file", 0, 3);
|
||||
|
||||
curl_easy_cleanup(curlhandle);
|
||||
curl_global_cleanup();
|
||||
|
@@ -19,7 +19,7 @@ int main(void)
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
/* http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTURL */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/");
|
||||
/* http://curl.haxx.se/libcurl/c/curl_easy_perform.html */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
|
@@ -8,8 +8,6 @@
|
||||
*
|
||||
* Example source code to show how the callback function can be used to
|
||||
* download data into a chunk of memory instead of storing it in a file.
|
||||
*
|
||||
* This exact source code has not been verified to work.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -17,25 +15,12 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <curl/types.h>
|
||||
#include <curl/easy.h>
|
||||
|
||||
struct MemoryStruct {
|
||||
char *memory;
|
||||
size_t size;
|
||||
};
|
||||
|
||||
static void *myrealloc(void *ptr, size_t size);
|
||||
|
||||
static void *myrealloc(void *ptr, size_t size)
|
||||
{
|
||||
/* There might be a realloc() out there that doesn't like reallocing
|
||||
NULL pointers, so we take care of it here */
|
||||
if(ptr)
|
||||
return realloc(ptr, size);
|
||||
else
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
static size_t
|
||||
WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
@@ -43,22 +28,28 @@ WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
|
||||
size_t realsize = size * nmemb;
|
||||
struct MemoryStruct *mem = (struct MemoryStruct *)data;
|
||||
|
||||
mem->memory = myrealloc(mem->memory, mem->size + realsize + 1);
|
||||
if (mem->memory) {
|
||||
mem->memory = realloc(mem->memory, mem->size + realsize + 1);
|
||||
if (mem->memory == NULL) {
|
||||
/* out of memory! */
|
||||
printf("not enough memory (realloc returned NULL)\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
memcpy(&(mem->memory[mem->size]), ptr, realsize);
|
||||
mem->size += realsize;
|
||||
mem->memory[mem->size] = 0;
|
||||
}
|
||||
|
||||
return realsize;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl_handle;
|
||||
|
||||
struct MemoryStruct chunk;
|
||||
|
||||
chunk.memory=NULL; /* we expect realloc(NULL, size) to work */
|
||||
chunk.memory = malloc(1); /* will be grown as needed by the realloc above */
|
||||
chunk.size = 0; /* no data at this point */
|
||||
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
@@ -67,7 +58,7 @@ int main(int argc, char **argv)
|
||||
curl_handle = curl_easy_init();
|
||||
|
||||
/* specify URL to get */
|
||||
curl_easy_setopt(curl_handle, CURLOPT_URL, "http://cool.haxx.se/");
|
||||
curl_easy_setopt(curl_handle, CURLOPT_URL, "http://www.example.com/");
|
||||
|
||||
/* send all data to this function */
|
||||
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
|
||||
@@ -96,6 +87,8 @@ int main(int argc, char **argv)
|
||||
* you're done with it, you should free() it as a nice application.
|
||||
*/
|
||||
|
||||
printf("%lu bytes retrieved\n", (long)chunk.size);
|
||||
|
||||
if(chunk.memory)
|
||||
free(chunk.memory);
|
||||
|
||||
|
@@ -58,10 +58,7 @@ callback.
|
||||
typedef struct _GlobalInfo {
|
||||
CURLM *multi;
|
||||
guint timer_event;
|
||||
int prev_running;
|
||||
int still_running;
|
||||
int requested; /* count: curl_easy_init() */
|
||||
int completed; /* count: curl_easy_cleanup() */
|
||||
} GlobalInfo;
|
||||
|
||||
|
||||
@@ -95,7 +92,6 @@ static void mcode_or_die(const char *where, CURLMcode code) {
|
||||
const char *s;
|
||||
switch (code) {
|
||||
case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break;
|
||||
case CURLM_OK: s="CURLM_OK"; break;
|
||||
case CURLM_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break;
|
||||
case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break;
|
||||
case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break;
|
||||
@@ -113,62 +109,43 @@ static void mcode_or_die(const char *where, CURLMcode code) {
|
||||
|
||||
|
||||
/* Check for completed transfers, and remove their easy handles */
|
||||
static void check_run_count(GlobalInfo *g)
|
||||
static void check_multi_info(GlobalInfo *g)
|
||||
{
|
||||
if (g->prev_running > g->still_running) {
|
||||
char *eff_url=NULL;
|
||||
char *eff_url;
|
||||
CURLMsg *msg;
|
||||
int msgs_left;
|
||||
ConnInfo *conn=NULL;
|
||||
CURL*easy;
|
||||
ConnInfo *conn;
|
||||
CURL *easy;
|
||||
CURLcode res;
|
||||
|
||||
MSG_OUT("REMAINING: %d\n", g->still_running);
|
||||
/*
|
||||
I am still uncertain whether it is safe to remove an easy handle
|
||||
from inside the curl_multi_info_read loop, so here I will search
|
||||
for completed transfers in the inner "while" loop, and then remove
|
||||
them in the outer "do-while" loop...
|
||||
*/
|
||||
do {
|
||||
easy=NULL;
|
||||
while ((msg = curl_multi_info_read(g->multi, &msgs_left))) {
|
||||
if (msg->msg == CURLMSG_DONE) {
|
||||
easy=msg->easy_handle;
|
||||
res=msg->data.result;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (easy) {
|
||||
easy = msg->easy_handle;
|
||||
res = msg->data.result;
|
||||
curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
|
||||
curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
|
||||
MSG_OUT("DONE: %s => (%d) %s\n", eff_url, res, conn->error);
|
||||
curl_multi_remove_handle(g->multi, easy);
|
||||
g_free(conn->url);
|
||||
free(conn->url);
|
||||
curl_easy_cleanup(easy);
|
||||
g_free(conn);
|
||||
g->completed++;
|
||||
free(conn);
|
||||
}
|
||||
} while ( easy );
|
||||
MSG_OUT("Requested: %d Completed:%d\n", g->requested, g->completed);
|
||||
}
|
||||
g->prev_running = g->still_running;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Called by glib when our timeout expires */
|
||||
static gboolean timer_cb(gpointer data)
|
||||
{
|
||||
GlobalInfo *g = (GlobalInfo *)data;
|
||||
CURLMcode rc;
|
||||
|
||||
do {
|
||||
rc = curl_multi_socket(g->multi, CURL_SOCKET_TIMEOUT, &g->still_running);
|
||||
} while (rc == CURLM_CALL_MULTI_PERFORM);
|
||||
mcode_or_die("timer_cb: curl_multi_socket", rc);
|
||||
check_run_count(g);
|
||||
rc = curl_multi_socket_action(g->multi,
|
||||
CURL_SOCKET_TIMEOUT, 0, &g->still_running);
|
||||
mcode_or_die("timer_cb: curl_multi_socket_action", rc);
|
||||
check_multi_info(g);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -198,11 +175,15 @@ static gboolean event_cb(GIOChannel *ch, GIOCondition condition, gpointer data)
|
||||
GlobalInfo *g = (GlobalInfo*) data;
|
||||
CURLMcode rc;
|
||||
int fd=g_io_channel_unix_get_fd(ch);
|
||||
do {
|
||||
rc = curl_multi_socket(g->multi, fd, &g->still_running);
|
||||
} while (rc == CURLM_CALL_MULTI_PERFORM);
|
||||
mcode_or_die("event_cb: curl_multi_socket", rc);
|
||||
check_run_count(g);
|
||||
|
||||
int action =
|
||||
(condition & G_IO_IN ? CURL_CSELECT_IN : 0) |
|
||||
(condition & G_IO_OUT ? CURL_CSELECT_OUT : 0);
|
||||
|
||||
rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running);
|
||||
mcode_or_die("event_cb: curl_multi_socket_action", rc);
|
||||
|
||||
check_multi_info(g);
|
||||
if(g->still_running) {
|
||||
return TRUE;
|
||||
} else {
|
||||
@@ -338,12 +319,9 @@ static void new_conn(char *url, GlobalInfo *g )
|
||||
MSG_OUT("Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
|
||||
rc =curl_multi_add_handle(g->multi, conn->easy);
|
||||
mcode_or_die("new_conn: curl_multi_add_handle", rc);
|
||||
g->requested++;
|
||||
do {
|
||||
rc = curl_multi_socket_all(g->multi, &g->still_running);
|
||||
} while (CURLM_CALL_MULTI_PERFORM == rc);
|
||||
mcode_or_die("new_conn: curl_multi_socket_all", rc);
|
||||
check_run_count(g);
|
||||
|
||||
/* note that the add_handle() will set a time-out to trigger very soon so
|
||||
that the necessary socket_action() call will be called by this app */
|
||||
}
|
||||
|
||||
|
||||
@@ -451,9 +429,10 @@ int main(int argc, char **argv)
|
||||
curl_multi_setopt(g->multi, CURLMOPT_SOCKETDATA, g);
|
||||
curl_multi_setopt(g->multi, CURLMOPT_TIMERFUNCTION, update_timeout_cb);
|
||||
curl_multi_setopt(g->multi, CURLMOPT_TIMERDATA, g);
|
||||
do {
|
||||
rc = curl_multi_socket_all(g->multi, &g->still_running);
|
||||
} while (CURLM_CALL_MULTI_PERFORM == rc);
|
||||
|
||||
/* we don't call any curl_multi_socket*() function yet as we have no handles
|
||||
added! */
|
||||
|
||||
g_main_loop_run(gmain);
|
||||
curl_multi_cleanup(g->multi);
|
||||
return 0;
|
||||
|
@@ -62,7 +62,6 @@ typedef struct _GlobalInfo {
|
||||
struct event fifo_event;
|
||||
struct event timer_event;
|
||||
CURLM *multi;
|
||||
int prev_running;
|
||||
int still_running;
|
||||
FILE* input;
|
||||
} GlobalInfo;
|
||||
@@ -110,7 +109,6 @@ static void mcode_or_die(const char *where, CURLMcode code)
|
||||
const char *s;
|
||||
switch (code) {
|
||||
case CURLM_CALL_MULTI_PERFORM: s="CURLM_CALL_MULTI_PERFORM"; break;
|
||||
case CURLM_OK: s="CURLM_OK"; break;
|
||||
case CURLM_BAD_HANDLE: s="CURLM_BAD_HANDLE"; break;
|
||||
case CURLM_BAD_EASY_HANDLE: s="CURLM_BAD_EASY_HANDLE"; break;
|
||||
case CURLM_OUT_OF_MEMORY: s="CURLM_OUT_OF_MEMORY"; break;
|
||||
@@ -132,33 +130,20 @@ static void mcode_or_die(const char *where, CURLMcode code)
|
||||
|
||||
|
||||
/* Check for completed transfers, and remove their easy handles */
|
||||
static void check_run_count(GlobalInfo *g)
|
||||
static void check_multi_info(GlobalInfo *g)
|
||||
{
|
||||
if (g->prev_running > g->still_running) {
|
||||
char *eff_url=NULL;
|
||||
char *eff_url;
|
||||
CURLMsg *msg;
|
||||
int msgs_left;
|
||||
ConnInfo *conn=NULL;
|
||||
CURL*easy;
|
||||
ConnInfo *conn;
|
||||
CURL *easy;
|
||||
CURLcode res;
|
||||
|
||||
fprintf(MSG_OUT, "REMAINING: %d\n", g->still_running);
|
||||
/*
|
||||
I am still uncertain whether it is safe to remove an easy handle
|
||||
from inside the curl_multi_info_read loop, so here I will search
|
||||
for completed transfers in the inner "while" loop, and then remove
|
||||
them in the outer "do-while" loop...
|
||||
*/
|
||||
do {
|
||||
easy=NULL;
|
||||
while ((msg = curl_multi_info_read(g->multi, &msgs_left))) {
|
||||
if (msg->msg == CURLMSG_DONE) {
|
||||
easy=msg->easy_handle;
|
||||
res=msg->data.result;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (easy) {
|
||||
easy = msg->easy_handle;
|
||||
res = msg->data.result;
|
||||
curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
|
||||
curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
|
||||
fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
|
||||
@@ -167,9 +152,7 @@ static void check_run_count(GlobalInfo *g)
|
||||
curl_easy_cleanup(easy);
|
||||
free(conn);
|
||||
}
|
||||
} while ( easy );
|
||||
}
|
||||
g->prev_running = g->still_running;
|
||||
}
|
||||
|
||||
|
||||
@@ -181,16 +164,13 @@ static void event_cb(int fd, short kind, void *userp)
|
||||
CURLMcode rc;
|
||||
|
||||
int action =
|
||||
(kind&EV_READ?CURL_CSELECT_IN:0)|
|
||||
(kind&EV_WRITE?CURL_CSELECT_OUT:0);
|
||||
(kind & EV_READ ? CURL_CSELECT_IN : 0) |
|
||||
(kind & EV_WRITE ? CURL_CSELECT_OUT : 0);
|
||||
|
||||
do {
|
||||
rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running);
|
||||
} while (rc == CURLM_CALL_MULTI_PERFORM);
|
||||
|
||||
mcode_or_die("event_cb: curl_multi_socket_action", rc);
|
||||
|
||||
check_run_count(g);
|
||||
check_multi_info(g);
|
||||
if ( g->still_running <= 0 ) {
|
||||
fprintf(MSG_OUT, "last transfer done, kill timeout\n");
|
||||
if (evtimer_pending(&g->timer_event, NULL)) {
|
||||
@@ -209,12 +189,10 @@ static void timer_cb(int fd, short kind, void *userp)
|
||||
(void)fd;
|
||||
(void)kind;
|
||||
|
||||
do {
|
||||
rc = curl_multi_socket_action(g->multi,
|
||||
CURL_SOCKET_TIMEOUT, 0, &g->still_running);
|
||||
} while (rc == CURLM_CALL_MULTI_PERFORM);
|
||||
mcode_or_die("timer_cb: curl_multi_socket_action", rc);
|
||||
check_run_count(g);
|
||||
check_multi_info(g);
|
||||
}
|
||||
|
||||
|
||||
@@ -340,7 +318,7 @@ static void new_conn(char *url, GlobalInfo *g )
|
||||
curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);
|
||||
fprintf(MSG_OUT,
|
||||
"Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
|
||||
rc =curl_multi_add_handle(g->multi, conn->easy);
|
||||
rc = curl_multi_add_handle(g->multi, conn->easy);
|
||||
mcode_or_die("new_conn: curl_multi_add_handle", rc);
|
||||
|
||||
/* note that the add_handle() will set a time-out to trigger very soon so
|
||||
@@ -372,7 +350,7 @@ static int init_fifo (GlobalInfo *g)
|
||||
{
|
||||
struct stat st;
|
||||
static const char *fifo = "hiper.fifo";
|
||||
int sockfd;
|
||||
curl_socket_t sockfd;
|
||||
|
||||
fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
|
||||
if (lstat (fifo, &st) == 0) {
|
||||
|
@@ -17,7 +17,7 @@ int main(void)
|
||||
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://sourceforge.net/");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
|
||||
#ifdef SKIP_PEER_VERIFICATION
|
||||
/*
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#define HTTP_HANDLE 0 /* Index for the HTTP transfer */
|
||||
#define FTP_HANDLE 1 /* Index for the FTP transfer */
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
CURL *handles[HANDLECOUNT];
|
||||
CURLM *multi_handle;
|
||||
@@ -43,9 +43,9 @@ int main(int argc, char **argv)
|
||||
handles[i] = curl_easy_init();
|
||||
|
||||
/* set the options (I left out a few, you'll get the point anyway) */
|
||||
curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "http://website.com");
|
||||
curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "http://example.com");
|
||||
|
||||
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://ftpsite.com");
|
||||
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://example.com");
|
||||
curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_UPLOAD, 1L);
|
||||
|
||||
/* init a multi stack */
|
||||
@@ -56,8 +56,7 @@ int main(int argc, char **argv)
|
||||
curl_multi_add_handle(multi_handle, handles[i]);
|
||||
|
||||
/* we start some action by calling perform right away */
|
||||
while(CURLM_CALL_MULTI_PERFORM ==
|
||||
curl_multi_perform(multi_handle, &still_running));
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
|
||||
while(still_running) {
|
||||
struct timeval timeout;
|
||||
@@ -66,7 +65,9 @@ int main(int argc, char **argv)
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
fd_set fdexcep;
|
||||
int maxfd;
|
||||
int maxfd = -1;
|
||||
|
||||
long curl_timeo = -1;
|
||||
|
||||
FD_ZERO(&fdread);
|
||||
FD_ZERO(&fdwrite);
|
||||
@@ -76,12 +77,23 @@ int main(int argc, char **argv)
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||
if(curl_timeo >= 0) {
|
||||
timeout.tv_sec = curl_timeo / 1000;
|
||||
if(timeout.tv_sec > 1)
|
||||
timeout.tv_sec = 1;
|
||||
else
|
||||
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls, *and* you make sure that maxfd is bigger than -1 so
|
||||
that the call to select() below makes sense! */
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||
to sleep. */
|
||||
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
|
||||
@@ -89,14 +101,9 @@ int main(int argc, char **argv)
|
||||
case -1:
|
||||
/* select error */
|
||||
break;
|
||||
case 0:
|
||||
/* timeout, do something else */
|
||||
break;
|
||||
default:
|
||||
/* one or more of curl's file descriptors say there's data to read
|
||||
or write */
|
||||
while(CURLM_CALL_MULTI_PERFORM ==
|
||||
curl_multi_perform(multi_handle, &still_running));
|
||||
case 0: /* timeout */
|
||||
default: /* action */
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -37,12 +37,12 @@ void dump(const char *text,
|
||||
/* without the hex output, we can fit more on screen */
|
||||
width = 0x40;
|
||||
|
||||
fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
|
||||
fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
|
||||
text, (long)size, (long)size);
|
||||
|
||||
for(i=0; i<size; i+= width) {
|
||||
|
||||
fprintf(stream, "%04.4lx: ", (long)i);
|
||||
fprintf(stream, "%4.4lx: ", (long)i);
|
||||
|
||||
if(!nohex) {
|
||||
/* hex not disabled, show it */
|
||||
@@ -79,6 +79,7 @@ int my_trace(CURL *handle, curl_infotype type,
|
||||
{
|
||||
const char *text;
|
||||
|
||||
(void)userp;
|
||||
(void)handle; /* prevent compiler warning */
|
||||
|
||||
switch (type) {
|
||||
@@ -108,7 +109,7 @@ int my_trace(CURL *handle, curl_infotype type,
|
||||
/*
|
||||
* Simply download a HTTP file.
|
||||
*/
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
CURL *http_handle;
|
||||
CURLM *multi_handle;
|
||||
@@ -118,7 +119,7 @@ int main(int argc, char **argv)
|
||||
http_handle = curl_easy_init();
|
||||
|
||||
/* set the options (I left out a few, you'll get the point anyway) */
|
||||
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.haxx.se/");
|
||||
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.example.com/");
|
||||
|
||||
curl_easy_setopt(http_handle, CURLOPT_DEBUGFUNCTION, my_trace);
|
||||
curl_easy_setopt(http_handle, CURLOPT_VERBOSE, 1L);
|
||||
@@ -130,8 +131,7 @@ int main(int argc, char **argv)
|
||||
curl_multi_add_handle(multi_handle, http_handle);
|
||||
|
||||
/* we start some action by calling perform right away */
|
||||
while(CURLM_CALL_MULTI_PERFORM ==
|
||||
curl_multi_perform(multi_handle, &still_running));
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
|
||||
while(still_running) {
|
||||
struct timeval timeout;
|
||||
@@ -140,7 +140,9 @@ int main(int argc, char **argv)
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
fd_set fdexcep;
|
||||
int maxfd;
|
||||
int maxfd = -1;
|
||||
|
||||
long curl_timeo = -1;
|
||||
|
||||
FD_ZERO(&fdread);
|
||||
FD_ZERO(&fdwrite);
|
||||
@@ -150,12 +152,23 @@ int main(int argc, char **argv)
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||
if(curl_timeo >= 0) {
|
||||
timeout.tv_sec = curl_timeo / 1000;
|
||||
if(timeout.tv_sec > 1)
|
||||
timeout.tv_sec = 1;
|
||||
else
|
||||
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls, *and* you make sure that maxfd is bigger than -1
|
||||
so that the call to select() below makes sense! */
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||
to sleep. */
|
||||
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
|
||||
@@ -168,8 +181,7 @@ int main(int argc, char **argv)
|
||||
case 0:
|
||||
default:
|
||||
/* timeout or readable/writable sockets */
|
||||
while(CURLM_CALL_MULTI_PERFORM ==
|
||||
curl_multi_perform(multi_handle, &still_running));
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@
|
||||
/*
|
||||
* Simply download two HTTP files!
|
||||
*/
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
CURL *http_handle;
|
||||
CURL *http_handle2;
|
||||
@@ -34,7 +34,7 @@ int main(int argc, char **argv)
|
||||
http_handle2 = curl_easy_init();
|
||||
|
||||
/* set options */
|
||||
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.haxx.se/");
|
||||
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.example.com/");
|
||||
|
||||
/* set options */
|
||||
curl_easy_setopt(http_handle2, CURLOPT_URL, "http://localhost/");
|
||||
@@ -47,8 +47,7 @@ int main(int argc, char **argv)
|
||||
curl_multi_add_handle(multi_handle, http_handle2);
|
||||
|
||||
/* we start some action by calling perform right away */
|
||||
while(CURLM_CALL_MULTI_PERFORM ==
|
||||
curl_multi_perform(multi_handle, &still_running));
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
|
||||
while(still_running) {
|
||||
struct timeval timeout;
|
||||
@@ -57,7 +56,9 @@ int main(int argc, char **argv)
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
fd_set fdexcep;
|
||||
int maxfd;
|
||||
int maxfd = -1;
|
||||
|
||||
long curl_timeo = -1;
|
||||
|
||||
FD_ZERO(&fdread);
|
||||
FD_ZERO(&fdwrite);
|
||||
@@ -67,12 +68,23 @@ int main(int argc, char **argv)
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||
if(curl_timeo >= 0) {
|
||||
timeout.tv_sec = curl_timeo / 1000;
|
||||
if(timeout.tv_sec > 1)
|
||||
timeout.tv_sec = 1;
|
||||
else
|
||||
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls, *and* you make sure that maxfd is bigger than -1 so
|
||||
that the call to select() below makes sense! */
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||
to sleep. */
|
||||
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
|
||||
@@ -83,8 +95,7 @@ int main(int argc, char **argv)
|
||||
case 0:
|
||||
default:
|
||||
/* timeout or readable/writable sockets */
|
||||
while(CURLM_CALL_MULTI_PERFORM ==
|
||||
curl_multi_perform(multi_handle, &still_running));
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl;
|
||||
|
||||
@@ -58,8 +58,7 @@ int main(int argc, char *argv[])
|
||||
if(curl && multi_handle) {
|
||||
|
||||
/* what URL that receives this POST */
|
||||
curl_easy_setopt(curl, CURLOPT_URL,
|
||||
"http://www.fillinyoururl.com/upload.cgi");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://www.example.com/upload.cgi");
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
|
||||
@@ -67,8 +66,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
curl_multi_add_handle(multi_handle, curl);
|
||||
|
||||
while(CURLM_CALL_MULTI_PERFORM ==
|
||||
curl_multi_perform(multi_handle, &still_running));
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
|
||||
while(still_running) {
|
||||
struct timeval timeout;
|
||||
@@ -77,7 +75,9 @@ int main(int argc, char *argv[])
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
fd_set fdexcep;
|
||||
int maxfd;
|
||||
int maxfd = -1;
|
||||
|
||||
long curl_timeo = -1;
|
||||
|
||||
FD_ZERO(&fdread);
|
||||
FD_ZERO(&fdwrite);
|
||||
@@ -87,12 +87,23 @@ int main(int argc, char *argv[])
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||
if(curl_timeo >= 0) {
|
||||
timeout.tv_sec = curl_timeo / 1000;
|
||||
if(timeout.tv_sec > 1)
|
||||
timeout.tv_sec = 1;
|
||||
else
|
||||
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls, *and* you make sure that maxfd is bigger than -1
|
||||
so that the call to select() below makes sense! */
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||
to sleep. */
|
||||
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
|
||||
@@ -101,12 +112,10 @@ int main(int argc, char *argv[])
|
||||
/* select error */
|
||||
break;
|
||||
case 0:
|
||||
printf("timeout!\n");
|
||||
default:
|
||||
/* timeout or readable/writable sockets */
|
||||
printf("perform!\n");
|
||||
while(CURLM_CALL_MULTI_PERFORM ==
|
||||
curl_multi_perform(multi_handle, &still_running));
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
printf("running: %d!\n", still_running);
|
||||
break;
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@
|
||||
/*
|
||||
* Simply download a HTTP file.
|
||||
*/
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
CURL *http_handle;
|
||||
CURLM *multi_handle;
|
||||
@@ -32,7 +32,7 @@ int main(int argc, char **argv)
|
||||
http_handle = curl_easy_init();
|
||||
|
||||
/* set the options (I left out a few, you'll get the point anyway) */
|
||||
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.haxx.se/");
|
||||
curl_easy_setopt(http_handle, CURLOPT_URL, "http://www.example.com/");
|
||||
|
||||
/* init a multi stack */
|
||||
multi_handle = curl_multi_init();
|
||||
@@ -41,8 +41,7 @@ int main(int argc, char **argv)
|
||||
curl_multi_add_handle(multi_handle, http_handle);
|
||||
|
||||
/* we start some action by calling perform right away */
|
||||
while(CURLM_CALL_MULTI_PERFORM ==
|
||||
curl_multi_perform(multi_handle, &still_running));
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
|
||||
while(still_running) {
|
||||
struct timeval timeout;
|
||||
@@ -51,7 +50,9 @@ int main(int argc, char **argv)
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
fd_set fdexcep;
|
||||
int maxfd;
|
||||
int maxfd = -1;
|
||||
|
||||
long curl_timeo = -1;
|
||||
|
||||
FD_ZERO(&fdread);
|
||||
FD_ZERO(&fdwrite);
|
||||
@@ -61,12 +62,23 @@ int main(int argc, char **argv)
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||
if(curl_timeo >= 0) {
|
||||
timeout.tv_sec = curl_timeo / 1000;
|
||||
if(timeout.tv_sec > 1)
|
||||
timeout.tv_sec = 1;
|
||||
else
|
||||
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls, *and* you make sure that maxfd is bigger than -1 so
|
||||
that the call to select() below makes sense! */
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||
to sleep. */
|
||||
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
|
||||
@@ -79,8 +91,7 @@ int main(int argc, char **argv)
|
||||
case 0:
|
||||
default:
|
||||
/* timeout or readable/writable sockets */
|
||||
while(CURLM_CALL_MULTI_PERFORM ==
|
||||
curl_multi_perform(multi_handle, &still_running));
|
||||
curl_multi_perform(multi_handle, &still_running);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@
|
||||
#include <unistd.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
@@ -24,12 +24,12 @@ int main(int argc, char **argv)
|
||||
curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
|
||||
|
||||
/* get the first document */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://curl.haxx.se/");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
/* get another document from the same server using the same
|
||||
connection */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://curl.haxx.se/docs/");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/docs/");
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
/* always cleanup */
|
||||
|
@@ -51,8 +51,8 @@ int main(void)
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
/* First set the URL that is about to receive our POST. */
|
||||
curl_easy_setopt(curl, CURLOPT_URL,
|
||||
"http://receivingsite.com.pooh/index.cgi");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/index.cgi");
|
||||
|
||||
/* Now specify we want to POST data */
|
||||
curl_easy_setopt(curl, CURLOPT_POST, 1L);
|
||||
|
||||
|
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
|
||||
headerlist = curl_slist_append(headerlist, buf);
|
||||
if(curl) {
|
||||
/* what URL that receives this POST */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://curl.haxx.se/examplepost.cgi");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/examplepost.cgi");
|
||||
if ( (argc == 2) && (!strcmp(argv[1], "noexpectheader")) )
|
||||
/* only disable 100-continue header if explicitly requested */
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
|
||||
|
@@ -75,7 +75,7 @@ int main(void)
|
||||
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||
|
||||
/* use platform-specific functions for codeset conversions */
|
||||
curl_easy_setopt(curl, CURLOPT_CONV_FROM_NETWORK_FUNCTION,
|
||||
|
@@ -14,7 +14,7 @@
|
||||
#include <curl/curl.h>
|
||||
|
||||
/* Auxiliary function that waits on the socket. */
|
||||
static int wait_on_socket(int sockfd, int for_recv, long timeout_ms)
|
||||
static int wait_on_socket(curl_socket_t sockfd, int for_recv, long timeout_ms)
|
||||
{
|
||||
struct timeval tv;
|
||||
fd_set infd, outfd, errfd;
|
||||
@@ -48,13 +48,14 @@ int main(void)
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
/* Minimalistic http request */
|
||||
const char *request = "GET / HTTP/1.0\r\nHost: curl.haxx.se\r\n\r\n";
|
||||
int sockfd; /* socket */
|
||||
const char *request = "GET / HTTP/1.0\r\nHost: example.com\r\n\r\n";
|
||||
curl_socket_t sockfd; /* socket */
|
||||
long sockextr;
|
||||
size_t iolen;
|
||||
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||
/* Do not do the transfer - only connect to host */
|
||||
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
|
||||
res = curl_easy_perform(curl);
|
||||
@@ -65,9 +66,11 @@ int main(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Extract the socket from the curl handle - we'll need it
|
||||
* for waiting */
|
||||
res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockfd);
|
||||
/* Extract the socket from the curl handle - we'll need it for waiting.
|
||||
* Note that this API takes a pointer to a 'long' while we use
|
||||
* curl_socket_t for sockets otherwise.
|
||||
*/
|
||||
res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockextr);
|
||||
|
||||
if(CURLE_OK != res)
|
||||
{
|
||||
@@ -75,6 +78,8 @@ int main(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
sockfd = sockextr;
|
||||
|
||||
/* wait for the socket to become ready for sending */
|
||||
if(!wait_on_socket(sockfd, 0, 60000L))
|
||||
{
|
||||
|
@@ -21,7 +21,7 @@ static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||
return written;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl_handle;
|
||||
static const char *headerfilename = "head.out";
|
||||
@@ -35,7 +35,7 @@ int main(int argc, char **argv)
|
||||
curl_handle = curl_easy_init();
|
||||
|
||||
/* set URL to get */
|
||||
curl_easy_setopt(curl_handle, CURLOPT_URL, "http://curl.haxx.se");
|
||||
curl_easy_setopt(curl_handle, CURLOPT_URL, "http://example.com");
|
||||
|
||||
/* no progress meter please */
|
||||
curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L);
|
||||
|
@@ -17,7 +17,7 @@ int main(void)
|
||||
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
/* always cleanup */
|
||||
|
@@ -20,7 +20,7 @@ int main(void)
|
||||
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://posthere.com");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
|
||||
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis);
|
||||
|
||||
/* if we don't provide POSTFIELDSIZE, libcurl will strlen() by
|
||||
|
71
docs/examples/simplesmtp.c
Normal file
71
docs/examples/simplesmtp.c
Normal file
@@ -0,0 +1,71 @@
|
||||
/*****************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
struct curl_slist *recipients = NULL;
|
||||
|
||||
/* value for envelope reverse-path */
|
||||
static const char *from = "<bradh@example.com>";
|
||||
|
||||
/* this becomes the envelope forward-path */
|
||||
static const char *to = "<bradh@example.net>";
|
||||
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
/* this is the URL for your mailserver - you can also use an smtps:// URL
|
||||
* here */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.net.");
|
||||
|
||||
/* Note that this option isn't strictly required, omitting it will result in
|
||||
* libcurl will sent the MAIL FROM command with no sender data. All
|
||||
* autoresponses should have an empty reverse-path, and should be directed
|
||||
* to the address in the reverse-path which triggered them. Otherwise, they
|
||||
* could cause an endless loop. See RFC 5321 Section 4.5.5 for more details.
|
||||
*/
|
||||
curl_easy_setopt(curl, CURLOPT_MAIL_FROM, from);
|
||||
|
||||
/* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array. */
|
||||
recipients = curl_slist_append(recipients, to);
|
||||
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
|
||||
|
||||
/* You provide the payload (headers and the body of the message) as the
|
||||
* "data" element. There are two choices, either:
|
||||
* - provide a callback function and specify the function name using the
|
||||
* CURLOPT_READFUNCTION option; or
|
||||
* - just provide a FILE pointer that can be used to read the data from.
|
||||
* The easiest case is just to read from standard input, (which is available
|
||||
* as a FILE pointer) as shown here.
|
||||
*/
|
||||
curl_easy_setopt(curl, CURLOPT_READDATA, stdin);
|
||||
|
||||
/* send the message (including headers) */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
/* free the list of recipients */
|
||||
curl_slist_free_all(recipients);
|
||||
|
||||
/* curl won't send the QUIT command until you call cleanup, so you should be
|
||||
* able to re-use this connection for additional messages (setting
|
||||
* CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT as required, and calling
|
||||
* curl_easy_perform() again. It may not be a good idea to keep the
|
||||
* connection open for a very long time though (more than a few minutes may
|
||||
* result in the server timing out the connection), and you do want to clean
|
||||
* up in the end.
|
||||
*/
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
return 0;
|
||||
}
|
@@ -32,7 +32,7 @@
|
||||
|
||||
*/
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
@@ -47,7 +47,7 @@ int main(int argc, char **argv)
|
||||
|
||||
const char *pEngine;
|
||||
|
||||
#if USE_ENGINE
|
||||
#ifdef USE_ENGINE
|
||||
pKeyName = "rsa_test";
|
||||
pKeyType = "ENG";
|
||||
pEngine = "chil"; /* for nChiper HSM... */
|
||||
|
192
docs/examples/smtp-multi.c
Normal file
192
docs/examples/smtp-multi.c
Normal file
@@ -0,0 +1,192 @@
|
||||
/*****************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
*
|
||||
* This is an example application source code sending SMTP mail using the
|
||||
* multi interface.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
/*
|
||||
* This is the list of basic details you need to tweak to get things right.
|
||||
*/
|
||||
#define USERNAME "user@example.com"
|
||||
#define PASSWORD "123qwerty"
|
||||
#define SMTPSERVER "smtp.example.com"
|
||||
#define SMTPPORT ":587" /* it is a colon+port string, but you can set it
|
||||
to "" to use the default port */
|
||||
#define RECIPIENT "<recipient@example.com>"
|
||||
#define MAILFROM "<realuser@example.com>"
|
||||
|
||||
#define MULTI_PERFORM_HANG_TIMEOUT 60 * 1000
|
||||
|
||||
/* Note that you should include the actual meta data headers here as well if
|
||||
you want the mail to have a Subject, another From:, show a To: or whatever
|
||||
you think your mail should feature! */
|
||||
static const char *text[]={
|
||||
"one\n",
|
||||
"two\n",
|
||||
"three\n",
|
||||
" Hello, this is CURL email SMTP\n",
|
||||
NULL
|
||||
};
|
||||
|
||||
struct WriteThis {
|
||||
int counter;
|
||||
};
|
||||
|
||||
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
|
||||
{
|
||||
struct WriteThis *pooh = (struct WriteThis *)userp;
|
||||
const char *data;
|
||||
|
||||
if(size*nmemb < 1)
|
||||
return 0;
|
||||
|
||||
data = text[pooh->counter];
|
||||
|
||||
if(data) {
|
||||
size_t len = strlen(data);
|
||||
memcpy(ptr, data, len);
|
||||
pooh->counter++; /* advance pointer */
|
||||
return len;
|
||||
}
|
||||
return 0; /* no more data left to deliver */
|
||||
}
|
||||
|
||||
static struct timeval 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;
|
||||
}
|
||||
|
||||
static long tvdiff(struct timeval newer, struct timeval older)
|
||||
{
|
||||
return (newer.tv_sec-older.tv_sec)*1000+
|
||||
(newer.tv_usec-older.tv_usec)/1000;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLM *mcurl;
|
||||
int still_running = 1;
|
||||
struct timeval mp_start;
|
||||
char mp_timedout = 0;
|
||||
struct WriteThis pooh;
|
||||
struct curl_slist* rcpt_list = NULL;
|
||||
|
||||
pooh.counter = 0;
|
||||
|
||||
curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||
|
||||
curl = curl_easy_init();
|
||||
if(!curl)
|
||||
return 1;
|
||||
|
||||
mcurl = curl_multi_init();
|
||||
if(!mcurl)
|
||||
return 2;
|
||||
|
||||
rcpt_list = curl_slist_append(rcpt_list, RECIPIENT);
|
||||
/* more addresses can be added here
|
||||
rcpt_list = curl_slist_append(rcpt_list, "<others@example.com>");
|
||||
*/
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "smtp://" SMTPSERVER SMTPPORT);
|
||||
curl_easy_setopt(curl, CURLOPT_USERNAME, USERNAME);
|
||||
curl_easy_setopt(curl, CURLOPT_PASSWORD, PASSWORD);
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
|
||||
curl_easy_setopt(curl, CURLOPT_MAIL_FROM, MAILFROM);
|
||||
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, rcpt_list);
|
||||
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER,0);
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
|
||||
curl_easy_setopt(curl, CURLOPT_READDATA, &pooh);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_SSLVERSION, 0);
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE, 0);
|
||||
curl_multi_add_handle(mcurl, curl);
|
||||
|
||||
mp_timedout = 0;
|
||||
mp_start = tvnow();
|
||||
|
||||
/* we start some action by calling perform right away */
|
||||
curl_multi_perform(mcurl, &still_running);
|
||||
|
||||
while(still_running) {
|
||||
struct timeval timeout;
|
||||
int rc; /* select() return code */
|
||||
|
||||
fd_set fdread;
|
||||
fd_set fdwrite;
|
||||
fd_set fdexcep;
|
||||
int maxfd = -1;
|
||||
|
||||
long curl_timeo = -1;
|
||||
|
||||
FD_ZERO(&fdread);
|
||||
FD_ZERO(&fdwrite);
|
||||
FD_ZERO(&fdexcep);
|
||||
|
||||
/* set a suitable timeout to play around with */
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
curl_multi_timeout(mcurl, &curl_timeo);
|
||||
if(curl_timeo >= 0) {
|
||||
timeout.tv_sec = curl_timeo / 1000;
|
||||
if(timeout.tv_sec > 1)
|
||||
timeout.tv_sec = 1;
|
||||
else
|
||||
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||
}
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
curl_multi_fdset(mcurl, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
/* In a real-world program you OF COURSE check the return code of the
|
||||
function calls. On success, the value of maxfd is guaranteed to be
|
||||
greater or equal than -1. We call select(maxfd + 1, ...), specially in
|
||||
case of (maxfd == -1), we call select(0, ...), which is basically equal
|
||||
to sleep. */
|
||||
|
||||
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
|
||||
if (tvdiff(tvnow(), mp_start) > MULTI_PERFORM_HANG_TIMEOUT) {
|
||||
fprintf(stderr, "ABORTING TEST, since it seems "
|
||||
"that it would have run forever.\n");
|
||||
break;
|
||||
}
|
||||
|
||||
switch(rc) {
|
||||
case -1:
|
||||
/* select error */
|
||||
break;
|
||||
case 0: /* timeout */
|
||||
default: /* action */
|
||||
curl_multi_perform(mcurl, &still_running);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
curl_slist_free_all(rcpt_list);
|
||||
curl_multi_remove_handle(mcurl, curl);
|
||||
curl_multi_cleanup(mcurl);
|
||||
curl_easy_cleanup(curl);
|
||||
curl_global_cleanup();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
136
docs/examples/smtp-tls.c
Normal file
136
docs/examples/smtp-tls.c
Normal file
@@ -0,0 +1,136 @@
|
||||
/*****************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
/* This is a simple example showing how to send mail using libcurl's SMTP
|
||||
* capabilities. It builds on the simplesmtp.c example, adding some
|
||||
* authentication and transport security.
|
||||
*/
|
||||
|
||||
#define FROM "<sender@example.org>"
|
||||
#define TO "<addressee@example.net>"
|
||||
#define CC "<info@example.org>"
|
||||
|
||||
static const char *payload_text[]={
|
||||
"Date: Mon, 29 Nov 2010 21:54:29 +1100\n",
|
||||
"To: " TO "\n",
|
||||
"From: " FROM "(Example User)\n",
|
||||
"Cc: " CC "(Another example User)\n",
|
||||
"Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@rfcpedant.example.org>\n",
|
||||
"Subject: SMTP TLS example message\n",
|
||||
"\n", /* empty line to divide headers from body, see RFC5322 */
|
||||
"The body of the message starts here.\n",
|
||||
"\n",
|
||||
"It could be a lot of lines, could be MIME encoded, whatever.\n",
|
||||
"Check RFC5322.\n",
|
||||
NULL
|
||||
};
|
||||
|
||||
struct upload_status {
|
||||
int lines_read;
|
||||
};
|
||||
|
||||
static size_t payload_source(void *ptr, size_t size, size_t nmemb, void *userp)
|
||||
{
|
||||
struct upload_status *upload_ctx = (struct upload_status *)userp;
|
||||
const char *data;
|
||||
|
||||
if ((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
data = payload_text[upload_ctx->lines_read];
|
||||
|
||||
if (data) {
|
||||
size_t len = strlen(data);
|
||||
memcpy(ptr, data, len);
|
||||
upload_ctx->lines_read ++;
|
||||
return len;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
struct curl_slist *recipients = NULL;
|
||||
struct upload_status upload_ctx;
|
||||
|
||||
upload_ctx.lines_read = 0;
|
||||
|
||||
curl = curl_easy_init();
|
||||
if (curl) {
|
||||
/* This is the URL for your mailserver. Note the use of port 587 here,
|
||||
* instead of the normal SMTP port (25). Port 587 is commonly used for
|
||||
* secure mail submission (see RFC4403), but you should use whatever
|
||||
* matches your server configuration. */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "smtp://mainserver.example.net:587");
|
||||
|
||||
/* In this example, we'll start with a plain text connection, and upgrade
|
||||
* to Transport Layer Security (TLS) using the STARTTLS command. Be careful
|
||||
* of using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer
|
||||
* will continue anyway - see the security discussion in the libcurl
|
||||
* tutorial for more details. */
|
||||
curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
|
||||
|
||||
/* If your server doesn't have a valid certificate, then you can disable
|
||||
* part of the Transport Layer Security protection by setting the
|
||||
* CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options to 0 (false).
|
||||
* curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
* curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
|
||||
* That is, in general, a bad idea. It is still better than sending your
|
||||
* authentication details in plain text though.
|
||||
* Instead, you should get the issuer certificate (or the host certificate
|
||||
* if the certificate is self-signed) and add it to the set of certificates
|
||||
* that are known to libcurl using CURLOPT_CAINFO and/or CURLOPT_CAPATH. See
|
||||
* docs/SSLCERTS for more information.
|
||||
*/
|
||||
curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem");
|
||||
|
||||
/* A common reason for requiring transport security is to protect
|
||||
* authentication details (user names and passwords) from being "snooped"
|
||||
* on the network. Here is how the user name and password are provided: */
|
||||
curl_easy_setopt(curl, CURLOPT_USERNAME, "user@example.net");
|
||||
curl_easy_setopt(curl, CURLOPT_PASSWORD, "P@ssw0rd");
|
||||
|
||||
/* value for envelope reverse-path */
|
||||
curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
|
||||
/* Add two recipients, in this particular case they correspond to the
|
||||
* To: and Cc: addressees in the header, but they could be any kind of
|
||||
* recipient. */
|
||||
recipients = curl_slist_append(recipients, TO);
|
||||
recipients = curl_slist_append(recipients, CC);
|
||||
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
|
||||
|
||||
/* In this case, we're using a callback function to specify the data. You
|
||||
* could just use the CURLOPT_READDATA option to specify a FILE pointer to
|
||||
* read from.
|
||||
*/
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
|
||||
curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
|
||||
|
||||
/* Since the traffic will be encrypted, it is very useful to turn on debug
|
||||
* information within libcurl to see what is happening during the transfer.
|
||||
*/
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
|
||||
/* send the message (including headers) */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
/* free the list of recipients and clean up */
|
||||
curl_slist_free_all(recipients);
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
return 0;
|
||||
}
|
@@ -91,10 +91,10 @@ void init_locks(void)
|
||||
|
||||
/* List of URLs to fetch.*/
|
||||
const char * const urls[]= {
|
||||
"https://www.sf.net/",
|
||||
"https://www.openssl.org/",
|
||||
"https://www.sf.net/",
|
||||
"https://www.openssl.org/",
|
||||
"https://www.example.com/",
|
||||
"https://www2.example.com/",
|
||||
"https://www3.example.com/",
|
||||
"https://www4.example.com/",
|
||||
};
|
||||
|
||||
static void *pull_one_url(void *url)
|
||||
|
105
docs/examples/version-check.pl
Executable file
105
docs/examples/version-check.pl
Executable file
@@ -0,0 +1,105 @@
|
||||
#!/usr/bin/env perl
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2010, 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
|
||||
# are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
#
|
||||
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
# copies of the Software, and permit persons to whom the Software is
|
||||
# furnished to do so, under the terms of the COPYING file.
|
||||
#
|
||||
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
# KIND, either express or implied.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
# This script accepts a source file as input on the command line.
|
||||
#
|
||||
# It first loads the 'symbols-in-versions' document and stores a lookup
|
||||
# table for all known symbols for which version they were introduced.
|
||||
#
|
||||
# It then scans the given source file to dig up all symbols starting with CURL.
|
||||
# Finally, it sorts the internal list of found symbols (using the version
|
||||
# number as sort key) and then it outputs the most recent version number and
|
||||
# the symbols from that version that are used.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# version-check.pl [source file]
|
||||
#
|
||||
|
||||
open(S, "<../libcurl/symbols-in-versions") || die;
|
||||
|
||||
my %doc;
|
||||
my %rem;
|
||||
while(<S>) {
|
||||
if(/(^CURL[^ \n]*) *(.*)/) {
|
||||
my ($sym, $rest)=($1, $2);
|
||||
my @a=split(/ +/, $rest);
|
||||
|
||||
$doc{$sym}=$a[0]; # when it was introduced
|
||||
|
||||
if($a[2]) {
|
||||
# this symbol is documented to have been present the last time
|
||||
# in this release
|
||||
$rem{$sym}=$a[2];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close(S);
|
||||
|
||||
sub age {
|
||||
my ($ver)=@_;
|
||||
|
||||
my @s=split(/\./, $ver);
|
||||
return $s[0]*10000+$s[1]*100+$s[2];
|
||||
}
|
||||
|
||||
my %used;
|
||||
open(C, "<$ARGV[0]") || die;
|
||||
|
||||
while(<C>) {
|
||||
if(/\W(CURL[_A-Z0-9v]+)\W/) {
|
||||
#print "$1\n";
|
||||
$used{$1}++;
|
||||
}
|
||||
}
|
||||
|
||||
close(C);
|
||||
|
||||
sub sortversions {
|
||||
my $r = age($doc{$a}) <=> age($doc{$b});
|
||||
if(!$r) {
|
||||
$r = $a cmp $b;
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
my @recent = reverse sort sortversions keys %used;
|
||||
|
||||
# the most recent symbol
|
||||
my $newsym = $recent[0];
|
||||
# the most recent version
|
||||
my $newver = $doc{$newsym};
|
||||
|
||||
print "The scanned source uses these symbols introduced in $newver:\n";
|
||||
|
||||
for my $w (@recent) {
|
||||
if($doc{$w} eq $newver) {
|
||||
printf " $w\n";
|
||||
next;
|
||||
}
|
||||
last;
|
||||
}
|
||||
|
||||
|
2
docs/libcurl/.gitignore
vendored
Normal file
2
docs/libcurl/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.html
|
||||
*.pdf
|
@@ -173,6 +173,17 @@ string holding the IP address of the most recent connection done with this
|
||||
\fBcurl\fP handle. This string may be IPv6 if that's enabled. Note that you
|
||||
get a pointer to a memory area that will be re-used at next request so you
|
||||
need to copy the string if you want to keep the information. (Added in 7.19.0)
|
||||
.IP CURLINFO_PRIMARY_PORT
|
||||
Pass a pointer to a long to receive the destination port of the most recent
|
||||
connection done with this \fBcurl\fP handle. (Added in 7.21.0)
|
||||
.IP CURLINFO_LOCAL_IP
|
||||
Pass a pointer to a char pointer to receive the pointer to a zero-terminated
|
||||
string holding the local (source) IP address of the most recent connection done
|
||||
with this \fBcurl\fP handle. This string may be IPv6 if that's enabled. The
|
||||
same restrictions apply as to \fICURLINFO_PRIMARY_IP\fP. (Added in 7.21.0)
|
||||
.IP CURLINFO_LOCAL_PORT
|
||||
Pass a pointer to a long to receive the local (source) port of the most recent
|
||||
connection done with this \fBcurl\fP handle. (Added in 7.21.0)
|
||||
.IP CURLINFO_COOKIELIST
|
||||
Pass a pointer to a 'struct curl_slist *' to receive a linked-list of all
|
||||
cookies cURL knows (expired ones, too). Don't forget to
|
||||
@@ -187,11 +198,16 @@ working with the socket, you must call curl_easy_cleanup() as usual and let
|
||||
libcurl close the socket and cleanup other resources associated with the
|
||||
handle. This is typically used in combination with \fICURLOPT_CONNECT_ONLY\fP.
|
||||
(Added in 7.15.2)
|
||||
|
||||
NOTE: this API is not really working on win64, since the SOCKET type on win64
|
||||
is 64 bit large while its 'long' is only 32 bits.
|
||||
.IP CURLINFO_FTP_ENTRY_PATH
|
||||
Pass a pointer to a char pointer to receive a pointer to a string holding the
|
||||
path of the entry path. That is the initial path libcurl ended up in when
|
||||
logging on to the remote FTP server. This stores a NULL as pointer if
|
||||
something is wrong. (Added in 7.15.4)
|
||||
|
||||
Also works for SFTP since 7.21.4
|
||||
.IP CURLINFO_CERTINFO
|
||||
Pass a pointer to a 'struct curl_certinfo *' and you'll get it set to point to
|
||||
struct that holds a number of linked lists with info about the certificate
|
||||
|
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" * Copyright (C) 1998 - 2011, 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
|
||||
@@ -84,11 +84,68 @@ If this option is set and libcurl has been built with the standard name
|
||||
resolver, timeouts will not occur while the name resolve takes place.
|
||||
Consider building libcurl with c-ares support to enable asynchronous DNS
|
||||
lookups, which enables nice timeouts for name resolves without signals.
|
||||
|
||||
Setting \fICURLOPT_NOSIGNAL\fP to 1 makes libcurl NOT ask the system to ignore
|
||||
SIGPIPE signals, which otherwise are sent by the system when trying to send
|
||||
data to a socket which is closed in the other end. libcurl makes an effort to
|
||||
never cause such SIGPIPEs to trigger, but some operating systems have no way
|
||||
to avoid them and even on those that have there are some corner cases when
|
||||
they may still happen, contrary to our desire.
|
||||
.IP CURLOPT_WILDCARDMATCH
|
||||
Set this option to 1 if you want to transfer multiple files according to a
|
||||
file name pattern. The pattern can be specified as part of the
|
||||
\fICURLOPT_URL\fP option, using an fnmatch-like pattern (Shell Pattern
|
||||
Matching) in the last part of URL (file name).
|
||||
|
||||
By default, libcurl uses its internal wildcard matching implementation. You
|
||||
can provide your own matching function by the \fICURLOPT_FNMATCH_FUNCTION\fP
|
||||
option.
|
||||
|
||||
This feature is only supported by the FTP download for now.
|
||||
|
||||
A brief introduction of its syntax follows:
|
||||
.RS
|
||||
.IP "\fB*\fP - ASTERISK"
|
||||
\&ftp://example.com/some/path/\fB*.txt\fP (for all txt's from the root
|
||||
directory)
|
||||
.RE
|
||||
.RS
|
||||
.IP "\fB?\fP - QUESTION MARK"
|
||||
Question mark matches any (exactly one) character.
|
||||
|
||||
\&ftp://example.com/some/path/\fBphoto?.jpeg\fP
|
||||
.RE
|
||||
.RS
|
||||
.IP "\fB[\fP - BRACKET EXPRESSION"
|
||||
The left bracket opens a bracket expression. The question mark and asterisk have
|
||||
no special meaning in a bracket expression. Each bracket expression ends by the
|
||||
right bracket and matches exactly one character. Some examples follow:
|
||||
|
||||
\fB[a-zA-Z0\-9]\fP or \fB[f\-gF\-G]\fP \- character interval
|
||||
|
||||
\fB[abc]\fP - character enumeration
|
||||
|
||||
\fB[^abc]\fP or \fB[!abc]\fP - negation
|
||||
|
||||
\fB[[:\fP\fIname\fP\fB:]]\fP class expression. Supported classes are
|
||||
\fBalnum\fP,\fBlower\fP, \fBspace\fP, \fBalpha\fP, \fBdigit\fP, \fBprint\fP,
|
||||
\fBupper\fP, \fBblank\fP, \fBgraph\fP, \fBxdigit\fP.
|
||||
|
||||
\fB[][-!^]\fP - special case \- matches only '\-', ']', '[', '!' or '^'. These
|
||||
characters have no special purpose.
|
||||
|
||||
\fB[\\[\\]\\\\]\fP - escape syntax. Matches '[', ']' or '\\'.
|
||||
|
||||
Using the rules above, a file name pattern can be constructed:
|
||||
|
||||
\&ftp://example.com/some/path/\fB[a-z[:upper:]\\\\].jpeg\fP
|
||||
.RE
|
||||
.PP
|
||||
(This was added in 7.21.0)
|
||||
.SH CALLBACK OPTIONS
|
||||
.IP CURLOPT_WRITEFUNCTION
|
||||
Function pointer that should match the following prototype: \fBsize_t
|
||||
function( void *ptr, size_t size, size_t nmemb, void *stream);\fP This
|
||||
function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP This
|
||||
function gets called by libcurl as soon as there is data received that needs
|
||||
to be saved. The size of the data pointed to by \fIptr\fP is \fIsize\fP
|
||||
multiplied with \fInmemb\fP, it will not be zero terminated. Return the number
|
||||
@@ -107,7 +164,7 @@ Set this option to NULL to get the internal default function. The internal
|
||||
default function will write the data to the FILE * given with
|
||||
\fICURLOPT_WRITEDATA\fP.
|
||||
|
||||
Set the \fIstream\fP argument with the \fICURLOPT_WRITEDATA\fP option.
|
||||
Set the \fIuserdata\fP argument with the \fICURLOPT_WRITEDATA\fP option.
|
||||
|
||||
The callback function will be passed as much data as possible in all invokes,
|
||||
but you cannot possibly make any assumptions. It may be one byte, it may be
|
||||
@@ -130,7 +187,7 @@ This option is also known with the older name \fICURLOPT_FILE\fP, the name
|
||||
\fICURLOPT_WRITEDATA\fP was introduced in 7.9.7.
|
||||
.IP CURLOPT_READFUNCTION
|
||||
Function pointer that should match the following prototype: \fBsize_t
|
||||
function( void *ptr, size_t size, size_t nmemb, void *stream);\fP This
|
||||
function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP This
|
||||
function gets called by libcurl as soon as it needs to read data in order to
|
||||
send it to the peer. The data area pointed at by the pointer \fIptr\fP may be
|
||||
filled with at most \fIsize\fP multiplied with \fInmemb\fP number of
|
||||
@@ -151,9 +208,9 @@ From 7.18.0, the function can return CURL_READFUNC_PAUSE which then will cause
|
||||
reading from this connection to become paused. See \fIcurl_easy_pause(3)\fP
|
||||
for further details.
|
||||
|
||||
If you set the callback pointer to NULL, or don't set it at all, the default
|
||||
internal read function will be used. It is simply doing an fread() on the FILE
|
||||
* stream set with \fICURLOPT_READDATA\fP.
|
||||
If you set this callback pointer to NULL, or don't set it at all, the default
|
||||
internal read function will be used. It is doing an fread() on the FILE *
|
||||
userdata set with \fICURLOPT_READDATA\fP.
|
||||
.IP CURLOPT_READDATA
|
||||
Data pointer to pass to the file read function. If you use the
|
||||
\fICURLOPT_READFUNCTION\fP option, this is the pointer you'll get as input. If
|
||||
@@ -246,11 +303,11 @@ argument in the opensocket callback set with \fICURLOPT_OPENSOCKETFUNCTION\fP.
|
||||
Function pointer that should match the \fIcurl_progress_callback\fP prototype
|
||||
found in \fI<curl/curl.h>\fP. This function gets called by libcurl instead of
|
||||
its internal equivalent with a frequent interval during operation (roughly
|
||||
once per second) no matter if data is being transfered or not. Unknown/unused
|
||||
argument values passed to the callback will be set to zero (like if you only
|
||||
download data, the upload size will remain 0). Returning a non-zero value from
|
||||
this callback will cause libcurl to abort the transfer and return
|
||||
\fICURLE_ABORTED_BY_CALLBACK\fP.
|
||||
once per second or sooner) no matter if data is being transfered or not.
|
||||
Unknown/unused argument values passed to the callback will be set to zero
|
||||
(like if you only download data, the upload size will remain 0). Returning a
|
||||
non-zero value from this callback will cause libcurl to abort the transfer and
|
||||
return \fICURLE_ABORTED_BY_CALLBACK\fP.
|
||||
|
||||
If you transfer data with the multi interface, this function will not be
|
||||
called during periods of idleness unless you call the appropriate libcurl
|
||||
@@ -263,13 +320,13 @@ Pass a pointer that will be untouched by libcurl and passed as the first
|
||||
argument in the progress callback set with \fICURLOPT_PROGRESSFUNCTION\fP.
|
||||
.IP CURLOPT_HEADERFUNCTION
|
||||
Function pointer that should match the following prototype: \fIsize_t
|
||||
function( void *ptr, size_t size, size_t nmemb, void *stream);\fP. This
|
||||
function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP. This
|
||||
function gets called by libcurl as soon as it has received header data. The
|
||||
header callback will be called once for each header and only complete header
|
||||
lines are passed on to the callback. Parsing headers should be easy enough
|
||||
using this. The size of the data pointed to by \fIptr\fP is \fIsize\fP
|
||||
multiplied with \fInmemb\fP. Do not assume that the header line is zero
|
||||
terminated! The pointer named \fIstream\fP is the one you set with the
|
||||
terminated! The pointer named \fIuserdata\fP is the one you set with the
|
||||
\fICURLOPT_WRITEHEADER\fP option. The callback function must return the number
|
||||
of bytes actually taken care of. If that amount differs from the amount passed
|
||||
to your function, it'll signal an error to the library. This will abort the
|
||||
@@ -402,7 +459,7 @@ You will need to override these definitions if they are different on your
|
||||
system.
|
||||
.IP CURLOPT_INTERLEAVEFUNCTION
|
||||
Function pointer that should match the following prototype: \fIsize_t
|
||||
function( void *ptr, size_t size, size_t nmemb, void *stream)\fP. This
|
||||
function( void *ptr, size_t size, size_t nmemb, void *userdata)\fP. This
|
||||
function gets called by libcurl as soon as it has received interleaved RTP
|
||||
data. This function gets called for each $ block and therefore contains
|
||||
exactly one upper-layer protocol unit (e.g. one RTP packet). Curl writes the
|
||||
@@ -422,8 +479,52 @@ request, (e.g. \fICURL_RTSPREQ_PAUSE\fP) then the response handler will
|
||||
process any pending RTP data before marking the request as finished. (Added
|
||||
in 7.20.0)
|
||||
.IP CURLOPT_INTERLEAVEDATA
|
||||
This is the stream that will be passed to \fICURLOPT_INTERLEAVEFUNCTION\fP when
|
||||
interleaved RTP data is received. (Added in 7.20.0)
|
||||
This is the userdata pointer that will be passed to
|
||||
\fICURLOPT_INTERLEAVEFUNCTION\fP when interleaved RTP data is received. (Added
|
||||
in 7.20.0)
|
||||
.IP CURLOPT_CHUNK_BGN_FUNCTION
|
||||
Function pointer that should match the following prototype: \fBlong function
|
||||
(const void *transfer_info, void *ptr, int remains)\fP. This function gets
|
||||
called by libcurl before a part of the stream is going to be transferred (if
|
||||
the transfer supports chunks).
|
||||
|
||||
This callback makes sense only when using the \fICURLOPT_WILDCARDMATCH\fP
|
||||
option for now.
|
||||
|
||||
The target of transfer_info parameter is a "feature depended" structure. For
|
||||
the FTP wildcard download, the target is curl_fileinfo structure (see
|
||||
\fIcurl/curl.h\fP). The parameter ptr is a pointer given by
|
||||
\fICURLOPT_CHUNK_DATA\fP. The parameter remains contains number of chunks
|
||||
remaining per the transfer. If the feature is not available, the parameter has
|
||||
zero value.
|
||||
|
||||
Return \fICURL_CHUNK_BGN_FUNC_OK\fP if everything is fine,
|
||||
\fICURL_CHUNK_BGN_FUNC_SKIP\fP if you want to skip the concrete chunk or
|
||||
\fICURL_CHUNK_BGN_FUNC_FAIL\fP to tell libcurl to stop if some error occurred.
|
||||
(This was added in 7.21.0)
|
||||
.IP CURLOPT_CHUNK_END_FUNCTION
|
||||
Function pointer that should match the following prototype: \fBlong
|
||||
function(void *ptr)\fP. This function gets called by libcurl as soon as a part
|
||||
of the stream has been transferred (or skipped).
|
||||
|
||||
Return \fICURL_CHUNK_END_FUNC_OK\fP if everything is fine or
|
||||
\fBCURL_CHUNK_END_FUNC_FAIL\fP to tell the lib to stop if some error occurred.
|
||||
(This was added in 7.21.0)
|
||||
.IP CURLOPT_CHUNK_DATA
|
||||
Pass a pointer that will be untouched by libcurl and passed as the ptr
|
||||
argument to the \fICURL_CHUNK_BGN_FUNTION\fP and \fICURL_CHUNK_END_FUNTION\fP.
|
||||
(This was added in 7.21.0)
|
||||
.IP CURLOPT_FNMATCH_FUNCTION
|
||||
Function pointer that should match \fBint function(void *ptr, const char
|
||||
*pattern, const char *string)\fP prototype (see \fIcurl/curl.h\fP). It is used
|
||||
internally for the wildcard matching feature.
|
||||
|
||||
Return \fICURL_FNMATCHFUNC_MATCH\fP if pattern matches the string,
|
||||
\fICURL_FNMATCHFUNC_NOMATCH\fP if not or \fICURL_FNMATCHFUNC_FAIL\fP if an
|
||||
error occurred. (This was added in 7.21.0)
|
||||
.IP CURLOPT_FNMATCH_DATA
|
||||
Pass a pointer that will be untouched by libcurl and passed as the ptr argument
|
||||
to the \fICURL_FNMATCH_FUNCTION\fP. (This was added in 7.21.0)
|
||||
.SH ERROR OPTIONS
|
||||
.IP CURLOPT_ERRORBUFFER
|
||||
Pass a char * to a buffer that the libcurl may store human readable error
|
||||
@@ -764,7 +865,34 @@ secure.
|
||||
This is a convenience macro that sets all bits except Basic and thus makes
|
||||
libcurl pick any it finds suitable. libcurl will automatically select the one
|
||||
it finds most secure.
|
||||
.IP CURLAUTH_ONLY
|
||||
This is a meta symbol. Or this value together with a single specific auth
|
||||
value to force libcurl to probe for un-restricted auth and if not, only that
|
||||
single auth algorithm is acceptable. (Added in 7.21.3)
|
||||
.RE
|
||||
.IP CURLOPT_TLSAUTH_TYPE
|
||||
Pass a long as parameter, which is set to a bitmask, to tell libcurl which
|
||||
authentication method(s) you want it to use for TLS authentication.
|
||||
.RS
|
||||
.IP CURLOPT_TLSAUTH_SRP
|
||||
TLS-SRP authentication. Secure Remote Password authentication for TLS is
|
||||
defined in RFC 5054 and provides mutual authentication if both sides have a
|
||||
shared secret. To use TLS-SRP, you must also set the
|
||||
\fICURLOPT_TLSAUTH_USERNAME\fP and \fICURLOPT_TLSAUTH_PASSWORD\fP options.
|
||||
|
||||
You need to build libcurl with GnuTLS and with TLS-SRP support for this to
|
||||
work. (Added in 7.21.4)
|
||||
.RE
|
||||
.IP CURLOPT_TLSAUTH_USERNAME
|
||||
Pass a char * as parameter, which should point to the zero-terminated username
|
||||
to use for the TLS authentication method specified with the
|
||||
\fICURLOPT_TLSAUTH_TYPE\fP option. Requires that the
|
||||
\fICURLOPT_TLS_PASSWORD\fP option also be set. (Added in 7.21.4)
|
||||
.IP CURLOPT_TLSAUTH_PASSWORD
|
||||
Pass a char * as parameter, which should point to the zero-terminated password
|
||||
to use for the TLS authentication method specified with the
|
||||
\fICURLOPT_TLSAUTH_TYPE\fP option. Requires that the
|
||||
\fICURLOPT_TLS_USERNAME\fP option also be set. (Added in 7.21.4)
|
||||
.IP CURLOPT_PROXYAUTH
|
||||
Pass a long as parameter, which is set to a bitmask, to tell libcurl which
|
||||
authentication method(s) you want it to use for your proxy authentication. If
|
||||
@@ -1084,6 +1212,10 @@ option is set to zero. (added in 7.16.2)
|
||||
Pass a pointer to a zero terminated string as parameter. It will be used to
|
||||
specify the sender address in a mail when sending an SMTP mail with libcurl.
|
||||
|
||||
An originator email address in SMTP lingo is specified within angle brackets
|
||||
(<>) which libcurl will not add for you before version 7.21.4. Failing to
|
||||
provide such brackets may cause the server to reject your mail.
|
||||
|
||||
(Added in 7.20.0)
|
||||
.IP CURLOPT_MAIL_RCPT
|
||||
Pass a pointer to a linked list of recipients to pass to the server in your
|
||||
@@ -1165,9 +1297,15 @@ A parameter set to 1 tells the library to just list the names of files in a
|
||||
directory, instead of doing a full directory listing that would include file
|
||||
sizes, dates etc. This works for FTP and SFTP URLs.
|
||||
|
||||
This causes an FTP NLST command to be sent on an FTP server. Beware
|
||||
that some FTP servers list only files in their response to NLST; they
|
||||
might not include subdirectories and symbolic links.
|
||||
This causes an FTP NLST command to be sent on an FTP server. Beware that some
|
||||
FTP servers list only files in their response to NLST; they might not include
|
||||
subdirectories and symbolic links.
|
||||
|
||||
Setting this option to 1 also implies a directory listing even if the URL
|
||||
doesn't end with a slash, which otherwise is necessary.
|
||||
|
||||
Do NOT use this option if you also use \fICURLOPT_WILDCARDMATCH\fP as it will
|
||||
effectively break that feature then.
|
||||
|
||||
(This option was known as CURLOPT_FTPLISTONLY up to 7.16.4)
|
||||
.IP CURLOPT_APPEND
|
||||
@@ -1237,22 +1375,6 @@ it already uses for the control connection. But it will use the port number
|
||||
from the 227-response. (Added in 7.14.2)
|
||||
|
||||
This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
|
||||
.IP CURLOPT_USE_SSL
|
||||
Pass a long using one of the values from below, to make libcurl use your
|
||||
desired level of SSL for the FTP transfer. (Added in 7.11.0)
|
||||
|
||||
(This option was known as CURLOPT_FTP_SSL up to 7.16.4, and the constants
|
||||
were known as CURLFTPSSL_*)
|
||||
.RS
|
||||
.IP CURLUSESSL_NONE
|
||||
Don't attempt to use SSL.
|
||||
.IP CURLUSESSL_TRY
|
||||
Try using SSL, proceed as normal otherwise.
|
||||
.IP CURLUSESSL_CONTROL
|
||||
Require SSL for the control connection or fail with \fICURLE_USE_SSL_FAILED\fP.
|
||||
.IP CURLUSESSL_ALL
|
||||
Require SSL for all communication or fail with \fICURLE_USE_SSL_FAILED\fP.
|
||||
.RE
|
||||
.IP CURLOPT_FTPSSLAUTH
|
||||
Pass a long using one of the values from below, to alter how libcurl issues
|
||||
\&"AUTH TLS" or "AUTH SSL" when FTP over SSL is activated (see
|
||||
@@ -1424,7 +1546,9 @@ to 0 (zero, the default), \fICURLOPT_TRANSFERTEXT\fP has no effect when doing
|
||||
FTP via a proxy. Beware that not all proxies support this feature. (Added in
|
||||
7.18.0)
|
||||
.IP CURLOPT_CRLF
|
||||
Convert Unix newlines to CRLF newlines on transfers.
|
||||
Pass a long. If the value is set to 1 (one), libcurl converts Unix newlines to
|
||||
CRLF newlines on transfers. Disable this option again by setting the value to
|
||||
0 (zero).
|
||||
.IP CURLOPT_RANGE
|
||||
Pass a char * as parameter, which should contain the specified range you
|
||||
want. It should be in the format "X-Y", where X or Y may be left out. HTTP
|
||||
@@ -1445,6 +1569,10 @@ want the transfer to start from. Set this option to 0 to make the transfer
|
||||
start from the beginning (effectively disabling resume). For FTP, set this
|
||||
option to -1 to make the transfer start from the end of the target file
|
||||
(useful to continue an interrupted upload).
|
||||
|
||||
When doing uploads with FTP, the resume position is where in the local/source
|
||||
file libcurl should try to resume the upload from and it will then append the
|
||||
source file to the remote target file.
|
||||
.IP CURLOPT_RESUME_FROM_LARGE
|
||||
Pass a curl_off_t as parameter. It contains the offset in number of bytes that
|
||||
you want the transfer to start from. (Added in 7.11.0)
|
||||
@@ -1543,8 +1671,8 @@ given limit. This concerns both FTP and HTTP transfers.
|
||||
.IP CURLOPT_TIMECONDITION
|
||||
Pass a long as parameter. This defines how the \fICURLOPT_TIMEVALUE\fP time
|
||||
value is treated. You can set this parameter to \fICURL_TIMECOND_IFMODSINCE\fP
|
||||
or \fICURL_TIMECOND_IFUNMODSINCE\fP. This feature applies to HTTP, FTP, and
|
||||
RTSP.
|
||||
or \fICURL_TIMECOND_IFUNMODSINCE\fP. This feature applies to HTTP, FTP, RTSP,
|
||||
and FILE.
|
||||
|
||||
The last modification time of a file is not always known and in such instances
|
||||
this feature will have no effect even if the given time condition would not
|
||||
@@ -1659,14 +1787,56 @@ This option is useful with the \fICURLINFO_LASTSOCKET\fP option to
|
||||
\fIcurl_easy_getinfo(3)\fP. The library can set up the connection and then the
|
||||
application can obtain the most recently used socket for special data
|
||||
transfers. (Added in 7.15.2)
|
||||
.IP CURLOPT_USE_SSL
|
||||
Pass a long using one of the values from below, to make libcurl use your
|
||||
desired level of SSL for the transfer. (Added in 7.11.0)
|
||||
|
||||
This is for enabling SSL/TLS when you use FTP, SMTP, POP3, IMAP etc.
|
||||
|
||||
(This option was known as CURLOPT_FTP_SSL up to 7.16.4, and the constants
|
||||
were known as CURLFTPSSL_*)
|
||||
.RS
|
||||
.IP CURLUSESSL_NONE
|
||||
Don't attempt to use SSL.
|
||||
.IP CURLUSESSL_TRY
|
||||
Try using SSL, proceed as normal otherwise.
|
||||
.IP CURLUSESSL_CONTROL
|
||||
Require SSL for the control connection or fail with \fICURLE_USE_SSL_FAILED\fP.
|
||||
.IP CURLUSESSL_ALL
|
||||
Require SSL for all communication or fail with \fICURLE_USE_SSL_FAILED\fP.
|
||||
.RE
|
||||
.IP CURLOPT_RESOLVE
|
||||
Pass a pointer to a linked list of strings with host name resolve information
|
||||
to use for requests with this handle. The linked list should be a fully valid
|
||||
list of \fBstruct curl_slist\fP structs properly filled in. Use
|
||||
\fIcurl_slist_append(3)\fP to create the list and \fIcurl_slist_free_all(3)\fP
|
||||
to clean up an entire list.
|
||||
|
||||
Each single name resolve string should be written using the format
|
||||
HOST:PORT:ADDRESS where HOST is the name libcurl will try to resolve, PORT is
|
||||
the port number of the service where libcurl wants to connect to the HOST and
|
||||
ADDRESS is the numerical IP address. If libcurl is built to support IPv6,
|
||||
ADDRESS can of course be either IPv4 or IPv6 style addressing.
|
||||
|
||||
This option effectively pre-populates the DNS cache with entries for the
|
||||
host+port pair so redirects and everything that operations against the
|
||||
HOST+PORT will instead use your provided ADDRESS.
|
||||
|
||||
You can remove names from the DNS cache again, to stop providing these fake
|
||||
resolves, by including a string in the linked list that uses the format
|
||||
\&"-HOST:PORT". The host name must be prefixed with a dash, and the host name
|
||||
and port number must exactly match what was already added previously.
|
||||
|
||||
(Added in 7.12.3)
|
||||
.SH SSL and SECURITY OPTIONS
|
||||
.IP CURLOPT_SSLCERT
|
||||
Pass a pointer to a zero terminated string as parameter. The string should be
|
||||
the file name of your certificate. The default format is "PEM" and can be
|
||||
changed with \fICURLOPT_SSLCERTTYPE\fP.
|
||||
|
||||
With NSS this is the nickname of the certificate you wish to authenticate
|
||||
with.
|
||||
With NSS this can also be the nickname of the certificate you wish to
|
||||
authenticate with. If you want to use a file from the current directory, please
|
||||
precede it with "./" prefix, in order to avoid confusion with a nickname.
|
||||
.IP CURLOPT_SSLCERTTYPE
|
||||
Pass a pointer to a zero terminated string as parameter. The string should be
|
||||
the format of your certificate. Supported formats are "PEM" and "DER". (Added
|
||||
@@ -1725,28 +1895,30 @@ Force SSLv2
|
||||
Force SSLv3
|
||||
.RE
|
||||
.IP CURLOPT_SSL_VERIFYPEER
|
||||
Pass a long as parameter.
|
||||
Pass a long as parameter. By default, curl assumes a value of 1.
|
||||
|
||||
This option determines whether curl verifies the authenticity of the peer's
|
||||
certificate. A value of 1 means curl verifies; zero means it doesn't. The
|
||||
default is nonzero, but before 7.10, it was zero.
|
||||
certificate. A value of 1 means curl verifies; 0 (zero) means it doesn't.
|
||||
|
||||
When negotiating an SSL connection, the server sends a certificate indicating
|
||||
its identity. Curl verifies whether the certificate is authentic, i.e. that
|
||||
you can trust that the server is who the certificate says it is. This trust
|
||||
is based on a chain of digital signatures, rooted in certification authority
|
||||
(CA) certificates you supply. As of 7.10, curl installs a default bundle of
|
||||
CA certificates and you can specify alternate certificates with the
|
||||
\fICURLOPT_CAINFO\fP option or the \fICURLOPT_CAPATH\fP option.
|
||||
(CA) certificates you supply. curl uses a default bundle of CA certificates
|
||||
(the path for that is determined at build time) and you can specify alternate
|
||||
certificates with the \fICURLOPT_CAINFO\fP option or the \fICURLOPT_CAPATH\fP
|
||||
option.
|
||||
|
||||
When \fICURLOPT_SSL_VERIFYPEER\fP is nonzero, and the verification fails to
|
||||
prove that the certificate is authentic, the connection fails. When the
|
||||
option is zero, the connection succeeds regardless.
|
||||
option is zero, the peer certificate verification succeeds regardless.
|
||||
|
||||
Authenticating the certificate is not by itself very useful. You typically
|
||||
want to ensure that the server, as authentically identified by its
|
||||
certificate, is the server you mean to be talking to. Use
|
||||
\fICURLOPT_SSL_VERIFYHOST\fP to control that.
|
||||
\fICURLOPT_SSL_VERIFYHOST\fP to control that. The check that the host name in
|
||||
the certificate is valid for the host name you're connecting to is done
|
||||
independently of the \fICURLOPT_SSL_VERIFYPEER\fP option.
|
||||
.IP CURLOPT_CAINFO
|
||||
Pass a char * to a zero terminated string naming a file holding one or more
|
||||
certificates to verify the peer with. This makes sense only when used in
|
||||
@@ -1777,13 +1949,15 @@ mismatch with the issuer of peer certificate (\fICURLOPT_SSL_VERIFYPEER\fP has
|
||||
to be set too for the check to fail). (Added in 7.19.0)
|
||||
.IP CURLOPT_CAPATH
|
||||
Pass a char * to a zero terminated string naming a directory holding multiple
|
||||
CA certificates to verify the peer with. The certificate directory must be
|
||||
prepared using the openssl c_rehash utility. This makes sense only when used
|
||||
in combination with the \fICURLOPT_SSL_VERIFYPEER\fP option. If
|
||||
\fICURLOPT_SSL_VERIFYPEER\fP is zero, \fICURLOPT_CAPATH\fP need not even
|
||||
indicate an accessible path. The \fICURLOPT_CAPATH\fP function apparently
|
||||
does not work in Windows due to some limitation in openssl. This option is
|
||||
OpenSSL-specific and does nothing if libcurl is built to use GnuTLS.
|
||||
CA certificates to verify the peer with. If libcurl is built against OpenSSL,
|
||||
the certificate directory must be prepared using the openssl c_rehash utility.
|
||||
This makes sense only when used in combination with the
|
||||
\fICURLOPT_SSL_VERIFYPEER\fP option. If \fICURLOPT_SSL_VERIFYPEER\fP is zero,
|
||||
\fICURLOPT_CAPATH\fP need not even indicate an accessible path. The
|
||||
\fICURLOPT_CAPATH\fP function apparently does not work in Windows due to some
|
||||
limitation in openssl. This option is OpenSSL-specific and does nothing if
|
||||
libcurl is built to use GnuTLS. NSS-powered libcurl provides the option only
|
||||
for backward compatibility.
|
||||
.IP CURLOPT_CRLFILE
|
||||
Pass a char * to a zero terminated string naming a file with the concatenation
|
||||
of CRL (in PEM format) to use in the certificate validation that occurs during
|
||||
@@ -1802,20 +1976,6 @@ A specific error code (CURLE_SSL_CRL_BADFILE) is defined with the option. It
|
||||
is returned when the SSL exchange fails because the CRL file cannot be loaded.
|
||||
A failure in certificate verification due to a revocation information found in
|
||||
the CRL does not trigger this specific error. (Added in 7.19.0)
|
||||
.IP CURLOPT_CERTINFO
|
||||
Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With
|
||||
this enabled, libcurl (if built with OpenSSL) will extract lots of information
|
||||
and data about the certificates in the certificate chain used in the SSL
|
||||
connection. This data is then possible to extract after a transfer using
|
||||
\fIcurl_easy_getinfo(3)\fP and its option \fICURLINFO_CERTINFO\fP. (Added in
|
||||
7.19.1)
|
||||
.IP CURLOPT_RANDOM_FILE
|
||||
Pass a char * to a zero terminated file name. The file will be used to read
|
||||
from to seed the random engine for SSL. The more random the specified file is,
|
||||
the more secure the SSL connection will become.
|
||||
.IP CURLOPT_EGDSOCKET
|
||||
Pass a char * to the zero terminated path name to the Entropy Gathering Daemon
|
||||
socket. It will be used to seed the random engine for SSL.
|
||||
.IP CURLOPT_SSL_VERIFYHOST
|
||||
Pass a long as parameter.
|
||||
|
||||
@@ -1839,10 +1999,25 @@ doesn't matter what name it says. (This is not ordinarily a useful setting).
|
||||
When the value is 0, the connection succeeds regardless of the names in the
|
||||
certificate.
|
||||
|
||||
The default, since 7.10, is 2.
|
||||
The default value for this option is 2.
|
||||
|
||||
This option controls checking the server's claimed identity. The server could
|
||||
be lying. To control lying, see \fICURLOPT_SSL_VERIFYPEER\fP.
|
||||
This option controls checking the server's certificate's claimed identity.
|
||||
The server could be lying. To control lying, see
|
||||
\fICURLOPT_SSL_VERIFYPEER\fP.
|
||||
.IP CURLOPT_CERTINFO
|
||||
Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With
|
||||
this enabled, libcurl (if built with OpenSSL) will extract lots of information
|
||||
and data about the certificates in the certificate chain used in the SSL
|
||||
connection. This data is then possible to extract after a transfer using
|
||||
\fIcurl_easy_getinfo(3)\fP and its option \fICURLINFO_CERTINFO\fP. (Added in
|
||||
7.19.1)
|
||||
.IP CURLOPT_RANDOM_FILE
|
||||
Pass a char * to a zero terminated file name. The file will be used to read
|
||||
from to seed the random engine for SSL. The more random the specified file is,
|
||||
the more secure the SSL connection will become.
|
||||
.IP CURLOPT_EGDSOCKET
|
||||
Pass a char * to the zero terminated path name to the Entropy Gathering Daemon
|
||||
socket. It will be used to seed the random engine for SSL.
|
||||
.IP CURLOPT_SSL_CIPHER_LIST
|
||||
Pass a char *, pointing to a zero terminated string holding the list of
|
||||
ciphers to use for the SSL connection. The list must be syntactically correct,
|
||||
|
@@ -112,14 +112,15 @@ timeout value to use when waiting for socket activities.
|
||||
them for activity. This can be done through your application code, or by way
|
||||
of an external library such as libevent or glib.
|
||||
|
||||
6. Wait for activity on any of libcurl's sockets, use the timeout value your
|
||||
6. Call curl_multi_socket_action() to kickstart everything. To get one or more
|
||||
callbacks called.
|
||||
|
||||
7. Wait for activity on any of libcurl's sockets, use the timeout value your
|
||||
callback has been told
|
||||
|
||||
7, When activity is detected, call curl_multi_socket_action() for the
|
||||
8, When activity is detected, call curl_multi_socket_action() for the
|
||||
socket(s) that got action. If no activity is detected and the timeout expires,
|
||||
call \fIcurl_multi_socket_action(3)\fP with \fICURL_SOCKET_TIMEOUT\fP
|
||||
|
||||
8. Go back to step 6.
|
||||
.SH AVAILABILITY
|
||||
This function was added in libcurl 7.15.4, and is deemed stable since 7.16.0.
|
||||
.SH "SEE ALSO"
|
||||
|
@@ -218,6 +218,16 @@ return code is only returned from \fIcurl_easy_recv(3)\fP and
|
||||
Failed to load CRL file (Added in 7.19.0)
|
||||
.IP "CURLE_SSL_ISSUER_ERROR (83)"
|
||||
Issuer check failed (Added in 7.19.0)
|
||||
.IP "CURLE_FTP_PRET_FAILED (84)"
|
||||
PRET command failed
|
||||
.IP "CURLE_RTSP_CSEQ_ERROR (85)"
|
||||
Mismatch of RTSP CSeq numbers.
|
||||
.IP "CURLE_RTSP_SESSION_ERROR (86)"
|
||||
Mismatch of RTSP Session Identifiers.
|
||||
.IP "CURLE_FTP_BAD_FILE_LIST (87)"
|
||||
Unable to parse FTP file list (during FTP wildcard downloading).
|
||||
.IP "CURLE_CHUNK_FAILED (88)"
|
||||
Chunk callback reported error.
|
||||
.IP "CURLE_OBSOLETE*"
|
||||
These error codes will never be returned. They were used in an old libcurl
|
||||
version and are currently unused.
|
||||
|
@@ -275,10 +275,18 @@ NSS
|
||||
|
||||
is claimed to be thread-safe already without anything required.
|
||||
|
||||
PolarSSL
|
||||
|
||||
Required actions unknown.
|
||||
|
||||
yassl
|
||||
|
||||
Required actions unknown.
|
||||
|
||||
axTLS
|
||||
|
||||
Required actions unknown.
|
||||
|
||||
When using multiple threads you should set the CURLOPT_NOSIGNAL option to 1
|
||||
for all handles. Everything will or might work fine except that timeouts are
|
||||
not honored during the DNS lookup - which you can work around by building
|
||||
@@ -1233,6 +1241,15 @@ are used to generate structured data. Characters like embedded carriage
|
||||
returns or ampersands could allow the user to create additional headers or
|
||||
fields that could cause malicious transactions.
|
||||
|
||||
.IP "Server-supplied Names"
|
||||
A server can supply data which the application may, in some cases, use as
|
||||
a file name. The curl command-line tool does this with --remote-header-name,
|
||||
using the Content-disposition: header to generate a file name. An application
|
||||
could also use CURLINFO_EFFECTIVE_URL to generate a file name from a
|
||||
server-supplied redirect URL. Special care must be taken to sanitize such
|
||||
names to avoid the possibility of a malicious server supplying one like
|
||||
"/etc/passwd", "\autoexec.bat" or even ".bashrc".
|
||||
|
||||
.IP "Server Certificates"
|
||||
A secure application should never use the CURLOPT_SSL_VERIFYPEER option to
|
||||
disable certificate validation. There are numerous attacks that are enabled
|
||||
|
@@ -61,7 +61,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
|
||||
AH_TEMPLATE([LIBCURL_PROTOCOL_SMTP],[Defined if libcurl supports SMTP])
|
||||
|
||||
AC_ARG_WITH(libcurl,
|
||||
AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]),
|
||||
AC_HELP_STRING([--with-libcurl=PREFIX],[look for the curl library in PREFIX/lib and headers in PREFIX/include]),
|
||||
[_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])])
|
||||
|
||||
if test "$_libcurl_with" != "no" ; then
|
||||
@@ -75,10 +75,10 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
|
||||
if test -d "$_libcurl_with" ; then
|
||||
LIBCURL_CPPFLAGS="-I$withval/include"
|
||||
_libcurl_ldflags="-L$withval/lib"
|
||||
AC_PATH_PROG([_libcurl_config],[curl-config],["$withval/bin"],
|
||||
AC_PATH_PROG([_libcurl_config],[curl-config],[],
|
||||
["$withval/bin"])
|
||||
else
|
||||
AC_PATH_PROG([_libcurl_config],[curl-config])
|
||||
AC_PATH_PROG([_libcurl_config],[curl-config],[],[$PATH])
|
||||
fi
|
||||
|
||||
if test x$_libcurl_config != "x" ; then
|
||||
|
@@ -18,18 +18,26 @@ CURLAUTH_BASIC 7.10.6
|
||||
CURLAUTH_DIGEST 7.10.6
|
||||
CURLAUTH_DIGEST_IE 7.19.3
|
||||
CURLAUTH_GSSNEGOTIATE 7.10.6
|
||||
CURLAUTH_NONE 7.10.6
|
||||
CURLAUTH_NTLM 7.10.6
|
||||
CURLAUTH_ONLY 7.21.3
|
||||
CURLCLOSEPOLICY_CALLBACK 7.7
|
||||
CURLCLOSEPOLICY_LEAST_RECENTLY_USED 7.7
|
||||
CURLCLOSEPOLICY_LEAST_TRAFFIC 7.7
|
||||
CURLCLOSEPOLICY_NONE 7.7
|
||||
CURLCLOSEPOLICY_OLDEST 7.7
|
||||
CURLCLOSEPOLICY_SLOWEST 7.7
|
||||
CURLE_ABORTED_BY_CALLBACK 7.1
|
||||
CURLE_AGAIN 7.18.2
|
||||
CURLE_ALREADY_COMPLETE 7.7.2
|
||||
CURLE_BAD_CALLING_ORDER 7.1 7.17.0
|
||||
CURLE_BAD_CONTENT_ENCODING 7.10
|
||||
CURLE_BAD_DOWNLOAD_RESUME 7.10
|
||||
CURLE_BAD_FUNCTION_ARGUMENT 7.1
|
||||
CURLE_BAD_PASSWORD_ENTERED - 7.17.0
|
||||
CURLE_CHUNK_FAILED 7.20.1
|
||||
CURLE_CONV_FAILED 7.15.4
|
||||
CURLE_CONV_REQD 7.15.4
|
||||
CURLE_COULDNT_CONNECT 7.1
|
||||
CURLE_COULDNT_RESOLVE_HOST 7.1
|
||||
CURLE_COULDNT_RESOLVE_PROXY 7.1
|
||||
@@ -37,7 +45,9 @@ CURLE_FAILED_INIT 7.1
|
||||
CURLE_FILESIZE_EXCEEDED 7.10.8
|
||||
CURLE_FILE_COULDNT_READ_FILE 7.1
|
||||
CURLE_FTP_ACCESS_DENIED 7.1
|
||||
CURLE_FTP_BAD_DOWNLOAD_RESUME 7.1
|
||||
CURLE_FTP_BAD_DOWNLOAD_RESUME 7.1 7.1
|
||||
CURLE_FTP_BAD_FILE_LIST 7.20.1
|
||||
CURLE_FTP_CANT_GET_HOST 7.1
|
||||
CURLE_FTP_CANT_RECONNECT 7.1 7.17.0
|
||||
CURLE_FTP_COULDNT_GET_SIZE 7.1 7.17.0
|
||||
@@ -65,11 +75,13 @@ CURLE_HTTP_NOT_FOUND 7.1
|
||||
CURLE_HTTP_PORT_FAILED - 7.12.0
|
||||
CURLE_HTTP_POST_ERROR 7.1
|
||||
CURLE_HTTP_RANGE_ERROR 7.1 7.17.0
|
||||
CURLE_HTTP_RETURNED_ERROR 7.10.3
|
||||
CURLE_INTERFACE_FAILED 7.12.0
|
||||
CURLE_LDAP_CANNOT_BIND 7.1
|
||||
CURLE_LDAP_INVALID_URL 7.10.8
|
||||
CURLE_LDAP_SEARCH_FAILED 7.1
|
||||
CURLE_LIBRARY_NOT_FOUND 7.1 7.17.0
|
||||
CURLE_LOGIN_DENIED 7.13.1
|
||||
CURLE_MALFORMAT_USER 7.1 7.17.0
|
||||
CURLE_OK 7.1
|
||||
CURLE_OPERATION_TIMEDOUT 7.17.0
|
||||
@@ -83,12 +95,16 @@ CURLE_READ_ERROR 7.1
|
||||
CURLE_RECV_ERROR 7.13.0
|
||||
CURLE_REMOTE_ACCESS_DENIED 7.17.0
|
||||
CURLE_REMOTE_DISK_FULL 7.17.0
|
||||
CURLE_REMOTE_FILE_EXISTS 7.17.0
|
||||
CURLE_REMOTE_FILE_NOT_FOUND 7.16.1
|
||||
CURLE_RTSP_CSEQ_ERROR 7.20.0
|
||||
CURLE_RTSP_SESSION_ERROR 7.20.0
|
||||
CURLE_SEND_ERROR 7.13.0
|
||||
CURLE_SEND_FAIL_REWIND 7.12.3
|
||||
CURLE_SHARE_IN_USE - 7.17.0
|
||||
CURLE_SSH 7.16.1
|
||||
CURLE_SSL_CACERT 7.10
|
||||
CURLE_SSL_CACERT_BADFILE 7.16.0
|
||||
CURLE_SSL_CERTPROBLEM 7.10
|
||||
CURLE_SSL_CIPHER 7.10
|
||||
CURLE_SSL_CONNECT_ERROR 7.1
|
||||
@@ -104,20 +120,59 @@ CURLE_TFTP_DISKFULL 7.15.0 7.17.0
|
||||
CURLE_TFTP_EXISTS 7.15.0 7.17.0
|
||||
CURLE_TFTP_ILLEGAL 7.15.0
|
||||
CURLE_TFTP_NOSUCHUSER 7.15.0
|
||||
CURLE_TFTP_NOTFOUND 7.15.0
|
||||
CURLE_TFTP_PERM 7.15.0
|
||||
CURLE_TFTP_UNKNOWNID 7.15.0
|
||||
CURLE_TOO_MANY_REDIRECTS 7.5
|
||||
CURLE_UNKNOWN_TELNET_OPTION 7.7
|
||||
CURLE_UNSUPPORTED_PROTOCOL 7.1
|
||||
CURLE_UPLOAD_FAILED 7.16.3
|
||||
CURLE_URL_MALFORMAT 7.1
|
||||
CURLE_URL_MALFORMAT_USER 7.1 7.17.0
|
||||
CURLE_USE_SSL_FAILED 7.17.0
|
||||
CURLE_WRITE_ERROR 7.1
|
||||
CURLFILETYPE_DEVICE_BLOCK 7.21.0
|
||||
CURLFILETYPE_DEVICE_CHAR 7.21.0
|
||||
CURLFILETYPE_DIRECTORY 7.21.0
|
||||
CURLFILETYPE_DOOR 7.21.0
|
||||
CURLFILETYPE_FILE 7.21.0
|
||||
CURLFILETYPE_NAMEDPIPE 7.21.0
|
||||
CURLFILETYPE_SOCKET 7.21.0
|
||||
CURLFILETYPE_SYMLINK 7.21.0
|
||||
CURLFILETYPE_UNKNOWN 7.21.0
|
||||
CURLFINFOFLAG_KNOWN_FILENAME 7.21.0
|
||||
CURLFINFOFLAG_KNOWN_FILETYPE 7.21.0
|
||||
CURLFINFOFLAG_KNOWN_GID 7.21.0
|
||||
CURLFINFOFLAG_KNOWN_HLINKCOUNT 7.21.0
|
||||
CURLFINFOFLAG_KNOWN_PERM 7.21.0
|
||||
CURLFINFOFLAG_KNOWN_SIZE 7.21.0
|
||||
CURLFINFOFLAG_KNOWN_TIME 7.21.0
|
||||
CURLFINFOFLAG_KNOWN_UID 7.21.0
|
||||
CURLFORM_ARRAY 7.9.1
|
||||
CURLFORM_BUFFER 7.9.8
|
||||
CURLFORM_BUFFERLENGTH 7.9.8
|
||||
CURLFORM_BUFFERPTR 7.9.8
|
||||
CURLFORM_CONTENTHEADER 7.9.3
|
||||
CURLFORM_CONTENTSLENGTH 7.9.1
|
||||
CURLFORM_CONTENTTYPE 7.9.1
|
||||
CURLFORM_COPYCONTENTS 7.9.1
|
||||
CURLFORM_COPYNAME 7.9.1
|
||||
CURLFORM_END 7.9.1
|
||||
CURLFORM_FILE 7.9.1
|
||||
CURLFORM_FILECONTENT 7.9.1
|
||||
CURLFORM_FILENAME 7.9.6
|
||||
CURLFORM_NAMELENGTH 7.9.1
|
||||
CURLFORM_NOTHING 7.9.1
|
||||
CURLFORM_PTRCONTENTS 7.9.1
|
||||
CURLFORM_PTRNAME 7.9.1
|
||||
CURLFORM_STREAM 7.18.2
|
||||
CURLFTPAUTH_DEFAULT 7.12.2
|
||||
CURLFTPAUTH_DEFAULT 7.12.2
|
||||
CURLFTPAUTH_SSL 7.12.2
|
||||
CURLFTPAUTH_SSL 7.12.2
|
||||
CURLFTPAUTH_TLS 7.12.2
|
||||
CURLFTPAUTH_TLS 7.12.2
|
||||
CURLFTPMETHOD_DEFAULT 7.15.1
|
||||
CURLFTPMETHOD_MULTICWD 7.15.1
|
||||
CURLFTPMETHOD_NOCWD 7.15.1
|
||||
CURLFTPMETHOD_SINGLECWD 7.15.1
|
||||
@@ -141,7 +196,9 @@ CURLINFO_CONTENT_TYPE 7.9.4
|
||||
CURLINFO_COOKIELIST 7.14.1
|
||||
CURLINFO_DATA_IN 7.9.6
|
||||
CURLINFO_DATA_OUT 7.9.6
|
||||
CURLINFO_DOUBLE 7.4.1
|
||||
CURLINFO_EFFECTIVE_URL 7.3
|
||||
CURLINFO_END 7.4.1
|
||||
CURLINFO_FILETIME 7.5
|
||||
CURLINFO_FTP_ENTRY_PATH 7.15.4
|
||||
CURLINFO_HEADER_IN 7.9.6
|
||||
@@ -150,12 +207,19 @@ CURLINFO_HEADER_SIZE 7.4.1
|
||||
CURLINFO_HTTPAUTH_AVAIL 7.10.8
|
||||
CURLINFO_HTTP_CODE 7.4.1 7.10.8
|
||||
CURLINFO_HTTP_CONNECTCODE 7.10.7
|
||||
CURLINFO_LASTONE 7.4.1
|
||||
CURLINFO_LASTSOCKET 7.15.2
|
||||
CURLINFO_LOCAL_IP 7.21.0
|
||||
CURLINFO_LOCAL_PORT 7.21.0
|
||||
CURLINFO_LONG 7.4.1
|
||||
CURLINFO_MASK 7.4.1
|
||||
CURLINFO_NAMELOOKUP_TIME 7.4.1
|
||||
CURLINFO_NONE 7.4.1
|
||||
CURLINFO_NUM_CONNECTS 7.12.3
|
||||
CURLINFO_OS_ERRNO 7.12.2
|
||||
CURLINFO_PRETRANSFER_TIME 7.4.1
|
||||
CURLINFO_PRIMARY_IP 7.19.0
|
||||
CURLINFO_PRIMARY_PORT 7.21.0
|
||||
CURLINFO_PRIVATE 7.10.3
|
||||
CURLINFO_PRIVATE 7.10.3
|
||||
CURLINFO_PROXYAUTH_AVAIL 7.10.8
|
||||
@@ -164,23 +228,61 @@ CURLINFO_REDIRECT_TIME 7.9.7
|
||||
CURLINFO_REDIRECT_URL 7.18.2
|
||||
CURLINFO_REQUEST_SIZE 7.4.1
|
||||
CURLINFO_RESPONSE_CODE 7.10.8
|
||||
CURLINFO_RTSP_CLIENT_CSEQ 7.20.0
|
||||
CURLINFO_RTSP_CSEQ_RECV 7.20.0
|
||||
CURLINFO_RTSP_SERVER_CSEQ 7.20.0
|
||||
CURLINFO_RTSP_SESSION_ID 7.20.0
|
||||
CURLINFO_SIZE_DOWNLOAD 7.4.1
|
||||
CURLINFO_SIZE_UPLOAD 7.4.1
|
||||
CURLINFO_SLIST 7.12.3
|
||||
CURLINFO_SPEED_DOWNLOAD 7.4.1
|
||||
CURLINFO_SPEED_UPLOAD 7.4.1
|
||||
CURLINFO_SSL_DATA_IN 7.12.1
|
||||
CURLINFO_SSL_DATA_OUT 7.12.1
|
||||
CURLINFO_SSL_ENGINES 7.12.3
|
||||
CURLINFO_SSL_VERIFYRESULT 7.5
|
||||
CURLINFO_STARTTRANSFER_TIME 7.9.2
|
||||
CURLINFO_STRING 7.4.1
|
||||
CURLINFO_TEXT 7.9.6
|
||||
CURLINFO_TOTAL_TIME 7.4.1
|
||||
CURLINFO_TYPEMASK 7.4.1
|
||||
CURLIOCMD_NOP 7.12.3
|
||||
CURLIOCMD_RESTARTREAD 7.12.3
|
||||
CURLIOE_FAILRESTART 7.12.3
|
||||
CURLIOE_OK 7.12.3
|
||||
CURLIOE_UNKNOWNCMD 7.12.3
|
||||
CURLKHMATCH_MISMATCH 7.19.6
|
||||
CURLKHMATCH_MISSING 7.19.6
|
||||
CURLKHMATCH_OK 7.19.6
|
||||
CURLKHSTAT_DEFER 7.19.6
|
||||
CURLKHSTAT_FINE 7.19.6
|
||||
CURLKHSTAT_FINE_ADD_TO_FILE 7.19.6
|
||||
CURLKHSTAT_REJECT 7.19.6
|
||||
CURLKHTYPE_DSS 7.19.6
|
||||
CURLKHTYPE_RSA 7.19.6
|
||||
CURLKHTYPE_RSA1 7.19.6
|
||||
CURLKHTYPE_UNKNOWN 7.19.6
|
||||
CURLMOPT_MAXCONNECTS 7.16.3
|
||||
CURLMOPT_PIPELINING 7.16.0
|
||||
CURLMOPT_SOCKETDATA 7.15.4
|
||||
CURLMOPT_SOCKETFUNCTION 7.15.4
|
||||
CURLMOPT_TIMERDATA 7.16.0
|
||||
CURLMOPT_TIMERFUNCTION 7.16.0
|
||||
CURLMSG_DONE 7.9.6
|
||||
CURLMSG_NONE 7.9.6
|
||||
CURLM_BAD_EASY_HANDLE 7.9.6
|
||||
CURLM_BAD_HANDLE 7.9.6
|
||||
CURLM_BAD_SOCKET 7.15.4
|
||||
CURLM_CALL_MULTI_PERFORM 7.9.6
|
||||
CURLM_CALL_MULTI_SOCKET 7.15.5
|
||||
CURLM_INTERNAL_ERROR 7.9.6
|
||||
CURLM_OK 7.9.6
|
||||
CURLM_OUT_OF_MEMORY 7.9.6
|
||||
CURLM_UNKNOWN_OPTION 7.15.4
|
||||
CURLOPTTYPE_FUNCTIONPOINT 7.1
|
||||
CURLOPTTYPE_LONG 7.1
|
||||
CURLOPTTYPE_OBJECTPOINT 7.1
|
||||
CURLOPTTYPE_OFF_T 7.11.0
|
||||
CURLOPT_ADDRESS_SCOPE 7.19.0
|
||||
CURLOPT_APPEND 7.16.4
|
||||
CURLOPT_AUTOREFERER 7.1
|
||||
@@ -188,6 +290,9 @@ CURLOPT_BUFFERSIZE 7.10
|
||||
CURLOPT_CAINFO 7.4.2
|
||||
CURLOPT_CAPATH 7.9.8
|
||||
CURLOPT_CERTINFO 7.19.1
|
||||
CURLOPT_CHUNK_BGN_FUNCTION 7.21.0
|
||||
CURLOPT_CHUNK_DATA 7.21.0
|
||||
CURLOPT_CHUNK_END_FUNCTION 7.21.0
|
||||
CURLOPT_CLOSEFUNCTION 7.7 7.11.1 7.15.4
|
||||
CURLOPT_CLOSEPOLICY 7.7 7.16.1
|
||||
CURLOPT_CONNECTTIMEOUT 7.7
|
||||
@@ -217,6 +322,8 @@ CURLOPT_FAILONERROR 7.1
|
||||
CURLOPT_FILE 7.1 7.9.7
|
||||
CURLOPT_FILETIME 7.5
|
||||
CURLOPT_FLAGS 7.1 - 7.9.2
|
||||
CURLOPT_FNMATCH_DATA 7.21.0
|
||||
CURLOPT_FNMATCH_FUNCTION 7.21.0
|
||||
CURLOPT_FOLLOWLOCATION 7.1
|
||||
CURLOPT_FORBID_REUSE 7.7
|
||||
CURLOPT_FRESH_CONNECT 7.7
|
||||
@@ -236,14 +343,6 @@ CURLOPT_FTP_SSL_CCC 7.16.1
|
||||
CURLOPT_FTP_USE_EPRT 7.10.5
|
||||
CURLOPT_FTP_USE_EPSV 7.9.2
|
||||
CURLOPT_FTP_USE_PRET 7.20.0
|
||||
CURLOPT_RTSP_REQUEST 7.20.0
|
||||
CURLOPT_RTSP_SESSION_ID 7.20.0
|
||||
CURLOPT_RTSP_STREAM_URI 7.20.0
|
||||
CURLOPT_RTSP_TRANSPORT 7.20.0
|
||||
CURLOPT_RTSP_CLIENT_CSEQ 7.20.0
|
||||
CURLOPT_RTSP_SERVER_CSEQ 7.20.0
|
||||
CURLOPT_INTERLEAVEDATA 7.20.0
|
||||
CURLOPT_INTERLEAVEFUNCTION 7.20.0
|
||||
CURLOPT_HEADER 7.1
|
||||
CURLOPT_HEADERDATA 7.10
|
||||
CURLOPT_HEADERFUNCTION 7.7.2
|
||||
@@ -262,11 +361,13 @@ CURLOPT_INFILE 7.1 7.9.7
|
||||
CURLOPT_INFILESIZE 7.1
|
||||
CURLOPT_INFILESIZE_LARGE 7.11.0
|
||||
CURLOPT_INTERFACE 7.3
|
||||
CURLOPT_INTERLEAVEDATA 7.20.0
|
||||
CURLOPT_INTERLEAVEFUNCTION 7.20.0
|
||||
CURLOPT_IOCTLDATA 7.12.3
|
||||
CURLOPT_IOCTLFUNCTION 7.12.3
|
||||
CURLOPT_IPRESOLVE 7.10.8
|
||||
CURLOPT_ISSUERCERT 7.19.0
|
||||
CURLOPT_KEYPASSWD - 7.17.0
|
||||
CURLOPT_KEYPASSWD 7.17.0
|
||||
CURLOPT_KRB4LEVEL 7.3 7.17.0
|
||||
CURLOPT_KRBLEVEL 7.17.0
|
||||
CURLOPT_LOCALPORT 7.15.2
|
||||
@@ -326,10 +427,19 @@ CURLOPT_READDATA 7.9.7
|
||||
CURLOPT_READFUNCTION 7.1
|
||||
CURLOPT_REDIR_PROTOCOLS 7.19.4
|
||||
CURLOPT_REFERER 7.1
|
||||
CURLOPT_RESOLVE 7.21.3
|
||||
CURLOPT_RESUME_FROM 7.1
|
||||
CURLOPT_RESUME_FROM_LARGE 7.11.0
|
||||
CURLOPT_RTSPHEADER 7.20.0
|
||||
CURLOPT_RTSP_CLIENT_CSEQ 7.20.0
|
||||
CURLOPT_RTSP_REQUEST 7.20.0
|
||||
CURLOPT_RTSP_SERVER_CSEQ 7.20.0
|
||||
CURLOPT_RTSP_SESSION_ID 7.20.0
|
||||
CURLOPT_RTSP_STREAM_URI 7.20.0
|
||||
CURLOPT_RTSP_TRANSPORT 7.20.0
|
||||
CURLOPT_SEEKDATA 7.18.1
|
||||
CURLOPT_SEEKFUNCTION 7.18.1
|
||||
CURLOPT_SERVER_RESPONSE_TIMEOUT 7.20.0
|
||||
CURLOPT_SHARE 7.10
|
||||
CURLOPT_SOCKOPTDATA 7.16.0
|
||||
CURLOPT_SOCKOPTFUNCTION 7.16.0
|
||||
@@ -345,6 +455,9 @@ CURLOPT_SOURCE_URL 7.13.0 - 7.15.4
|
||||
CURLOPT_SOURCE_USERPWD 7.12.1 - 7.15.4
|
||||
CURLOPT_SSH_AUTH_TYPES 7.16.1
|
||||
CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 7.17.1
|
||||
CURLOPT_SSH_KEYDATA 7.19.6
|
||||
CURLOPT_SSH_KEYFUNCTION 7.19.6
|
||||
CURLOPT_SSH_KNOWNHOSTS 7.19.6
|
||||
CURLOPT_SSH_PRIVATE_KEYFILE 7.16.1
|
||||
CURLOPT_SSH_PUBLIC_KEYFILE 7.16.1
|
||||
CURLOPT_SSLCERT 7.1
|
||||
@@ -366,11 +479,14 @@ CURLOPT_SSL_VERIFYPEER 7.4.2
|
||||
CURLOPT_STDERR 7.1
|
||||
CURLOPT_TCP_NODELAY 7.11.2
|
||||
CURLOPT_TELNETOPTIONS 7.7
|
||||
CURLOPT_TFTPBLKSIZE 7.19.4
|
||||
CURLOPT_TFTP_BLKSIZE 7.19.4
|
||||
CURLOPT_TIMECONDITION 7.1
|
||||
CURLOPT_TIMEOUT 7.1
|
||||
CURLOPT_TIMEOUT_MS 7.16.2
|
||||
CURLOPT_TIMEVALUE 7.1
|
||||
CURLOPT_TLSAUTH_PASSWORD 7.21.4
|
||||
CURLOPT_TLSAUTH_TYPE 7.21.4
|
||||
CURLOPT_TLSAUTH_USERNAME 7.21.4
|
||||
CURLOPT_TRANSFERTEXT 7.11.1
|
||||
CURLOPT_UNRESTRICTED_AUTH 7.10.4
|
||||
CURLOPT_UPLOAD 7.1
|
||||
@@ -380,14 +496,23 @@ CURLOPT_USERNAME 7.19.1
|
||||
CURLOPT_USERPWD 7.1
|
||||
CURLOPT_USE_SSL 7.17.0
|
||||
CURLOPT_VERBOSE 7.1
|
||||
CURLOPT_WILDCARDMATCH 7.21.0
|
||||
CURLOPT_WRITEDATA 7.9.7
|
||||
CURLOPT_WRITEFUNCTION 7.1
|
||||
CURLOPT_WRITEHEADER 7.1
|
||||
CURLOPT_WRITEINFO 7.1
|
||||
CURLPAUSE_ALL 7.18.0
|
||||
CURLPAUSE_CONT 7.18.0
|
||||
CURLPAUSE_RECV 7.18.0
|
||||
CURLPAUSE_RECV_CONT 7.18.0
|
||||
CURLPAUSE_SEND 7.18.0
|
||||
CURLPAUSE_SEND_CONT 7.18.0
|
||||
CURLPROTO_ALL 7.19.4
|
||||
CURLPROTO_DICT 7.19.4
|
||||
CURLPROTO_FILE 7.19.4
|
||||
CURLPROTO_FTP 7.19.4
|
||||
CURLPROTO_FTPS 7.19.4
|
||||
CURLPROTO_GOPHER 7.21.2
|
||||
CURLPROTO_HTTP 7.19.4
|
||||
CURLPROTO_HTTPS 7.19.4
|
||||
CURLPROTO_IMAP 7.20.0
|
||||
@@ -396,6 +521,12 @@ CURLPROTO_LDAP 7.19.4
|
||||
CURLPROTO_LDAPS 7.19.4
|
||||
CURLPROTO_POP3 7.20.0
|
||||
CURLPROTO_POP3S 7.20.0
|
||||
CURLPROTO_RTMP 7.21.0
|
||||
CURLPROTO_RTMPE 7.21.0
|
||||
CURLPROTO_RTMPS 7.21.0
|
||||
CURLPROTO_RTMPT 7.21.0
|
||||
CURLPROTO_RTMPTE 7.21.0
|
||||
CURLPROTO_RTMPTS 7.21.0
|
||||
CURLPROTO_RTSP 7.20.0
|
||||
CURLPROTO_SCP 7.19.4
|
||||
CURLPROTO_SFTP 7.19.4
|
||||
@@ -409,6 +540,19 @@ CURLPROXY_SOCKS4 7.10
|
||||
CURLPROXY_SOCKS4A 7.18.0
|
||||
CURLPROXY_SOCKS5 7.10
|
||||
CURLPROXY_SOCKS5_HOSTNAME 7.18.0
|
||||
CURLSHE_BAD_OPTION 7.10.3
|
||||
CURLSHE_INVALID 7.10.3
|
||||
CURLSHE_IN_USE 7.10.3
|
||||
CURLSHE_NOMEM 7.10.3
|
||||
CURLSHE_OK 7.10.3
|
||||
CURLSHOPT_LOCKFUNC 7.10.3
|
||||
CURLSHOPT_NONE 7.10.3
|
||||
CURLSHOPT_SHARE 7.10.3
|
||||
CURLSHOPT_UNLOCKFUNC 7.10.3
|
||||
CURLSHOPT_UNSHARE 7.10.3
|
||||
CURLSHOPT_USERDATA 7.10.3
|
||||
CURLSOCKTYPE_IPCXN 7.15.6
|
||||
CURLSSH_AUTH_ANY 7.16.1
|
||||
CURLSSH_AUTH_DEFAULT 7.16.1
|
||||
CURLSSH_AUTH_HOST 7.16.1
|
||||
CURLSSH_AUTH_KEYBOARD 7.16.1
|
||||
@@ -424,21 +568,83 @@ CURLUSESSL_NONE 7.17.0
|
||||
CURLUSESSL_TRY 7.17.0
|
||||
CURLUSESSL_TRY 7.17.0
|
||||
CURLVERSION_FIRST 7.10
|
||||
CURLVERSION_FOURTH 7.16.1
|
||||
CURLVERSION_NOW 7.10
|
||||
CURLVERSION_SECOND 7.11.1
|
||||
CURLVERSION_THIRD 7.12.0
|
||||
CURL_CHUNK_BGN_FUNC_FAIL 7.21.0
|
||||
CURL_CHUNK_BGN_FUNC_OK 7.21.0
|
||||
CURL_CHUNK_BGN_FUNC_SKIP 7.21.0
|
||||
CURL_CHUNK_END_FUNC_FAIL 7.21.0
|
||||
CURL_CHUNK_END_FUNC_OK 7.21.0
|
||||
CURL_CSELECT_ERR 7.16.3
|
||||
CURL_CSELECT_IN 7.16.3
|
||||
CURL_CSELECT_OUT 7.16.3
|
||||
CURL_ERROR_SIZE 7.1
|
||||
CURL_FNMATCHFUNC_FAIL 7.21.0
|
||||
CURL_FNMATCHFUNC_MATCH 7.21.0
|
||||
CURL_FNMATCHFUNC_NOMATCH 7.21.0
|
||||
CURL_FORMADD_DISABLED 7.12.1
|
||||
CURL_FORMADD_ILLEGAL_ARRAY 7.9.8
|
||||
CURL_FORMADD_INCOMPLETE 7.9.8
|
||||
CURL_FORMADD_MEMORY 7.9.8
|
||||
CURL_FORMADD_NULL 7.9.8
|
||||
CURL_FORMADD_OK 7.9.8
|
||||
CURL_FORMADD_OPTION_TWICE 7.9.8
|
||||
CURL_FORMADD_UNKNOWN_OPTION 7.9.8
|
||||
CURL_GLOBAL_ALL 7.8
|
||||
CURL_GLOBAL_DEFAULT 7.8
|
||||
CURL_GLOBAL_NOTHING 7.8
|
||||
CURL_GLOBAL_SSL 7.8
|
||||
CURL_GLOBAL_WIN32 7.8.1
|
||||
CURL_HTTP_VERSION_1_0 7.9.1
|
||||
CURL_HTTP_VERSION_1_1 7.9.1
|
||||
CURL_HTTP_VERSION_NONE 7.9.1
|
||||
CURL_IPRESOLVE_V4 7.10.8
|
||||
CURL_IPRESOLVE_V6 7.10.8
|
||||
CURL_IPRESOLVE_WHATEVER 7.10.8
|
||||
CURL_LOCK_ACCESS_NONE 7.10.3
|
||||
CURL_LOCK_ACCESS_SHARED 7.10.3
|
||||
CURL_LOCK_ACCESS_SINGLE 7.10.3
|
||||
CURL_LOCK_DATA_CONNECT 7.10.3
|
||||
CURL_LOCK_DATA_COOKIE 7.10.3
|
||||
CURL_LOCK_DATA_DNS 7.10.3
|
||||
CURL_LOCK_DATA_NONE 7.10.3
|
||||
CURL_LOCK_DATA_SHARE 7.10.4
|
||||
CURL_LOCK_DATA_SSL_SESSION 7.10.3
|
||||
CURL_MAX_HTTP_HEADER 7.19.7
|
||||
CURL_MAX_WRITE_SIZE 7.9.7
|
||||
CURL_NETRC_IGNORED 7.9.8
|
||||
CURL_NETRC_OPTIONAL 7.9.8
|
||||
CURL_NETRC_REQUIRED 7.9.8
|
||||
CURL_POLL_IN 7.14.0
|
||||
CURL_POLL_INOUT 7.14.0
|
||||
CURL_POLL_NONE 7.14.0
|
||||
CURL_POLL_OUT 7.14.0
|
||||
CURL_POLL_REMOVE 7.14.0
|
||||
CURL_READFUNC_ABORT 7.12.1
|
||||
CURL_READFUNC_PAUSE 7.18.0
|
||||
CURL_REDIR_GET_ALL 7.19.1
|
||||
CURL_REDIR_POST_301 7.19.1
|
||||
CURL_REDIR_POST_302 7.19.1
|
||||
CURL_REDIR_POST_ALL 7.19.1
|
||||
CURL_RTSPREQ_ANNOUNCE 7.20.0
|
||||
CURL_RTSPREQ_DESCRIBE 7.20.0
|
||||
CURL_RTSPREQ_GET_PARAMETER 7.20.0
|
||||
CURL_RTSPREQ_NONE 7.20.0
|
||||
CURL_RTSPREQ_OPTIONS 7.20.0
|
||||
CURL_RTSPREQ_PAUSE 7.20.0
|
||||
CURL_RTSPREQ_PLAY 7.20.0
|
||||
CURL_RTSPREQ_RECEIVE 7.20.0
|
||||
CURL_RTSPREQ_RECORD 7.20.0
|
||||
CURL_RTSPREQ_SETUP 7.20.0
|
||||
CURL_RTSPREQ_SET_PARAMETER 7.20.0
|
||||
CURL_RTSPREQ_TEARDOWN 7.20.0
|
||||
CURL_SEEKFUNC_CANTSEEK 7.19.5
|
||||
CURL_SEEKFUNC_FAIL 7.19.5
|
||||
CURL_SEEKFUNC_OK 7.19.5
|
||||
CURL_SOCKET_BAD 7.14.0
|
||||
CURL_SOCKET_TIMEOUT 7.14.0
|
||||
CURL_SSLVERSION_DEFAULT 7.9.2
|
||||
CURL_SSLVERSION_SSLv2 7.9.2
|
||||
CURL_SSLVERSION_SSLv3 7.9.2
|
||||
@@ -446,6 +652,9 @@ CURL_SSLVERSION_TLSv1 7.9.2
|
||||
CURL_TIMECOND_IFMODSINCE 7.9.7
|
||||
CURL_TIMECOND_IFUNMODSINCE 7.9.7
|
||||
CURL_TIMECOND_LASTMOD 7.9.7
|
||||
CURL_TIMECOND_NONE 7.9.7
|
||||
CURL_TLSAUTH_NONE 7.21.4
|
||||
CURL_TLSAUTH_SRP 7.21.4
|
||||
CURL_VERSION_ASYNCHDNS 7.10.7
|
||||
CURL_VERSION_CONV 7.15.4
|
||||
CURL_VERSION_CURLDEBUG 7.19.6
|
||||
@@ -460,3 +669,5 @@ CURL_VERSION_NTLM 7.10.6
|
||||
CURL_VERSION_SPNEGO 7.10.8
|
||||
CURL_VERSION_SSL 7.10
|
||||
CURL_VERSION_SSPI 7.13.2
|
||||
CURL_VERSION_TLSAUTH_SRP 7.21.4
|
||||
CURL_WRITEFUNC_PAUSE 7.18.0
|
||||
|
2
include/curl/.gitignore
vendored
2
include/curl/.gitignore
vendored
@@ -1,3 +1,3 @@
|
||||
curlbuild.h
|
||||
stamp-h3
|
||||
|
||||
curlver.h.dist
|
||||
|
@@ -198,6 +198,97 @@ typedef size_t (*curl_write_callback)(char *buffer,
|
||||
size_t nitems,
|
||||
void *outstream);
|
||||
|
||||
|
||||
|
||||
/* enumeration of file types */
|
||||
typedef enum {
|
||||
CURLFILETYPE_FILE = 0,
|
||||
CURLFILETYPE_DIRECTORY,
|
||||
CURLFILETYPE_SYMLINK,
|
||||
CURLFILETYPE_DEVICE_BLOCK,
|
||||
CURLFILETYPE_DEVICE_CHAR,
|
||||
CURLFILETYPE_NAMEDPIPE,
|
||||
CURLFILETYPE_SOCKET,
|
||||
CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */
|
||||
|
||||
CURLFILETYPE_UNKNOWN /* should never occur */
|
||||
} curlfiletype;
|
||||
|
||||
#define CURLFINFOFLAG_KNOWN_FILENAME (1<<0)
|
||||
#define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1)
|
||||
#define CURLFINFOFLAG_KNOWN_TIME (1<<2)
|
||||
#define CURLFINFOFLAG_KNOWN_PERM (1<<3)
|
||||
#define CURLFINFOFLAG_KNOWN_UID (1<<4)
|
||||
#define CURLFINFOFLAG_KNOWN_GID (1<<5)
|
||||
#define CURLFINFOFLAG_KNOWN_SIZE (1<<6)
|
||||
#define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7)
|
||||
|
||||
/* Content of this structure depends on information which is known and is
|
||||
achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man
|
||||
page for callbacks returning this structure -- some fields are mandatory,
|
||||
some others are optional. The FLAG field has special meaning. */
|
||||
struct curl_fileinfo {
|
||||
char *filename;
|
||||
curlfiletype filetype;
|
||||
time_t time;
|
||||
unsigned int perm;
|
||||
int uid;
|
||||
int gid;
|
||||
curl_off_t size;
|
||||
long int hardlinks;
|
||||
|
||||
struct {
|
||||
/* If some of these fields is not NULL, it is a pointer to b_data. */
|
||||
char *time;
|
||||
char *perm;
|
||||
char *user;
|
||||
char *group;
|
||||
char *target; /* pointer to the target filename of a symlink */
|
||||
} strings;
|
||||
|
||||
unsigned int flags;
|
||||
|
||||
/* used internally */
|
||||
char * b_data;
|
||||
size_t b_size;
|
||||
size_t b_used;
|
||||
};
|
||||
|
||||
/* return codes for CURLOPT_CHUNK_BGN_FUNCTION */
|
||||
#define CURL_CHUNK_BGN_FUNC_OK 0
|
||||
#define CURL_CHUNK_BGN_FUNC_FAIL 1 /* tell the lib to end the task */
|
||||
#define CURL_CHUNK_BGN_FUNC_SKIP 2 /* skip this chunk over */
|
||||
|
||||
/* if splitting of data transfer is enabled, this callback is called before
|
||||
download of an individual chunk started. Note that parameter "remains" works
|
||||
only for FTP wildcard downloading (for now), otherwise is not used */
|
||||
typedef long (*curl_chunk_bgn_callback)(const void *transfer_info,
|
||||
void *ptr,
|
||||
int remains);
|
||||
|
||||
/* return codes for CURLOPT_CHUNK_END_FUNCTION */
|
||||
#define CURL_CHUNK_END_FUNC_OK 0
|
||||
#define CURL_CHUNK_END_FUNC_FAIL 1 /* tell the lib to end the task */
|
||||
|
||||
/* If splitting of data transfer is enabled this callback is called after
|
||||
download of an individual chunk finished.
|
||||
Note! After this callback was set then it have to be called FOR ALL chunks.
|
||||
Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC.
|
||||
This is the reason why we don't need "transfer_info" parameter in this
|
||||
callback and we are not interested in "remains" parameter too. */
|
||||
typedef long (*curl_chunk_end_callback)(void *ptr);
|
||||
|
||||
/* return codes for FNMATCHFUNCTION */
|
||||
#define CURL_FNMATCHFUNC_MATCH 0 /* string corresponds to the pattern */
|
||||
#define CURL_FNMATCHFUNC_NOMATCH 1 /* pattern doesn't match the string */
|
||||
#define CURL_FNMATCHFUNC_FAIL 2 /* an error occurred */
|
||||
|
||||
/* callback type for wildcard downloading pattern matching. If the
|
||||
string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */
|
||||
typedef int (*curl_fnmatch_callback)(void *ptr,
|
||||
const char *pattern,
|
||||
const char *string);
|
||||
|
||||
/* These are the return codes for the seek callbacks */
|
||||
#define CURL_SEEKFUNC_OK 0
|
||||
#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */
|
||||
@@ -409,6 +500,8 @@ typedef enum {
|
||||
CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */
|
||||
CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */
|
||||
CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Identifiers */
|
||||
CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */
|
||||
CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */
|
||||
|
||||
CURL_LAST /* never use! */
|
||||
} CURLcode;
|
||||
@@ -492,6 +585,9 @@ typedef enum {
|
||||
#define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */
|
||||
#define CURLAUTH_NTLM (1<<3) /* NTLM */
|
||||
#define CURLAUTH_DIGEST_IE (1<<4) /* Digest with IE flavour */
|
||||
#define CURLAUTH_ONLY (1<<31) /* used together with a single other
|
||||
type to force no auth or just that
|
||||
single type */
|
||||
#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) /* all fine types set */
|
||||
#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
|
||||
|
||||
@@ -623,6 +719,13 @@ typedef enum {
|
||||
#define CURLPROTO_SMTP (1<<16)
|
||||
#define CURLPROTO_SMTPS (1<<17)
|
||||
#define CURLPROTO_RTSP (1<<18)
|
||||
#define CURLPROTO_RTMP (1<<19)
|
||||
#define CURLPROTO_RTMPT (1<<20)
|
||||
#define CURLPROTO_RTMPE (1<<21)
|
||||
#define CURLPROTO_RTMPTE (1<<22)
|
||||
#define CURLPROTO_RTMPS (1<<23)
|
||||
#define CURLPROTO_RTMPTS (1<<24)
|
||||
#define CURLPROTO_GOPHER (1<<25)
|
||||
#define CURLPROTO_ALL (~0) /* enable everything */
|
||||
|
||||
/* long may be 32 or 64 bits, but we should never depend on anything else
|
||||
@@ -1316,6 +1419,38 @@ typedef enum {
|
||||
/* Let the application define a custom write method for RTP data */
|
||||
CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196),
|
||||
|
||||
/* Turn on wildcard matching */
|
||||
CINIT(WILDCARDMATCH, LONG, 197),
|
||||
|
||||
/* Directory matching callback called before downloading of an
|
||||
individual file (chunk) started */
|
||||
CINIT(CHUNK_BGN_FUNCTION, FUNCTIONPOINT, 198),
|
||||
|
||||
/* Directory matching callback called after the file (chunk)
|
||||
was downloaded, or skipped */
|
||||
CINIT(CHUNK_END_FUNCTION, FUNCTIONPOINT, 199),
|
||||
|
||||
/* Change match (fnmatch-like) callback for wildcard matching */
|
||||
CINIT(FNMATCH_FUNCTION, FUNCTIONPOINT, 200),
|
||||
|
||||
/* Let the application define custom chunk data pointer */
|
||||
CINIT(CHUNK_DATA, OBJECTPOINT, 201),
|
||||
|
||||
/* FNMATCH_FUNCTION user pointer */
|
||||
CINIT(FNMATCH_DATA, OBJECTPOINT, 202),
|
||||
|
||||
/* send linked-list of name:port:address sets */
|
||||
CINIT(RESOLVE, OBJECTPOINT, 203),
|
||||
|
||||
/* Set a username for authenticated TLS */
|
||||
CINIT(TLSAUTH_USERNAME, OBJECTPOINT, 204),
|
||||
|
||||
/* Set a password for authenticated TLS */
|
||||
CINIT(TLSAUTH_PASSWORD, OBJECTPOINT, 205),
|
||||
|
||||
/* Set authentication type for authenticated TLS */
|
||||
CINIT(TLSAUTH_TYPE, OBJECTPOINT, 206),
|
||||
|
||||
CURLOPT_LASTENTRY /* the last unused */
|
||||
} CURLoption;
|
||||
|
||||
@@ -1412,6 +1547,12 @@ enum {
|
||||
CURL_SSLVERSION_LAST /* never use, keep last */
|
||||
};
|
||||
|
||||
enum CURL_TLSAUTH {
|
||||
CURL_TLSAUTH_NONE,
|
||||
CURL_TLSAUTH_SRP,
|
||||
CURL_TLSAUTH_LAST /* never use, keep last */
|
||||
};
|
||||
|
||||
/* symbols to use with CURLOPT_POSTREDIR.
|
||||
CURL_REDIR_POST_301 and CURL_REDIR_POST_302 can be bitwise ORed so that
|
||||
CURL_REDIR_POST_301 | CURL_REDIR_POST_302 == CURL_REDIR_POST_ALL */
|
||||
@@ -1764,9 +1905,12 @@ typedef enum {
|
||||
CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37,
|
||||
CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38,
|
||||
CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39,
|
||||
CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40,
|
||||
CURLINFO_LOCAL_IP = CURLINFO_STRING + 41,
|
||||
CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42,
|
||||
/* Fill in new entries below here! */
|
||||
|
||||
CURLINFO_LASTONE = 39
|
||||
CURLINFO_LASTONE = 42
|
||||
} CURLINFO;
|
||||
|
||||
/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
|
||||
@@ -1914,6 +2058,7 @@ typedef struct {
|
||||
#define CURL_VERSION_SSPI (1<<11) /* SSPI is supported */
|
||||
#define CURL_VERSION_CONV (1<<12) /* character conversions supported */
|
||||
#define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */
|
||||
#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */
|
||||
|
||||
/*
|
||||
* NAME curl_version_info()
|
||||
|
@@ -7,7 +7,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2011, 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
|
||||
@@ -216,14 +216,23 @@ typedef char
|
||||
* Macros for minimum-width signed and unsigned curl_off_t integer constants.
|
||||
*/
|
||||
|
||||
#ifdef CURL_ISOCPP
|
||||
# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val ## Suffix
|
||||
#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551)
|
||||
# define __CURL_OFF_T_C_HLPR2(x) x
|
||||
# define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x)
|
||||
# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \
|
||||
__CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T)
|
||||
# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \
|
||||
__CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU)
|
||||
#else
|
||||
# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val/**/Suffix
|
||||
# ifdef CURL_ISOCPP
|
||||
# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix
|
||||
# else
|
||||
# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix
|
||||
# endif
|
||||
# define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix)
|
||||
# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T)
|
||||
# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU)
|
||||
#endif
|
||||
#define __CURL_OFF_T_C_HELPER1(Val,Suffix) __CURL_OFF_T_C_HELPER2(Val,Suffix)
|
||||
#define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_T)
|
||||
#define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_TU)
|
||||
|
||||
/*
|
||||
* Get rid of macros private to this header file.
|
||||
|
@@ -30,13 +30,13 @@
|
||||
|
||||
/* This is the version number of the libcurl package from which this header
|
||||
file origins: */
|
||||
#define LIBCURL_VERSION "7.20.1-DEV"
|
||||
#define LIBCURL_VERSION "7.21.4-DEV"
|
||||
|
||||
/* The numeric version number is also available "in parts" by using these
|
||||
defines: */
|
||||
#define LIBCURL_VERSION_MAJOR 7
|
||||
#define LIBCURL_VERSION_MINOR 20
|
||||
#define LIBCURL_VERSION_PATCH 1
|
||||
#define LIBCURL_VERSION_MINOR 21
|
||||
#define LIBCURL_VERSION_PATCH 4
|
||||
|
||||
/* This is the numeric version of the libcurl version number, meant for easier
|
||||
parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
|
||||
@@ -53,7 +53,7 @@
|
||||
and it is always a greater number in a more recent release. It makes
|
||||
comparisons with greater than and less than work.
|
||||
*/
|
||||
#define LIBCURL_VERSION_NUM 0x071401
|
||||
#define LIBCURL_VERSION_NUM 0x071504
|
||||
|
||||
/*
|
||||
* This is the date and time when the full source package was created. The
|
||||
|
@@ -7,7 +7,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2010, 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
|
||||
@@ -25,11 +25,16 @@
|
||||
/* wraps curl_easy_setopt() with typechecking */
|
||||
|
||||
/* To add a new kind of warning, add an
|
||||
* if(_curl_is_sometype_option(_curl_opt) && ! _curl_is_sometype(value))
|
||||
* if(_curl_is_sometype_option(_curl_opt))
|
||||
* if(!_curl_is_sometype(value))
|
||||
* _curl_easy_setopt_err_sometype();
|
||||
* block and define _curl_is_sometype_option, _curl_is_sometype and
|
||||
* _curl_easy_setopt_err_sometype below
|
||||
*
|
||||
* NOTE: We use two nested 'if' statements here instead of the && operator, in
|
||||
* order to work around gcc bug #32061. It affects only gcc 4.3.x/4.4.x
|
||||
* when compiling with -Wlogical-op.
|
||||
*
|
||||
* To add an option that uses the same type as an existing option, you'll just
|
||||
* need to extend the appropriate _curl_*_option macro
|
||||
*/
|
||||
@@ -37,50 +42,65 @@
|
||||
__extension__ ({ \
|
||||
__typeof__ (option) _curl_opt = option; \
|
||||
if (__builtin_constant_p(_curl_opt)) { \
|
||||
if (_curl_is_long_option(_curl_opt) && !_curl_is_long(value)) \
|
||||
if (_curl_is_long_option(_curl_opt)) \
|
||||
if (!_curl_is_long(value)) \
|
||||
_curl_easy_setopt_err_long(); \
|
||||
if (_curl_is_off_t_option(_curl_opt) && !_curl_is_off_t(value)) \
|
||||
if (_curl_is_off_t_option(_curl_opt)) \
|
||||
if (!_curl_is_off_t(value)) \
|
||||
_curl_easy_setopt_err_curl_off_t(); \
|
||||
if (_curl_is_string_option(_curl_opt) && !_curl_is_string(value)) \
|
||||
if (_curl_is_string_option(_curl_opt)) \
|
||||
if (!_curl_is_string(value)) \
|
||||
_curl_easy_setopt_err_string(); \
|
||||
if (_curl_is_write_cb_option(_curl_opt) && !_curl_is_write_cb(value)) \
|
||||
if (_curl_is_write_cb_option(_curl_opt)) \
|
||||
if (!_curl_is_write_cb(value)) \
|
||||
_curl_easy_setopt_err_write_callback(); \
|
||||
if ((_curl_opt) == CURLOPT_READFUNCTION && !_curl_is_read_cb(value)) \
|
||||
if ((_curl_opt) == CURLOPT_READFUNCTION) \
|
||||
if (!_curl_is_read_cb(value)) \
|
||||
_curl_easy_setopt_err_read_cb(); \
|
||||
if ((_curl_opt) == CURLOPT_IOCTLFUNCTION && !_curl_is_ioctl_cb(value)) \
|
||||
if ((_curl_opt) == CURLOPT_IOCTLFUNCTION) \
|
||||
if (!_curl_is_ioctl_cb(value)) \
|
||||
_curl_easy_setopt_err_ioctl_cb(); \
|
||||
if ((_curl_opt) == CURLOPT_SOCKOPTFUNCTION && !_curl_is_sockopt_cb(value))\
|
||||
if ((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \
|
||||
if (!_curl_is_sockopt_cb(value)) \
|
||||
_curl_easy_setopt_err_sockopt_cb(); \
|
||||
if ((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION && \
|
||||
!_curl_is_opensocket_cb(value)) \
|
||||
if ((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \
|
||||
if (!_curl_is_opensocket_cb(value)) \
|
||||
_curl_easy_setopt_err_opensocket_cb(); \
|
||||
if ((_curl_opt) == CURLOPT_PROGRESSFUNCTION && \
|
||||
!_curl_is_progress_cb(value)) \
|
||||
if ((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \
|
||||
if (!_curl_is_progress_cb(value)) \
|
||||
_curl_easy_setopt_err_progress_cb(); \
|
||||
if ((_curl_opt) == CURLOPT_DEBUGFUNCTION && !_curl_is_debug_cb(value)) \
|
||||
if ((_curl_opt) == CURLOPT_DEBUGFUNCTION) \
|
||||
if (!_curl_is_debug_cb(value)) \
|
||||
_curl_easy_setopt_err_debug_cb(); \
|
||||
if ((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION && \
|
||||
!_curl_is_ssl_ctx_cb(value)) \
|
||||
if ((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \
|
||||
if (!_curl_is_ssl_ctx_cb(value)) \
|
||||
_curl_easy_setopt_err_ssl_ctx_cb(); \
|
||||
if (_curl_is_conv_cb_option(_curl_opt) && !_curl_is_conv_cb(value)) \
|
||||
if (_curl_is_conv_cb_option(_curl_opt)) \
|
||||
if (!_curl_is_conv_cb(value)) \
|
||||
_curl_easy_setopt_err_conv_cb(); \
|
||||
if ((_curl_opt) == CURLOPT_SEEKFUNCTION && !_curl_is_seek_cb(value)) \
|
||||
if ((_curl_opt) == CURLOPT_SEEKFUNCTION) \
|
||||
if (!_curl_is_seek_cb(value)) \
|
||||
_curl_easy_setopt_err_seek_cb(); \
|
||||
if (_curl_is_cb_data_option(_curl_opt) && !_curl_is_cb_data(value)) \
|
||||
if (_curl_is_cb_data_option(_curl_opt)) \
|
||||
if (!_curl_is_cb_data(value)) \
|
||||
_curl_easy_setopt_err_cb_data(); \
|
||||
if ((_curl_opt) == CURLOPT_ERRORBUFFER && !_curl_is_error_buffer(value)) \
|
||||
if ((_curl_opt) == CURLOPT_ERRORBUFFER) \
|
||||
if (!_curl_is_error_buffer(value)) \
|
||||
_curl_easy_setopt_err_error_buffer(); \
|
||||
if ((_curl_opt) == CURLOPT_STDERR && !_curl_is_FILE(value)) \
|
||||
if ((_curl_opt) == CURLOPT_STDERR) \
|
||||
if (!_curl_is_FILE(value)) \
|
||||
_curl_easy_setopt_err_FILE(); \
|
||||
if (_curl_is_postfields_option(_curl_opt) && !_curl_is_postfields(value)) \
|
||||
if (_curl_is_postfields_option(_curl_opt)) \
|
||||
if (!_curl_is_postfields(value)) \
|
||||
_curl_easy_setopt_err_postfields(); \
|
||||
if ((_curl_opt) == CURLOPT_HTTPPOST && \
|
||||
!_curl_is_arr((value), struct curl_httppost)) \
|
||||
if ((_curl_opt) == CURLOPT_HTTPPOST) \
|
||||
if (!_curl_is_arr((value), struct curl_httppost)) \
|
||||
_curl_easy_setopt_err_curl_httpost(); \
|
||||
if (_curl_is_slist_option(_curl_opt) && \
|
||||
!_curl_is_arr((value), struct curl_slist)) \
|
||||
if (_curl_is_slist_option(_curl_opt)) \
|
||||
if (!_curl_is_arr((value), struct curl_slist)) \
|
||||
_curl_easy_setopt_err_curl_slist(); \
|
||||
if ((_curl_opt) == CURLOPT_SHARE && !_curl_is_ptr((value), CURLSH)) \
|
||||
if ((_curl_opt) == CURLOPT_SHARE) \
|
||||
if (!_curl_is_ptr((value), CURLSH)) \
|
||||
_curl_easy_setopt_err_CURLSH(); \
|
||||
} \
|
||||
curl_easy_setopt(handle, _curl_opt, value); \
|
||||
@@ -92,14 +112,17 @@ __extension__ ({ \
|
||||
__extension__ ({ \
|
||||
__typeof__ (info) _curl_info = info; \
|
||||
if (__builtin_constant_p(_curl_info)) { \
|
||||
if (_curl_is_string_info(_curl_info) && !_curl_is_arr((arg), char *)) \
|
||||
if (_curl_is_string_info(_curl_info)) \
|
||||
if (!_curl_is_arr((arg), char *)) \
|
||||
_curl_easy_getinfo_err_string(); \
|
||||
if (_curl_is_long_info(_curl_info) && !_curl_is_arr((arg), long)) \
|
||||
if (_curl_is_long_info(_curl_info)) \
|
||||
if (!_curl_is_arr((arg), long)) \
|
||||
_curl_easy_getinfo_err_long(); \
|
||||
if (_curl_is_double_info(_curl_info) && !_curl_is_arr((arg), double)) \
|
||||
if (_curl_is_double_info(_curl_info)) \
|
||||
if (!_curl_is_arr((arg), double)) \
|
||||
_curl_easy_getinfo_err_double(); \
|
||||
if (_curl_is_slist_info(_curl_info) && \
|
||||
!_curl_is_arr((arg), struct curl_slist *)) \
|
||||
if (_curl_is_slist_info(_curl_info)) \
|
||||
if (!_curl_is_arr((arg), struct curl_slist *)) \
|
||||
_curl_easy_getinfo_err_curl_slist(); \
|
||||
} \
|
||||
curl_easy_getinfo(handle, _curl_info, arg); \
|
||||
@@ -230,6 +253,12 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
|
||||
(option) == CURLOPT_SSH_PRIVATE_KEYFILE || \
|
||||
(option) == CURLOPT_CRLFILE || \
|
||||
(option) == CURLOPT_ISSUERCERT || \
|
||||
(option) == CURLOPT_SOCKS5_GSSAPI_SERVICE || \
|
||||
(option) == CURLOPT_SSH_KNOWNHOSTS || \
|
||||
(option) == CURLOPT_MAIL_FROM || \
|
||||
(option) == CURLOPT_RTSP_SESSION_ID || \
|
||||
(option) == CURLOPT_RTSP_STREAM_URI || \
|
||||
(option) == CURLOPT_RTSP_TRANSPORT || \
|
||||
0)
|
||||
|
||||
/* evaluates to true if option takes a curl_write_callback argument */
|
||||
@@ -256,6 +285,10 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
|
||||
(option) == CURLOPT_SSL_CTX_DATA || \
|
||||
(option) == CURLOPT_SEEKDATA || \
|
||||
(option) == CURLOPT_PRIVATE || \
|
||||
(option) == CURLOPT_SSH_KEYDATA || \
|
||||
(option) == CURLOPT_INTERLEAVEDATA || \
|
||||
(option) == CURLOPT_CHUNK_DATA || \
|
||||
(option) == CURLOPT_FNMATCH_DATA || \
|
||||
0)
|
||||
|
||||
/* evaluates to true if option takes a POST data argument (void* or char*) */
|
||||
@@ -272,6 +305,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
|
||||
(option) == CURLOPT_POSTQUOTE || \
|
||||
(option) == CURLOPT_PREQUOTE || \
|
||||
(option) == CURLOPT_TELNETOPTIONS || \
|
||||
(option) == CURLOPT_MAIL_RCPT || \
|
||||
0)
|
||||
|
||||
/* groups of curl_easy_getinfo infos that take the same type of argument */
|
||||
|
6
lib/.gitignore
vendored
6
lib/.gitignore
vendored
@@ -4,3 +4,9 @@ stamp-h1
|
||||
*.orig
|
||||
*.rej
|
||||
TAGS
|
||||
Makefile.vc8.dist
|
||||
Makefile.vc9.dist
|
||||
libcurl.plist.dist
|
||||
libcurl.vcproj
|
||||
vc6libcurl.dsp
|
||||
Makefile.vc10.dist
|
||||
|
@@ -3,563 +3,234 @@
|
||||
# G. Vanem <gvanem@broadpark.no>
|
||||
#
|
||||
|
||||
TARGETS = libcurl_wc.dll libcurl_wc_imp.lib libcurl_wc.lib
|
||||
!ifndef %watcom
|
||||
!error WATCOM environment variable not set!
|
||||
!endif
|
||||
|
||||
!ifdef %libname
|
||||
LIBNAME = $(%libname)
|
||||
!else
|
||||
LIBNAME = libcurl
|
||||
!endif
|
||||
TARGETS = $(LIBNAME).dll $(LIBNAME)_imp.lib $(LIBNAME).lib
|
||||
|
||||
CC = wcc386
|
||||
LD = wlink
|
||||
AR = wlib
|
||||
RC = wrc
|
||||
|
||||
CFLAGS = -3s -mf -d3 -hc -zff -zgf -zq -zm -zc -s -fr=con -w2 -fpi -oilrtfm -bt=nt &
|
||||
-bd -d+ -dWIN32 -dCURL_CA_BUNDLE=getenv("CURL_CA_BUNDLE") &
|
||||
-dBUILDING_LIBCURL -dHAVE_SPNEGO=1 -dENABLE_IPV6 &
|
||||
-dDEBUG=1 -dDEBUGBUILD -d_WIN32_WINNT=0x0501 -dWINBERAPI=__declspec(cdecl) &
|
||||
-dWINLDAPAPI=__declspec(cdecl) -I. -I..\include
|
||||
!ifdef __LOADDLL__
|
||||
! loaddll wcc386 wccd386
|
||||
! loaddll wpp386 wppd386
|
||||
! loaddll wlib wlibd
|
||||
! if $(__VERSION__) > 1270
|
||||
! loaddll wlink wlinkd
|
||||
! else
|
||||
! loaddll wlink wlink
|
||||
! endif
|
||||
!endif
|
||||
|
||||
!ifdef __LINUX__
|
||||
DS = /
|
||||
CP = cp
|
||||
MD = mkdir -p
|
||||
RD = rmdir -p
|
||||
RM = rm -f
|
||||
!else
|
||||
DS = $(X)\$(X)
|
||||
CP = copy 2>NUL
|
||||
MD = mkdir
|
||||
RD = rmdir /q /s 2>NUL
|
||||
!if $(__VERSION__) < 1250
|
||||
RM = del /q /f 2>NUL
|
||||
!else
|
||||
RM = rm -f
|
||||
!endif
|
||||
!endif
|
||||
|
||||
SYS_INCL = -I$(%watcom)$(DS)h$(DS)nt -I$(%watcom)$(DS)h
|
||||
SYS_LIBS = $(%watcom)$(DS)lib386$(DS)nt;$(%watcom)$(DS)lib386
|
||||
|
||||
CFLAGS = -3r -mf -hc -zff -zgf -zq -zm -zc -s -fr=con -w2 -fpi -oilrtfm &
|
||||
-wcd=201 -bt=nt -d+ -dWIN32 -dCURL_WANTS_CA_BUNDLE_ENV &
|
||||
-dBUILDING_LIBCURL -dHAVE_SPNEGO=1 -I. -I..$(DS)include $(SYS_INCL)
|
||||
|
||||
!ifdef %debug
|
||||
DEBUG = -dDEBUG=1 -dDEBUGBUILD
|
||||
CFLAGS += -d3 $(DEBUG)
|
||||
!else
|
||||
CFLAGS += -d0
|
||||
!endif
|
||||
|
||||
!ifdef %use_ipv6
|
||||
CFLAGS += -d_WIN32_WINNT=0x0501 -dENABLE_IPV6
|
||||
!endif
|
||||
|
||||
!ifdef %use_sspi
|
||||
CFLAGS += -dUSE_WINDOWS_SSPI
|
||||
!endif
|
||||
|
||||
#
|
||||
# Change to suite.
|
||||
#
|
||||
ZLIB_ROOT = ..\..\..\zlib-1.2.3
|
||||
USE_ZLIB = 0
|
||||
USE_ARES = 0
|
||||
USE_WATT32 = 0
|
||||
!ifdef %zlib_root
|
||||
ZLIB_ROOT = $(%zlib_root)
|
||||
!else
|
||||
ZLIB_ROOT = ..$(DS)..$(DS)zlib-1.2.5
|
||||
!endif
|
||||
|
||||
!ifeq USE_ZLIB 1
|
||||
!ifdef %libssh2_root
|
||||
LIBSSH2_ROOT = $(%libssh2_root)
|
||||
!else
|
||||
LIBSSH2_ROOT = ..$(DS)..$(DS)libssh2-1.2.7
|
||||
!endif
|
||||
|
||||
!ifdef %librtmp_root
|
||||
LIBRTMP_ROOT = $(%librtmp_root)
|
||||
!else
|
||||
LIBRTMP_ROOT = ..$(DS)..$(DS)rtmpdump-2.3
|
||||
!endif
|
||||
|
||||
!ifdef %openssl_root
|
||||
OPENSSL_ROOT = $(%openssl_root)
|
||||
!else
|
||||
OPENSSL_ROOT = ..$(DS)..$(DS)openssl-0.9.8r
|
||||
!endif
|
||||
|
||||
!ifdef %ares_root
|
||||
ARES_ROOT = $(%ares_root)
|
||||
!else
|
||||
ARES_ROOT = ..$(DS)ares
|
||||
!endif
|
||||
|
||||
!ifdef %use_zlib
|
||||
CFLAGS += -dHAVE_ZLIB_H -dHAVE_LIBZ -I$(ZLIB_ROOT)
|
||||
!endif
|
||||
|
||||
!ifeq USE_ARES 1
|
||||
CFLAGS += -dUSE_ARES -I..\ares
|
||||
!ifdef %use_rtmp
|
||||
CFLAGS += -dUSE_LIBRTMP -I$(LIBRTMP_ROOT)
|
||||
!endif
|
||||
|
||||
!ifeq USE_WATT32 1
|
||||
CFLAGS += -dUSE_WATT32 -I$(%watt_root)\inc
|
||||
!ifdef %use_ssh2
|
||||
CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H -I$(LIBSSH2_ROOT)$(DS)include -I$(LIBSSH2_ROOT)$(DS)win32
|
||||
!endif
|
||||
|
||||
!ifdef %use_ssl
|
||||
CFLAGS += -wcd=138 -dUSE_OPENSSL -dUSE_SSLEAY -I$(OPENSSL_ROOT)$(DS)inc32
|
||||
!endif
|
||||
|
||||
!ifdef %use_ares
|
||||
CFLAGS += -dUSE_ARES -I$(ARES_ROOT)
|
||||
!endif
|
||||
|
||||
!ifdef %use_watt32
|
||||
CFLAGS += -dUSE_WATT32 -I$(%watt_root)$(DS)inc
|
||||
!endif
|
||||
|
||||
OBJ_BASE = WC_Win32.obj
|
||||
C_ARG = $(OBJ_BASE)\wcc386.arg
|
||||
LINK_ARG = $(OBJ_BASE)\dyn\wlink.arg
|
||||
LIB_ARG = $(OBJ_BASE)\stat\wlib.arg
|
||||
LINK_ARG = $(OBJ_BASE)$(DS)dyn$(DS)wlink.arg
|
||||
LIB_ARG = $(OBJ_BASE)$(DS)stat$(DS)wlib.arg
|
||||
|
||||
# Unfortunately, we can't include Makefile.inc here because wmake doesn't
|
||||
# use backslash as the line continuation character by default
|
||||
CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c &
|
||||
cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c &
|
||||
ldap.c ssluse.c version.c getenv.c escape.c mprintf.c telnet.c &
|
||||
netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.c &
|
||||
krb5.c memdebug.c http_chunks.c strtok.c connect.c llist.c hash.c &
|
||||
multi.c content_encoding.c share.c http_digest.c md5.c curl_rand.c &
|
||||
http_negotiate.c http_ntlm.c inet_pton.c strtoofft.c strerror.c &
|
||||
hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c &
|
||||
inet_ntop.c parsedate.c select.c gtls.c sslgen.c tftp.c splay.c &
|
||||
strdup.c socks.c ssh.c nss.c qssl.c rawstr.c curl_addrinfo.c &
|
||||
socks_gssapi.c socks_sspi.c curl_sspi.c slist.c nonblock.c &
|
||||
curl_memrchr.c imap.c pop3.c smtp.c pingpong.c rtsp.c curl_threads.c &
|
||||
warnless.c
|
||||
# In order to process Makefile.inc wmake must be called with -u switch!
|
||||
!ifndef %MAKEFLAGS
|
||||
!error You MUST call wmake with the -u switch!
|
||||
!else
|
||||
!include Makefile.inc
|
||||
!endif
|
||||
|
||||
OBJS = $(CSOURCES:.c=.obj)
|
||||
!ifdef __LINUX__
|
||||
OBJS = $OBJ_DIR/$(OBJS: = $OBJ_DIR/)
|
||||
|
||||
!else
|
||||
OBJS = $OBJ_DIR\$(OBJS: = $OBJ_DIR\)
|
||||
!endif
|
||||
|
||||
#
|
||||
# Use $(OBJS) as a template to generate $(OBJS_STAT) and $(OBJS_DYN).
|
||||
#
|
||||
OBJ_DIR = $(OBJ_BASE)\stat
|
||||
OBJ_DIR = $(OBJ_BASE)$(DS)stat
|
||||
OBJS_STAT = $+ $(OBJS) $-
|
||||
|
||||
OBJ_DIR = $(OBJ_BASE)\dyn
|
||||
OBJ_DIR = $(OBJ_BASE)$(DS)dyn
|
||||
OBJS_DYN = $+ $(OBJS) $-
|
||||
|
||||
RESOURCE = $(OBJ_BASE)\dyn\libcurl.res
|
||||
CURLBUILDH = ..$(DS)include$(DS)curl$(DS)curlbuild.h
|
||||
RESOURCE = $(OBJ_BASE)$(DS)dyn$(DS)libcurl.res
|
||||
|
||||
all: $(OBJ_BASE) $(C_ARG) $(TARGETS) .SYMBOLIC
|
||||
all: $(CURLBUILDH) $(OBJ_BASE) $(TARGETS) .SYMBOLIC
|
||||
@echo Welcome to libcurl
|
||||
|
||||
$(OBJ_BASE):
|
||||
- mkdir $(OBJ_BASE)
|
||||
- mkdir $(OBJ_BASE)\stat
|
||||
- mkdir $(OBJ_BASE)\dyn
|
||||
|
||||
libcurl_wc.dll libcurl_wc_imp.lib: $(OBJS_DYN) $(RESOURCE) $(LINK_ARG)
|
||||
wlink name libcurl_wc.dll @$(LINK_ARG)
|
||||
|
||||
libcurl_wc.lib: $(OBJS_STAT) $(LIB_ARG)
|
||||
wlib -q -b- c $@ @$(LIB_ARG)
|
||||
|
||||
clean: .SYMBOLIC
|
||||
- rm -f $(OBJS_STAT) $(OBJS_DYN) $(RESOURCE) $(C_ARG) $(LINK_ARG) $(LIB_ARG)
|
||||
-$(RM) $(OBJS_STAT)
|
||||
-$(RM) $(OBJS_DYN)
|
||||
-$(RM) $(RESOURCE) $(LINK_ARG) $(LIB_ARG)
|
||||
|
||||
vclean realclean: clean .SYMBOLIC
|
||||
- rm -f $(TARGETS) libcurl_wc.map
|
||||
- rmdir $(OBJ_BASE)\stat
|
||||
- rmdir $(OBJ_BASE)\dyn
|
||||
- rmdir $(OBJ_BASE)
|
||||
vclean distclean: clean .SYMBOLIC
|
||||
-$(RM) $(TARGETS) $(LIBNAME).map $(LIBNAME).sym
|
||||
-$(RD) $(OBJ_BASE)$(DS)stat
|
||||
-$(RD) $(OBJ_BASE)$(DS)dyn
|
||||
-$(RD) $(OBJ_BASE)
|
||||
|
||||
$(OBJ_BASE):
|
||||
-$(MD) $^@
|
||||
-$(MD) $^@$(DS)stat
|
||||
-$(MD) $^@$(DS)dyn
|
||||
|
||||
$(CURLBUILDH): .EXISTSONLY
|
||||
$(CP) $^@.dist $^@
|
||||
|
||||
$(LIBNAME).dll: $(OBJS_DYN) $(RESOURCE) $(LINK_ARG)
|
||||
$(LD) name $^@ @$]@
|
||||
|
||||
$(LIBNAME).lib: $(OBJS_STAT) $(LIB_ARG)
|
||||
$(AR) -q -b -c $^@ @$]@
|
||||
|
||||
.ERASE
|
||||
$(RESOURCE): libcurl.rc
|
||||
wrc -dDEBUGBUILD=1 -q -r -zm -I..\include -fo=$@ libcurl.rc
|
||||
$(RC) $(DEBUG) -q -r -zm -bt=nt -I..$(DS)include $(SYS_INCL) $[@ -fo=$^@
|
||||
|
||||
.ERASE
|
||||
.c{$(OBJ_BASE)\dyn}.obj:
|
||||
$(CC) $[@ @$(C_ARG) -fo=$@
|
||||
.c{$(OBJ_BASE)$(DS)dyn}.obj:
|
||||
$(CC) $(CFLAGS) -bd -br $[@ -fo=$^@
|
||||
|
||||
.ERASE
|
||||
.c{$(OBJ_BASE)\stat}.obj:
|
||||
$(CC) $[@ @$(C_ARG) -DCURL_STATICLIB -fo=$@
|
||||
|
||||
$(C_ARG): $(__MAKEFILES__)
|
||||
%create $^@
|
||||
%append $^@ $(CFLAGS)
|
||||
.c{$(OBJ_BASE)$(DS)stat}.obj:
|
||||
$(CC) $(CFLAGS) -DCURL_STATICLIB $[@ -fo=$^@
|
||||
|
||||
$(LINK_ARG): $(__MAKEFILES__)
|
||||
%create $^@
|
||||
@%append $^@ system nt dll
|
||||
@%append $^@ file { $(OBJS_DYN) }
|
||||
@%append $^@ option quiet, map, caseexact, eliminate, implib=libcurl_wc_imp.lib,
|
||||
@%append $^@ res=$(RESOURCE) libpath $(%watcom)\lib386;$(%watcom)\lib386\nt
|
||||
@%append $^@ library clib3s.lib, wldap32.lib
|
||||
!ifeq USE_WATT32 1
|
||||
@%append $^@ library $(%watt_root)\lib\wattcpw_imp.lib
|
||||
!ifdef %debug
|
||||
@%append $^@ debug all
|
||||
@%append $^@ option symfile
|
||||
!endif
|
||||
@%append $^@ option quiet, map, caseexact, eliminate, implib=$(LIBNAME)_imp.lib,
|
||||
@%append $^@ res=$(RESOURCE) libpath $(SYS_LIBS)
|
||||
@%append $^@ library wldap32.lib
|
||||
!ifdef %use_watt32
|
||||
@%append $^@ library $(%watt_root)$(DS)lib$(DS)wattcpw_imp.lib
|
||||
!else
|
||||
@%append $^@ library ws2_32.lib
|
||||
!endif
|
||||
!ifeq USE_ZLIB 1
|
||||
@%append $^@ library $(ZLIB_ROOT)\zlib.lib
|
||||
!ifdef %use_zlib
|
||||
@%append $^@ library $(ZLIB_ROOT)$(DS)zlib.lib
|
||||
!endif
|
||||
!ifeq USE_ARES 1
|
||||
@%append $^@ library ..\ares\cares.lib
|
||||
!ifdef %use_rtmp
|
||||
@%append $^@ library $(LIBRTMP_ROOT)$(DS)librtmp$(DS)librtmp.lib
|
||||
!endif
|
||||
!ifdef %use_ssh2
|
||||
@%append $^@ library $(LIBSSH2_ROOT)$(DS)win32$(DS)libssh2.lib
|
||||
!endif
|
||||
!ifdef %use_ssl
|
||||
@%append $^@ library $(OPENSSL_ROOT)$(DS)out32$(DS)libeay32.lib, $(OPENSSL_ROOT)$(DS)out32$(DS)ssleay32.lib
|
||||
!endif
|
||||
!ifdef %use_ares
|
||||
@%append $^@ library $(ARES_ROOT)$(DS)cares.lib
|
||||
!endif
|
||||
|
||||
$(LIB_ARG): $(__MAKEFILES__)
|
||||
%create $^@
|
||||
for %f in ($(OBJS_STAT)) do @%append $^@ +- %f
|
||||
@for %f in ($(OBJS_STAT)) do @%append $^@ +- %f
|
||||
|
||||
#
|
||||
# Dependencies based on "gcc -MM .."
|
||||
#
|
||||
$(OBJ_DIR)\file.obj: file.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h strtoofft.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
|
||||
progress.h sendf.h escape.h file.h speedcheck.h getinfo.h transfer.h &
|
||||
url.h curl_memory.h parsedate.h ..\include\curl\mprintf.h memdebug.h
|
||||
$(OBJ_DIR)\timeval.obj: timeval.c timeval.h setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h
|
||||
$(OBJ_DIR)\base64.obj: base64.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\mprintf.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h urldata.h cookie.h ..\include\curl\curl.h &
|
||||
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
|
||||
curl_addrinfo.h splay.h easyif.h curl_base64.h curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\hostip.obj: hostip.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
||||
share.h strerror.h url.h inet_ntop.h ..\include\curl\mprintf.h curl_memory.h &
|
||||
memdebug.h
|
||||
$(OBJ_DIR)\progress.obj: progress.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
||||
progress.h ..\include\curl\mprintf.h
|
||||
$(OBJ_DIR)\formdata.obj: formdata.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
||||
llist.h curl_addrinfo.h splay.h easyif.h strequal.h curl_memory.h &
|
||||
curl_rand.h ..\include\curl\mprintf.h memdebug.h
|
||||
$(OBJ_DIR)\cookie.obj: cookie.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\mprintf.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h urldata.h cookie.h ..\include\curl\curl.h &
|
||||
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
|
||||
curl_addrinfo.h splay.h strequal.h strtok.h sendf.h curl_memory.h share.h &
|
||||
strtoofft.h rawstr.h memdebug.h curl_memrchr.h
|
||||
$(OBJ_DIR)\http.obj: http.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
|
||||
transfer.h sendf.h easyif.h progress.h curl_base64.h strequal.h &
|
||||
sslgen.h http_digest.h http_ntlm.h http_negotiate.h url.h share.h &
|
||||
http.h curl_memory.h select.h parsedate.h strtoofft.h multiif.h rawstr.h &
|
||||
..\include\curl\mprintf.h memdebug.h
|
||||
$(OBJ_DIR)\sendf.obj: sendf.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
||||
llist.h curl_addrinfo.h splay.h sendf.h connect.h sslgen.h ssh.h &
|
||||
multiif.h ..\include\curl\mprintf.h curl_memory.h strerror.h easyif.h &
|
||||
memdebug.h
|
||||
$(OBJ_DIR)\ftp.obj: ftp.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
||||
llist.h curl_addrinfo.h splay.h sendf.h easyif.h if2ip.h progress.h &
|
||||
transfer.h escape.h http.h socks.h ftp.h strtoofft.h strequal.h &
|
||||
sslgen.h connect.h strerror.h inet_ntop.h inet_pton.h select.h &
|
||||
parsedate.h sockaddr.h multiif.h url.h ..\include\curl\mprintf.h &
|
||||
curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\url.obj: url.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h netrc.h &
|
||||
sslgen.h transfer.h sendf.h progress.h strequal.h strerror.h escape.h &
|
||||
strtok.h share.h content_encoding.h http_digest.h http_negotiate.h &
|
||||
select.h multiif.h easyif.h speedcheck.h rawstr.h ftp.h dict.h telnet.h &
|
||||
tftp.h http.h file.h curl_ldap.h ssh.h url.h connect.h inet_ntop.h &
|
||||
http_ntlm.h socks.h ..\include\curl\mprintf.h curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\dict.obj: dict.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
|
||||
transfer.h sendf.h progress.h strequal.h dict.h rawstr.h &
|
||||
..\include\curl\mprintf.h memdebug.h
|
||||
$(OBJ_DIR)\if2ip.obj: if2ip.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h inet_ntop.h strequal.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h if2ip.h &
|
||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\speedcheck.obj: speedcheck.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h urldata.h cookie.h &
|
||||
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
|
||||
curl_addrinfo.h splay.h sendf.h multiif.h speedcheck.h
|
||||
$(OBJ_DIR)\ldap.obj: ldap.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h
|
||||
$(OBJ_DIR)\ssluse.obj: ssluse.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
||||
url.h inet_pton.h ssluse.h connect.h strequal.h select.h sslgen.h &
|
||||
rawstr.h ..\include\curl\mprintf.h
|
||||
$(OBJ_DIR)\version.obj: version.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
||||
llist.h curl_addrinfo.h splay.h sslgen.h ..\include\curl\mprintf.h
|
||||
$(OBJ_DIR)\getenv.obj: getenv.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
||||
curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\escape.obj: escape.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
||||
curl_memory.h urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h &
|
||||
hash.h llist.h curl_addrinfo.h splay.h easyif.h &
|
||||
..\include\curl\mprintf.h memdebug.h
|
||||
$(OBJ_DIR)\mprintf.obj: mprintf.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\mprintf.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h curl_memory.h ..\include\curl\curl.h memdebug.h
|
||||
$(OBJ_DIR)\telnet.obj: telnet.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
|
||||
transfer.h sendf.h telnet.h connect.h ..\include\curl\mprintf.h &
|
||||
arpa_telnet.h curl_memory.h select.h strequal.h rawstr.h memdebug.h
|
||||
$(OBJ_DIR)\netrc.obj: netrc.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
||||
netrc.h strequal.h strtok.h curl_memory.h rawstr.h ..\include\curl\mprintf.h &
|
||||
memdebug.h
|
||||
$(OBJ_DIR)\getinfo.obj: getinfo.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
||||
llist.h curl_addrinfo.h splay.h getinfo.h curl_memory.h sslgen.h connect.h &
|
||||
memdebug.h
|
||||
$(OBJ_DIR)\transfer.obj: transfer.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h strtoofft.h strequal.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h rawstr.h urldata.h &
|
||||
cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
|
||||
curl_addrinfo.h splay.h netrc.h content_encoding.h transfer.h sendf.h &
|
||||
speedcheck.h progress.h http.h url.h getinfo.h sslgen.h http_digest.h &
|
||||
http_ntlm.h http_negotiate.h share.h curl_memory.h select.h multiif.h &
|
||||
easyif.h ..\include\curl\mprintf.h memdebug.h
|
||||
$(OBJ_DIR)\strequal.obj: strequal.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h strequal.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h
|
||||
$(OBJ_DIR)\easy.obj: easy.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h strequal.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h urldata.h cookie.h &
|
||||
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
|
||||
curl_addrinfo.h splay.h transfer.h sslgen.h url.h getinfo.h share.h &
|
||||
strdup.h curl_memory.h progress.h easyif.h select.h sendf.h http_ntlm.h &
|
||||
curl_rand.h connect.h ..\include\curl\mprintf.h memdebug.h
|
||||
$(OBJ_DIR)\security.obj: security.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h
|
||||
$(OBJ_DIR)\krb4.obj: krb4.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h
|
||||
$(OBJ_DIR)\krb5.obj: krb5.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h
|
||||
$(OBJ_DIR)\memdebug.obj: memdebug.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
||||
..\include\curl\mprintf.h urldata.h cookie.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h curl_memory.h &
|
||||
memdebug.h
|
||||
$(OBJ_DIR)\http_chunks.obj: http_chunks.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
||||
urldata.h cookie.h ..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
||||
content_encoding.h http.h curl_memory.h easyif.h ..\include\curl\mprintf.h &
|
||||
memdebug.h
|
||||
$(OBJ_DIR)\strtok.obj: strtok.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h strtok.h
|
||||
$(OBJ_DIR)\connect.obj: connect.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\mprintf.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h urldata.h cookie.h ..\include\curl\curl.h &
|
||||
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
|
||||
curl_addrinfo.h splay.h sendf.h if2ip.h strerror.h connect.h curl_memory.h &
|
||||
select.h url.h multiif.h sockaddr.h inet_ntop.h sslgen.h memdebug.h
|
||||
$(OBJ_DIR)\llist.obj: llist.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h llist.h curl_memory.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h memdebug.h
|
||||
$(OBJ_DIR)\hash.obj: hash.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h hash.h llist.h &
|
||||
..\include\curl\mprintf.h ..\include\curl\curl.h &
|
||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
||||
..\include\curl\easy.h ..\include\curl\multi.h curl_memory.h &
|
||||
..\include\curl\curl.h memdebug.h
|
||||
$(OBJ_DIR)\multi.obj: multi.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
||||
llist.h curl_addrinfo.h splay.h transfer.h url.h connect.h progress.h &
|
||||
easyif.h multiif.h sendf.h http.h ..\include\curl\mprintf.h curl_memory.h &
|
||||
memdebug.h
|
||||
$(OBJ_DIR)\content_encoding.obj: content_encoding.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h
|
||||
$(OBJ_DIR)\share.obj: share.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
||||
llist.h curl_addrinfo.h splay.h share.h curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\http_digest.obj: http_digest.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
||||
urldata.h cookie.h ..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
||||
rawstr.h curl_base64.h curl_md5.h http_digest.h strtok.h url.h curl_memory.h &
|
||||
easyif.h ..\include\curl\mprintf.h memdebug.h
|
||||
$(OBJ_DIR)\md5.obj: md5.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h curl_md5.h
|
||||
$(OBJ_DIR)\http_negotiate.obj: http_negotiate.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h
|
||||
$(OBJ_DIR)\http_ntlm.obj: http_ntlm.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
||||
urldata.h cookie.h ..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h easyif.h &
|
||||
sendf.h rawstr.h curl_base64.h http_ntlm.h url.h curl_memory.h ssluse.h &
|
||||
..\include\curl\mprintf.h memdebug.h
|
||||
$(OBJ_DIR)\inet_pton.obj: inet_pton.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
||||
inet_pton.h
|
||||
$(OBJ_DIR)\strtoofft.obj: strtoofft.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
||||
strtoofft.h
|
||||
$(OBJ_DIR)\strerror.obj: strerror.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
||||
strerror.h urldata.h cookie.h formdata.h timeval.h http_chunks.h &
|
||||
hostip.h hash.h llist.h curl_addrinfo.h splay.h &
|
||||
..\include\curl\mprintf.h
|
||||
$(OBJ_DIR)\hostares.obj: hostares.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
||||
share.h strerror.h url.h multiif.h inet_pton.h connect.h select.h &
|
||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\hostasyn.obj: hostasyn.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
||||
share.h strerror.h url.h ..\include\curl\mprintf.h curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\hostip4.obj: hostip4.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
||||
share.h strerror.h url.h inet_pton.h ..\include\curl\mprintf.h curl_memory.h &
|
||||
memdebug.h
|
||||
$(OBJ_DIR)\hostip6.obj: hostip6.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
||||
share.h strerror.h url.h inet_pton.h connect.h &
|
||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\hostsyn.obj: hostsyn.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
||||
share.h strerror.h url.h ..\include\curl\mprintf.h curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\hostthre.obj: hostthre.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
||||
share.h strerror.h url.h multiif.h inet_pton.h &
|
||||
..\include\curl\mprintf.h inet_ntop.h curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\inet_ntop.obj: inet_ntop.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
||||
..\include\curl\mprintf.h ..\include\curl\curl.h &
|
||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
||||
..\include\curl\easy.h ..\include\curl\multi.h inet_ntop.h
|
||||
$(OBJ_DIR)\parsedate.obj: parsedate.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h rawstr.h parsedate.h
|
||||
$(OBJ_DIR)\select.obj: select.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
||||
llist.h curl_addrinfo.h splay.h connect.h select.h
|
||||
$(OBJ_DIR)\gtls.obj: gtls.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h
|
||||
$(OBJ_DIR)\sslgen.obj: sslgen.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sslgen.h &
|
||||
ssluse.h gtls.h nssg.h qssl.h sendf.h rawstr.h url.h curl_memory.h &
|
||||
progress.h memdebug.h
|
||||
$(OBJ_DIR)\tftp.obj: tftp.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
|
||||
transfer.h sendf.h tftp.h progress.h connect.h strerror.h sockaddr.h &
|
||||
url.h ..\include\curl\mprintf.h curl_memory.h select.h memdebug.h
|
||||
$(OBJ_DIR)\splay.obj: splay.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h splay.h
|
||||
$(OBJ_DIR)\strdup.obj: strdup.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h strdup.h
|
||||
$(OBJ_DIR)\socks.obj: socks.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
||||
strequal.h select.h connect.h socks.h memdebug.h
|
||||
$(OBJ_DIR)\ssh.obj: ssh.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h
|
||||
$(OBJ_DIR)\nss.obj: nss.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
||||
url.h connect.h strequal.h select.h sslgen.h ..\include\curl\mprintf.h
|
||||
$(OBJ_DIR)\qssl.obj: qssl.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h
|
||||
$(OBJ_DIR)\nonblock.obj: nonblock.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h nonblock.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h
|
||||
$(OBJ_DIR)\rawstr.obj: rawstr.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h rawstr.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h
|
||||
$(OBJ_DIR)\curl_addrinfo.obj: curl_addrinfo.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h curl_addrinfo.h &
|
||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\curl_rand.obj: curl_rand.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h curl_rand.h &
|
||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\curl_memrchr.obj: curl_memrchr.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h curl_memrchr.h &
|
||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\imap.obj: imap.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h imap.h &
|
||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\pop3.obj: pop3.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h pop3.h &
|
||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\smtp.obj: smtp.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h smtp.h &
|
||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
||||
$(OBJ_DIR)\pingpong.obj: pingpong.c setup.h config-win32.h &
|
||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h pingpong.h &
|
||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1998 - 2011, 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
|
||||
@@ -30,20 +30,24 @@ DOCS = README.encoding README.memoryleak README.ares README.curlx \
|
||||
|
||||
CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
|
||||
|
||||
EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 Makefile.riscos $(DSP) \
|
||||
EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 $(DSP) \
|
||||
vc6libcurl.dsw config-win32.h config-win32ce.h config-riscos.h \
|
||||
config-mac.h curl_config.h.in makefile.dj config.dos libcurl.plist \
|
||||
config-mac.h curl_config.h.in makefile.dj config-dos.h libcurl.plist \
|
||||
libcurl.rc config-amigaos.h amigaos.c amigaos.h makefile.amiga \
|
||||
Makefile.netware nwlib.c nwos.c libcurl.imp msvcproj.head msvcproj.foot \
|
||||
config-win32ce.h config-os400.h setup-os400.h config-symbian.h \
|
||||
Makefile.Watcom config-tpf.h $(DOCS) $(VCPROJ) mk-ca-bundle.pl \
|
||||
firefox-db2pem.sh $(CMAKE_DIST) config-vxworks.h Makefile.vxworks
|
||||
mk-ca-bundle.vbs firefox-db2pem.sh $(CMAKE_DIST) config-vxworks.h \
|
||||
Makefile.vxworks config-vms.h
|
||||
|
||||
CLEANFILES = $(DSP) $(VCPROJ)
|
||||
|
||||
lib_LTLIBRARIES = libcurl.la
|
||||
LIBCURL_LIBS = @LIBCURL_LIBS@
|
||||
|
||||
# This might hold -Werror
|
||||
libcurl_la_CFLAGS = $(CFLAGS) @CURL_CFLAG_EXTRAS@
|
||||
|
||||
# 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
|
||||
@@ -112,12 +116,23 @@ if MIMPURE
|
||||
MIMPURE = -mimpure-text
|
||||
endif
|
||||
|
||||
libcurl_la_LDFLAGS = $(UNDEF) $(VERSIONINFO) $(MIMPURE) $(LIBCURL_LIBS)
|
||||
LINKFLAGS=$(UNDEF) $(MIMPURE) $(LIBCURL_LIBS)
|
||||
|
||||
libcurl_la_LDFLAGS = $(LINKFLAGS) $(VERSIONINFO)
|
||||
|
||||
# as unit testing will compile and link everything an extra time, we only
|
||||
# do it if debug is enabled
|
||||
if CURLDEBUG
|
||||
noinst_LTLIBRARIES = libcurlu.la
|
||||
libcurlu_la_CFLAGS = -DUNITTESTS
|
||||
libcurlu_la_LDFLAGS = -static $(LINKFLAGS)
|
||||
endif
|
||||
|
||||
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
||||
include Makefile.inc
|
||||
|
||||
libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)
|
||||
libcurlu_la_SOURCES = $(CSOURCES) $(HHEADERS)
|
||||
|
||||
WIN32SOURCES = $(CSOURCES)
|
||||
WIN32HEADERS = $(HHEADERS) config-win32.h
|
||||
|
@@ -6,19 +6,28 @@
|
||||
#
|
||||
# 'BCCDIR' has to be set up to point to the base directory
|
||||
# of the compiler, i.e. SET BCCDIR = c:\Borland\BCC55
|
||||
# where c:\Borland\BCC55 is the compiler is installed
|
||||
#
|
||||
# Written by Jaepil Kim, pit@paradise.net.nz
|
||||
# Initially written by Jaepil Kim, pit@paradise.net.nz
|
||||
############################################################
|
||||
|
||||
!if "$(__MAKE__)" == ""
|
||||
!error __MAKE__ not defined. Use Borlands's MAKE to process this makefile.
|
||||
!endif
|
||||
|
||||
# Borland's $(MAKEDIR) expands to the path where make.exe is located,
|
||||
# use this feature to define BCCDIR when user has not defined BCCDIR.
|
||||
!ifndef BCCDIR
|
||||
BCCDIR = $(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
# Edit the path below to point to the base of your Zlib sources.
|
||||
!ifndef ZLIB_PATH
|
||||
ZLIB_PATH = ../../zlib-1.2.1
|
||||
ZLIB_PATH = ..\..\zlib-1.2.5
|
||||
!endif
|
||||
|
||||
# Edit the path below to point to the base of your OpenSSL package.
|
||||
!ifndef OPENSSL_PATH
|
||||
OPENSSL_PATH = ../../openssl-0.9.7d
|
||||
OPENSSL_PATH = ..\..\openssl-0.9.8q
|
||||
!endif
|
||||
|
||||
# Set libcurl static lib, dll and import lib
|
||||
@@ -27,55 +36,78 @@ LIBCURL_DLL = libcurl.dll
|
||||
LIBCURL_IMPLIB = libcurl_imp.lib
|
||||
|
||||
# Setup environment
|
||||
CXX = bcc32
|
||||
PP_CMD = cpp32 -q -P-
|
||||
CC_CMD = bcc32 -q -c
|
||||
LD = bcc32
|
||||
CP = copy
|
||||
RM = del
|
||||
RM = del 2>NUL
|
||||
MKDIR = mkdir
|
||||
RMDIR = rmdir /s /q 2>NUL
|
||||
LIB = tlib
|
||||
IMPLIB = implib
|
||||
|
||||
CXXFLAGS = -q -5 -O2 -w-aus -w-ccc -w-csu -w-par -w-pia -w-rch -w-inl -w-ngu -w-pro -tWM
|
||||
CC_FLAGS = -5 -O2 -tWM -w -w-aus -w-ccc -w-dup -w-prc -w-pro -w-rch -w-sig -w-spa -Dinline=__inline
|
||||
LIBFLAGS = /C /P32
|
||||
LDFLAGS = -q -lq -laa -tWD
|
||||
|
||||
INCDIRS = -I.;../include
|
||||
LINKLIB = $(BCCDIR)/lib/cw32mt.lib
|
||||
SRCDIR = .
|
||||
OBJDIR = .\objs
|
||||
INCDIRS = -I.;..\include
|
||||
LINKLIB = $(BCCDIR)\lib\cw32mt.lib
|
||||
DEFINES = -DNDEBUG -DWIN32 -DBUILDING_LIBCURL
|
||||
|
||||
# If you build with SSL support, set WITH_SSL=1
|
||||
DEFINES = -DNDEBUG -DWIN32 -D_CONSOLE -D_MBCS -DBUILDING_LIBCURL
|
||||
# By default SSPI support is enabled for BCC
|
||||
!ifndef DISABLE_SSPI
|
||||
DEFINES = $(DEFINES) -DUSE_WINDOWS_SSPI
|
||||
!endif
|
||||
|
||||
# By default LDAP support is disabled for BCC
|
||||
!ifndef WITH_LDAP
|
||||
DEFINES = $(DEFINES) -DCURL_DISABLE_LDAP
|
||||
!endif
|
||||
|
||||
# ZLIB support is enabled setting WITH_ZLIB=1
|
||||
!ifdef WITH_ZLIB
|
||||
DEFINES = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H
|
||||
INCDIRS = $(INCDIRS);$(ZLIB_PATH)
|
||||
LINKLIB = $(LINKLIB) $(ZLIB_PATH)/zlib.lib
|
||||
LINKLIB = $(LINKLIB) $(ZLIB_PATH)\zlib.lib
|
||||
!endif
|
||||
|
||||
# SSL support is enabled setting WITH_SSL=1
|
||||
!ifdef WITH_SSL
|
||||
DEFINES = $(DEFINES) -DUSE_SSLEAY
|
||||
INCDIRS = $(INCDIRS);$(OPENSSL_PATH)/inc32;$(OPENSSL_PATH)/inc32/openssl
|
||||
LINKLIB = $(LINKLIB) $(OPENSSL_PATH)/out32/ssleay32.lib $(OPENSSL_PATH)/out32/libeay32.lib
|
||||
INCDIRS = $(INCDIRS);$(OPENSSL_PATH)\inc32;$(OPENSSL_PATH)\inc32\openssl
|
||||
LINKLIB = $(LINKLIB) $(OPENSSL_PATH)\out32\ssleay32.lib $(OPENSSL_PATH)\out32\libeay32.lib
|
||||
!endif
|
||||
|
||||
.autodepend
|
||||
|
||||
.path.c = $(SRCDIR)
|
||||
.path.obj = $(OBJDIR)
|
||||
|
||||
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
||||
!include Makefile.inc
|
||||
|
||||
OBJECTS = $(CSOURCES:.c=.obj)
|
||||
|
||||
.c.obj:
|
||||
$(CXX) -c $(INCDIRS) $(CXXFLAGS) $(DEFINES) $<
|
||||
@-$(RM) $(@R).int
|
||||
$(PP_CMD) $(CC_FLAGS) $(INCDIRS) $(DEFINES) -o$(@R).int $(<)
|
||||
$(CC_CMD) $(CC_FLAGS) -o$(@) $(@R).int
|
||||
|
||||
all: $(LIBCURL_LIB) $(LIBCURL_DLL)
|
||||
all: $(OBJDIR) $(LIBCURL_LIB) $(LIBCURL_DLL)
|
||||
|
||||
clean:
|
||||
-$(RM) $(LIBCURL_LIB)
|
||||
-$(RM) $(LIBCURL_IMPLIB)
|
||||
-$(RM) libcurl.tds
|
||||
-$(RM) *.obj
|
||||
@-$(RMDIR) $(OBJDIR)
|
||||
@-$(RM) $(LIBCURL_LIB)
|
||||
@-$(RM) $(LIBCURL_IMPLIB)
|
||||
@-$(RM) libcurl.tds
|
||||
|
||||
$(OBJDIR):
|
||||
@-$(RMDIR) $(OBJDIR)
|
||||
@-$(MKDIR) $(OBJDIR)
|
||||
|
||||
$(LIBCURL_LIB): $(OBJECTS)
|
||||
@-$(RM) $@
|
||||
@-$(RM) $(LIBCURL_LIB)
|
||||
$(LIB) $(LIBFLAGS) $@ @&&!
|
||||
+$(**: = &^
|
||||
+)
|
||||
@@ -87,3 +119,5 @@ $(LIBCURL_DLL) $(LIBCURL_IMPLIB): $(OBJECTS) $(LINKLIB)
|
||||
$(LD) $(LDFLAGS) -e$(LIBCURL_DLL) $**
|
||||
$(IMPLIB) $(LIBCURL_IMPLIB) $(LIBCURL_DLL)
|
||||
|
||||
|
||||
# End of Makefile.b32
|
||||
|
@@ -1,28 +1,40 @@
|
||||
# ./lib/Makefile.inc
|
||||
# Using the backslash as line continuation character might be problematic
|
||||
# with some make flavours, as Watcom's wmake showed us already. If we
|
||||
# ever want to change this in a portable manner then we should consider
|
||||
# this idea (posted to the libcurl list by Adam Kellas):
|
||||
# CSRC1 = file1.c file2.c file3.c
|
||||
# CSRC2 = file4.c file5.c file6.c
|
||||
# CSOURCES = $(CSRC1) $(CSRC2)
|
||||
|
||||
CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c \
|
||||
cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c \
|
||||
ldap.c ssluse.c version.c getenv.c escape.c mprintf.c telnet.c \
|
||||
netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.c \
|
||||
krb5.c memdebug.c http_chunks.c strtok.c connect.c llist.c hash.c \
|
||||
multi.c content_encoding.c share.c http_digest.c md5.c curl_rand.c \
|
||||
curl_fnmatch.c fileinfo.c ftplistparser.c wildcard.c krb5.c \
|
||||
memdebug.c http_chunks.c strtok.c connect.c llist.c hash.c multi.c \
|
||||
content_encoding.c share.c http_digest.c md4.c md5.c curl_rand.c \
|
||||
http_negotiate.c http_ntlm.c inet_pton.c strtoofft.c strerror.c \
|
||||
hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c \
|
||||
inet_ntop.c parsedate.c select.c gtls.c sslgen.c tftp.c splay.c \
|
||||
strdup.c socks.c ssh.c nss.c qssl.c rawstr.c curl_addrinfo.c \
|
||||
socks_gssapi.c socks_sspi.c curl_sspi.c slist.c nonblock.c \
|
||||
curl_memrchr.c imap.c pop3.c smtp.c pingpong.c rtsp.c curl_threads.c \
|
||||
warnless.c
|
||||
warnless.c hmac.c polarssl.c curl_rtmp.c openldap.c curl_gethostname.c\
|
||||
gopher.c axtls.c idn_win32.c http_negotiate_sspi.c
|
||||
|
||||
HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \
|
||||
progress.h formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h \
|
||||
if2ip.h speedcheck.h urldata.h curl_ldap.h ssluse.h escape.h telnet.h \
|
||||
getinfo.h strequal.h krb4.h memdebug.h http_chunks.h curl_rand.h \
|
||||
strtok.h connect.h llist.h hash.h content_encoding.h share.h \
|
||||
curl_fnmatch.h wildcard.h fileinfo.h ftplistparser.h strtok.h \
|
||||
connect.h llist.h hash.h content_encoding.h share.h curl_md4.h \
|
||||
curl_md5.h http_digest.h http_negotiate.h http_ntlm.h inet_pton.h \
|
||||
strtoofft.h strerror.h inet_ntop.h curlx.h curl_memory.h setup.h \
|
||||
transfer.h select.h easyif.h multiif.h parsedate.h sslgen.h gtls.h \
|
||||
tftp.h sockaddr.h splay.h strdup.h setup_once.h socks.h ssh.h nssg.h \
|
||||
curl_base64.h rawstr.h curl_addrinfo.h curl_sspi.h slist.h nonblock.h \
|
||||
curl_memrchr.h imap.h pop3.h smtp.h pingpong.h rtsp.h curl_threads.h \
|
||||
warnless.h
|
||||
warnless.h curl_hmac.h polarssl.h curl_rtmp.h curl_gethostname.h \
|
||||
gopher.h axtls.h
|
||||
|
||||
|
@@ -1,13 +1,13 @@
|
||||
#########################################################################
|
||||
#
|
||||
## Makefile for building libcurl.a with MingW32 (GCC-3.2 or later)
|
||||
## and optionally OpenSSL (0.9.8), libssh2 (1.1), zlib (1.2.3)
|
||||
## and optionally OpenSSL (0.9.8), libssh2 (1.2), zlib (1.2.5)
|
||||
##
|
||||
## Usage:
|
||||
## mingw32-make -f Makefile.m32 [SSL=1] [SSH2=1] [ZLIB=1] [IDN=1] [SSPI=1] [IPV6=1] [LDAPS=1] [DYN=1]
|
||||
## mingw32-make -f Makefile.m32 [SSL=1] [SSH2=1] [ZLIB=1] [IDN=1] [SSPI=1] [IPV6=1] [LDAPS=1] [RTMP=1] [DYN=1]
|
||||
##
|
||||
## Hint: you can also set environment vars to control the build, f.e.:
|
||||
## set ZLIB_PATH=c:/zlib-1.2.3
|
||||
## set ZLIB_PATH=c:/zlib-1.2.5
|
||||
## set ZLIB=1
|
||||
##
|
||||
## Comments to: Troy Engel <tengel@sonic.net> or
|
||||
@@ -16,20 +16,24 @@
|
||||
|
||||
# Edit the path below to point to the base of your Zlib sources.
|
||||
ifndef ZLIB_PATH
|
||||
ZLIB_PATH = ../../zlib-1.2.4
|
||||
ZLIB_PATH = ../../zlib-1.2.5
|
||||
endif
|
||||
# Edit the path below to point to the base of your OpenSSL package.
|
||||
ifndef OPENSSL_PATH
|
||||
OPENSSL_PATH = ../../openssl-0.9.8n
|
||||
OPENSSL_PATH = ../../openssl-0.9.8r
|
||||
endif
|
||||
# Edit the path below to point to the base of your LibSSH2 package.
|
||||
ifndef LIBSSH2_PATH
|
||||
LIBSSH2_PATH = ../../libssh2-1.2.4
|
||||
LIBSSH2_PATH = ../../libssh2-1.2.7
|
||||
endif
|
||||
# Edit the path below to point to the base of your libidn package.
|
||||
ifndef LIBIDN_PATH
|
||||
LIBIDN_PATH = ../../libidn-1.18
|
||||
endif
|
||||
# Edit the path below to point to the base of your librtmp package.
|
||||
ifndef LIBRTMP_PATH
|
||||
LIBRTMP_PATH = ../../librtmp-2.3
|
||||
endif
|
||||
# Edit the path below to point to the base of your Novell LDAP NDK.
|
||||
ifndef LDAP_SDK
|
||||
LDAP_SDK = c:/novell/ndk/cldapsdk/win32
|
||||
@@ -47,7 +51,7 @@ LDFLAGS = -s
|
||||
RANLIB = ranlib
|
||||
RC = windres
|
||||
RCFLAGS = --include-dir=../include -DDEBUGBUILD=0 -O COFF -i
|
||||
RM = del /q /f > NUL 2>&1
|
||||
RM = del /q /f 2>NUL
|
||||
STRIP = strip -g
|
||||
|
||||
########################################################
|
||||
@@ -61,6 +65,11 @@ ifdef ARES
|
||||
DLL_LIBS += -L$(LIBCARES_PATH) -lcares
|
||||
libcurl_dll_DEPENDENCIES = $(LIBCARES_PATH)/libcares.a
|
||||
endif
|
||||
ifdef RTMP
|
||||
INCLUDES += -I"$(LIBRTMP_PATH)"
|
||||
CFLAGS += -DUSE_LIBRTMP
|
||||
DLL_LIBS += -L"$(LIBRTMP_PATH)/librtmp" -lrtmp -lwinmm
|
||||
endif
|
||||
ifdef SSH2
|
||||
INCLUDES += -I"$(LIBSSH2_PATH)/include" -I"$(LIBSSH2_PATH)/win32"
|
||||
CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H
|
||||
@@ -148,7 +157,7 @@ $(libcurl_dll_LIBRARY): $(libcurl_a_OBJECTS) $(RESOURCE) $(libcurl_dll_DEPENDENC
|
||||
clean:
|
||||
-$(RM) $(libcurl_a_OBJECTS) $(RESOURCE)
|
||||
|
||||
distrib: clean
|
||||
distclean vclean: clean
|
||||
-$(RM) $(libcurl_a_LIBRARY) $(libcurl_dll_LIBRARY) $(libcurl_dll_a_LIBRARY)
|
||||
|
||||
FORCE: ;
|
||||
@@ -156,4 +165,3 @@ FORCE: ;
|
||||
$(LIBCARES_PATH)/libcares.a:
|
||||
$(MAKE) -C $(LIBCARES_PATH) -f Makefile.m32
|
||||
|
||||
|
||||
|
@@ -14,17 +14,22 @@ endif
|
||||
|
||||
# Edit the path below to point to the base of your Zlib sources.
|
||||
ifndef ZLIB_PATH
|
||||
ZLIB_PATH = ../../zlib-1.2.4
|
||||
ZLIB_PATH = ../../zlib-1.2.5
|
||||
endif
|
||||
|
||||
# Edit the path below to point to the base of your OpenSSL package.
|
||||
ifndef OPENSSL_PATH
|
||||
OPENSSL_PATH = ../../openssl-0.9.8n
|
||||
OPENSSL_PATH = ../../openssl-0.9.8r
|
||||
endif
|
||||
|
||||
# Edit the path below to point to the base of your LibSSH2 package.
|
||||
ifndef LIBSSH2_PATH
|
||||
LIBSSH2_PATH = ../../libssh2-1.2.4
|
||||
LIBSSH2_PATH = ../../libssh2-1.2.7
|
||||
endif
|
||||
|
||||
# Edit the path below to point to the base of your axTLS package.
|
||||
ifndef AXTLS_PATH
|
||||
AXTLS_PATH = ../../axTLS-1.2.7
|
||||
endif
|
||||
|
||||
# Edit the path below to point to the base of your libidn package.
|
||||
@@ -32,6 +37,11 @@ ifndef LIBIDN_PATH
|
||||
LIBIDN_PATH = ../../libidn-1.18
|
||||
endif
|
||||
|
||||
# Edit the path below to point to the base of your librtmp package.
|
||||
ifndef LIBRTMP_PATH
|
||||
LIBRTMP_PATH = ../../librtmp-2.3
|
||||
endif
|
||||
|
||||
# Edit the path below to point to the base of your c-ares package.
|
||||
ifndef LIBCARES_PATH
|
||||
LIBCARES_PATH = ../ares
|
||||
@@ -84,14 +94,13 @@ else
|
||||
CC = gcc
|
||||
endif
|
||||
PERL = perl
|
||||
# a native win32 awk can be downloaded from here:
|
||||
# Here you can find a native Win32 binary of the original awk:
|
||||
# http://www.gknw.net/development/prgtools/awk-20070501.zip
|
||||
AWK = awk
|
||||
YACC = bison -y
|
||||
CP = cp -afv
|
||||
MKDIR = mkdir
|
||||
# RM = rm -f
|
||||
# if you want to mark the target as MTSAFE you will need a tool for
|
||||
# If you want to mark the target as MTSAFE you will need a tool for
|
||||
# generating the xdc data for the linker; here's a minimal tool:
|
||||
# http://www.gknw.net/development/prgtools/mkxdc.zip
|
||||
MPKXDC = mkxdc
|
||||
@@ -117,13 +126,13 @@ CFLAGS += -relax_pointers
|
||||
#CFLAGS += -w on
|
||||
ifeq ($(LIBARCH),LIBC)
|
||||
ifeq ($(POSIXFL),1)
|
||||
PRELUDE = $(SDK_LIBC)/imports/posixpre.o
|
||||
PRELUDE = $(NDK_LIBC)/imports/posixpre.o
|
||||
else
|
||||
PRELUDE = $(SDK_LIBC)/imports/libcpre.o
|
||||
PRELUDE = $(NDK_LIBC)/imports/libcpre.o
|
||||
endif
|
||||
CFLAGS += -align 4
|
||||
else
|
||||
# PRELUDE = $(SDK_CLIB)/imports/clibpre.o
|
||||
# PRELUDE = $(NDK_CLIB)/imports/clibpre.o
|
||||
# to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
|
||||
PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
|
||||
# CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
|
||||
@@ -136,16 +145,20 @@ AR = ar
|
||||
ARFLAGS = -cq
|
||||
LIBEXT = a
|
||||
RANLIB = ranlib
|
||||
CFLAGS += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
|
||||
CFLAGS += -m32
|
||||
CFLAGS += -fno-builtin -fno-strict-aliasing
|
||||
ifeq ($(findstring gcc,$(CC)),gcc)
|
||||
CFLAGS += -fpcc-struct-return
|
||||
endif
|
||||
CFLAGS += -Wall # -pedantic
|
||||
ifeq ($(LIBARCH),LIBC)
|
||||
ifeq ($(POSIXFL),1)
|
||||
PRELUDE = $(SDK_LIBC)/imports/posixpre.gcc.o
|
||||
PRELUDE = $(NDK_LIBC)/imports/posixpre.gcc.o
|
||||
else
|
||||
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
|
||||
PRELUDE = $(NDK_LIBC)/imports/libcpre.gcc.o
|
||||
endif
|
||||
else
|
||||
PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
|
||||
PRELUDE = $(NDK_CLIB)/imports/clibpre.gcc.o
|
||||
# to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
|
||||
# http://www.gknw.net/development/mk_nlm/gcc_pre.zip
|
||||
# PRELUDE = $(NDK_ROOT)/pre/prelude.o
|
||||
@@ -154,9 +167,15 @@ endif
|
||||
endif
|
||||
|
||||
NDK_ROOT = $(NDKBASE)/ndk
|
||||
SDK_CLIB = $(NDK_ROOT)/nwsdk
|
||||
SDK_LIBC = $(NDK_ROOT)/libc
|
||||
SDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
|
||||
ifndef NDK_CLIB
|
||||
NDK_CLIB = $(NDK_ROOT)/nwsdk
|
||||
endif
|
||||
ifndef NDK_LIBC
|
||||
NDK_LIBC = $(NDK_ROOT)/libc
|
||||
endif
|
||||
ifndef NDK_LDAP
|
||||
NDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
|
||||
endif
|
||||
CURL_INC = ../include
|
||||
CURL_LIB = ../lib
|
||||
|
||||
@@ -175,12 +194,27 @@ else
|
||||
IMPORTS += @$(LIBSSH2_PATH)/nw/libssh2.imp
|
||||
endif
|
||||
endif
|
||||
ifdef WITH_RTMP
|
||||
INCLUDES += -I$(LIBRTMP_PATH)
|
||||
LDLIBS += $(LIBRTMP_PATH)/librtmp/librtmp.$(LIBEXT)
|
||||
endif
|
||||
ifdef WITH_SSL
|
||||
INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
|
||||
LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT)
|
||||
LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
|
||||
IMPORTS += GetProcessSwitchCount RunningProcess
|
||||
INSTDEP += ca-bundle.crt
|
||||
else
|
||||
ifdef WITH_AXTLS
|
||||
INCLUDES += -I$(AXTLS_PATH)/inc
|
||||
ifdef LINK_STATIC
|
||||
LDLIBS += $(AXTLS_PATH)/lib/libaxtls.$(LIBEXT)
|
||||
else
|
||||
MODULES += libaxtls.nlm
|
||||
IMPORTS += $(AXTLS_PATH)/lib/libaxtls.imp
|
||||
endif
|
||||
INSTDEP += ca-bundle.crt
|
||||
endif
|
||||
endif
|
||||
ifdef WITH_ZLIB
|
||||
INCLUDES += -I$(ZLIB_PATH)
|
||||
@@ -197,17 +231,17 @@ ifdef WITH_IDN
|
||||
endif
|
||||
|
||||
ifeq ($(LIBARCH),LIBC)
|
||||
INCLUDES += -I$(SDK_LIBC)/include
|
||||
# INCLUDES += -I$(SDK_LIBC)/include/nks
|
||||
# INCLUDES += -I$(SDK_LIBC)/include/winsock
|
||||
INCLUDES += -I$(NDK_LIBC)/include
|
||||
# INCLUDES += -I$(NDK_LIBC)/include/nks
|
||||
# INCLUDES += -I$(NDK_LIBC)/include/winsock
|
||||
CFLAGS += -D_POSIX_SOURCE
|
||||
else
|
||||
INCLUDES += -I$(SDK_CLIB)/include/nlm
|
||||
# INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
|
||||
# INCLUDES += -I$(SDK_CLIB)/include
|
||||
INCLUDES += -I$(NDK_CLIB)/include/nlm
|
||||
# INCLUDES += -I$(NDK_CLIB)/include/nlm/obsolete
|
||||
# INCLUDES += -I$(NDK_CLIB)/include
|
||||
endif
|
||||
ifndef DISABLE_LDAP
|
||||
INCLUDES += -I$(SDK_LDAP)/$(LIBARCH_L)/inc
|
||||
INCLUDES += -I$(NDK_LDAP)/$(LIBARCH_L)/inc
|
||||
endif
|
||||
CFLAGS += $(INCLUDES)
|
||||
|
||||
@@ -269,7 +303,7 @@ clean:
|
||||
-$(RM) curl_config.h
|
||||
-$(RM) -r $(OBJDIR)
|
||||
|
||||
distclean: clean
|
||||
distclean vclean: clean
|
||||
-$(RM) $(TARGET).$(LIBEXT) $(TARGET).nlm
|
||||
-$(RM) certdata.txt ca-bundle.crt
|
||||
|
||||
@@ -323,15 +357,15 @@ endif
|
||||
ifeq ($(LIBARCH),CLIB)
|
||||
@echo $(DL)start _Prelude$(DL) >> $@
|
||||
@echo $(DL)exit _Stop$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/clib.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/threads.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/socklib.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(NDK_CLIB)/imports/clib.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(NDK_CLIB)/imports/threads.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(NDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(NDK_CLIB)/imports/socklib.imp$(DL) >> $@
|
||||
@echo $(DL)module clib$(DL) >> $@
|
||||
ifndef DISABLE_LDAP
|
||||
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@
|
||||
# @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@
|
||||
# @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
|
||||
@echo $(DL)module ldapsdk ldapssl$(DL) >> $@
|
||||
endif
|
||||
else
|
||||
@@ -348,13 +382,13 @@ else
|
||||
@echo $(DL)exit _LibCPostlude$(DL) >> $@
|
||||
@echo $(DL)check _LibCCheckUnload$(DL) >> $@
|
||||
endif
|
||||
@echo $(DL)import @$(SDK_LIBC)/imports/libc.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LIBC)/imports/netware.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(NDK_LIBC)/imports/libc.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(NDK_LIBC)/imports/netware.imp$(DL) >> $@
|
||||
@echo $(DL)module libc$(DL) >> $@
|
||||
ifndef DISABLE_LDAP
|
||||
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@
|
||||
# @echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@
|
||||
# @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@
|
||||
@echo $(DL)module lldapsdk lldapssl$(DL) >> $@
|
||||
endif
|
||||
endif
|
||||
@@ -410,6 +444,7 @@ ifeq ($(LIBARCH),CLIB)
|
||||
@echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
|
||||
@echo $(DL)#define SIZEOF_SIZE_T 4$(DL) >> $@
|
||||
@echo $(DL)#define pressanykey PressAnyKeyToContinue$(DL) >> $@
|
||||
else
|
||||
@echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
|
||||
@@ -425,13 +460,6 @@ else
|
||||
@echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_FREEADDRINFO 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_GETADDRINFO 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_ARG2 void *$(DL) >> $@
|
||||
@echo $(DL)#define RECV_TYPE_ARG3 size_t$(DL) >> $@
|
||||
@@ -451,11 +479,20 @@ else
|
||||
@echo $(DL)#define SEND_TYPE_ARG3 size_t$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
|
||||
@echo $(DL)#define SEND_TYPE_RETV ssize_t$(DL) >> $@
|
||||
@echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
|
||||
@echo $(DL)#define SIZEOF_OFF_T 8$(DL) >> $@
|
||||
@echo $(DL)#define SIZEOF_SIZE_T 8$(DL) >> $@
|
||||
@echo $(DL)#define _LARGEFILE 1$(DL) >> $@
|
||||
ifdef ENABLE_IPV6
|
||||
@echo $(DL)#define ENABLE_IPV6 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_FREEADDRINFO 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_GETADDRINFO 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
|
||||
@echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
|
||||
endif
|
||||
endif
|
||||
@echo $(DL)#define USE_MANUAL 1$(DL) >> $@
|
||||
@@ -491,7 +528,6 @@ endif
|
||||
@echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_SYS_IOCTL_H 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
|
||||
@@ -547,6 +583,10 @@ ifdef WITH_SSL
|
||||
@echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
|
||||
@echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@
|
||||
else
|
||||
ifdef WITH_AXTLS
|
||||
@echo $(DL)#define USE_AXTLS 1$(DL) >> $@
|
||||
endif
|
||||
endif
|
||||
ifdef WITH_SSH2
|
||||
@echo $(DL)#define USE_LIBSSH2 1$(DL) >> $@
|
||||
@@ -555,6 +595,9 @@ endif
|
||||
ifdef WITH_IDN
|
||||
@echo $(DL)#define HAVE_LIBIDN 1$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_TLD_H 1$(DL) >> $@
|
||||
endif
|
||||
ifdef WITH_RTMP
|
||||
@echo $(DL)#define USE_LIBRTMP 1$(DL) >> $@
|
||||
endif
|
||||
@echo $(DL)#ifdef __GNUC__$(DL) >> $@
|
||||
@echo $(DL)#define HAVE_VARIADIC_MACROS_GCC 1$(DL) >> $@
|
||||
@@ -616,6 +659,9 @@ $(CURL_INC)/curl/curlbuild.h: Makefile.netware FORCE
|
||||
@echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
|
||||
@echo $(DL)** All your changes will be lost!!$(DL) >> $@
|
||||
@echo $(DL)*/$(DL) >> $@
|
||||
@echo $(DL)#ifndef NETWARE$(DL) >> $@
|
||||
@echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
|
||||
@echo $(DL)#endif$(DL) >> $@
|
||||
@echo $(DL)#ifndef __CURL_CURLBUILD_H$(DL) >> $@
|
||||
@echo $(DL)#define __CURL_CURLBUILD_H$(DL) >> $@
|
||||
ifeq ($(LIBARCH),LIBC)
|
||||
|
@@ -1,196 +0,0 @@
|
||||
# Makefile for project libcurl
|
||||
# Generated on Sun,13 Jan 2002.16:57:00 by EasyGCC (0.1.3 [beta 2] (3 Jan 2002))
|
||||
# Contact: easygcc@melotech.co.uk
|
||||
|
||||
# Project objects:
|
||||
objs = o.base64 o.connect o.cookie o.dict \
|
||||
o.dllinit o.easy o.escape o.file \
|
||||
o.formdata o.ftp o.getenv \
|
||||
o.getinfo o.getpass o.hostip \
|
||||
o.hostip4 o.hostsyn o.http \
|
||||
o.http_chunks o.inet_ntop o.inet_pton o.if2ip o.krb4 o.ldap \
|
||||
o.memdebug o.mprintf o.netrc o.parsedate o.progress \
|
||||
o.security o.select o.sendf o.speedcheck o.ssluse \
|
||||
o.strequal o.strtok o.telnet o.timeval \
|
||||
o.transfer o.url o.version o.strtoofft o.sslgen o.gtls \
|
||||
o.rawstr o.curl_addrinfo o.slist o.nonblock o.curl_rand \
|
||||
o.curl_memrchr o.imap o.pop3 o.smtp o.pingpong o.rtsp \
|
||||
o.curl_threads o.warnless
|
||||
|
||||
|
||||
# Compile options:
|
||||
linkopts = -o libcurl
|
||||
compileropts = -mpoke-function-name -IUtilLib: -mthrowback
|
||||
|
||||
# Project target:
|
||||
libcurl: $(objs)
|
||||
makealf $(linkopts) $(objs)
|
||||
|
||||
# Static dependancies:
|
||||
o.base64: c.base64
|
||||
gcc $(compileropts) -c -o base64.o c.base64
|
||||
|
||||
o.connect: c.connect
|
||||
gcc $(compileropts) -c -o connect.o c.connect
|
||||
|
||||
o.cookie: c.cookie
|
||||
gcc $(compileropts) -c -o cookie.o c.cookie
|
||||
|
||||
o.curl_addrinfo: c.curl_addrinfo
|
||||
gcc $(compileropts) -c -o curl_addrinfo.o c.curl_addrinfo
|
||||
|
||||
o.curl_memrchr: c.curl_memrchr
|
||||
gcc $(compileropts) -c -o curl_memrchr.o c.curl_memrchr
|
||||
|
||||
o.curl_rand: c.curl_rand
|
||||
gcc $(compileropts) -c -o curl_rand.o c.curl_rand
|
||||
|
||||
o.curl_threads: c.curl_threads
|
||||
gcc $(compileropts) -c -o curl_threads.o c.curl_threads
|
||||
|
||||
o.dict: c.dict
|
||||
gcc $(compileropts) -c -o dict.o c.dict
|
||||
|
||||
o.dllinit: c.dllinit
|
||||
gcc $(compileropts) -c -o dllinit.o c.dllinit
|
||||
|
||||
o.easy: c.easy
|
||||
gcc $(compileropts) -c -o easy.o c.easy
|
||||
|
||||
o.escape: c.escape
|
||||
gcc $(compileropts) -c -o escape.o c.escape
|
||||
|
||||
o.file: c.file
|
||||
gcc $(compileropts) -c -o file.o c.file
|
||||
|
||||
o.formdata: c.formdata
|
||||
gcc $(compileropts) -c -o formdata.o c.formdata
|
||||
|
||||
o.ftp: c.ftp
|
||||
gcc $(compileropts) -c -o ftp.o c.ftp
|
||||
|
||||
o.getenv: c.getenv
|
||||
gcc $(compileropts) -c -o getenv.o c.getenv
|
||||
|
||||
o.getinfo: c.getinfo
|
||||
gcc $(compileropts) -c -o getinfo.o c.getinfo
|
||||
|
||||
o.getpass: c.getpass
|
||||
gcc $(compileropts) -c -o getpass.o c.getpass
|
||||
|
||||
o.hostip: c.hostip
|
||||
gcc $(compileropts) -c -o hostip.o c.hostip
|
||||
|
||||
o.hostip4: c.hostip4
|
||||
gcc $(compileropts) -c -o hostip4.o c.hostip4
|
||||
|
||||
o.hostsyn: c.hostsyn
|
||||
gcc $(compileropts) -c -o hostsyn.o c.hostsyn
|
||||
|
||||
o.http: c.http
|
||||
gcc $(compileropts) -c -o http.o c.http
|
||||
|
||||
o.http_chunks: c.http_chunks
|
||||
gcc $(compileropts) -c -o http_chunks.o c.http_chunks
|
||||
|
||||
o.if2ip: c.if2ip
|
||||
gcc $(compileropts) -c -o if2ip.o c.if2ip
|
||||
|
||||
o.imap: c.imap
|
||||
gcc $(compileropts) -c -o imap.o c.imap
|
||||
|
||||
o.inet_ntop: c.inet_ntop
|
||||
gcc $(compileropts) -c -o inet_ntop.o c.inet_ntop
|
||||
|
||||
o.inet_pton: c.inet_pton
|
||||
gcc $(compileropts) -c -o inet_pton.o c.inet_pton
|
||||
|
||||
o.krb4: c.krb4
|
||||
gcc $(compileropts) -c -o krb4.o c.krb4
|
||||
|
||||
o.ldap: c.ldap
|
||||
gcc $(compileropts) -IOpenLDAP: -c -o ldap.o c.ldap
|
||||
|
||||
o.memdebug: c.memdebug
|
||||
gcc $(compileropts) -c -o memdebug.o c.memdebug
|
||||
|
||||
o.mprintf: c.mprintf
|
||||
gcc $(compileropts) -c -o mprintf.o c.mprintf
|
||||
|
||||
o.netrc: c.netrc
|
||||
gcc $(compileropts) -c -o netrc.o c.netrc
|
||||
|
||||
o.parsedate: c.parsedate
|
||||
gcc $(compileropts) -c -o parsedate.o c.parsedate
|
||||
|
||||
o.pingpong: c.pingpong
|
||||
gcc $(compileropts) -c -o pingpong.o c.pingpong
|
||||
|
||||
o.pop3: c.pop3
|
||||
gcc $(compileropts) -c -o pop3.o c.pop3
|
||||
|
||||
o.progress: c.progress
|
||||
gcc $(compileropts) -c -o progress.o c.progress
|
||||
|
||||
o.rtsp: c.rtsp
|
||||
gcc $(compileropts) -c -o rtsp.o c.rtsp
|
||||
|
||||
o.security: c.security
|
||||
gcc $(compileropts) -c -o security.o c.security
|
||||
|
||||
o.select: c.select
|
||||
gcc $(compileropts) -c -o select.o c.select
|
||||
|
||||
o.sendf: c.sendf
|
||||
gcc $(compileropts) -c -o sendf.o c.sendf
|
||||
|
||||
o.slist: c.slist
|
||||
gcc $(compileropts) -c -o slist.o c.slist
|
||||
|
||||
o.smtp: c.smtp
|
||||
gcc $(compileropts) -c -o smtp.o c.smtp
|
||||
|
||||
o.speedcheck: c.speedcheck
|
||||
gcc $(compileropts) -c -o speedcheck.o c.speedcheck
|
||||
|
||||
o.gtls: c.gtls
|
||||
gcc $(compileropts) -c -o gtls.o c.gtls
|
||||
|
||||
o.sslgen: c.sslgen
|
||||
gcc $(compileropts) -c -o sslgen.o c.sslgen
|
||||
|
||||
o.ssluse: c.ssluse
|
||||
gcc $(compileropts) -c -o ssluse.o c.ssluse
|
||||
|
||||
o.nonblock: c.nonblock
|
||||
gcc $(compileropts) -c -o nonblock.o c.nonblock
|
||||
|
||||
o.rawstr: c.rawstr
|
||||
gcc $(compileropts) -c -o rawstr.o c.rawstr
|
||||
|
||||
o.strequal: c.strequal
|
||||
gcc $(compileropts) -c -o strequal.o c.strequal
|
||||
|
||||
o.strtok: c.strtok
|
||||
gcc $(compileropts) -c -o strtok.o c.strtok
|
||||
|
||||
o.strtoofft: c.strtoofft
|
||||
gcc $(compileropts) -c -o strtoofft.o c.strtoofft
|
||||
|
||||
o.telnet: c.telnet
|
||||
gcc $(compileropts) -c -o telnet.o c.telnet
|
||||
|
||||
o.timeval: c.timeval
|
||||
gcc $(compileropts) -c -o timeval.o c.timeval
|
||||
|
||||
o.transfer: c.transfer
|
||||
gcc $(compileropts) -c -o transfer.o c.transfer
|
||||
|
||||
o.url: c.url
|
||||
gcc $(compileropts) -c -o url.o c.url
|
||||
|
||||
o.version: c.version
|
||||
gcc $(compileropts) -c -o version.o c.version
|
||||
|
||||
o.warnless: c.warnless
|
||||
gcc $(compileropts) -c -o warnless.o c.warnless
|
215
lib/Makefile.vc6
215
lib/Makefile.vc6
@@ -5,7 +5,7 @@
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1999 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
# Copyright (C) 1999 - 2010, 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
|
||||
@@ -18,7 +18,8 @@
|
||||
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
# KIND, either express or implied.
|
||||
#
|
||||
# $Id: Makefile.am,v 1.139 2008-11-03 08:50:58 bagder Exp $
|
||||
#***************************************************************************
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# Makefile for building libcurl with MSVC6
|
||||
@@ -42,24 +43,31 @@
|
||||
#
|
||||
##############################################################
|
||||
|
||||
#
|
||||
# Stem for static libs and DLLs
|
||||
#
|
||||
LIB_NAME = libcurl
|
||||
LIB_NAME_DEBUG = libcurld
|
||||
# ----------------------------------------------
|
||||
# Verify that current subdir is libcurl's 'lib'
|
||||
# ----------------------------------------------
|
||||
|
||||
!IF ! EXIST(.\curl_addrinfo.c)
|
||||
! MESSAGE Can not process this makefile from outside of libcurl's 'lib' subdirectory.
|
||||
! MESSAGE Change to libcurl's 'lib' subdirectory, and try again.
|
||||
! ERROR See previous message.
|
||||
!ENDIF
|
||||
|
||||
# ------------------------------------------------
|
||||
# Makefile.msvc.names provides libcurl file names
|
||||
# ------------------------------------------------
|
||||
|
||||
!INCLUDE ..\Makefile.msvc.names
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Stem for DLL import libs
|
||||
#
|
||||
IMPLIB_NAME = libcurl_imp
|
||||
IMPLIB_NAME_DEBUG = libcurld_imp
|
||||
|
||||
!IFNDEF OPENSSL_PATH
|
||||
OPENSSL_PATH = ../../openssl-0.9.8g
|
||||
OPENSSL_PATH = ../../openssl-0.9.8r
|
||||
!ENDIF
|
||||
|
||||
!IFNDEF ZLIB_PATH
|
||||
ZLIB_PATH = ../../zlib-1.2.3
|
||||
ZLIB_PATH = ../../zlib-1.2.5
|
||||
!ENDIF
|
||||
|
||||
!IFNDEF MACHINE
|
||||
@@ -82,7 +90,7 @@ MACHINE = X86
|
||||
|
||||
!IFDEF WINDOWS_SSPI
|
||||
!IFNDEF WINDOWS_SDK_PATH
|
||||
WINDOWS_SDK_PATH = "C:\Program Files\Microsoft SDK"
|
||||
WINDOWS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDK"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
@@ -101,7 +109,7 @@ LFLAGS = /nologo /machine:$(MACHINE)
|
||||
SSLLIBS = libeay32.lib ssleay32.lib
|
||||
ZLIBLIBSDLL= zdll.lib
|
||||
ZLIBLIBS = zlib.lib
|
||||
WINLIBS = wsock32.lib wldap32.lib
|
||||
WINLIBS = ws2_32.lib wldap32.lib
|
||||
CFLAGS = $(CFLAGS)
|
||||
|
||||
CFGSET = FALSE
|
||||
@@ -110,6 +118,10 @@ CFGSET = FALSE
|
||||
CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
|
||||
!ENDIF
|
||||
|
||||
!IFDEF USE_IPV6
|
||||
CFLAGS = $(CFLAGS) /DUSE_IPV6
|
||||
!ENDIF
|
||||
|
||||
##############################################################
|
||||
# Runtime library configuration
|
||||
|
||||
@@ -126,42 +138,18 @@ RTLIBD = /MTd
|
||||
# release
|
||||
|
||||
!IF "$(CFG)" == "release"
|
||||
TARGET = $(LIB_NAME).lib
|
||||
TARGET = $(LIBCURL_STA_LIB_REL)
|
||||
DIROBJ = $(CFG)
|
||||
LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
|
||||
CC = $(CCNODBG) $(RTLIB) $(CFLAGSLIB)
|
||||
CFGSET = TRUE
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# release-zlib
|
||||
|
||||
!IF "$(CFG)" == "release-zlib"
|
||||
TARGET = $(LIB_NAME).lib
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||
LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
|
||||
CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB)
|
||||
CFGSET = TRUE
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# release-dll
|
||||
|
||||
!IF "$(CFG)" == "release-dll"
|
||||
TARGET = $(LIB_NAME).dll
|
||||
DIROBJ = $(CFG)
|
||||
LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
|
||||
CC = $(CCNODBG) $(RTLIB)
|
||||
CFGSET = TRUE
|
||||
RESOURCE = $(DIROBJ)\libcurl.res
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# release-ssl
|
||||
|
||||
!IF "$(CFG)" == "release-ssl"
|
||||
TARGET = $(LIB_NAME).lib
|
||||
TARGET = $(LIBCURL_STA_LIB_REL)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
|
||||
LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
|
||||
@@ -170,14 +158,14 @@ CFGSET = TRUE
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# release-ssl-dll
|
||||
# release-zlib
|
||||
|
||||
!IF "$(CFG)" == "release-ssl-dll"
|
||||
TARGET = $(LIB_NAME).lib
|
||||
!IF "$(CFG)" == "release-zlib"
|
||||
TARGET = $(LIBCURL_STA_LIB_REL)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
|
||||
LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
|
||||
CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
|
||||
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||
LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
|
||||
CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB) $(CFLAGSLIB)
|
||||
CFGSET = TRUE
|
||||
!ENDIF
|
||||
|
||||
@@ -185,7 +173,7 @@ CFGSET = TRUE
|
||||
# release-ssl-zlib
|
||||
|
||||
!IF "$(CFG)" == "release-ssl-zlib"
|
||||
TARGET = $(LIB_NAME).lib
|
||||
TARGET = $(LIBCURL_STA_LIB_REL)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
|
||||
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||
@@ -195,23 +183,22 @@ CFGSET = TRUE
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# release-dll-ssl-dll
|
||||
# release-ssl-dll
|
||||
|
||||
!IF "$(CFG)" == "release-dll-ssl-dll"
|
||||
TARGET = $(LIB_NAME).dll
|
||||
!IF "$(CFG)" == "release-ssl-dll"
|
||||
TARGET = $(LIBCURL_STA_LIB_REL)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
|
||||
LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
|
||||
CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)
|
||||
LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
|
||||
CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSLIB)
|
||||
CFGSET = TRUE
|
||||
RESOURCE = $(DIROBJ)\libcurl.res
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# release-zlib-dll
|
||||
|
||||
!IF "$(CFG)" == "release-zlib-dll"
|
||||
TARGET = $(LIB_NAME).lib
|
||||
TARGET = $(LIBCURL_STA_LIB_REL)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||
LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
|
||||
@@ -223,7 +210,7 @@ CFGSET = TRUE
|
||||
# release-ssl-dll-zlib-dll
|
||||
|
||||
!IF "$(CFG)" == "release-ssl-dll-zlib-dll"
|
||||
TARGET = $(LIB_NAME).lib
|
||||
TARGET = $(LIBCURL_STA_LIB_REL)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
|
||||
@@ -232,14 +219,39 @@ CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
|
||||
CFGSET = TRUE
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# release-dll
|
||||
|
||||
!IF "$(CFG)" == "release-dll"
|
||||
TARGET = $(LIBCURL_DYN_LIB_REL)
|
||||
DIROBJ = $(CFG)
|
||||
LNK = $(LNKDLL) $(WINLIBS) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)
|
||||
CC = $(CCNODBG) $(RTLIB)
|
||||
CFGSET = TRUE
|
||||
RESOURCE = $(DIROBJ)\libcurl.res
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# release-dll-ssl-dll
|
||||
|
||||
!IF "$(CFG)" == "release-dll-ssl-dll"
|
||||
TARGET = $(LIBCURL_DYN_LIB_REL)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
|
||||
LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)
|
||||
CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL)
|
||||
CFGSET = TRUE
|
||||
RESOURCE = $(DIROBJ)\libcurl.res
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# release-dll-zlib-dll
|
||||
|
||||
!IF "$(CFG)" == "release-dll-zlib-dll"
|
||||
TARGET = $(LIB_NAME).dll
|
||||
TARGET = $(LIBCURL_DYN_LIB_REL)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||
LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
|
||||
LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)
|
||||
CC = $(CCNODBG) $(RTLIB) $(CFLAGSZLIB)
|
||||
CFGSET = TRUE
|
||||
RESOURCE = $(DIROBJ)\libcurl.res
|
||||
@@ -249,11 +261,11 @@ RESOURCE = $(DIROBJ)\libcurl.res
|
||||
# release-dll-ssl-dll-zlib-dll
|
||||
|
||||
!IF "$(CFG)" == "release-dll-ssl-dll-zlib-dll"
|
||||
TARGET = $(LIB_NAME).dll
|
||||
TARGET = $(LIBCURL_DYN_LIB_REL)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
|
||||
LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME).lib
|
||||
LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_REL)
|
||||
CC = $(CCNODBG) $(RTLIB) $(CFLAGSSSL) $(CFLAGSZLIB)
|
||||
CFGSET = TRUE
|
||||
RESOURCE = $(DIROBJ)\libcurl.res
|
||||
@@ -263,7 +275,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
|
||||
# debug
|
||||
|
||||
!IF "$(CFG)" == "debug"
|
||||
TARGET = $(LIB_NAME_DEBUG).lib
|
||||
TARGET = $(LIBCURL_STA_LIB_DBG)
|
||||
DIROBJ = $(CFG)
|
||||
LNK = $(LNKLIB) /out:$(DIROBJ)\$(TARGET)
|
||||
CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSLIB)
|
||||
@@ -274,7 +286,7 @@ CFGSET = TRUE
|
||||
# debug-ssl
|
||||
|
||||
!IF "$(CFG)" == "debug-ssl"
|
||||
TARGET = $(LIB_NAME_DEBUG).lib
|
||||
TARGET = $(LIBCURL_STA_LIB_DBG)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
|
||||
LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
|
||||
@@ -286,7 +298,7 @@ CFGSET = TRUE
|
||||
# debug-zlib
|
||||
|
||||
!IF "$(CFG)" == "debug-zlib"
|
||||
TARGET = $(LIB_NAME_DEBUG).lib
|
||||
TARGET = $(LIBCURL_STA_LIB_DBG)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||
LNK = $(LNKLIB) $(ZLIBLIBS) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
|
||||
@@ -294,23 +306,11 @@ CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB) $(CFLAGSLIB)
|
||||
CFGSET = TRUE
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# debug-ssl-dll
|
||||
|
||||
!IF "$(CFG)" == "debug-ssl-dll"
|
||||
TARGET = $(LIB_NAME_DEBUG).lib
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll
|
||||
LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
|
||||
CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)
|
||||
CFGSET = TRUE
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# debug-ssl-zlib
|
||||
|
||||
!IF "$(CFG)" == "debug-ssl-zlib"
|
||||
TARGET = $(LIB_NAME_DEBUG).lib
|
||||
TARGET = $(LIBCURL_STA_LIB_DBG)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32"
|
||||
@@ -319,11 +319,23 @@ CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB) $(CFLAGSLIB)
|
||||
CFGSET = TRUE
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# debug-ssl-dll
|
||||
|
||||
!IF "$(CFG)" == "debug-ssl-dll"
|
||||
TARGET = $(LIBCURL_STA_LIB_DBG)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)\out32dll
|
||||
LNK = $(LNKLIB) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /out:$(DIROBJ)\$(TARGET)
|
||||
CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSLIB)
|
||||
CFGSET = TRUE
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# debug-zlib-dll
|
||||
|
||||
!IF "$(CFG)" == "debug-zlib-dll"
|
||||
TARGET = $(LIB_NAME_DEBUG).lib
|
||||
TARGET = $(LIBCURL_STA_LIB_DBG)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||
LNK = $(LNKLIB) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /out:$(DIROBJ)\$(TARGET)
|
||||
@@ -335,7 +347,7 @@ CFGSET = TRUE
|
||||
# debug-ssl-dll-zlib-dll
|
||||
|
||||
!IF "$(CFG)" == "debug-ssl-dll-zlib-dll"
|
||||
TARGET = $(LIB_NAME_DEBUG).lib
|
||||
TARGET = $(LIBCURL_STA_LIB_DBG)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
|
||||
@@ -348,9 +360,9 @@ CFGSET = TRUE
|
||||
# debug-dll
|
||||
|
||||
!IF "$(CFG)" == "debug-dll"
|
||||
TARGET = $(LIB_NAME_DEBUG).dll
|
||||
TARGET = $(LIBCURL_DYN_LIB_DBG)
|
||||
DIROBJ = $(CFG)
|
||||
LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
|
||||
LNK = $(LNKDLL) $(WINLIBS) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)
|
||||
CC = $(CCDEBUG) $(RTLIBD)
|
||||
CFGSET = TRUE
|
||||
RESOURCE = $(DIROBJ)\libcurl.res
|
||||
@@ -360,10 +372,10 @@ RESOURCE = $(DIROBJ)\libcurl.res
|
||||
# debug-dll-ssl-dll
|
||||
|
||||
!IF "$(CFG)" == "debug-dll-ssl-dll"
|
||||
TARGET = $(LIB_NAME_DEBUG).dll
|
||||
TARGET = $(LIBCURL_DYN_LIB_DBG)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
|
||||
LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
|
||||
LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(LFLAGSSSL) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)
|
||||
CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL)
|
||||
CFGSET = TRUE
|
||||
RESOURCE = $(DIROBJ)\libcurl.res
|
||||
@@ -373,10 +385,10 @@ RESOURCE = $(DIROBJ)\libcurl.res
|
||||
# debug-dll-zlib-dll
|
||||
|
||||
!IF "$(CFG)" == "debug-dll-zlib-dll"
|
||||
TARGET = $(LIB_NAME_DEBUG).dll
|
||||
TARGET = $(LIBCURL_DYN_LIB_DBG)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||
LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
|
||||
LNK = $(LNKDLL) $(WINLIBS) $(ZLIBLIBSDLL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)
|
||||
CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSZLIB)
|
||||
CFGSET = TRUE
|
||||
RESOURCE = $(DIROBJ)\libcurl.res
|
||||
@@ -386,11 +398,11 @@ RESOURCE = $(DIROBJ)\libcurl.res
|
||||
# debug-dll-ssl-dll-zlib-dll
|
||||
|
||||
!IF "$(CFG)" == "debug-dll-ssl-dll-zlib-dll"
|
||||
TARGET = $(LIB_NAME_DEBUG).dll
|
||||
TARGET = $(LIBCURL_DYN_LIB_DBG)
|
||||
DIROBJ = $(CFG)
|
||||
LFLAGSZLIB = "/LIBPATH:$(ZLIB_PATH)"
|
||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)\out32dll"
|
||||
LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib /PDB:$(DIROBJ)\$(IMPLIB_NAME_DEBUG).pdb
|
||||
LNK = $(LNKDLL) $(WINLIBS) $(SSLLIBS) $(ZLIBLIBSDLL) $(LFLAGSSSL) $(LFLAGSZLIB) /DEBUG /out:$(DIROBJ)\$(TARGET) /IMPLIB:$(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) /PDB:$(DIROBJ)\$(LIBCURL_DYN_LIB_PDB)
|
||||
CC = $(CCDEBUG) $(RTLIBD) $(CFLAGSSSL) $(CFLAGSZLIB)
|
||||
CFGSET = TRUE
|
||||
RESOURCE = $(DIROBJ)\libcurl.res
|
||||
@@ -450,46 +462,56 @@ X_OBJS= \
|
||||
$(DIROBJ)\content_encoding.obj \
|
||||
$(DIROBJ)\cookie.obj \
|
||||
$(DIROBJ)\curl_addrinfo.obj \
|
||||
$(DIROBJ)\curl_fnmatch.obj \
|
||||
$(DIROBJ)\curl_gethostname.obj \
|
||||
$(DIROBJ)\curl_memrchr.obj \
|
||||
$(DIROBJ)\curl_rand.obj \
|
||||
$(DIROBJ)\curl_rtmp.obj \
|
||||
$(DIROBJ)\curl_sspi.obj \
|
||||
$(DIROBJ)\curl_threads.obj \
|
||||
$(DIROBJ)\dict.obj \
|
||||
$(DIROBJ)\easy.obj \
|
||||
$(DIROBJ)\escape.obj \
|
||||
$(DIROBJ)\fileinfo.obj \
|
||||
$(DIROBJ)\file.obj \
|
||||
$(DIROBJ)\formdata.obj \
|
||||
$(DIROBJ)\ftplistparser.obj \
|
||||
$(DIROBJ)\ftp.obj \
|
||||
$(DIROBJ)\getenv.obj \
|
||||
$(DIROBJ)\getinfo.obj \
|
||||
$(DIROBJ)\gtls.obj \
|
||||
$(DIROBJ)\gopher.obj \
|
||||
$(DIROBJ)\hash.obj \
|
||||
$(DIROBJ)\hmac.obj \
|
||||
$(DIROBJ)\hostares.obj \
|
||||
$(DIROBJ)\hostasyn.obj \
|
||||
$(DIROBJ)\hostip.obj \
|
||||
$(DIROBJ)\hostip4.obj \
|
||||
$(DIROBJ)\hostip6.obj \
|
||||
$(DIROBJ)\hostip.obj \
|
||||
$(DIROBJ)\hostsyn.obj \
|
||||
$(DIROBJ)\hostthre.obj \
|
||||
$(DIROBJ)\http.obj \
|
||||
$(DIROBJ)\http_chunks.obj \
|
||||
$(DIROBJ)\http_digest.obj \
|
||||
$(DIROBJ)\http_negotiate.obj \
|
||||
$(DIROBJ)\http_ntlm.obj \
|
||||
$(DIROBJ)\http.obj \
|
||||
$(DIROBJ)\if2ip.obj \
|
||||
$(DIROBJ)\imap.obj \
|
||||
$(DIROBJ)\inet_ntop.obj \
|
||||
$(DIROBJ)\inet_pton.obj \
|
||||
$(DIROBJ)\ldap.obj \
|
||||
$(DIROBJ)\llist.obj \
|
||||
$(DIROBJ)\md4.obj \
|
||||
$(DIROBJ)\md5.obj \
|
||||
$(DIROBJ)\memdebug.obj \
|
||||
$(DIROBJ)\mprintf.obj \
|
||||
$(DIROBJ)\multi.obj \
|
||||
$(DIROBJ)\netrc.obj \
|
||||
$(DIROBJ)\nonblock.obj \
|
||||
$(DIROBJ)\openldap.obj \
|
||||
$(DIROBJ)\parsedate.obj \
|
||||
$(DIROBJ)\pingpong.obj \
|
||||
$(DIROBJ)\polarssl.obj \
|
||||
$(DIROBJ)\pop3.obj \
|
||||
$(DIROBJ)\progress.obj \
|
||||
$(DIROBJ)\rawstr.obj \
|
||||
@@ -499,8 +521,8 @@ X_OBJS= \
|
||||
$(DIROBJ)\share.obj \
|
||||
$(DIROBJ)\slist.obj \
|
||||
$(DIROBJ)\smtp.obj \
|
||||
$(DIROBJ)\socks.obj \
|
||||
$(DIROBJ)\socks_gssapi.obj \
|
||||
$(DIROBJ)\socks.obj \
|
||||
$(DIROBJ)\socks_sspi.obj \
|
||||
$(DIROBJ)\speedcheck.obj \
|
||||
$(DIROBJ)\splay.obj \
|
||||
@@ -518,18 +540,19 @@ X_OBJS= \
|
||||
$(DIROBJ)\url.obj \
|
||||
$(DIROBJ)\version.obj \
|
||||
$(DIROBJ)\warnless.obj \
|
||||
$(DIROBJ)\wildcard.obj \
|
||||
$(RESOURCE)
|
||||
|
||||
all : $(TARGET)
|
||||
|
||||
$(TARGET): $(X_OBJS)
|
||||
$(LNK) $(LFLAGS) $(X_OBJS)
|
||||
-xcopy $(DIROBJ)\$(LIB_NAME).dll . /y
|
||||
-xcopy $(DIROBJ)\$(LIB_NAME).lib . /y
|
||||
-xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).dll . /y
|
||||
-xcopy $(DIROBJ)\$(LIB_NAME_DEBUG).lib . /y
|
||||
-xcopy $(DIROBJ)\$(IMPLIB_NAME).lib . /y
|
||||
-xcopy $(DIROBJ)\$(IMPLIB_NAME_DEBUG).lib . /y
|
||||
-xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_REL) . /y
|
||||
-xcopy $(DIROBJ)\$(LIBCURL_STA_LIB_DBG) . /y
|
||||
-xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_REL) . /y
|
||||
-xcopy $(DIROBJ)\$(LIBCURL_DYN_LIB_DBG) . /y
|
||||
-xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_REL) . /y
|
||||
-xcopy $(DIROBJ)\$(LIBCURL_IMP_LIB_DBG) . /y
|
||||
-xcopy $(DIROBJ)\*.exp . /y
|
||||
-xcopy $(DIROBJ)\*.pdb . /y
|
||||
|
||||
|
@@ -11,7 +11,7 @@ c-ares:
|
||||
http://c-ares.haxx.se/
|
||||
|
||||
NOTE
|
||||
The latest libcurl version requires c-ares 1.4.0 or later.
|
||||
The latest libcurl version requires c-ares 1.6.0 or later.
|
||||
|
||||
Once upon the time libcurl built fine with the "original" ares. That is no
|
||||
longer true. You need to use c-ares.
|
||||
|
500
lib/axtls.c
Normal file
500
lib/axtls.c
Normal file
@@ -0,0 +1,500 @@
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2010, DirecTV
|
||||
* contact: Eric Hu <ehu@directv.com>
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
* Source file for all axTLS-specific code for the TLS/SSL layer. No code
|
||||
* but sslgen.c should ever call or use these functions.
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
#ifdef USE_AXTLS
|
||||
#include <axTLS/ssl.h>
|
||||
#include "axtls.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#include "sendf.h"
|
||||
#include "inet_pton.h"
|
||||
#include "sslgen.h"
|
||||
#include "parsedate.h"
|
||||
#include "connect.h" /* for the connect timeout */
|
||||
#include "select.h"
|
||||
#define _MPRINTF_REPLACE /* use our functions only */
|
||||
#include <curl/mprintf.h>
|
||||
#include "curl_memory.h"
|
||||
/* The last #include file should be: */
|
||||
#include "memdebug.h"
|
||||
|
||||
/* SSL_read is opied from axTLS compat layer */
|
||||
static int SSL_read(SSL *ssl, void *buf, int num)
|
||||
{
|
||||
uint8_t *read_buf;
|
||||
int ret;
|
||||
|
||||
while((ret = ssl_read(ssl, &read_buf)) == SSL_OK);
|
||||
|
||||
if(ret > SSL_OK){
|
||||
memcpy(buf, read_buf, ret > num ? num : ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Global axTLS init, called from Curl_ssl_init() */
|
||||
int Curl_axtls_init(void)
|
||||
{
|
||||
/* axTLS has no global init. Everything is done through SSL and SSL_CTX
|
||||
* structs stored in connectdata structure. Perhaps can move to axtls.h.
|
||||
*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
int Curl_axtls_cleanup(void)
|
||||
{
|
||||
/* axTLS has no global cleanup. Perhaps can move this to axtls.h. */
|
||||
return 1;
|
||||
}
|
||||
|
||||
static CURLcode map_error_to_curl(int axtls_err)
|
||||
{
|
||||
switch (axtls_err)
|
||||
{
|
||||
case SSL_ERROR_NOT_SUPPORTED:
|
||||
case SSL_ERROR_INVALID_VERSION:
|
||||
case -70: /* protocol version alert from server */
|
||||
return CURLE_UNSUPPORTED_PROTOCOL;
|
||||
break;
|
||||
case SSL_ERROR_NO_CIPHER:
|
||||
return CURLE_SSL_CIPHER;
|
||||
break;
|
||||
case SSL_ERROR_BAD_CERTIFICATE: /* this may be bad server cert too */
|
||||
case SSL_ERROR_NO_CERT_DEFINED:
|
||||
case -42: /* bad certificate alert from server */
|
||||
case -43: /* unsupported cert alert from server */
|
||||
case -44: /* cert revoked alert from server */
|
||||
case -45: /* cert expired alert from server */
|
||||
case -46: /* cert unknown alert from server */
|
||||
return CURLE_SSL_CERTPROBLEM;
|
||||
break;
|
||||
case SSL_X509_ERROR(X509_NOT_OK):
|
||||
case SSL_X509_ERROR(X509_VFY_ERROR_NO_TRUSTED_CERT):
|
||||
case SSL_X509_ERROR(X509_VFY_ERROR_BAD_SIGNATURE):
|
||||
case SSL_X509_ERROR(X509_VFY_ERROR_NOT_YET_VALID):
|
||||
case SSL_X509_ERROR(X509_VFY_ERROR_EXPIRED):
|
||||
case SSL_X509_ERROR(X509_VFY_ERROR_SELF_SIGNED):
|
||||
case SSL_X509_ERROR(X509_VFY_ERROR_INVALID_CHAIN):
|
||||
case SSL_X509_ERROR(X509_VFY_ERROR_UNSUPPORTED_DIGEST):
|
||||
case SSL_X509_ERROR(X509_INVALID_PRIV_KEY):
|
||||
return CURLE_PEER_FAILED_VERIFICATION;
|
||||
break;
|
||||
case -48: /* unknown ca alert from server */
|
||||
return CURLE_SSL_CACERT;
|
||||
break;
|
||||
case -49: /* access denied alert from server */
|
||||
return CURLE_REMOTE_ACCESS_DENIED;
|
||||
break;
|
||||
case SSL_ERROR_CONN_LOST:
|
||||
case SSL_ERROR_SOCK_SETUP_FAILURE:
|
||||
case SSL_ERROR_INVALID_HANDSHAKE:
|
||||
case SSL_ERROR_INVALID_PROT_MSG:
|
||||
case SSL_ERROR_INVALID_HMAC:
|
||||
case SSL_ERROR_INVALID_SESSION:
|
||||
case SSL_ERROR_INVALID_KEY: /* it's too bad this doesn't map better */
|
||||
case SSL_ERROR_FINISHED_INVALID:
|
||||
case SSL_ERROR_NO_CLIENT_RENOG:
|
||||
default:
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static Curl_recv axtls_recv;
|
||||
static Curl_send axtls_send;
|
||||
|
||||
/*
|
||||
* This function is called after the TCP connect has completed. Setup the TLS
|
||||
* layer and do all necessary magic.
|
||||
*/
|
||||
CURLcode
|
||||
Curl_axtls_connect(struct connectdata *conn,
|
||||
int sockindex)
|
||||
|
||||
{
|
||||
struct SessionHandle *data = conn->data;
|
||||
SSL_CTX *ssl_ctx;
|
||||
SSL *ssl;
|
||||
int cert_types[] = {SSL_OBJ_X509_CERT, SSL_OBJ_PKCS12, 0};
|
||||
int key_types[] = {SSL_OBJ_RSA_KEY, SSL_OBJ_PKCS8, SSL_OBJ_PKCS12, 0};
|
||||
int i, ssl_fcn_return;
|
||||
const uint8_t *ssl_sessionid;
|
||||
size_t ssl_idsize;
|
||||
const char *x509;
|
||||
|
||||
/* Assuming users will not compile in custom key/cert to axTLS */
|
||||
uint32_t client_option = SSL_NO_DEFAULT_KEY|SSL_SERVER_VERIFY_LATER;
|
||||
|
||||
if(conn->ssl[sockindex].state == ssl_connection_complete)
|
||||
/* to make us tolerant against being called more than once for the
|
||||
same connection */
|
||||
return CURLE_OK;
|
||||
|
||||
/* axTLS only supports TLSv1 */
|
||||
/* check to see if we've been told to use an explicit SSL/TLS version */
|
||||
switch(data->set.ssl.version) {
|
||||
case CURL_SSLVERSION_DEFAULT:
|
||||
case CURL_SSLVERSION_TLSv1:
|
||||
break;
|
||||
default:
|
||||
failf(data, "axTLS only supports TLSv1");
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
|
||||
#ifdef AXTLSDEBUG
|
||||
client_option |= SSL_DISPLAY_STATES | SSL_DISPLAY_RSA | SSL_DISPLAY_CERTS;
|
||||
#endif /* AXTLSDEBUG */
|
||||
|
||||
/* Allocate an SSL_CTX struct */
|
||||
ssl_ctx = ssl_ctx_new(client_option, SSL_DEFAULT_CLNT_SESS);
|
||||
if(ssl_ctx == NULL) {
|
||||
failf(data, "unable to create client SSL context");
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
|
||||
/* Load the trusted CA cert bundle file */
|
||||
if(data->set.ssl.CAfile) {
|
||||
if(ssl_obj_load(ssl_ctx, SSL_OBJ_X509_CACERT, data->set.ssl.CAfile, NULL)
|
||||
!= SSL_OK){
|
||||
infof(data, "error reading ca cert file %s \n",
|
||||
data->set.ssl.CAfile);
|
||||
if(data->set.ssl.verifypeer){
|
||||
Curl_axtls_close(conn, sockindex);
|
||||
return CURLE_SSL_CACERT_BADFILE;
|
||||
}
|
||||
}
|
||||
else
|
||||
infof(data, "found certificates in %s\n", data->set.ssl.CAfile);
|
||||
}
|
||||
|
||||
/* gtls.c tasks we're skipping for now:
|
||||
* 1) certificate revocation list checking
|
||||
* 2) dns name assignment to host
|
||||
* 3) set protocol priority. axTLS is TLSv1 only, so can probably ignore
|
||||
* 4) set certificate priority. axTLS ignores type and sends certs in
|
||||
* order added. can probably ignore this.
|
||||
*/
|
||||
|
||||
/* Load client certificate */
|
||||
if(data->set.str[STRING_CERT]){
|
||||
i=0;
|
||||
/* Instead of trying to analyze cert type here, let axTLS try them all. */
|
||||
while(cert_types[i] != 0){
|
||||
ssl_fcn_return = ssl_obj_load(ssl_ctx, cert_types[i],
|
||||
data->set.str[STRING_CERT], NULL);
|
||||
if(ssl_fcn_return == SSL_OK){
|
||||
infof(data, "successfully read cert file %s \n",
|
||||
data->set.str[STRING_CERT]);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
/* Tried all cert types, none worked. */
|
||||
if(cert_types[i] == 0){
|
||||
failf(data, "%s is not x509 or pkcs12 format",
|
||||
data->set.str[STRING_CERT]);
|
||||
Curl_axtls_close(conn, sockindex);
|
||||
return CURLE_SSL_CERTPROBLEM;
|
||||
}
|
||||
}
|
||||
|
||||
/* Load client key.
|
||||
If a pkcs12 file successfully loaded a cert, then there's nothing to do
|
||||
because the key has already been loaded. */
|
||||
if(data->set.str[STRING_KEY] && cert_types[i] != SSL_OBJ_PKCS12){
|
||||
i=0;
|
||||
/* Instead of trying to analyze key type here, let axTLS try them all. */
|
||||
while(key_types[i] != 0){
|
||||
ssl_fcn_return = ssl_obj_load(ssl_ctx, key_types[i],
|
||||
data->set.str[STRING_KEY], NULL);
|
||||
if(ssl_fcn_return == SSL_OK){
|
||||
infof(data, "successfully read key file %s \n",
|
||||
data->set.str[STRING_KEY]);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
/* Tried all key types, none worked. */
|
||||
if(key_types[i] == 0){
|
||||
failf(data, "Failure: %s is not a supported key file",
|
||||
data->set.str[STRING_KEY]);
|
||||
Curl_axtls_close(conn, sockindex);
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
/* gtls.c does more here that is being left out for now
|
||||
* 1) set session credentials. can probably ignore since axtls puts this
|
||||
* info in the ssl_ctx struct
|
||||
* 2) setting up callbacks. these seem gnutls specific
|
||||
*/
|
||||
|
||||
/* In axTLS, handshaking happens inside ssl_client_new. */
|
||||
if(!Curl_ssl_getsessionid(conn, (void **) &ssl_sessionid, &ssl_idsize)) {
|
||||
/* we got a session id, use it! */
|
||||
infof (data, "SSL re-using session ID\n");
|
||||
ssl = ssl_client_new(ssl_ctx, conn->sock[sockindex],
|
||||
ssl_sessionid, (uint8_t)ssl_idsize);
|
||||
}
|
||||
else
|
||||
ssl = ssl_client_new(ssl_ctx, conn->sock[sockindex], NULL, 0);
|
||||
|
||||
/* Check to make sure handshake was ok. */
|
||||
ssl_fcn_return = ssl_handshake_status(ssl);
|
||||
if(ssl_fcn_return != SSL_OK){
|
||||
Curl_axtls_close(conn, sockindex);
|
||||
ssl_display_error(ssl_fcn_return); /* goes to stdout. */
|
||||
return map_error_to_curl(ssl_fcn_return);
|
||||
}
|
||||
infof (data, "handshake completed successfully\n");
|
||||
|
||||
/* Here, gtls.c gets the peer certificates and fails out depending on
|
||||
* settings in "data." axTLS api doesn't have get cert chain fcn, so omit?
|
||||
*/
|
||||
|
||||
/* Verify server's certificate */
|
||||
if(data->set.ssl.verifypeer){
|
||||
if(ssl_verify_cert(ssl) != SSL_OK){
|
||||
Curl_axtls_close(conn, sockindex);
|
||||
failf(data, "server cert verify failed");
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
infof(data, "\t server certificate verification SKIPPED\n");
|
||||
|
||||
/* Here, gtls.c does issuer verfication. axTLS has no straightforward
|
||||
* equivalent, so omitting for now.*/
|
||||
|
||||
/* See if common name was set in server certificate */
|
||||
x509 = ssl_get_cert_dn(ssl, SSL_X509_CERT_COMMON_NAME);
|
||||
if(x509 == NULL)
|
||||
infof(data, "error fetching CN from cert\n");
|
||||
|
||||
/* Here, gtls.c does the following
|
||||
* 1) x509 hostname checking per RFC2818. axTLS doesn't support this, but
|
||||
* it seems useful. Omitting for now.
|
||||
* 2) checks cert validity based on time. axTLS does this in ssl_verify_cert
|
||||
* 3) displays a bunch of cert information. axTLS doesn't support most of
|
||||
* this, but a couple fields are available.
|
||||
*/
|
||||
|
||||
/* General housekeeping */
|
||||
conn->ssl[sockindex].state = ssl_connection_complete;
|
||||
conn->ssl[sockindex].ssl = ssl;
|
||||
conn->ssl[sockindex].ssl_ctx = ssl_ctx;
|
||||
conn->recv[sockindex] = axtls_recv;
|
||||
conn->send[sockindex] = axtls_send;
|
||||
|
||||
/* Put our freshly minted SSL session in cache */
|
||||
ssl_idsize = ssl_get_session_id_size(ssl);
|
||||
ssl_sessionid = ssl_get_session_id(ssl);
|
||||
if(Curl_ssl_addsessionid(conn, (void *) ssl_sessionid, ssl_idsize)
|
||||
!= CURLE_OK)
|
||||
infof (data, "failed to add session to cache\n");
|
||||
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
|
||||
/* return number of sent (non-SSL) bytes */
|
||||
static ssize_t axtls_send(struct connectdata *conn,
|
||||
int sockindex,
|
||||
const void *mem,
|
||||
size_t len,
|
||||
CURLcode *err)
|
||||
{
|
||||
/* ssl_write() returns 'int' while write() and send() returns 'size_t' */
|
||||
int rc = ssl_write(conn->ssl[sockindex].ssl, mem, (int)len);
|
||||
|
||||
infof(conn->data, " axtls_send\n");
|
||||
|
||||
if(rc < 0 ) {
|
||||
*err = map_error_to_curl(rc);
|
||||
rc = -1; /* generic error code for send failure */
|
||||
}
|
||||
|
||||
*err = CURLE_OK;
|
||||
return rc;
|
||||
}
|
||||
|
||||
void Curl_axtls_close_all(struct SessionHandle *data)
|
||||
{
|
||||
(void)data;
|
||||
infof(data, " Curl_axtls_close_all\n");
|
||||
}
|
||||
|
||||
void Curl_axtls_close(struct connectdata *conn, int sockindex)
|
||||
{
|
||||
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
|
||||
|
||||
infof(conn->data, " Curl_axtls_close\n");
|
||||
if(connssl->ssl) {
|
||||
/* line from ssluse.c: (void)SSL_shutdown(connssl->ssl);
|
||||
axTLS compat layer does nothing for SSL_shutdown */
|
||||
|
||||
/* The following line is from ssluse.c. There seems to be no axTLS
|
||||
equivalent. ssl_free and ssl_ctx_free close things.
|
||||
SSL_set_connect_state(connssl->handle); */
|
||||
|
||||
ssl_free (connssl->ssl);
|
||||
connssl->ssl = NULL;
|
||||
}
|
||||
if(connssl->ssl_ctx) {
|
||||
ssl_ctx_free (connssl->ssl_ctx);
|
||||
connssl->ssl_ctx = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is called to shut down the SSL layer but keep the
|
||||
* socket open (CCC - Clear Command Channel)
|
||||
*/
|
||||
int Curl_axtls_shutdown(struct connectdata *conn, int sockindex)
|
||||
{
|
||||
/* Outline taken from ssluse.c since functions are in axTLS compat layer.
|
||||
axTLS's error set is much smaller, so a lot of error-handling was removed.
|
||||
*/
|
||||
int retval = 0;
|
||||
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
|
||||
struct SessionHandle *data = conn->data;
|
||||
char buf[120]; /* We will use this for the OpenSSL error buffer, so it has
|
||||
to be at least 120 bytes long. */
|
||||
ssize_t nread;
|
||||
|
||||
infof(conn->data, " Curl_axtls_shutdown\n");
|
||||
|
||||
/* This has only been tested on the proftpd server, and the mod_tls code
|
||||
sends a close notify alert without waiting for a close notify alert in
|
||||
response. Thus we wait for a close notify alert from the server, but
|
||||
we do not send one. Let's hope other servers do the same... */
|
||||
|
||||
/* axTLS compat layer does nothing for SSL_shutdown, so we do nothing too
|
||||
if(data->set.ftp_ccc == CURLFTPSSL_CCC_ACTIVE)
|
||||
(void)SSL_shutdown(connssl->ssl);
|
||||
*/
|
||||
|
||||
if(connssl->ssl) {
|
||||
int what = Curl_socket_ready(conn->sock[sockindex],
|
||||
CURL_SOCKET_BAD, SSL_SHUTDOWN_TIMEOUT);
|
||||
if(what > 0) {
|
||||
/* Something to read, let's do it and hope that it is the close
|
||||
notify alert from the server */
|
||||
nread = (ssize_t)SSL_read(conn->ssl[sockindex].ssl, buf,
|
||||
sizeof(buf));
|
||||
|
||||
if (nread < SSL_OK){
|
||||
failf(data, "close notify alert not received during shutdown");
|
||||
retval = -1;
|
||||
}
|
||||
}
|
||||
else if(0 == what) {
|
||||
/* timeout */
|
||||
failf(data, "SSL shutdown timeout");
|
||||
}
|
||||
else {
|
||||
/* anything that gets here is fatally bad */
|
||||
failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
|
||||
retval = -1;
|
||||
}
|
||||
|
||||
ssl_free (connssl->ssl);
|
||||
connssl->ssl = NULL;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
static ssize_t axtls_recv(struct connectdata *conn, /* connection data */
|
||||
int num, /* socketindex */
|
||||
char *buf, /* store read data here */
|
||||
size_t buffersize, /* max amount to read */
|
||||
CURLcode *err)
|
||||
{
|
||||
struct ssl_connect_data *connssl = &conn->ssl[num];
|
||||
ssize_t ret = 0;
|
||||
|
||||
infof(conn->data, " axtls_recv\n");
|
||||
|
||||
if(connssl){
|
||||
ret = (ssize_t)SSL_read(conn->ssl[num].ssl, buf, (int)buffersize);
|
||||
|
||||
/* axTLS isn't terribly generous about error reporting */
|
||||
/* With patched axTLS, SSL_CLOSE_NOTIFY=-3. Hard-coding until axTLS
|
||||
team approves proposed fix. */
|
||||
if(ret == -3 ){
|
||||
Curl_axtls_close(conn, num);
|
||||
}
|
||||
else if(ret < 0) {
|
||||
failf(conn->data, "axTLS recv error (%d)", (int)ret);
|
||||
*err = map_error_to_curl(ret);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
*err = CURLE_OK;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return codes:
|
||||
* 1 means the connection is still in place
|
||||
* 0 means the connection has been closed
|
||||
* -1 means the connection status is unknown
|
||||
*/
|
||||
int Curl_axtls_check_cxn(struct connectdata *conn)
|
||||
{
|
||||
/* ssluse.c line: rc = SSL_peek(conn->ssl[FIRSTSOCKET].ssl, (void*)&buf, 1);
|
||||
axTLS compat layer always returns the last argument, so connection is
|
||||
always alive? */
|
||||
|
||||
infof(conn->data, " Curl_axtls_check_cxn\n");
|
||||
return 1; /* connection still in place */
|
||||
}
|
||||
|
||||
void Curl_axtls_session_free(void *ptr)
|
||||
{
|
||||
(void)ptr;
|
||||
/* free the ID */
|
||||
/* both ssluse.c and gtls.c do something here, but axTLS's OpenSSL
|
||||
compatibility layer does nothing, so we do nothing too. */
|
||||
}
|
||||
|
||||
size_t Curl_axtls_version(char *buffer, size_t size)
|
||||
{
|
||||
return snprintf(buffer, size, "axTLS/%s", ssl_version());
|
||||
}
|
||||
|
||||
#endif /* USE_AXTLS */
|
62
lib/axtls.h
Normal file
62
lib/axtls.h
Normal file
@@ -0,0 +1,62 @@
|
||||
#ifndef __AXTLS_H
|
||||
#define __AXTLS_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2010, DirecTV
|
||||
* contact: Eric Hu <ehu@directv.com>
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef USE_AXTLS
|
||||
#include "curl/curl.h"
|
||||
#include "urldata.h"
|
||||
|
||||
int Curl_axtls_init(void);
|
||||
int Curl_axtls_cleanup(void);
|
||||
CURLcode Curl_axtls_connect(struct connectdata *conn, int sockindex);
|
||||
|
||||
/* tell axTLS to close down all open information regarding connections (and
|
||||
thus session ID caching etc) */
|
||||
void Curl_axtls_close_all(struct SessionHandle *data);
|
||||
|
||||
/* close a SSL connection */
|
||||
void Curl_axtls_close(struct connectdata *conn, int sockindex);
|
||||
|
||||
void Curl_axtls_session_free(void *ptr);
|
||||
size_t Curl_axtls_version(char *buffer, size_t size);
|
||||
int Curl_axtls_shutdown(struct connectdata *conn, int sockindex);
|
||||
int Curl_axtls_check_cxn(struct connectdata *conn);
|
||||
|
||||
/* API setup for axTLS */
|
||||
#define curlssl_init Curl_axtls_init
|
||||
#define curlssl_cleanup Curl_axtls_cleanup
|
||||
#define curlssl_connect Curl_axtls_connect
|
||||
#define curlssl_session_free(x) Curl_axtls_session_free(x)
|
||||
#define curlssl_close_all Curl_axtls_close_all
|
||||
#define curlssl_close Curl_axtls_close
|
||||
#define curlssl_shutdown(x,y) Curl_axtls_shutdown(x,y)
|
||||
#define curlssl_set_engine(x,y) (x=x, y=y, CURLE_FAILED_INIT)
|
||||
#define curlssl_set_engine_default(x) (x=x, CURLE_FAILED_INIT)
|
||||
#define curlssl_engines_list(x) (x=x, (struct curl_slist *)NULL)
|
||||
#define curlssl_version Curl_axtls_version
|
||||
#define curlssl_check_cxn(x) Curl_axtls_check_cxn(x)
|
||||
#define curlssl_data_pending(x,y) (x=x, y=y, 0)
|
||||
|
||||
#endif /* USE_AXTLS */
|
||||
#endif
|
@@ -86,6 +86,7 @@
|
||||
|
||||
#define SIZEOF_INT 4
|
||||
#define SIZEOF_SHORT 2
|
||||
#define SIZEOF_SIZE_T 4
|
||||
|
||||
#define USE_OPENSSL 1
|
||||
#define USE_SSLEAY 1
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
/* ================================================================ */
|
||||
/* lib/config.dos - Hand crafted config file for DOS */
|
||||
/* lib/config-dos.h - Hand crafted config file for DOS */
|
||||
/* ================================================================ */
|
||||
|
||||
#if defined(DJGPP)
|
||||
@@ -67,6 +67,7 @@
|
||||
#define SIZEOF_INT 4
|
||||
#define SIZEOF_LONG_DOUBLE 16
|
||||
#define SIZEOF_SHORT 2
|
||||
#define SIZEOF_SIZE_T 4
|
||||
#define STDC_HEADERS 1
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user