Compare commits
	
		
			949 Commits
		
	
	
		
			curl-7_18_
			...
			curl-7_19_
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | a6ba9e5ccd | ||
|   | c4cdab969b | ||
|   | c331c73ec6 | ||
|   | d1f063c62d | ||
|   | b686dc4911 | ||
|   | 78936b2f2a | ||
|   | b2ed1e2607 | ||
|   | fb8870297d | ||
|   | 4cbc0f6c2e | ||
|   | 1b9eff64fa | ||
|   | d07d1a6ef8 | ||
|   | 8bdd60fa71 | ||
|   | b872086c74 | ||
|   | e0af4a15d0 | ||
|   | d31802ed98 | ||
|   | 87c4136bd4 | ||
|   | 09e027bc9d | ||
|   | 707828b71a | ||
|   | 8f44037133 | ||
|   | 9717ccb786 | ||
|   | 6354cbf9d6 | ||
|   | 95a849efc2 | ||
|   | fe083a94b9 | ||
|   | 6fdcdfa5ea | ||
|   | 4a4885eead | ||
|   | a0ef686c54 | ||
|   | 2903a5c050 | ||
|   | 4d50b9f1f1 | ||
|   | 5e3c2af236 | ||
|   | 5d791838d2 | ||
|   | b80c5cff49 | ||
|   | 47b5740bdf | ||
|   | b8092857d9 | ||
|   | 3cda1a23ce | ||
|   | 215677c10b | ||
|   | 3688cd3fea | ||
|   | 5ca2a8318d | ||
|   | e27ec862c3 | ||
|   | d0b8b5a199 | ||
|   | efe2ce3647 | ||
|   | 71f00188fb | ||
|   | a1c9cb8860 | ||
|   | 74e9718370 | ||
|   | 2d71c9cdfd | ||
|   | 484d549ece | ||
|   | d098ab436d | ||
|   | 85ffd33f08 | ||
|   | c1b8e93083 | ||
|   | 383d4656aa | ||
|   | 3e3d10824f | ||
|   | 128418b214 | ||
|   | 050a39a7a5 | ||
|   | 5f085789b9 | ||
|   | 6a8832d83b | ||
|   | fcb498b0d5 | ||
|   | 0433252e50 | ||
|   | 5ce6f37e26 | ||
|   | 02fc7bb5f6 | ||
|   | 9e1294e866 | ||
|   | c2c800d863 | ||
|   | 625c107c25 | ||
|   | 33319f5d2d | ||
|   | ad3c1c37bb | ||
|   | 005bf19acf | ||
|   | 91c77808c4 | ||
|   | 0ce97f77e0 | ||
|   | 197ad60d21 | ||
|   | dc31387c6f | ||
|   | bd64da3785 | ||
|   | 4fef0d4f14 | ||
|   | 89d6f580dc | ||
|   | 23eb74e085 | ||
|   | 9c86097286 | ||
|   | f0bb9c7d8d | ||
|   | d4514f9c10 | ||
|   | c324033ba4 | ||
|   | 74a16db975 | ||
|   | a10044e110 | ||
|   | 6cdd067faf | ||
|   | 0989cd358a | ||
|   | 6e0739931d | ||
|   | b17ca44f0b | ||
|   | fd6e025d61 | ||
|   | 9230708e47 | ||
|   | 92f3b3895e | ||
|   | fa8a78ff01 | ||
|   | 310d842b70 | ||
|   | 1498de83d6 | ||
|   | e29f62f0a7 | ||
|   | 39e5fa6ae8 | ||
|   | dc289aa4fa | ||
|   | 6db8f53445 | ||
|   | 417bac4055 | ||
|   | e9c94cdd49 | ||
|   | d104216bbe | ||
|   | d086fdaf9f | ||
|   | 8693afdfea | ||
|   | a876161ef9 | ||
|   | 10035c898b | ||
|   | 71edaf4d01 | ||
|   | 2b77d50776 | ||
|   | 6ea91af2f8 | ||
|   | b767440399 | ||
|   | 4174ec7116 | ||
|   | 068ba17e21 | ||
|   | 4d10c96aa6 | ||
|   | b701ea36a7 | ||
|   | 198fa5e3c7 | ||
|   | 507cd13793 | ||
|   | 6c14c96e71 | ||
|   | 976963cd21 | ||
|   | 9391d980c3 | ||
|   | bab5183820 | ||
|   | 0abaf22467 | ||
|   | 463a8134a1 | ||
|   | d22b2d181f | ||
|   | 5a9bbf639a | ||
|   | 81e48ada47 | ||
|   | 598bc44f67 | ||
|   | b93f4f623c | ||
|   | 1054dc5ed1 | ||
|   | 7fc4e8af0a | ||
|   | 4198bb88b6 | ||
|   | db325d1f43 | ||
|   | 7ff38c14a9 | ||
|   | 3f2de3d101 | ||
|   | 6bd91936ff | ||
|   | 035a2e5479 | ||
|   | 6983ba3225 | ||
|   | 77e028d620 | ||
|   | 0bb91218c5 | ||
|   | 231a51fe7a | ||
|   | 8d0cbaf8df | ||
|   | b843c27322 | ||
|   | 2688cf343b | ||
|   | b416b87518 | ||
|   | 3f1b9f095a | ||
|   | 8a6eeb82c5 | ||
|   | 5779283a52 | ||
|   | 80d0dcc9a3 | ||
|   | d51ad518c4 | ||
|   | 29ba1730ca | ||
|   | 183210619d | ||
|   | feff911fb7 | ||
|   | 8eee5f3253 | ||
|   | 3e55fef5e1 | ||
|   | 63397e380f | ||
|   | 07c3aaeea1 | ||
|   | 8254bbae56 | ||
|   | e7886aa9b4 | ||
|   | fb08868e54 | ||
|   | c141d99059 | ||
|   | f66e1c49b0 | ||
|   | 4acbe8f20c | ||
|   | 2ea70a5c73 | ||
|   | eb612bfdfc | ||
|   | 5e826c78a7 | ||
|   | a0d906739d | ||
|   | 98b13037e7 | ||
|   | 29f09f71b4 | ||
|   | a00b6e258d | ||
|   | 7ded272b94 | ||
|   | 1d12b1fa1e | ||
|   | 54582bdce9 | ||
|   | a9a4300a36 | ||
|   | f720e0ac0f | ||
|   | a8245df745 | ||
|   | 86c5d02a5e | ||
|   | 5af597c2fb | ||
|   | dd9e0164d5 | ||
|   | 9d16b4081e | ||
|   | 545cafce9b | ||
|   | fb66d51796 | ||
|   | 5175664174 | ||
|   | a579d67064 | ||
|   | be760bed7e | ||
|   | 357383159e | ||
|   | 0ea1c28135 | ||
|   | 36e56f36ad | ||
|   | 0a9984c27e | ||
|   | 0ecdcc253b | ||
|   | 1667890172 | ||
|   | 9b3f863cf5 | ||
|   | 2f2ed4e40e | ||
|   | 3d582304b6 | ||
|   | 996d45df0a | ||
|   | 6047635406 | ||
|   | e16bccbb91 | ||
|   | 9786e7faeb | ||
|   | fde4b823f1 | ||
|   | b7e71a249e | ||
|   | bf8d642607 | ||
|   | 1fab40bb69 | ||
|   | ad61b58036 | ||
|   | b7722e7037 | ||
|   | 6c2167b65f | ||
|   | 18be9882f7 | ||
|   | a102c2c22b | ||
|   | ae75462254 | ||
|   | 3ad956e73f | ||
|   | d6114165d3 | ||
|   | c3a959cc37 | ||
|   | ca70beec47 | ||
|   | 758939215d | ||
|   | ab861e56f1 | ||
|   | 8eb64ad600 | ||
|   | d74d3fe851 | ||
|   | fefc6a7e6b | ||
|   | a119114ad7 | ||
|   | 430b1a22db | ||
|   | a754ea1326 | ||
|   | 2ecf22e37e | ||
|   | 9dcd0756ba | ||
|   | c455254fd1 | ||
|   | bb1f6e6818 | ||
|   | 0722e91eb9 | ||
|   | c859a6f365 | ||
|   | ef49850789 | ||
|   | 4f6f334f41 | ||
|   | 8cd76d3921 | ||
|   | 885805b5df | ||
|   | d61f260372 | ||
|   | d0a48627b2 | ||
|   | 4b8f13e902 | ||
|   | 5b9a57f536 | ||
|   | ba9963b8fa | ||
|   | 6887106ff7 | ||
|   | 98416a4fab | ||
|   | fad3288d20 | ||
|   | 5ecff1e4c3 | ||
|   | bfeae0b5f5 | ||
|   | 1c5336cd57 | ||
|   | 43c2cf4edb | ||
|   | f6d80d66a2 | ||
|   | b2ca0babeb | ||
|   | ed4ae322f5 | ||
|   | 4f924ab07e | ||
|   | ebadeff0ca | ||
|   | 830018aa38 | ||
|   | 8dfddd279b | ||
|   | 544f2f74df | ||
|   | 450348d6bd | ||
|   | 5928ea9c7a | ||
|   | 4754880099 | ||
|   | 1fea66e527 | ||
|   | 806a3163ba | ||
|   | 08cf6780ba | ||
|   | 6814907a2c | ||
|   | 11a8a25528 | ||
|   | 1b246eecfe | ||
|   | 95456b8e78 | ||
|   | 79fc481a2b | ||
|   | b9ce871463 | ||
|   | 0bd78e1cd8 | ||
|   | d27f2d8168 | ||
|   | 407f3f142a | ||
|   | 61cfbecc74 | ||
|   | feeabd08ab | ||
|   | 31a3432a8e | ||
|   | 27db045095 | ||
|   | db8c75f08d | ||
|   | beaada77e6 | ||
|   | aefab9293a | ||
|   | a6d9310888 | ||
|   | bfc09ac211 | ||
|   | d930280af5 | ||
|   | 445e4a9792 | ||
|   | aec761916e | ||
|   | 7d750d2b92 | ||
|   | bdf1724412 | ||
|   | 9cea2dfb8f | ||
|   | 00dec36c72 | ||
|   | 26a651f7ae | ||
|   | b64f0dace3 | ||
|   | a7b95cacb6 | ||
|   | ac0e0351a0 | ||
|   | 2245ac2f88 | ||
|   | 1bfaf76dd0 | ||
|   | 88513d2d1a | ||
|   | 91bc396178 | ||
|   | d3fdbe48ae | ||
|   | 2c086105b1 | ||
|   | aed98c5125 | ||
|   | 2d77f7cd48 | ||
|   | d5affe1ada | ||
|   | d61688923d | ||
|   | 4aee6822ca | ||
|   | 038542ea3e | ||
|   | beb14ca6d6 | ||
|   | 4114129ac0 | ||
|   | 6d24719167 | ||
|   | 2393c94363 | ||
|   | 372203f1fa | ||
|   | 691468174b | ||
|   | 6f8d439717 | ||
|   | f3ab5d5500 | ||
|   | 8f467b4288 | ||
|   | 4adcf7e9ed | ||
|   | 9f8c40ed78 | ||
|   | cda9d7e579 | ||
|   | c27d2d4b93 | ||
|   | 003afef541 | ||
|   | 09bbca2f61 | ||
|   | 0a305eb79f | ||
|   | aff5408633 | ||
|   | 31626d4c6f | ||
|   | 426ec2d399 | ||
|   | a632f6d5b1 | ||
|   | 83c199bb00 | ||
|   | 2ec6d08613 | ||
|   | 42271ad463 | ||
|   | 57ee847ce7 | ||
|   | 985bd18904 | ||
|   | 2d1f798d14 | ||
|   | 9e9f70a693 | ||
|   | 1b9d311b5c | ||
|   | 4d437416da | ||
|   | 267b942383 | ||
|   | 142cb601f8 | ||
|   | 21b523fcd3 | ||
|   | 006cab3e9e | ||
|   | 4e909ee8b1 | ||
|   | 95df5d042c | ||
|   | 22059858fe | ||
|   | 82107a02f5 | ||
|   | 515893595d | ||
|   | 3800be3898 | ||
|   | c9ad952604 | ||
|   | 2a09ffc648 | ||
|   | 821d8fee3b | ||
|   | 42224594b6 | ||
|   | d369a2b775 | ||
|   | a5f4cfc612 | ||
|   | 23e5402bec | ||
|   | 391e8afd1f | ||
|   | eff2c3a621 | ||
|   | de48e4e4df | ||
|   | c4a694862c | ||
|   | 1e076a4ae0 | ||
|   | 188311863a | ||
|   | 0eb083e979 | ||
|   | abe61b9926 | ||
|   | 54e49d10d2 | ||
|   | ef75829878 | ||
|   | a19341b57a | ||
|   | c9549391d1 | ||
|   | 2b767161da | ||
|   | 7c9631081d | ||
|   | b6f29bef06 | ||
|   | 6abbbaad1b | ||
|   | fe5f448015 | ||
|   | 7beb473a3d | ||
|   | 19bc92289d | ||
|   | 4e4f6c1ec8 | ||
|   | 459e67b2a7 | ||
|   | 51ba24991c | ||
|   | dfa0fd5b33 | ||
|   | f7ef60c13f | ||
|   | 8b2bfa4212 | ||
|   | a6c915aab9 | ||
|   | a8323cc3f5 | ||
|   | aa29735868 | ||
|   | a059e9241e | ||
|   | acd637160f | ||
|   | ddb2783f9a | ||
|   | 8fa895d65e | ||
|   | 33b658a341 | ||
|   | df725aade2 | ||
|   | d84440d53b | ||
|   | 0c1ae21c11 | ||
|   | f30959c6bd | ||
|   | d7e406e020 | ||
|   | 638e3c070c | ||
|   | 07aeac37fd | ||
|   | 6ec76e7f9a | ||
|   | cb9951dcad | ||
|   | 0776701396 | ||
|   | 39de6c784c | ||
|   | e5c4482088 | ||
|   | 975c171d5a | ||
|   | 7d7f63059a | ||
|   | 8c6c0a7bcc | ||
|   | aa41743ebd | ||
|   | ee5f13cb6b | ||
|   | 974145f61c | ||
|   | 849318138e | ||
|   | 6a04c0878b | ||
|   | db80e18308 | ||
|   | 3081207a4c | ||
|   | 8085c7a450 | ||
|   | 842de91168 | ||
|   | 4c621bc697 | ||
|   | 938458b330 | ||
|   | 651dad0cc1 | ||
|   | f591ab3ba0 | ||
|   | 09aa4cf2ca | ||
|   | 61c0bdb09c | ||
|   | 89367d47a8 | ||
|   | 7fdfd938e0 | ||
|   | e526b5ffeb | ||
|   | adb974960d | ||
|   | 2acc92828f | ||
|   | a1d1f43e6a | ||
|   | aac739ccd2 | ||
|   | c3d1b07c45 | ||
|   | 77bafd823b | ||
|   | 624b5f228b | ||
|   | 6d233becf0 | ||
|   | 2bcd13aaee | ||
|   | 20723cb792 | ||
|   | b93ad10fa5 | ||
|   | 28e2007767 | ||
|   | 802f1e4406 | ||
|   | a37cc6cb08 | ||
|   | 6cea51585f | ||
|   | fce9c3a9f1 | ||
|   | 969903ebf2 | ||
|   | 7b3f86152a | ||
|   | ea1362a936 | ||
|   | f62a5b83a9 | ||
|   | a834b98232 | ||
|   | 152cf6325d | ||
|   | c98ab69cc7 | ||
|   | f7cce15156 | ||
|   | 3072c5b8a1 | ||
|   | ac1ab03cb0 | ||
|   | 2ef72f7abb | ||
|   | eae27d1788 | ||
|   | a3787eff19 | ||
|   | 836d945ece | ||
|   | 2816902f0e | ||
|   | f72a26d340 | ||
|   | 387521bb6d | ||
|   | a4da82a43b | ||
|   | bc90fefb5b | ||
|   | c3d871aef4 | ||
|   | 59e378f48f | ||
|   | a622fd90b4 | ||
|   | 861b647e7b | ||
|   | 70e57dad88 | ||
|   | 91ff938035 | ||
|   | 3acd1146f9 | ||
|   | 45d3bfff28 | ||
|   | 18110b519c | ||
|   | 4c9768565e | ||
|   | 873e734c39 | ||
|   | 747e0c657d | ||
|   | 780f13db30 | ||
|   | 62519bfe05 | ||
|   | 29f7f468ce | ||
|   | 9c36a5fd06 | ||
|   | 4558c8f37a | ||
|   | bb67388bbe | ||
|   | 3dcd2b82c4 | ||
|   | c0f3e32447 | ||
|   | 8733e087d7 | ||
|   | 9f9e577640 | ||
|   | 9813cea1d0 | ||
|   | 304537c24f | ||
|   | cc0054a4d5 | ||
|   | 29ec219b82 | ||
|   | 0994d7811f | ||
|   | 934708d950 | ||
|   | bbc002a505 | ||
|   | c8d4e8b5d0 | ||
|   | 18a21d5802 | ||
|   | fcb63f3039 | ||
|   | 91d7a6f8a9 | ||
|   | 238db14002 | ||
|   | d0995204da | ||
|   | 6ebc2b2561 | ||
|   | 95b817e8d7 | ||
|   | 558f034007 | ||
|   | 72ea805298 | ||
|   | 79ffbf7fe1 | ||
|   | 4f0d286d2c | ||
|   | 6fb5888e55 | ||
|   | b5810dfe9d | ||
|   | 85a79f9d67 | ||
|   | d24465b79a | ||
|   | c67a99ff27 | ||
|   | bae4e12302 | ||
|   | 09df1cdb5c | ||
|   | 2946d87e48 | ||
|   | 6a2d7bff1a | ||
|   | 9b7b2b347f | ||
|   | 33638d5347 | ||
|   | 2ae7d2e6ea | ||
|   | ffc490ef89 | ||
|   | 29b75ca46f | ||
|   | 004dde18a7 | ||
|   | 3440e8d208 | ||
|   | e138ae5ec9 | ||
|   | bf8ba229e0 | ||
|   | 19d0a7495e | ||
|   | 099b62f124 | ||
|   | 8ce78ca488 | ||
|   | fc9610919c | ||
|   | e082d2403c | ||
|   | 370c3afc71 | ||
|   | 93357ef017 | ||
|   | 753592cc70 | ||
|   | b150e6866d | ||
|   | 2f475fa9ea | ||
|   | ecff50c2b4 | ||
|   | 6f53cf9cc6 | ||
|   | 1056202b48 | ||
|   | 709de3d621 | ||
|   | f9894f4ebc | ||
|   | 74d3b80d70 | ||
|   | 4b01dfe369 | ||
|   | fc09d10560 | ||
|   | 59b2e3ea4a | ||
|   | 243cf29793 | ||
|   | 9ded8fbe58 | ||
|   | 9258928c2d | ||
|   | 132cd3aa2c | ||
|   | fef60d9d41 | ||
|   | 2fdd24c724 | ||
|   | 852a02daff | ||
|   | 2a6148716c | ||
|   | 5ca692fc89 | ||
|   | 3e2487493e | ||
|   | fdcb0cd2bc | ||
|   | 4962e1772d | ||
|   | d7d5618498 | ||
|   | 3f3d6ebe66 | ||
|   | ec28988bfa | ||
|   | db23538898 | ||
|   | 423a18cecc | ||
|   | f164260eee | ||
|   | a091121293 | ||
|   | d744c85310 | ||
|   | c9f2c54c49 | ||
|   | f29d223ed5 | ||
|   | 8dabd34432 | ||
|   | a104a365e3 | ||
|   | 62d94ff342 | ||
|   | cbc04a7d40 | ||
|   | 71d3c5bf41 | ||
|   | bc69e46ad1 | ||
|   | 13f035b905 | ||
|   | 79cbe50894 | ||
|   | 1c04aa54a7 | ||
|   | b718283327 | ||
|   | b34390017b | ||
|   | 8980f89370 | ||
|   | f46d47239f | ||
|   | 13dc82b9d4 | ||
|   | a243dd4587 | ||
|   | 9d5d6c557b | ||
|   | a604682805 | ||
|   | 70b1cd798f | ||
|   | 578f42d588 | ||
|   | e3ad6d2bd1 | ||
|   | 4b64a8d20d | ||
|   | fcc8700218 | ||
|   | e5b713ee63 | ||
|   | 9849c6b847 | ||
|   | 9bb5da968c | ||
|   | d5a71fd567 | ||
|   | 0f98ba4729 | ||
|   | a6a2174bf7 | ||
|   | f07c3171e3 | ||
|   | 6cb1e3f3fa | ||
|   | 81b64f69a5 | ||
|   | 17e1f58fd6 | ||
|   | 582833b338 | ||
|   | 48be4fa069 | ||
|   | 2af05bdd3c | ||
|   | 4dbfc91e2b | ||
|   | 95cef39def | ||
|   | 00fb5bcf35 | ||
|   | 42eeb93d99 | ||
|   | afe7bb4b33 | ||
|   | 0f5f91df0b | ||
|   | f209a4804b | ||
|   | 5794ffe4bd | ||
|   | ceb49d3742 | ||
|   | 44142f8234 | ||
|   | 347213d124 | ||
|   | 8ca51bc68a | ||
|   | 56f852a64f | ||
|   | 1c68e79091 | ||
|   | 473a050f0b | ||
|   | 6768e81d5d | ||
|   | 3743f515cf | ||
|   | 3e0b6a7d1f | ||
|   | ef72f7d513 | ||
|   | 2f71461b29 | ||
|   | d8cab4c133 | ||
|   | 95a093e97b | ||
|   | 68bb51c55b | ||
|   | fb8fe6f2b3 | ||
|   | 3e61c90dbe | ||
|   | ac18b471d2 | ||
|   | bbe2386bff | ||
|   | 2f47248e3c | ||
|   | 315bb970a5 | ||
|   | 65b0f6049d | ||
|   | 0033535e21 | ||
|   | 3e4a8cb800 | ||
|   | ad638da2c2 | ||
|   | a923d8541c | ||
|   | 66fb9ca5f6 | ||
|   | 11cb78c5f8 | ||
|   | 527a5f0980 | ||
|   | 6e878d2ca4 | ||
|   | cf30b24706 | ||
|   | 709a2ed474 | ||
|   | ecd30cc8bb | ||
|   | 0105ad5e39 | ||
|   | cebaab8ee5 | ||
|   | 34281925d6 | ||
|   | e90c4fa770 | ||
|   | a06e077938 | ||
|   | 7bdae7be4f | ||
|   | c125d83e9e | ||
|   | 2abf9221e3 | ||
|   | 6f1e89085c | ||
|   | 5303cdc4af | ||
|   | feb03e4717 | ||
|   | 64e3a091c3 | ||
|   | a2c50a980c | ||
|   | 23478b891f | ||
|   | aab2d52b25 | ||
|   | 9a9041f1ce | ||
|   | 0aa704935b | ||
|   | ede7f8f5de | ||
|   | 3c317d2fac | ||
|   | b55b0258e0 | ||
|   | 55a8098d48 | ||
|   | 389e50ff1e | ||
|   | 1df4043ad7 | ||
|   | b000b8a736 | ||
|   | 7eab7fa353 | ||
|   | 58f7c82d52 | ||
|   | 4d1cd0da93 | ||
|   | 9ee7a014c9 | ||
|   | e1ab7db87d | ||
|   | 14a5596346 | ||
|   | 2eba5f33b9 | ||
|   | 60a3773c50 | ||
|   | e8e8177e9d | ||
|   | f1fe04245a | ||
|   | 8bb208e8f8 | ||
|   | f8a3aa91cd | ||
|   | 019bde82ce | ||
|   | ca5e38751c | ||
|   | b5b25b39e9 | ||
|   | 1784523cc6 | ||
|   | d71d10adbc | ||
|   | 40fb750589 | ||
|   | 62a6b8d4a6 | ||
|   | 24b1890710 | ||
|   | 3a1d28379a | ||
|   | c57285d199 | ||
|   | 68cfe929c4 | ||
|   | 6237fd2c16 | ||
|   | b023f9bd2a | ||
|   | b7ac885d38 | ||
|   | cbd9dcbe41 | ||
|   | 4594187732 | ||
|   | 63818f8488 | ||
|   | 8af61cdb66 | ||
|   | ab83c0fd5b | ||
|   | 3cc40a2584 | ||
|   | c11933b3fd | ||
|   | 4687699726 | ||
|   | 012dcb4893 | ||
|   | f01d18e4b9 | ||
|   | dabd3cd355 | ||
|   | fa001f27a5 | ||
|   | 40b2e06a7f | ||
|   | 8008499028 | ||
|   | 3ac6929919 | ||
|   | 8d36acd29b | ||
|   | e54209d643 | ||
|   | f6a958dc3a | ||
|   | 2548e7b23f | ||
|   | 97046a3548 | ||
|   | a7d52c414f | ||
|   | 479466a495 | ||
|   | fa2a8f6fb8 | ||
|   | ddfa33be79 | ||
|   | 25c76a760e | ||
|   | 14240e9e10 | ||
|   | a3045b4e49 | ||
|   | b0685b3576 | ||
|   | 138c57c76a | ||
|   | 182a415555 | ||
|   | 6e789fc516 | ||
|   | 09f278121e | ||
|   | ed50e3f1b4 | ||
|   | 3a499099af | ||
|   | 931fc45f05 | ||
|   | 6076c74041 | ||
|   | b4fdccf87a | ||
|   | 8d012181b0 | ||
|   | d6344d9b5f | ||
|   | cb9410ded2 | ||
|   | 6838fb32af | ||
|   | 74d77cb140 | ||
|   | 7ad3abfd05 | ||
|   | 7c6df7132e | ||
|   | f27299dc3b | ||
|   | 47724ef238 | ||
|   | 357389a905 | ||
|   | 42cabc14d4 | ||
|   | a948ca1669 | ||
|   | 9cef14dfb2 | ||
|   | 2d15d84a01 | ||
|   | 1035469662 | ||
|   | 296a6f7749 | ||
|   | 5cff8124b0 | ||
|   | 90e2510e2f | ||
|   | 9251dd7b24 | ||
|   | 3615063fbc | ||
|   | 09664f1ab8 | ||
|   | bdf1157d55 | ||
|   | b4a5ce89c2 | ||
|   | 660516914e | ||
|   | 4c1c479fcf | ||
|   | 309651dc82 | ||
|   | b13b9f3331 | ||
|   | 108e584983 | ||
|   | f3b4071209 | ||
|   | fe1d024351 | ||
|   | 0de08d418f | ||
|   | 109edaae6d | ||
|   | d69a630989 | ||
|   | 987b67bd2e | ||
|   | f4d56802f9 | ||
|   | 9dfd6eacf4 | ||
|   | 5aed78e183 | ||
|   | 011e5dd864 | ||
|   | ae654266df | ||
|   | 03986f1b8b | ||
|   | bc649593e4 | ||
|   | cc0285da7f | ||
|   | f3bc16f4f5 | ||
|   | 15f94858f2 | ||
|   | 5febd06c25 | ||
|   | 9eb7fe8ac0 | ||
|   | 1f26ea4a85 | ||
|   | 912c29fd8c | ||
|   | eea468918e | ||
|   | 537490e391 | ||
|   | de8e362d4a | ||
|   | 7a588144b7 | ||
|   | 7f2999aa43 | ||
|   | a3498f96ef | ||
|   | 637bfa0252 | ||
|   | 1c8f689ecb | ||
|   | 7a8b11d716 | ||
|   | a67e207866 | ||
|   | 5817209158 | ||
|   | b39d409aa2 | ||
|   | a18fb9448b | ||
|   | 1f3007dbb4 | ||
|   | 5dafa4a270 | ||
|   | e93bcbeee1 | ||
|   | adc032e7d8 | ||
|   | 248c2b9bf5 | ||
|   | a8baa05023 | ||
|   | 7066a79466 | ||
|   | 4a623f7ed2 | ||
|   | f18700ef64 | ||
|   | 52d9a3c34f | ||
|   | d785ed2588 | ||
|   | 4ff37a4ed1 | ||
|   | fe167b6ba2 | ||
|   | f042a7419d | ||
|   | bc0ebfcdeb | ||
|   | 57d13c770a | ||
|   | 1692384636 | ||
|   | 7634091325 | ||
|   | bdc8f59c17 | ||
|   | 817efbc29c | ||
|   | d2661cb4b2 | ||
|   | 9b0110f50c | ||
|   | 5876381f86 | ||
|   | c4edc25d01 | ||
|   | 36361d14cf | ||
|   | c8fe5f485c | ||
|   | 1ac1212925 | ||
|   | 3d4fb5136d | ||
|   | b6b03c8ab9 | ||
|   | 432945e422 | ||
|   | 052f9ddedb | ||
|   | a96784b98e | ||
|   | e06944438a | ||
|   | fa1009b6fc | ||
|   | b377e857bd | ||
|   | 9a806f667b | ||
|   | 979c9ce8e3 | ||
|   | b217e6eed7 | ||
|   | 6b7e74a030 | ||
|   | 7fdeb14e6d | ||
|   | 8a323f8354 | ||
|   | a7abd5bf70 | ||
|   | 932b589780 | ||
|   | 27c282a6ee | ||
|   | 5373289574 | ||
|   | 7d0eabaa80 | ||
|   | e7f5d12cb6 | ||
|   | f14e020370 | ||
|   | e933b28aaf | ||
|   | 1bc490077a | ||
|   | 7d773abe50 | ||
|   | f22114aeed | ||
|   | 0919de4511 | ||
|   | 3e5292a052 | ||
|   | 2066d60b16 | ||
|   | 51e84c77e7 | ||
|   | 775d9e0615 | ||
|   | a20d55fb64 | ||
|   | 1b37baf656 | ||
|   | bffe69a151 | ||
|   | 71525352f0 | ||
|   | facc5f7ec5 | ||
|   | 184229b1e5 | ||
|   | 3e488c4f19 | ||
|   | 3f84e373ac | ||
|   | ac6d6ec2f1 | ||
|   | f11d5d9de8 | ||
|   | ed2dbefa73 | ||
|   | 39f23aec6b | ||
|   | 362422641e | ||
|   | a9dc900515 | ||
|   | 3a705696af | ||
|   | 2cfb8a2bf0 | ||
|   | 21ee1c2d01 | ||
|   | a00febe1a0 | ||
|   | 1e7125ae7b | ||
|   | aa4a7471dd | ||
|   | 69a03ce23c | ||
|   | 0f50cd7623 | ||
|   | 669c555874 | ||
|   | 1cfb73a129 | ||
|   | 2a585c2fba | ||
|   | 32a83128e6 | ||
|   | fe7bb33af8 | ||
|   | da6fa34f02 | ||
|   | 37a358ab93 | ||
|   | 3452c8d693 | ||
|   | 336992cc54 | ||
|   | 13afcbd1eb | ||
|   | e58a3fd0aa | ||
|   | 57625b6c4c | ||
|   | 0d058d2174 | ||
|   | 8d49a8f278 | ||
|   | b4b6cfdb1c | ||
|   | 6b7ccde156 | ||
|   | 9b0fd007fd | ||
|   | 6f3ef94836 | ||
|   | 08ac9866e0 | ||
|   | a17fadea3a | ||
|   | e30bbfd85d | ||
|   | 120f9d81b2 | ||
|   | fa38839a80 | ||
|   | d8f109176c | ||
|   | bbb1b99ce1 | ||
|   | 0cd8840dba | ||
|   | d4b253ba3e | ||
|   | aee7fc118b | ||
|   | 60f0b4fffe | ||
|   | a95e600eb0 | ||
|   | a25959184e | ||
|   | 0e5da5b8bc | ||
|   | ddfa4b8896 | ||
|   | d816a11bca | ||
|   | 7820391cb9 | ||
|   | 148866bc73 | ||
|   | 0b57c47547 | ||
|   | 02db4450df | ||
|   | ed7af82bdf | ||
|   | e3b5673e98 | ||
|   | 82412f218f | ||
|   | 7c648782bc | ||
|   | ee64d14733 | ||
|   | bfaab6ed6b | ||
|   | 97333deb3f | ||
|   | 400d9d4205 | ||
|   | ad1145a201 | ||
|   | 513c22df3b | ||
|   | b5afd53138 | ||
|   | 72b4b3c7f8 | ||
|   | eb60ba23f5 | ||
|   | 69aac49f79 | ||
|   | 67f139e016 | ||
|   | 654f047302 | ||
|   | e6c23672b2 | ||
|   | 1058e5fdde | ||
|   | 6929d9355f | ||
|   | 8c377ad965 | ||
|   | a81a16beac | ||
|   | d92945bb8a | ||
|   | 90a6a59a2f | ||
|   | 8bae3d9007 | ||
|   | 98042b858d | ||
|   | a837bd08b0 | ||
|   | 2c61e9c76a | ||
|   | da97f78ae0 | ||
|   | 2e1a9da5e2 | ||
|   | 422fd933f5 | ||
|   | 2594124825 | ||
|   | d09b6ecaa5 | ||
|   | fb2e71b9bd | ||
|   | 68b67e24f2 | ||
|   | c1e2341f0a | ||
|   | 70d834c512 | ||
|   | 65ee4e4555 | ||
|   | 5304b13365 | ||
|   | e547bfa933 | ||
|   | 36ddb13d1f | ||
|   | 74e3def5b3 | ||
|   | 24d41452b0 | ||
|   | 2597020d22 | ||
|   | 2d0fea2650 | ||
|   | c1a71ad14f | ||
|   | 024c7641a9 | ||
|   | 5c56bdf229 | ||
|   | af779fa57c | ||
|   | 9918541795 | ||
|   | 04d5c8fb77 | ||
|   | 5980b3cbb0 | ||
|   | 10074bfcc6 | ||
|   | 3940e69c91 | ||
|   | 0ace5f6553 | ||
|   | b8a9f19515 | ||
|   | 6cd007838d | ||
|   | 72870e2c57 | ||
|   | 9c8997cbe4 | ||
|   | c6efb82526 | ||
|   | 5abfdc0140 | ||
|   | d8bc4a0e9a | ||
|   | 8ad2fdd71e | ||
|   | a2e45a2211 | ||
|   | 621c2b9015 | ||
|   | b39d1e9b9d | ||
|   | e1c456407e | ||
|   | 3fe8251dfb | ||
|   | 930a45e7a9 | ||
|   | afc66554d7 | ||
|   | 998ab15570 | ||
|   | c0d258ca17 | ||
|   | 230e4547e8 | ||
|   | 4cf33909ee | 
| @@ -4,6 +4,7 @@ Makefile | ||||
| libtool | ||||
| Makefile.in | ||||
| aclocal.m4 | ||||
| aclocal.m4.bak | ||||
| configure | ||||
| config.h | ||||
| config.status | ||||
|   | ||||
							
								
								
									
										15
									
								
								Makefile.am
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								Makefile.am
									
									
									
									
									
								
							| @@ -23,8 +23,11 @@ | ||||
|  | ||||
| AUTOMAKE_OPTIONS = foreign | ||||
|  | ||||
| ACLOCAL_AMFLAGS = -I m4 | ||||
|  | ||||
| EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist curl-config.in \ | ||||
|  curl-style.el sample.emacs RELEASE-NOTES buildconf buildconf.bat libcurl.pc.in | ||||
|  curl-style.el sample.emacs RELEASE-NOTES buildconf buildconf.bat 	 \ | ||||
|  libcurl.pc.in vc6curl.dsw | ||||
|  | ||||
| bin_SCRIPTS = curl-config | ||||
|  | ||||
| @@ -74,6 +77,10 @@ endif | ||||
| examples: | ||||
| 	@(cd docs/examples; $(MAKE) check) | ||||
|  | ||||
| clean-local: | ||||
| 	@(cd tests; $(MAKE) clean) | ||||
| 	@(cd docs; $(MAKE) clean) | ||||
|  | ||||
| # | ||||
| # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros | ||||
| # must contain the following line: | ||||
| @@ -102,7 +109,7 @@ rpm: | ||||
| 	mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm . | ||||
|  | ||||
| # | ||||
| # Build a Solaris pkkgadd format file | ||||
| # Build a Solaris pkgadd format file | ||||
| # run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format | ||||
| # file (which ends up back in this directory). | ||||
| # The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do | ||||
| @@ -135,3 +142,7 @@ uninstall-hook: | ||||
| ca-bundle: lib/mk-ca-bundle.pl | ||||
| 	@echo "generate a fresh ca-bundle.crt" | ||||
| 	@perl $< -b -l -u lib/ca-bundle.crt | ||||
|  | ||||
| ca-firefox: lib/firefox-db2pem.sh | ||||
| 	@echo "generate a fresh ca-bundle.crt" | ||||
| 	./lib/firefox-db2pem.sh lib/ca-bundle.crt | ||||
|   | ||||
| @@ -265,4 +265,6 @@ ca-bundle: lib/mk-ca-bundle.pl | ||||
| 	@echo "generate a fresh ca-bundle.crt" | ||||
| 	@perl $< -b -l -u lib/ca-bundle.crt | ||||
|  | ||||
|  | ||||
| ca-firefox: lib/firefox-db2pem.sh | ||||
| 	@echo "generate a fresh ca-bundle.crt" | ||||
| 	./lib/firefox-db2pem.sh lib/ca-bundle.crt | ||||
|   | ||||
							
								
								
									
										5
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								README
									
									
									
									
									
								
							| @@ -30,10 +30,9 @@ CONTACT | ||||
|  | ||||
| WEB SITE | ||||
|  | ||||
|   Visit the curl web site or mirrors for the latest news and downloads: | ||||
|   Visit the curl web site for the latest news and downloads: | ||||
|  | ||||
|         Sweden       http://curl.haxx.se/ | ||||
|         Mirrors      http://curlm.haxx.se/ | ||||
|         http://curl.haxx.se/ | ||||
|  | ||||
| CVS | ||||
|  | ||||
|   | ||||
| @@ -1,46 +1,22 @@ | ||||
| Curl and libcurl 7.18.2 | ||||
| Curl and libcurl 7.19.2 | ||||
|  | ||||
|  Public curl releases:         105 | ||||
|  Command line options:         126 | ||||
|  curl_easy_setopt() options:   150 | ||||
|  Public curl releases:         108 | ||||
|  Command line options:         128 | ||||
|  curl_easy_setopt() options:   158 | ||||
|  Public functions in libcurl:  58 | ||||
|  Public web site mirrors:      37 | ||||
|  Known libcurl bindings:       36 | ||||
|  Contributors:                 636 | ||||
|  Known libcurl bindings:       37 | ||||
|  Contributors:                 672 | ||||
|  | ||||
| This release includes the following changes: | ||||
|  | ||||
|  o CURLFORM_STREAM was added | ||||
|  o CURLOPT_NOBODY is now supported over SFTP | ||||
|  o curl can now run on Symbian OS | ||||
|  o curl -w redirect_url and CURLINFO_REDIRECT_URL | ||||
|  o added curl_easy_send() and curl_easy_recv() | ||||
|  o  | ||||
|  | ||||
| This release includes the following bugfixes: | ||||
|  | ||||
|  o CURLOPT_NOBODY first set to TRUE and then FALSE for HTTP no longer causes | ||||
|    the confusion that could lead to a hung transfer | ||||
|  o curl_easy_reset() resets the max redirect limit properly | ||||
|  o configure now correctly recognizes Heimdal and MIT gssapi libraries | ||||
|  o malloc() failure check in Negotiate | ||||
|  o -i and -I together now work the same no matter what order they're used | ||||
|  o the typechecker can be bypassed by defining CURL_DISABLE_TYPECHECK | ||||
|  o a pointer mixup could make the FTP code send bad user+password under rare | ||||
|    circumstances (found when using curlftpfs) | ||||
|  o CURLOPT_OPENSOCKETFUNCTION can now be used to create a unix domain socket | ||||
|  o CURLOPT_TCP_NODELAY crash due to getprotobyname() use | ||||
|  o libcurl sometimes sent body twice when using CURLAUTH_ANY | ||||
|  o configure detecting debug-enabled c-ares | ||||
|  o microsecond resolution keys for internal splay trees | ||||
|  o krb4 and krb5 ftp segfault | ||||
|  o multi interface busy loop for CONNECT requests | ||||
|  o internal time differences now use monotonic time source if available | ||||
|  o several curl_multi_socket() fixes | ||||
|  o builds fine for Haiku OS | ||||
|  o follow redirect with only a new query string | ||||
|  o SCP and SFTP memory leaks on aborted transfers | ||||
|  o curl_multi_socket() and HTTP pipelining transfer stalls | ||||
|  o lost telnet data on an EWOULDBLOCK condition | ||||
|  o build failure when using MSVC 6 makefile and on four platforms more | ||||
|  o crash when using --interface name on Linux systems with a TEQL device | ||||
|  o using the multi interface to download a HTTPS page with libcurl built | ||||
|    powered by OpenSSL could download "rubbish" instead of actual content | ||||
|  | ||||
| This release includes the following known bugs: | ||||
|  | ||||
| @@ -48,21 +24,12 @@ This release includes the following known bugs: | ||||
|  | ||||
| Other curl-related news: | ||||
|  | ||||
|  o pycurl 7.18.1 was released: http://pycurl.sf.net/ | ||||
|  o brand new curl Haskell binding: | ||||
|    http://hackage.haskell.org/cgi-bin/hackage-scripts/package/curl | ||||
|  | ||||
| New curl mirrors: | ||||
|  | ||||
|  o  | ||||
|  | ||||
| This release would not have looked like this without help, code, reports and | ||||
| advice from friends like these: | ||||
|  | ||||
|  Michal Marek, Daniel Fandrich, Scott Barrett, Alexey Simak, Daniel Black, | ||||
|  Rafa Muyo, Andre Guibert de Bruet, Brock Noland, Sandor Feldi, Stefan Krause, | ||||
|  David Shaw, Norbert Frese, Bart Whiteley, Jean-Francois Bertrand, Ben Van Hof, | ||||
|  Yuriy Sosov, Christopher Palow, Yang Tse, Liam Healy, Nikolai Kondrashov, | ||||
|  David Rosenstrauch, Andreas Faerber, Scott McCreary, Jeff Weber, Emil Romanus | ||||
|  John Wilkinson, Adam Sampson, Daniel Fandrich, Yang Tse, Rainer Canavan, | ||||
|  Michal Marek | ||||
|  | ||||
|         Thanks! (and sorry if I forgot to mention someone) | ||||
|   | ||||
							
								
								
									
										20
									
								
								TODO-RELEASE
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								TODO-RELEASE
									
									
									
									
									
								
							| @@ -1,17 +1,13 @@ | ||||
| To be addressed before 7.18.2 (planned release: June 2008) | ||||
| ============================= | ||||
| To be addressed in 7.19.3 (planned release: January 2009) | ||||
| ========================= | ||||
|  | ||||
| To be addressed before 7.18.3 (planned release: August 2008) | ||||
| ============================= | ||||
| 191 - "proposed patch for curl/libssh2 bugfix" | ||||
|       http://curl.haxx.se/mail/archive-2008-10/0000.html | ||||
|  | ||||
| 139 - Christopher Palow's CURLM_EASY_HANDLE_EXISTS patch | ||||
| 192 - "infinite loop during GSS authentication" bug #2221237 | ||||
|  | ||||
| 140 - Arnaud Ebalard and Axel Tillequin's CRL support and issuer check patches | ||||
| 193 - Fix zero-byte file transfers | ||||
|  | ||||
| 141 - The sponsored feature CURLINFO_PRIMARY_IP that returns the IP address | ||||
|       as a string for the most recently used connection. | ||||
|  | ||||
| 144 - Help apps use 64bit/LFS libcurl! | ||||
|  | ||||
| 145 - | ||||
| 194 - remove "Pragma: no-cache" from default HTTP requests | ||||
|  | ||||
| 195 -  | ||||
|   | ||||
							
								
								
									
										1562
									
								
								acinclude.m4
									
									
									
									
									
								
							
							
						
						
									
										1562
									
								
								acinclude.m4
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										51
									
								
								ares/AUTHORS
									
									
									
									
									
								
							
							
						
						
									
										51
									
								
								ares/AUTHORS
									
									
									
									
									
								
							| @@ -1,34 +1,37 @@ | ||||
| c-ares is based on ares, and these are the people that have worked on it since | ||||
| the fork was made: | ||||
|  | ||||
| Daniel Stenberg | ||||
| Dominick Meglio | ||||
| liren at vivisimo.com | ||||
| James Bursa | ||||
| Duncan Wilcox | ||||
| Dirk Manske | ||||
| Alexander Lazic | ||||
| Alexey Simak | ||||
| Andreas Rieke | ||||
| Ashish Sharma | ||||
| Brad House | ||||
| Brad Spencer | ||||
| Bram Matthys | ||||
| Dan Fandrich | ||||
| Daniel Stenberg | ||||
| Dirk Manske | ||||
| Dominick Meglio | ||||
| Doug Goldstein | ||||
| Duncan Wilcox | ||||
| Eino Tuominen | ||||
| Erik Kline | ||||
| George Neill | ||||
| Gisle Vanem | ||||
| Guilherme Balena Versiani | ||||
| Gunter Knauf | ||||
| Henrik Stoerner | ||||
| Yang Tse | ||||
| Nick Mathewson | ||||
| Alexander Lazic | ||||
| Andreas Rieke | ||||
| Guilherme Balena Versiani | ||||
| Brad Spencer | ||||
| Ravi Pratap | ||||
| William Ahern | ||||
| Bram Matthys | ||||
| James Bursa | ||||
| Michael Wallner | ||||
| Vlad Dinulescu | ||||
| Brad House | ||||
| Shmulik Regev | ||||
| Ashish Sharma | ||||
| Steinar H. Gunderson | ||||
| Nick Mathewson | ||||
| Phil Blundell | ||||
| Ravi Pratap | ||||
| Robin Cornelius | ||||
| Erik Kline | ||||
| Alexey Simak | ||||
| Eino Tuominen | ||||
| Doug Goldstein | ||||
| Sebastian at basti79.de | ||||
| Shmulik Regev | ||||
| Steinar H. Gunderson | ||||
| Tofu Linden | ||||
| Vlad Dinulescu | ||||
| William Ahern | ||||
| Yang Tse | ||||
| liren at vivisimo.com | ||||
|   | ||||
							
								
								
									
										160
									
								
								ares/CHANGES
									
									
									
									
									
								
							
							
						
						
									
										160
									
								
								ares/CHANGES
									
									
									
									
									
								
							| @@ -1,5 +1,165 @@ | ||||
|   Changelog for the c-ares project | ||||
|  | ||||
| * Nov 1 2008 (Daniel Stenberg) | ||||
| - Carlo Contavalli added support for the glibc "rotate" option, as documented | ||||
|   in man resolv.conf:  | ||||
|  | ||||
|   causes round robin selection of nameservers from among those listed.  This | ||||
|   has the effect of spreading the query load among all listed servers, rather | ||||
|   than having all clients try the first listed server first every time. | ||||
|  | ||||
|   You can enable it with ARES_OPT_ROTATE | ||||
|  | ||||
| * Oct 21 2008 (Yang Tse) | ||||
|   Charles Hardin added handling of EINPROGRESS for UDP connects. | ||||
|  | ||||
| * Oct 18 2008 (Daniel Stenberg) | ||||
|   Charles Hardin made adig support a regular numerical dotted IP address for the | ||||
|   -s option as well. | ||||
|  | ||||
| * Oct 7 2008 (Yang Tse) | ||||
| - Added --enable-optimize configure option to enable and disable compiler | ||||
|   optimizations to allow decoupled setting from --enable-debug. | ||||
|  | ||||
| * Oct 2 2008 (Yang Tse) | ||||
| - Added --enable-warnings configure option to enable and disable strict | ||||
|   compiler warnings to allow decoupled setting from --enable-debug. | ||||
|  | ||||
| * Sep 17 2008 (Yang Tse) | ||||
| - Code reorganization to allow internal/private use of "nameser.h" to any | ||||
|   system that lacks arpa/nameser.h or arpa/nameser_compat.h header files. | ||||
|  | ||||
| * Sep 16 2008 (Yang Tse) | ||||
| - Code reorganization to allow internal/private use of ares_writev to any | ||||
|   system that lacks the writev function. | ||||
|  | ||||
| * Sep 15 2008 (Yang Tse) | ||||
| - Code reorganization to allow internal/private use of ares_strcasecmp to any | ||||
|   system that lacks the strcasecmp function. | ||||
|  | ||||
| - Improve configure detection of some string functions. | ||||
|  | ||||
| * Sep 11 2008 (Yang Tse) | ||||
| - Code reorganization to allow internal/private use of ares_strdup to any | ||||
|   system that lacks the strdup function. | ||||
|  | ||||
| Version 1.5.3 (Aug 29, 2008) | ||||
|  | ||||
| * Aug 25 2008 (Yang Tse) | ||||
| - Improvement by Brad House: | ||||
|  | ||||
|   This patch addresses an issue in which a response could be sent back to the | ||||
|   source port of a client from a different address than the request was made to. | ||||
|   This is one form of a DNS cache poisoning attack. | ||||
|  | ||||
|   The patch simply uses recvfrom() rather than recv() and validates that the | ||||
|   address returned from recvfrom() matches the address of the server we have | ||||
|   connected to. Only necessary on UDP sockets as they are connection-less, TCP | ||||
|   is unaffected. | ||||
|  | ||||
| - Fix by George Neill: | ||||
|   Fixed compilation of acountry sample application failure on some systems. | ||||
|  | ||||
| * Aug 4 2008 (Daniel Stenberg) | ||||
| - Fix by Tofu Linden: | ||||
|  | ||||
|   The symptom: | ||||
|   * Users (usually, but not always) on 2-Wire routers and the Comcast service | ||||
|   and a wired connection to their router would find that the second and | ||||
|   subsequent DNS lookups from fresh processes using c-ares to resolve the same | ||||
|   address would cause the process to never see a reply (it keeps polling for | ||||
|   around 1m15s before giving up). | ||||
|  | ||||
|   The repro: | ||||
|   * On such a machine (and yeah, it took us a lot of QA to find the systems | ||||
|   that reproduce such a specific problem!), do 'ahost www.secondlife.com', | ||||
|   then do it again.  The first process's lookup will work, subsequent lookups | ||||
|   will time-out and fail. | ||||
|  | ||||
|   The cause: | ||||
|   * init_id_key() was calling randomize_key() *before* it initialized | ||||
|   key->state, meaning that the randomness generated by randomize_key() is | ||||
|   immediately overwritten with deterministic values. (/dev/urandom was also | ||||
|   being read incorrectly in the c-ares version we were using, but this was | ||||
|   fixed in a later version.) | ||||
|   * This makes the stream of generated query-IDs from any new c-ares process | ||||
|   be an identical and predictable sequence of IDs. | ||||
|   * This makes the 2-Wire's default built-in DNS server detect these queries | ||||
|   as probable-duplicates and (erroneously) not respond at all. | ||||
|  | ||||
|  | ||||
| * Aug 4 2008 (Yang Tse) | ||||
| - Autoconf 2.62 has changed the behaviour of the AC_AIX macro which we use. | ||||
|   Prior versions of autoconf defined _ALL_SOURCE if _AIX was defined. 2.62 | ||||
|   version of AC_AIX defines _ALL_SOURCE and other four preprocessor symbols | ||||
|   no matter if the system is AIX or not. To keep the traditional behaviour, | ||||
|   and an uniform one across autoconf versions AC_AIX is replaced with our | ||||
|   own internal macro CARES_CHECK_AIX_ALL_SOURCE. | ||||
|  | ||||
| * Aug 1 2008 (Yang Tse) | ||||
| - Configure process now checks if the preprocessor _REENTRANT symbol is already | ||||
|   defined. If it isn't currently defined a set of checks are performed to test | ||||
|   if its definition is required to make visible to the compiler a set of *_r | ||||
|   functions. Finally, if _REENTRANT is already defined or needed it takes care | ||||
|   of making adjustments necessary to ensure that it is defined equally for the | ||||
|   configure process tests and generated config file. | ||||
|  | ||||
| * Jul 20 2008 (Yang Tse) | ||||
| - When recvfrom prototype uses a void pointer for arguments 2, 5 or 6 this will | ||||
|   now cause the definition, as appropriate, of RECVFROM_TYPE_ARG2_IS_VOID, | ||||
|   RECVFROM_TYPE_ARG5_IS_VOID or RECVFROM_TYPE_ARG6_IS_VOID. | ||||
|  | ||||
| * Jul 17 2008 (Yang Tse) | ||||
| - RECVFROM_TYPE_ARG2, RECVFROM_TYPE_ARG5 and RECVFROM_TYPE_ARG6 are now defined | ||||
|   to the data type pointed by its respective argument and not the pointer type. | ||||
|  | ||||
| * Jul 16 2008 (Yang Tse) | ||||
| - Improved configure detection of number of arguments for getservbyport_r. | ||||
|   Detection is now based on compilation checks instead of linker ones. | ||||
|  | ||||
| - Configure process now checks availability of recvfrom() socket function and | ||||
|   finds out its return type and the types of its arguments. Added definitions | ||||
|   for non-configure systems config files, and introduced macro sreadfrom which | ||||
|   will be used on udp sockets as a recvfrom() wrapper in the future. | ||||
|  | ||||
| * Jul 15 2008 (Yang Tse) | ||||
| - Introduce definition of _REENTRANT symbol in setup.h to improve library | ||||
|   usability.  Previously the configure process only used the AC_SYS_LARGEFILE | ||||
|   macro for debug builds, now it is also used for non-debug ones enabling the | ||||
|   use of configure options --enable-largefile and --disable-largefile which | ||||
|   might be needed for library compatibility.  Remove checking the size of | ||||
|   curl_off_t, it is no longer needed. | ||||
|  | ||||
| * Jul 3 2008 (Daniel Stenberg) | ||||
| - Phil Blundell: If you ask ares_gethostbyname() to do an AF_INET6 lookup and | ||||
|   the target host has only A records, it automatically falls back to an | ||||
|   AF_INET lookup and gives you the A results.  However, if the target host has | ||||
|   a CNAME record, this behaviour is defeated since the original query does | ||||
|   return some data even though ares_parse_aaa_reply() doesn't consider it | ||||
|   relevant. Here's a small patch to make it behave the same with and without | ||||
|   the CNAME. | ||||
|  | ||||
| * Jul 2 2008 (Yang Tse) | ||||
| - Fallback to gettimeofday when monotonic clock is unavailable at run-time. | ||||
|  | ||||
| * Jun 30 2008 (Daniel Stenberg) | ||||
|  | ||||
| - As was pointed out to me by Andreas Schuldei, the MAXHOSTNAMELEN define is | ||||
|   not posix or anything and thus c-ares failed to build on hurd (and possibly | ||||
|   elsewhere). The define was also somewhat artificially used in the windows | ||||
|   port. Now, I instead rewrote the use of gethostbyname to enlarge the host | ||||
|   name buffer in case of need and totally avoid the use of the MAXHOSTNAMELEN | ||||
|   define. I thus also removed the defien from the namser.h file where it was | ||||
|   once added for the windows build. | ||||
|  | ||||
|   I also fixed init_by_defaults() function to not leak memory in case if | ||||
|   error. | ||||
|  | ||||
| * Jun 9 2008 (Yang Tse) | ||||
|  | ||||
| - Make libcares.pc generated file for pkg-config include information relative | ||||
|   to the libraries needed for the static linking of c-ares. | ||||
|  | ||||
| * May 30 2008 (Yang Tse) | ||||
|  | ||||
| - Brad House fixed a missing header file inclusion in adig sample program. | ||||
|   | ||||
| @@ -1,4 +1,30 @@ | ||||
| AUTOMAKE_OPTIONS = foreign | ||||
| AUTOMAKE_OPTIONS = foreign nostdinc | ||||
|  | ||||
| ACLOCAL_AMFLAGS = -I m4 | ||||
|  | ||||
| # Specify our include paths here, and do it relative to $(top_srcdir) and | ||||
| # $(top_builddir), to ensure that these paths which belong to the library | ||||
| # being currently built and tested are searched before the library which | ||||
| # might possibly already be installed in the system. | ||||
| # | ||||
| # When using the low-level hard-hacking memory leak tracking code from | ||||
| # libcurl the generated curl/curlbuild.h file must also be reachable. | ||||
| # Using the libcurl lowlevel code from within c-ares library is ugly and | ||||
| # only works when c-ares is built and linked with a similarly debug-build | ||||
| # libcurl, but we do this anyway for convenience. | ||||
| # | ||||
| # $(top_builddir)/../include is for libcurl's generated curl/curlbuild.h file | ||||
| # $(top_builddir) is for c-ares's generated config.h file | ||||
| # $(top_srcdir) is for c-ares's lib/setup.h and other "c-ares-private" files | ||||
|  | ||||
| if CURLDEBUG | ||||
| INCLUDES = -I$(top_builddir)/../include \ | ||||
|            -I$(top_builddir)            \ | ||||
|            -I$(top_srcdir) | ||||
| else | ||||
| INCLUDES = -I$(top_builddir) \ | ||||
|            -I$(top_srcdir) | ||||
| endif | ||||
|  | ||||
| lib_LTLIBRARIES = libcares.la | ||||
|  | ||||
| @@ -19,7 +45,8 @@ noinst_PROGRAMS =$(PROGS) | ||||
| # regular sources and headers | ||||
| EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj	   \ | ||||
|  Makefile.m32 Makefile.netware Makefile.vc6 $(man_MANS) $(MSVCFILES)	   \ | ||||
|  config-win32.h RELEASE-NOTES libcares.pc.in buildconf get_ver.awk maketgz | ||||
|  config-win32.h RELEASE-NOTES libcares.pc.in buildconf get_ver.awk maketgz \ | ||||
|  TODO | ||||
|  | ||||
| pkgconfigdir = $(libdir)/pkgconfig | ||||
| pkgconfig_DATA = libcares.pc | ||||
|   | ||||
| @@ -23,7 +23,13 @@ CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_IOCTLSOCKET \ | ||||
|           -DRECV_TYPE_ARG1='int'   -DRECV_TYPE_ARG2='void*' \ | ||||
|           -DRECV_TYPE_ARG3='int'   -DRECV_TYPE_ARG4='int' \ | ||||
|           -DRECV_TYPE_RETV='int'   -DHAVE_STRUCT_TIMEVAL \ | ||||
|           -Dselect=select_s        -Dsocklen_t=int -UHAVE_CONFIG_H | ||||
|           -Dselect=select_s        -Dsocklen_t=int -UHAVE_CONFIG_H \ | ||||
|           -DRECVFROM_TYPE_ARG1='int' -DRECVFROM_TYPE_ARG2='void' \ | ||||
|           -DRECVFROM_TYPE_ARG3='int' -DRECVFROM_TYPE_ARG4='int' \ | ||||
|           -DRECVFROM_TYPE_ARG6='int' -DRECVFROM_TYPE_RETV='int' \ | ||||
|           -DRECVFROM_TYPE_ARG5='struct sockaddr' -DHAVE_RECVFROM \ | ||||
|           -DRECVFROM_TYPE_ARG2_IS_VOID -DHAVE_STRDUP -DHAVE_NETDB_H \ | ||||
|           -DHAVE_ARPA_INET_H -DHAVE_STRCASECMP -DHAVE_STRNCASECMP | ||||
|  | ||||
| LDFLAGS = -s | ||||
|  | ||||
|   | ||||
| @@ -3,14 +3,14 @@ ares_query.c ares__close_sockets.c ares_free_string.c ares_search.c	\ | ||||
| ares__get_hostent.c ares_gethostbyaddr.c ares_send.c ares__read_line.c	\ | ||||
| ares_gethostbyname.c ares_strerror.c ares_cancel.c ares_init.c		\ | ||||
| ares_timeout.c ares_destroy.c ares_mkquery.c ares_version.c		\ | ||||
| ares_expand_name.c ares_parse_a_reply.c windows_port.c			\ | ||||
| ares_expand_name.c ares_parse_a_reply.c windows_port.c ares_strdup.c	\ | ||||
| ares_expand_string.c ares_parse_ptr_reply.c ares_parse_aaaa_reply.c	\ | ||||
| ares_getnameinfo.c inet_net_pton.c bitncmp.c inet_ntop.c		\ | ||||
| ares_parse_ns_reply.c ares_llist.c ares__timeval.c | ||||
| ares_getnameinfo.c inet_net_pton.c bitncmp.c inet_ntop.c ares_writev.c	\ | ||||
| ares_parse_ns_reply.c ares_llist.c ares__timeval.c ares_strcasecmp.c | ||||
|  | ||||
| HHEADERS = ares.h ares_private.h setup.h ares_dns.h ares_version.h          \ | ||||
|            nameser.h inet_net_pton.h inet_ntop.h ares_ipv6.h bitncmp.h      \ | ||||
|            setup_once.h ares_llist.h | ||||
|  nameser.h inet_net_pton.h inet_ntop.h ares_ipv6.h bitncmp.h setup_once.h   \ | ||||
|  ares_llist.h ares_strdup.h ares_strcasecmp.h ares_writev.h | ||||
|  | ||||
| MANPAGES= ares_destroy.3 ares_expand_name.3 ares_expand_string.3 ares_fds.3 \ | ||||
|  ares_free_hostent.3 ares_free_string.3 ares_gethostbyaddr.3		    \ | ||||
|   | ||||
| @@ -75,7 +75,7 @@ MKDIR	= mkdir | ||||
| MPKXDC	= mkxdc | ||||
|  | ||||
| # Global flags for all compilers | ||||
| CFLAGS	= $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc | ||||
| CFLAGS	+= $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc | ||||
|  | ||||
| ifeq ($(CC),mwccnlm) | ||||
| LD	= mwldnlm | ||||
| @@ -160,7 +160,7 @@ lib: prebuild $(LTARGET) | ||||
|  | ||||
| nlm: prebuild $(TARGETS) | ||||
|  | ||||
| prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h arpa/nameser.h | ||||
| prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h | ||||
|  | ||||
| install: $(INSTDIR) all | ||||
| 	@$(CP) *.nlm $(INSTDIR) | ||||
| @@ -282,13 +282,21 @@ config.h: Makefile.netware | ||||
| 	@echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@ | ||||
| ifeq ($(LIBARCH),CLIB) | ||||
| 	@echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@ | ||||
| 	@echo $(DL)#define MAXHOSTNAMELEN 256$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_STRNICMP 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECVFROM_TYPE_ARG2 char$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECVFROM_TYPE_ARG3 int$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECVFROM_TYPE_ARG6 int$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECVFROM_TYPE_RETV int$(DL) >> $@ | ||||
| 	@echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@ | ||||
| 	@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@ | ||||
| 	@echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@ | ||||
| @@ -296,15 +304,12 @@ ifeq ($(LIBARCH),CLIB) | ||||
| 	@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@ | ||||
| 	@echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@ | ||||
| 	@echo $(DL)#define socklen_t int$(DL) >> $@ | ||||
| 	@echo $(DL)#define strncasecmp strnicmp$(DL) >> $@ | ||||
| 	@echo $(DL)#define strcasecmp stricmp$(DL) >> $@ | ||||
| else | ||||
| 	@echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_INET_PTON 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@ | ||||
| @@ -325,6 +330,14 @@ else | ||||
| 	@echo $(DL)#define RECV_TYPE_ARG3 size_t$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECV_TYPE_RETV ssize_t$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECVFROM_TYPE_ARG2 void$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECVFROM_TYPE_ARG3 size_t$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECVFROM_TYPE_ARG6 size_t$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECVFROM_TYPE_RETV ssize_t$(DL) >> $@ | ||||
| 	@echo $(DL)#define RECVFROM_TYPE_ARG2_IS_VOID 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@ | ||||
| 	@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@ | ||||
| 	@echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@ | ||||
| @@ -334,7 +347,6 @@ else | ||||
| 	@echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@ | ||||
| endif | ||||
| 	@echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_ARPA_NAMESER_H 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@ | ||||
| @@ -344,12 +356,12 @@ endif | ||||
| 	@echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_INET_NTOA 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_LL 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_RECV 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_RECVFROM 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_SELECT 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_SEND 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@ | ||||
| @@ -372,8 +384,8 @@ endif | ||||
| 	@echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_UTIME 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define HAVE_WRITEV 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define RETSIGTYPE void$(DL) >> $@ | ||||
| 	@echo $(DL)#define SIZEOF_CURL_OFF_T 4$(DL) >> $@ | ||||
| 	@echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@ | ||||
| 	@echo $(DL)#define STDC_HEADERS 1$(DL) >> $@ | ||||
| 	@echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@ | ||||
| @@ -394,9 +406,3 @@ ifdef OLD_NOVELLSDK | ||||
| 	@echo $(DL)#define socklen_t int$(DL) >> $@ | ||||
| endif | ||||
|  | ||||
| arpa/nameser.h: nameser.h | ||||
| 	@echo Fix missing header $@ | ||||
| 	@-mkdir arpa | ||||
| 	@$(CP) $< arpa | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -57,6 +57,7 @@ OBJECTS = $(OBJ_DIR)\ares_fds.obj              \ | ||||
|           $(OBJ_DIR)\ares__read_line.obj       \ | ||||
|           $(OBJ_DIR)\ares_gethostbyname.obj    \ | ||||
|           $(OBJ_DIR)\ares_getnameinfo.obj      \ | ||||
|           $(OBJ_DIR)\ares_strcasecmp.obj       \ | ||||
|           $(OBJ_DIR)\ares_strerror.obj         \ | ||||
|           $(OBJ_DIR)\ares_cancel.obj           \ | ||||
|           $(OBJ_DIR)\ares_init.obj             \ | ||||
| @@ -73,6 +74,7 @@ OBJECTS = $(OBJ_DIR)\ares_fds.obj              \ | ||||
|           $(OBJ_DIR)\windows_port.obj          \ | ||||
|           $(OBJ_DIR)\ares_expand_string.obj    \ | ||||
|           $(OBJ_DIR)\ares_parse_ptr_reply.obj  \ | ||||
|           $(OBJ_DIR)\ares_writev.obj           \ | ||||
|           $(OBJ_DIR)\bitncmp.obj               \ | ||||
|           $(OBJ_DIR)\inet_net_pton.obj         \ | ||||
|           $(OBJ_DIR)\inet_ntop.obj | ||||
| @@ -111,6 +113,7 @@ $(DEF_FILE): $(OBJECTS) Makefile.VC6 | ||||
|        @echo   ares_parse_ptr_reply   >> $@ | ||||
|        @echo   ares_parse_ns_reply    >> $@ | ||||
|        @echo   ares_process           >> $@ | ||||
|        @echo   ares_process_fd        >> $@ | ||||
|        @echo   ares_query             >> $@ | ||||
|        @echo   ares_search            >> $@ | ||||
|        @echo   ares_strerror          >> $@ | ||||
| @@ -183,6 +186,8 @@ $(OBJ_DIR)\ares__read_line.obj: ares__read_line.c setup.h setup_once.h ares.h  \ | ||||
| $(OBJ_DIR)\ares_gethostbyname.obj: ares_gethostbyname.c setup.h setup_once.h   \ | ||||
|   nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h bitncmp.h | ||||
|  | ||||
| $(OBJ_DIR)\ares_strcasecmp.obj: ares_strcasecmp.c setup.h setup_once.h ares.h | ||||
|  | ||||
| $(OBJ_DIR)\ares_strerror.obj: ares_strerror.c setup.h setup_once.h ares.h | ||||
|  | ||||
| $(OBJ_DIR)\ares_cancel.obj: ares_cancel.c setup.h setup_once.h ares.h          \ | ||||
| @@ -242,3 +247,6 @@ $(OBJ_DIR)\ares_getopt.obj: ares_getopt.c ares_getopt.h | ||||
|  | ||||
| $(OBJ_DIR)\ares_llist.obj: ares_llist.c setup.h setup_once.h ares.h            \ | ||||
|   ares_private.h ares_llist.h | ||||
|  | ||||
| $(OBJ_DIR)\ares_writev.obj: ares_writev.c setup.h setup_once.h ares.h          \ | ||||
|   ares_writev.h | ||||
|   | ||||
| @@ -27,7 +27,7 @@ call ares_process() when select() returns. | ||||
| Some features are missing from the current version of ares, relative | ||||
| to the BIND resolver: | ||||
|  | ||||
| 	* There is no IPV6 support. | ||||
| 	* There is no IPV6 support.                [not true for c-ares] | ||||
| 	* There is no hostname verification. | ||||
| 	* There is no logging of unexpected events. | ||||
| 	* There is no debugging-oriented logging. | ||||
|   | ||||
| @@ -1,10 +1,11 @@ | ||||
| This is what's new and changed in the c-ares 1.5.3 release: | ||||
| This is what's new and changed in the c-ares 1.5.4 release: | ||||
|  | ||||
|  o adig sample application compilation failure on some systems | ||||
|  o improved configure detection of several functions | ||||
|  o improved source code portability | ||||
|  | ||||
| Thanks go to these friendly people for their efforts and contributions: | ||||
|  | ||||
|  Brad House | ||||
|   | ||||
|  and obviously Daniel Stenberg | ||||
|  | ||||
| Have fun! | ||||
|   | ||||
							
								
								
									
										8
									
								
								ares/TODO
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								ares/TODO
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| TODO | ||||
| ==== | ||||
|  | ||||
| ares_gethostbyname | ||||
|  | ||||
| - When built to support IPv6, it needs to also support PF_UNSPEC or similar, | ||||
|   so that an application can ask for any protocol and then c-ares would return | ||||
|   all known resolves and not just explicitly IPv4 _or_ IPv6 resolves. | ||||
| @@ -1,5 +1,129 @@ | ||||
|  | ||||
|  | ||||
| dnl CURL_CHECK_COMPILER_HALT_ON_ERROR | ||||
| dnl ------------------------------------------------- | ||||
| dnl Verifies if the compiler actually halts after the | ||||
| dnl compilation phase without generating any object | ||||
| dnl code file, when the source compiles with errors. | ||||
|  | ||||
| AC_DEFUN([CURL_CHECK_COMPILER_HALT_ON_ERROR], [ | ||||
|   AC_MSG_CHECKING([if compiler halts on compilation errors]) | ||||
|   AC_COMPILE_IFELSE([ | ||||
|     AC_LANG_PROGRAM([[ | ||||
|     ]],[[ | ||||
|       force compilation error | ||||
|     ]]) | ||||
|   ],[ | ||||
|     AC_MSG_RESULT([no]) | ||||
|     AC_MSG_ERROR([compiler does not halt on compilation errors.]) | ||||
|   ],[ | ||||
|     AC_MSG_RESULT([yes]) | ||||
|   ]) | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE | ||||
| dnl ------------------------------------------------- | ||||
| dnl Verifies if the compiler actually halts after the | ||||
| dnl compilation phase without generating any object | ||||
| dnl code file, when the source code tries to define a | ||||
| dnl type for a constant array with negative dimension. | ||||
|  | ||||
| AC_DEFUN([CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE], [ | ||||
|   AC_REQUIRE([CURL_CHECK_COMPILER_HALT_ON_ERROR])dnl | ||||
|   AC_MSG_CHECKING([if compiler halts on negative sized arrays]) | ||||
|   AC_COMPILE_IFELSE([ | ||||
|     AC_LANG_PROGRAM([[ | ||||
|       typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ]; | ||||
|     ]],[[ | ||||
|       bad_t dummy; | ||||
|     ]]) | ||||
|   ],[ | ||||
|     AC_MSG_RESULT([no]) | ||||
|     AC_MSG_ERROR([compiler does not halt on negative sized arrays.]) | ||||
|   ],[ | ||||
|     AC_MSG_RESULT([yes]) | ||||
|   ]) | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CURL_CHECK_DEF (SYMBOL, [INCLUDES], [SILENT]) | ||||
| dnl ------------------------------------------------- | ||||
| dnl Use the C preprocessor to find out if the given object-style symbol | ||||
| dnl is defined and get its expansion. This macro will not use default | ||||
| dnl includes even if no INCLUDES argument is given. This macro will run | ||||
| dnl silently when invoked with three arguments. If the expansion would | ||||
| dnl result in a set of double-quoted strings the returned expansion will | ||||
| dnl actually be a single double-quoted string concatenating all them. | ||||
|  | ||||
| AC_DEFUN([CURL_CHECK_DEF], [ | ||||
|   AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])dnl | ||||
|   AS_VAR_PUSHDEF([ac_Def], [curl_cv_def_$1])dnl | ||||
|   if test -z "$SED"; then | ||||
|     AC_MSG_ERROR([SED not set. Cannot continue without SED being set.]) | ||||
|   fi | ||||
|   if test -z "$GREP"; then | ||||
|     AC_MSG_ERROR([GREP not set. Cannot continue without GREP being set.]) | ||||
|   fi | ||||
|   ifelse($3,,[AC_MSG_CHECKING([for preprocessor definition of $1])]) | ||||
|   tmp_exp="" | ||||
|   AC_PREPROC_IFELSE([ | ||||
|     AC_LANG_SOURCE( | ||||
| ifelse($2,,,[$2])[[ | ||||
| #ifdef $1 | ||||
| CURL_DEF_TOKEN $1 | ||||
| #endif | ||||
|     ]]) | ||||
|   ],[ | ||||
|     tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \ | ||||
|       "$GREP" CURL_DEF_TOKEN 2>/dev/null | \ | ||||
|       "$SED" 's/.*CURL_DEF_TOKEN[[ ]]//' 2>/dev/null | \ | ||||
|       "$SED" 's/[["]][[ ]]*[["]]//g' 2>/dev/null` | ||||
|     if test -z "$tmp_exp" || test "$tmp_exp" = "$1"; then | ||||
|       tmp_exp="" | ||||
|     fi | ||||
|   ]) | ||||
|   if test -z "$tmp_exp"; then | ||||
|     AS_VAR_SET(ac_HaveDef, no) | ||||
|     ifelse($3,,[AC_MSG_RESULT([no])]) | ||||
|   else | ||||
|     AS_VAR_SET(ac_HaveDef, yes) | ||||
|     AS_VAR_SET(ac_Def, $tmp_exp) | ||||
|     ifelse($3,,[AC_MSG_RESULT([$tmp_exp])]) | ||||
|   fi | ||||
|   AS_VAR_POPDEF([ac_Def])dnl | ||||
|   AS_VAR_POPDEF([ac_HaveDef])dnl | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_AIX_ALL_SOURCE | ||||
| dnl ------------------------------------------------- | ||||
| dnl Provides a replacement of traditional AC_AIX with | ||||
| dnl an uniform behaviour across all autoconf versions, | ||||
| dnl and with our own placement rules. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_AIX_ALL_SOURCE], [ | ||||
|   AH_VERBATIM([_ALL_SOURCE], | ||||
|     [/* Define to 1 if OS is AIX. */ | ||||
| #ifndef _ALL_SOURCE | ||||
| #  undef _ALL_SOURCE | ||||
| #endif]) | ||||
|   AC_BEFORE([$0], [AC_SYS_LARGEFILE])dnl | ||||
|   AC_BEFORE([$0], [CARES_CONFIGURE_REENTRANT])dnl | ||||
|   AC_MSG_CHECKING([if OS is AIX (to define _ALL_SOURCE)]) | ||||
|   AC_EGREP_CPP([yes_this_is_aix],[ | ||||
| #ifdef _AIX | ||||
|    yes_this_is_aix | ||||
| #endif | ||||
|   ],[ | ||||
|     AC_MSG_RESULT([yes]) | ||||
|     AC_DEFINE(_ALL_SOURCE) | ||||
|   ],[ | ||||
|     AC_MSG_RESULT([no]) | ||||
|   ]) | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CURL_CHECK_HEADER_WINDOWS | ||||
| dnl ------------------------------------------------- | ||||
| dnl Check for compilable and valid windows.h header  | ||||
| @@ -50,7 +174,8 @@ AC_DEFUN([CURL_CHECK_NATIVE_WINDOWS], [ | ||||
|       AC_COMPILE_IFELSE([ | ||||
|         AC_LANG_PROGRAM([[ | ||||
|         ]],[[ | ||||
| #if defined(__MINGW32__) || defined(__MINGW32CE__) | ||||
| #if defined(__MINGW32__) || defined(__MINGW32CE__) || \ | ||||
|    (defined(_MSC_VER) && (defined(_WIN32) || defined(_WIN64))) | ||||
|           int dummy=1; | ||||
| #else | ||||
|           Not a native Windows build target. | ||||
| @@ -250,6 +375,7 @@ AC_DEFUN([CURL_CHECK_TYPE_SOCKLEN_T], [ | ||||
|       for arg1 in 'int' 'SOCKET'; do | ||||
|         for arg2 in "struct sockaddr" void; do | ||||
|           for t in int size_t unsigned long "unsigned long"; do | ||||
|             if test "$curl_cv_socklen_t_equiv" = "unknown"; then | ||||
|               AC_COMPILE_IFELSE([ | ||||
|                 AC_LANG_PROGRAM([[ | ||||
| #undef inline | ||||
| @@ -282,8 +408,8 @@ AC_DEFUN([CURL_CHECK_TYPE_SOCKLEN_T], [ | ||||
|                 ]]) | ||||
|               ],[ | ||||
|                 curl_cv_socklen_t_equiv="$t" | ||||
|                break 3 | ||||
|               ]) | ||||
|             fi | ||||
|           done | ||||
|         done | ||||
|       done | ||||
| @@ -412,6 +538,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [ | ||||
|         for gni_arg2 in 'socklen_t' 'size_t' 'int'; do | ||||
|           for gni_arg46 in 'size_t' 'int' 'socklen_t' 'unsigned int' 'DWORD'; do | ||||
|             for gni_arg7 in 'int' 'unsigned int'; do | ||||
|               if test "$curl_cv_func_getnameinfo_args" = "unknown"; then | ||||
|                 AC_COMPILE_IFELSE([ | ||||
|                   AC_LANG_PROGRAM([[ | ||||
| #undef inline  | ||||
| @@ -456,13 +583,13 @@ AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [ | ||||
|                   ]]) | ||||
|                 ],[ | ||||
|                   curl_cv_func_getnameinfo_args="$gni_arg1,$gni_arg2,$gni_arg46,$gni_arg7" | ||||
|                  break 4 | ||||
|                 ]) | ||||
|               fi | ||||
|             done | ||||
|           done | ||||
|         done | ||||
|       done | ||||
|     ]) # AC_CACHE_CHECK | ||||
|     ]) # AC-CACHE-CHECK | ||||
|     if test "$curl_cv_func_getnameinfo_args" = "unknown"; then | ||||
|       AC_MSG_WARN([Cannot find proper types to use for getnameinfo args]) | ||||
|       AC_MSG_WARN([HAVE_GETNAMEINFO will not be defined]) | ||||
| @@ -520,7 +647,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [ | ||||
|       ac_cv_func_getnameinfo="yes" | ||||
|     fi | ||||
|   fi | ||||
| ]) # AC_DEFUN | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl TYPE_SOCKADDR_STORAGE | ||||
| @@ -575,6 +702,9 @@ AC_DEFUN([CURL_CHECK_NI_WITHSCOPEID], [ | ||||
|     [ac_cv_working_ni_withscopeid], [ | ||||
|     AC_RUN_IFELSE([ | ||||
|       AC_LANG_PROGRAM([[ | ||||
| #ifdef HAVE_STDLIB_H | ||||
| #include <stdlib.h> | ||||
| #endif | ||||
| #ifdef HAVE_STDIO_H | ||||
| #include <stdio.h> | ||||
| #endif | ||||
| @@ -624,7 +754,7 @@ AC_DEFUN([CURL_CHECK_NI_WITHSCOPEID], [ | ||||
| #else | ||||
|         return 4; /* Error, NI_WITHSCOPEID not defined or no getnameinfo() */ | ||||
| #endif | ||||
|       ]]) # AC_LANG_PROGRAM | ||||
|       ]]) # AC-LANG-PROGRAM | ||||
|     ],[ | ||||
|       # Exit code == 0. Program worked. | ||||
|       ac_cv_working_ni_withscopeid="yes" | ||||
| @@ -646,16 +776,16 @@ AC_DEFUN([CURL_CHECK_NI_WITHSCOPEID], [ | ||||
|         ac_cv_working_ni_withscopeid="yes" | ||||
|       ],[ | ||||
|         ac_cv_working_ni_withscopeid="no" | ||||
|       ]) # AC_COMPILE_IFELSE | ||||
|     ]) # AC_RUN_IFELSE | ||||
|   ]) # AC_CACHE_CHECK | ||||
|       ]) # AC-COMPILE-IFELSE | ||||
|     ]) # AC-RUN-IFELSE | ||||
|   ]) # AC-CACHE-CHECK | ||||
|   case "$ac_cv_working_ni_withscopeid" in | ||||
|     yes) | ||||
|       AC_DEFINE(HAVE_NI_WITHSCOPEID, 1, | ||||
|         [Define to 1 if NI_WITHSCOPEID exists and works.]) | ||||
|       ;; | ||||
|   esac | ||||
| ]) # AC_DEFUN | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CURL_CHECK_FUNC_RECV | ||||
| @@ -717,6 +847,7 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [ | ||||
|           for recv_arg2 in 'char *' 'void *'; do | ||||
|             for recv_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do | ||||
|               for recv_arg4 in 'int' 'unsigned int'; do | ||||
|                 if test "$curl_cv_func_recv_args" = "unknown"; then | ||||
|                   AC_COMPILE_IFELSE([ | ||||
|                     AC_LANG_PROGRAM([[ | ||||
| #undef inline  | ||||
| @@ -742,7 +873,8 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [ | ||||
| #endif | ||||
| #define RECVCALLCONV | ||||
| #endif | ||||
|                     extern $recv_retv RECVCALLCONV recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4); | ||||
|                       extern $recv_retv RECVCALLCONV | ||||
|                       recv($recv_arg1, $recv_arg2, $recv_arg3, $recv_arg4); | ||||
|                     ]],[[ | ||||
|                       $recv_arg1 s=0; | ||||
|                       $recv_arg2 buf=0; | ||||
| @@ -752,14 +884,14 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [ | ||||
|                     ]]) | ||||
|                   ],[ | ||||
|                     curl_cv_func_recv_args="$recv_arg1,$recv_arg2,$recv_arg3,$recv_arg4,$recv_retv" | ||||
|                    break 5 | ||||
|                   ]) | ||||
|                 fi | ||||
|               done | ||||
|             done | ||||
|           done | ||||
|         done | ||||
|       done | ||||
|     ]) # AC_CACHE_CHECK | ||||
|     ]) # AC-CACHE-CHECK | ||||
|     if test "$curl_cv_func_recv_args" = "unknown"; then | ||||
|       AC_MSG_ERROR([Cannot find proper types to use for recv args]) | ||||
|     else | ||||
| @@ -786,7 +918,7 @@ AC_DEFUN([CURL_CHECK_FUNC_RECV], [ | ||||
|   else | ||||
|     AC_MSG_ERROR([Unable to link function recv]) | ||||
|   fi | ||||
| ]) # AC_DEFUN | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CURL_CHECK_FUNC_SEND | ||||
| @@ -849,6 +981,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [ | ||||
|           for send_arg2 in 'char *' 'void *' 'const char *' 'const void *'; do | ||||
|             for send_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do | ||||
|               for send_arg4 in 'int' 'unsigned int'; do | ||||
|                 if test "$curl_cv_func_send_args" = "unknown"; then | ||||
|                   AC_COMPILE_IFELSE([ | ||||
|                     AC_LANG_PROGRAM([[ | ||||
| #undef inline  | ||||
| @@ -874,7 +1007,8 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [ | ||||
| #endif | ||||
| #define SENDCALLCONV | ||||
| #endif | ||||
|                     extern $send_retv SENDCALLCONV send($send_arg1, $send_arg2, $send_arg3, $send_arg4); | ||||
|                       extern $send_retv SENDCALLCONV | ||||
|                       send($send_arg1, $send_arg2, $send_arg3, $send_arg4); | ||||
|                     ]],[[ | ||||
|                       $send_arg1 s=0; | ||||
|                       $send_arg3 len=0; | ||||
| @@ -883,14 +1017,14 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [ | ||||
|                     ]]) | ||||
|                   ],[ | ||||
|                     curl_cv_func_send_args="$send_arg1,$send_arg2,$send_arg3,$send_arg4,$send_retv" | ||||
|                    break 5 | ||||
|                   ]) | ||||
|                 fi | ||||
|               done | ||||
|             done | ||||
|           done | ||||
|         done | ||||
|       done | ||||
|     ]) # AC_CACHE_CHECK | ||||
|     ]) # AC-CACHE-CHECK | ||||
|     if test "$curl_cv_func_send_args" = "unknown"; then | ||||
|       AC_MSG_ERROR([Cannot find proper types to use for send args]) | ||||
|     else | ||||
| @@ -951,7 +1085,201 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [ | ||||
|   else | ||||
|     AC_MSG_ERROR([Unable to link function send]) | ||||
|   fi | ||||
| ]) # AC_DEFUN | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CURL_CHECK_FUNC_RECVFROM | ||||
| dnl ------------------------------------------------- | ||||
| dnl Test if the socket recvfrom() function is available, | ||||
| dnl and check its return type and the types of its | ||||
| dnl arguments. If the function succeeds HAVE_RECVFROM | ||||
| dnl will be defined, defining the types of the arguments | ||||
| dnl in RECVFROM_TYPE_ARG1, RECVFROM_TYPE_ARG2, and so on | ||||
| dnl to RECVFROM_TYPE_ARG6, defining also the type of the | ||||
| dnl function return value in RECVFROM_TYPE_RETV. | ||||
| dnl Notice that the types returned for pointer arguments | ||||
| dnl will actually be the type pointed by the pointer. | ||||
|  | ||||
| AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [ | ||||
|   AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl | ||||
|   AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl | ||||
|   AC_CHECK_HEADERS(sys/types.h sys/socket.h) | ||||
|   # | ||||
|   AC_MSG_CHECKING([for recvfrom]) | ||||
|   AC_LINK_IFELSE([ | ||||
|     AC_LANG_PROGRAM([[ | ||||
| #undef inline  | ||||
| #ifdef HAVE_WINDOWS_H | ||||
| #ifndef WIN32_LEAN_AND_MEAN | ||||
| #define WIN32_LEAN_AND_MEAN | ||||
| #endif | ||||
| #include <windows.h> | ||||
| #ifdef HAVE_WINSOCK2_H | ||||
| #include <winsock2.h> | ||||
| #else | ||||
| #ifdef HAVE_WINSOCK_H | ||||
| #include <winsock.h> | ||||
| #endif | ||||
| #endif | ||||
| #else | ||||
| #ifdef HAVE_SYS_TYPES_H | ||||
| #include <sys/types.h> | ||||
| #endif | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #include <sys/socket.h> | ||||
| #endif | ||||
| #endif | ||||
|     ]],[[ | ||||
|       recvfrom(0, 0, 0, 0, 0, 0); | ||||
|     ]]) | ||||
|   ],[ | ||||
|     AC_MSG_RESULT([yes]) | ||||
|     curl_cv_recvfrom="yes" | ||||
|   ],[ | ||||
|     AC_MSG_RESULT([no]) | ||||
|     curl_cv_recvfrom="no" | ||||
|   ]) | ||||
|   # | ||||
|   if test "$curl_cv_recvfrom" = "yes"; then | ||||
|     AC_CACHE_CHECK([types of args and return type for recvfrom], | ||||
|       [curl_cv_func_recvfrom_args], [ | ||||
|       curl_cv_func_recvfrom_args="unknown" | ||||
|       for recvfrom_retv in 'int' 'ssize_t'; do | ||||
|         for recvfrom_arg1 in 'int' 'ssize_t' 'SOCKET'; do | ||||
|           for recvfrom_arg2 in 'char *' 'void *'; do | ||||
|             for recvfrom_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do | ||||
|               for recvfrom_arg4 in 'int' 'unsigned int'; do | ||||
|                 for recvfrom_arg5 in 'struct sockaddr *' 'void *'; do | ||||
|                   for recvfrom_arg6 in 'socklen_t *' 'int *' 'unsigned int *' 'size_t *' 'void *'; do | ||||
|                     if test "$curl_cv_func_recvfrom_args" = "unknown"; then | ||||
|                       AC_COMPILE_IFELSE([ | ||||
|                         AC_LANG_PROGRAM([[ | ||||
| #undef inline  | ||||
| #ifdef HAVE_WINDOWS_H | ||||
| #ifndef WIN32_LEAN_AND_MEAN | ||||
| #define WIN32_LEAN_AND_MEAN | ||||
| #endif | ||||
| #include <windows.h> | ||||
| #ifdef HAVE_WINSOCK2_H | ||||
| #include <winsock2.h> | ||||
| #else | ||||
| #ifdef HAVE_WINSOCK_H | ||||
| #include <winsock.h> | ||||
| #endif | ||||
| #endif | ||||
| #define RECVFROMCALLCONV PASCAL | ||||
| #else | ||||
| #ifdef HAVE_SYS_TYPES_H | ||||
| #include <sys/types.h> | ||||
| #endif | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #include <sys/socket.h> | ||||
| #endif | ||||
| #define RECVFROMCALLCONV | ||||
| #endif | ||||
|                           extern $recvfrom_retv RECVFROMCALLCONV | ||||
|                           recvfrom($recvfrom_arg1, $recvfrom_arg2, | ||||
|                                    $recvfrom_arg3, $recvfrom_arg4, | ||||
|                                    $recvfrom_arg5, $recvfrom_arg6); | ||||
|                         ]],[[ | ||||
|                           $recvfrom_arg1 s=0; | ||||
|                           $recvfrom_arg2 buf=0; | ||||
|                           $recvfrom_arg3 len=0; | ||||
|                           $recvfrom_arg4 flags=0; | ||||
|                           $recvfrom_arg5 addr=0; | ||||
|                           $recvfrom_arg6 addrlen=0; | ||||
|                           $recvfrom_retv res=0; | ||||
|                           res = recvfrom(s, buf, len, flags, addr, addrlen); | ||||
|                         ]]) | ||||
|                       ],[ | ||||
|                         curl_cv_func_recvfrom_args="$recvfrom_arg1,$recvfrom_arg2,$recvfrom_arg3,$recvfrom_arg4,$recvfrom_arg5,$recvfrom_arg6,$recvfrom_retv" | ||||
|                       ]) | ||||
|                     fi | ||||
|                   done | ||||
|                 done | ||||
|               done | ||||
|             done | ||||
|           done | ||||
|         done | ||||
|       done | ||||
|     ]) # AC-CACHE-CHECK | ||||
|     # Nearly last minute change for this release starts here | ||||
|     AC_DEFINE_UNQUOTED(HAVE_RECVFROM, 1, | ||||
|       [Define to 1 if you have the recvfrom function.]) | ||||
|     ac_cv_func_recvfrom="yes" | ||||
|     # Nearly last minute change for this release ends here | ||||
|     if test "$curl_cv_func_recvfrom_args" = "unknown"; then | ||||
|       AC_MSG_WARN([Cannot find proper types to use for recvfrom args]) | ||||
|     else | ||||
|       recvfrom_prev_IFS=$IFS; IFS=',' | ||||
|       set dummy `echo "$curl_cv_func_recvfrom_args" | sed 's/\*/\*/g'` | ||||
|       IFS=$recvfrom_prev_IFS | ||||
|       shift | ||||
|       # | ||||
|       recvfrom_ptrt_arg2=$[2] | ||||
|       recvfrom_ptrt_arg5=$[5] | ||||
|       recvfrom_ptrt_arg6=$[6] | ||||
|       # | ||||
|       AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG1, $[1], | ||||
|         [Define to the type of arg 1 for recvfrom.]) | ||||
|       AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG3, $[3], | ||||
|         [Define to the type of arg 3 for recvfrom.]) | ||||
|       AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG4, $[4], | ||||
|         [Define to the type of arg 4 for recvfrom.]) | ||||
|       AC_DEFINE_UNQUOTED(RECVFROM_TYPE_RETV, $[7], | ||||
|         [Define to the function return type for recvfrom.]) | ||||
|       # | ||||
|       prev_sh_opts=$- | ||||
|       # | ||||
|       case $prev_sh_opts in | ||||
|         *f*) | ||||
|           ;; | ||||
|         *) | ||||
|           set -f | ||||
|           ;; | ||||
|       esac | ||||
|       # | ||||
|       recvfrom_type_arg2=`echo $recvfrom_ptrt_arg2 | sed 's/ \*//'` | ||||
|       recvfrom_type_arg5=`echo $recvfrom_ptrt_arg5 | sed 's/ \*//'` | ||||
|       recvfrom_type_arg6=`echo $recvfrom_ptrt_arg6 | sed 's/ \*//'` | ||||
|       # | ||||
|       AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG2, $recvfrom_type_arg2, | ||||
|         [Define to the type pointed by arg 2 for recvfrom.]) | ||||
|       AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG5, $recvfrom_type_arg5, | ||||
|         [Define to the type pointed by arg 5 for recvfrom.]) | ||||
|       AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG6, $recvfrom_type_arg6, | ||||
|         [Define to the type pointed by arg 6 for recvfrom.]) | ||||
|       # | ||||
|       if test "$recvfrom_type_arg2" = "void"; then | ||||
|         AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG2_IS_VOID, 1, | ||||
|           [Define to 1 if the type pointed by arg 2 for recvfrom is void.]) | ||||
|       fi | ||||
|       if test "$recvfrom_type_arg5" = "void"; then | ||||
|         AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG5_IS_VOID, 1, | ||||
|           [Define to 1 if the type pointed by arg 5 for recvfrom is void.]) | ||||
|       fi | ||||
|       if test "$recvfrom_type_arg6" = "void"; then | ||||
|         AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG6_IS_VOID, 1, | ||||
|           [Define to 1 if the type pointed by arg 6 for recvfrom is void.]) | ||||
|       fi | ||||
|       # | ||||
|       case $prev_sh_opts in | ||||
|         *f*) | ||||
|           ;; | ||||
|         *) | ||||
|           set +f | ||||
|           ;; | ||||
|       esac | ||||
|       # | ||||
|       AC_DEFINE_UNQUOTED(HAVE_RECVFROM, 1, | ||||
|         [Define to 1 if you have the recvfrom function.]) | ||||
|       ac_cv_func_recvfrom="yes" | ||||
|     fi | ||||
|   else | ||||
|     AC_MSG_WARN([Unable to link function recvfrom]) | ||||
|     AC_MSG_WARN([Your system will be vulnerable to some forms of DNS cache poisoning]) | ||||
|   fi | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CURL_CHECK_MSG_NOSIGNAL | ||||
| @@ -999,7 +1327,7 @@ AC_DEFUN([CURL_CHECK_MSG_NOSIGNAL], [ | ||||
|         [Define to 1 if you have the MSG_NOSIGNAL flag.]) | ||||
|       ;; | ||||
|   esac | ||||
| ]) # AC_DEFUN | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CURL_CHECK_STRUCT_TIMEVAL | ||||
| @@ -1058,7 +1386,7 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [ | ||||
|         [Define to 1 if you have the timeval struct.]) | ||||
|       ;; | ||||
|   esac | ||||
| ]) # AC_DEFUN | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl TYPE_SIG_ATOMIC_T | ||||
| @@ -1102,7 +1430,7 @@ AC_DEFUN([TYPE_SIG_ATOMIC_T], [ | ||||
|       fi | ||||
|       ;; | ||||
|   esac | ||||
| ]) # AC_DEFUN | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CURL_CHECK_NONBLOCKING_SOCKET | ||||
| @@ -1257,14 +1585,15 @@ dnl TYPE_IN_ADDR_T | ||||
| dnl ------------------------------------------------- | ||||
| dnl Check for in_addr_t: it is used to receive the return code of inet_addr() | ||||
| dnl and a few other things. | ||||
| AC_DEFUN([TYPE_IN_ADDR_T], | ||||
| [ | ||||
|  | ||||
| AC_DEFUN([TYPE_IN_ADDR_T], [ | ||||
|   AC_CHECK_TYPE([in_addr_t], ,[ | ||||
|       AC_MSG_CHECKING([for in_addr_t equivalent]) | ||||
|       AC_CACHE_VAL([curl_cv_in_addr_t_equiv], | ||||
|       [ | ||||
|          curl_cv_in_addr_t_equiv= | ||||
|     dnl in_addr_t not available | ||||
|     AC_CACHE_CHECK([for in_addr_t equivalent], | ||||
|       [curl_cv_in_addr_t_equiv], [ | ||||
|       curl_cv_in_addr_t_equiv="unknown" | ||||
|       for t in "unsigned long" int size_t unsigned long; do | ||||
|         if test "$curl_cv_in_addr_t_equiv" = "unknown"; then | ||||
|           AC_LINK_IFELSE([ | ||||
|             AC_LANG_PROGRAM([[ | ||||
| #undef inline | ||||
| @@ -1299,18 +1628,20 @@ AC_DEFUN([TYPE_IN_ADDR_T], | ||||
|             ]]) | ||||
|           ],[ | ||||
|             curl_cv_in_addr_t_equiv="$t" | ||||
|               break | ||||
|           ]) | ||||
|          done | ||||
|  | ||||
|          if test "x$curl_cv_in_addr_t_equiv" = x; then | ||||
|             AC_MSG_ERROR([Cannot find a type to use in place of in_addr_t]) | ||||
|         fi | ||||
|       done | ||||
|     ]) | ||||
|       AC_MSG_RESULT($curl_cv_in_addr_t_equiv) | ||||
|     case "$curl_cv_in_addr_t_equiv" in | ||||
|       unknown) | ||||
|         AC_MSG_ERROR([Cannot find a type to use in place of in_addr_t]) | ||||
|         ;; | ||||
|       *) | ||||
|         AC_DEFINE_UNQUOTED(in_addr_t, $curl_cv_in_addr_t_equiv, | ||||
| 			[type to use in place of in_addr_t if not defined])], | ||||
|       [ | ||||
|           [Type to use in place of in_addr_t when system does not provide it.]) | ||||
|         ;; | ||||
|     esac | ||||
|   ],[ | ||||
| #undef inline | ||||
| #ifdef HAVE_WINDOWS_H | ||||
| #ifndef WIN32_LEAN_AND_MEAN | ||||
| @@ -1338,8 +1669,9 @@ AC_DEFUN([TYPE_IN_ADDR_T], | ||||
| #include <arpa/inet.h> | ||||
| #endif | ||||
| #endif | ||||
|   ]) dnl AC_CHECK_TYPE | ||||
| ]) dnl AC_DEFUN | ||||
|   ]) | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC | ||||
| dnl ------------------------------------------------- | ||||
| @@ -1375,9 +1707,10 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC], [ | ||||
|     AC_MSG_RESULT([no]) | ||||
|     ac_cv_func_clock_gettime="no" | ||||
|   ]) | ||||
|   dnl Definition of HAVE_CLOCK_GETTIME_MONOTONIC is intentionally | ||||
|   dnl postponed until library linking checks for clock_gettime pass. | ||||
| ]) dnl AC_DEFUN | ||||
|   dnl Definition of HAVE_CLOCK_GETTIME_MONOTONIC is intentionally postponed | ||||
|   dnl until library linking and run-time checks for clock_gettime succeed. | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC | ||||
| dnl ------------------------------------------------- | ||||
| @@ -1395,6 +1728,7 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [ | ||||
|     curl_cv_gclk_LIBS="unknown" | ||||
|     # | ||||
|     for x_xlibs in '' '-lrt' '-lposix4' ; do | ||||
|       if test "$curl_cv_gclk_LIBS" = "unknown"; then | ||||
|         if test -z "$x_xlibs"; then | ||||
|           LIBS="$curl_cv_save_LIBS" | ||||
|         else | ||||
| @@ -1421,8 +1755,8 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [ | ||||
|           ]]) | ||||
|         ],[ | ||||
|           curl_cv_gclk_LIBS="$x_xlibs" | ||||
|         break | ||||
|         ]) | ||||
|       fi | ||||
|     done | ||||
|     # | ||||
|     LIBS="$curl_cv_save_LIBS" | ||||
| @@ -1448,6 +1782,45 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [ | ||||
|         ;; | ||||
|     esac | ||||
|     # | ||||
|     dnl only do runtime verification when not cross-compiling | ||||
|     if test "x$cross_compiling" != "xyes" && | ||||
|       test "$ac_cv_func_clock_gettime" = "yes"; then | ||||
|       AC_MSG_CHECKING([if monotonic clock_gettime works]) | ||||
|       AC_RUN_IFELSE([ | ||||
|         AC_LANG_PROGRAM([[ | ||||
| #ifdef HAVE_STDLIB_H | ||||
| #include <stdlib.h> | ||||
| #endif | ||||
| #ifdef HAVE_SYS_TYPES_H | ||||
| #include <sys/types.h> | ||||
| #endif | ||||
| #ifdef HAVE_SYS_TIME_H | ||||
| #include <sys/time.h> | ||||
| #ifdef TIME_WITH_SYS_TIME | ||||
| #include <time.h> | ||||
| #endif | ||||
| #else | ||||
| #ifdef HAVE_TIME_H | ||||
| #include <time.h> | ||||
| #endif | ||||
| #endif | ||||
|         ]],[[ | ||||
|           struct timespec ts; | ||||
|           if (0 == clock_gettime(CLOCK_MONOTONIC, &ts)) | ||||
|             exit(0); | ||||
|           else | ||||
|             exit(1); | ||||
|         ]]) | ||||
|       ],[ | ||||
|         AC_MSG_RESULT([yes]) | ||||
|       ],[ | ||||
|         AC_MSG_RESULT([no]) | ||||
|         AC_MSG_WARN([HAVE_CLOCK_GETTIME_MONOTONIC will not be defined]) | ||||
|         ac_cv_func_clock_gettime="no" | ||||
|         LIBS="$curl_cv_save_LIBS" | ||||
|       ]) | ||||
|     fi | ||||
|     # | ||||
|     case "$ac_cv_func_clock_gettime" in | ||||
|       yes) | ||||
|         AC_DEFINE_UNQUOTED(HAVE_CLOCK_GETTIME_MONOTONIC, 1, | ||||
| @@ -1457,161 +1830,8 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [ | ||||
|     # | ||||
|   fi | ||||
|   # | ||||
| ]) dnl AC_DEFUN | ||||
|  | ||||
| dnl ********************************************************************** | ||||
| dnl CURL_DETECT_ICC ([ACTION-IF-YES]) | ||||
| dnl | ||||
| dnl check if this is the Intel ICC compiler, and if so run the ACTION-IF-YES | ||||
| dnl sets the $ICC variable to "yes" or "no" | ||||
| dnl ********************************************************************** | ||||
| AC_DEFUN([CURL_DETECT_ICC], | ||||
| [ | ||||
|     ICC="no" | ||||
|     AC_MSG_CHECKING([for icc in use]) | ||||
|     if test "$GCC" = "yes"; then | ||||
|        dnl check if this is icc acting as gcc in disguise | ||||
|        AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER], | ||||
|          dnl action if the text is found, this it has not been replaced by the | ||||
|          dnl cpp | ||||
|          ICC="no", | ||||
|          dnl the text was not found, it was replaced by the cpp | ||||
|          ICC="yes" | ||||
|          AC_MSG_RESULT([yes]) | ||||
|          [$1] | ||||
|        ) | ||||
|     fi | ||||
|     if test "$ICC" = "no"; then | ||||
|         # this is not ICC | ||||
|         AC_MSG_RESULT([no]) | ||||
|     fi | ||||
| ]) | ||||
|  | ||||
| dnl We create a function for detecting which compiler we use and then set as | ||||
| dnl pendantic compiler options as possible for that particular compiler. The | ||||
| dnl options are only used for debug-builds. | ||||
|  | ||||
| dnl This is a copy of the original found in curl's configure script. Don't | ||||
| dnl modify this one, edit the one in curl and copy it back here when that one | ||||
| dnl is changed. | ||||
|  | ||||
| AC_DEFUN([CURL_CC_DEBUG_OPTS], | ||||
| [ | ||||
|     if test "z$ICC" = "z"; then | ||||
|       CURL_DETECT_ICC | ||||
|     fi | ||||
|  | ||||
|     if test "$GCC" = "yes"; then | ||||
|  | ||||
|        dnl figure out gcc version! | ||||
|        AC_MSG_CHECKING([gcc version]) | ||||
|        gccver=`$CC -dumpversion` | ||||
|        num1=`echo $gccver | cut -d . -f1` | ||||
|        num2=`echo $gccver | cut -d . -f2` | ||||
|        gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null` | ||||
|        AC_MSG_RESULT($gccver) | ||||
|  | ||||
|        if test "$ICC" = "yes"; then | ||||
|          dnl this is icc, not gcc. | ||||
|  | ||||
|          dnl ICC warnings we ignore: | ||||
|          dnl * 269 warns on our "%Od" printf formatters for curl_off_t output: | ||||
|          dnl   "invalid format string conversion" | ||||
|          dnl * 279 warns on static conditions in while expressions | ||||
|          dnl * 981 warns on "operands are evaluated in unspecified order" | ||||
|          dnl * 1418 "external definition with no prior declaration" | ||||
|          dnl * 1419 warns on "external declaration in primary source file" | ||||
|          dnl   which we know and do on purpose. | ||||
|  | ||||
|          WARN="-wd279,269,981,1418,1419" | ||||
|  | ||||
|          if test "$gccnum" -gt "600"; then | ||||
|             dnl icc 6.0 and older doesn't have the -Wall flag | ||||
|             WARN="-Wall $WARN" | ||||
|          fi | ||||
|        else dnl $ICC = yes | ||||
|          dnl this is a set of options we believe *ALL* gcc versions support: | ||||
|          WARN="-W -Wall -Wwrite-strings -pedantic -Wpointer-arith -Wnested-externs -Winline -Wmissing-prototypes" | ||||
|  | ||||
|          dnl -Wcast-align is a bit too annoying on all gcc versions ;-) | ||||
|  | ||||
|          if test "$gccnum" -ge "207"; then | ||||
|            dnl gcc 2.7 or later | ||||
|            WARN="$WARN -Wmissing-declarations" | ||||
|          fi | ||||
|  | ||||
|          if test "$gccnum" -gt "295"; then | ||||
|            dnl only if the compiler is newer than 2.95 since we got lots of | ||||
|            dnl "`_POSIX_C_SOURCE' is not defined" in system headers with | ||||
|            dnl gcc 2.95.4 on FreeBSD 4.9! | ||||
|            WARN="$WARN -Wundef -Wno-long-long -Wsign-compare -Wshadow -Wno-multichar" | ||||
|          fi | ||||
|  | ||||
|          if test "$gccnum" -ge "296"; then | ||||
|            dnl gcc 2.96 or later | ||||
|            WARN="$WARN -Wfloat-equal" | ||||
|          fi | ||||
|  | ||||
|          if test "$gccnum" -gt "296"; then | ||||
|            dnl this option does not exist in 2.96 | ||||
|            WARN="$WARN -Wno-format-nonliteral" | ||||
|          fi | ||||
|  | ||||
|          dnl -Wunreachable-code seems totally unreliable on my gcc 3.3.2 on | ||||
|          dnl on i686-Linux as it gives us heaps with false positives. | ||||
|          dnl Also, on gcc 4.0.X it is totally unbearable and complains all | ||||
|          dnl over making it unusable for generic purposes. Let's not use it. | ||||
|  | ||||
|          if test "$gccnum" -ge "303"; then | ||||
|            dnl gcc 3.3 and later | ||||
|            WARN="$WARN -Wendif-labels -Wstrict-prototypes" | ||||
|          fi | ||||
|  | ||||
|          if test "$gccnum" -ge "304"; then | ||||
|            # try these on gcc 3.4 | ||||
|            WARN="$WARN -Wdeclaration-after-statement" | ||||
|          fi | ||||
|  | ||||
|          for flag in $CPPFLAGS; do | ||||
|            case "$flag" in | ||||
|             -I*) | ||||
|               dnl Include path, provide a -isystem option for the same dir | ||||
|               dnl to prevent warnings in those dirs. The -isystem was not very | ||||
|               dnl reliable on earlier gcc versions. | ||||
|               add=`echo $flag | sed 's/^-I/-isystem /g'` | ||||
|               WARN="$WARN $add" | ||||
|               ;; | ||||
|            esac | ||||
|          done | ||||
|  | ||||
|        fi dnl $ICC = no | ||||
|  | ||||
|        CFLAGS="$CFLAGS $WARN" | ||||
|  | ||||
|       AC_MSG_NOTICE([Added this set of compiler options: $WARN]) | ||||
|  | ||||
|     else dnl $GCC = yes | ||||
|  | ||||
|       AC_MSG_NOTICE([Added no extra compiler options]) | ||||
|  | ||||
|     fi dnl $GCC = yes | ||||
|  | ||||
|     dnl strip off optimizer flags | ||||
|     NEWFLAGS="" | ||||
|     for flag in $CFLAGS; do | ||||
|       case "$flag" in | ||||
|       -O*) | ||||
|         dnl echo "cut off $flag" | ||||
|         ;; | ||||
|       *) | ||||
|         NEWFLAGS="$NEWFLAGS $flag" | ||||
|         ;; | ||||
|       esac | ||||
|     done | ||||
|     CFLAGS=$NEWFLAGS | ||||
|  | ||||
| ]) dnl end of AC_DEFUN() | ||||
|  | ||||
|  | ||||
| dnl This macro determines if the specified struct exists in the specified file | ||||
| dnl Syntax: | ||||
| @@ -1658,75 +1878,3 @@ AC_DEFUN([CARES_CHECK_CONSTANT], [ | ||||
|   fi | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_GETSERVBYPORT_R | ||||
| dnl ------------------------------------------------- | ||||
| dnl Test if the getservbyport_r function is available, | ||||
| dnl and find out how many parameters it takes. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_GETSERVBYPORT_R], [ | ||||
|   AC_MSG_CHECKING([how many arguments getservbyport_r takes]) | ||||
|   ac_func_getservbyport_r="unknown" | ||||
|  | ||||
|   AC_LINK_IFELSE([ | ||||
|     AC_LANG_PROGRAM([[ | ||||
| #include <netdb.h> | ||||
|     ]],[[ | ||||
|       int p1, p5; | ||||
|       char *p2, p4[4096]; | ||||
|       struct servent *p3, *p6; | ||||
|       getservbyport_r(p1, p2, p3, p4, p5, &p6); | ||||
|     ]]) | ||||
|   ],[ | ||||
|     ac_func_getservbyport_r="6" | ||||
|   ]) | ||||
|  | ||||
|   if test "$ac_func_getservbyport_r" = "unknown"; then | ||||
|     AC_LINK_IFELSE([ | ||||
|       AC_LANG_PROGRAM([[ | ||||
| #include <netdb.h> | ||||
|       ]],[[ | ||||
|         int p1, p5; | ||||
|         char *p2, p4[4096]; | ||||
|         struct servent *p3; | ||||
|         getservbyport_r(p1, p2, p3, p4, p5); | ||||
|       ]]) | ||||
|     ],[ | ||||
|       ac_func_getservbyport_r="5" | ||||
|     ]) | ||||
|   fi | ||||
|  | ||||
|   if test "$ac_func_getservbyport_r" = "unknown"; then | ||||
|     AC_LINK_IFELSE([ | ||||
|       AC_LANG_PROGRAM([[ | ||||
| #include <netdb.h> | ||||
|       ]],[[ | ||||
|         int p1; | ||||
|         char *p2; | ||||
|         struct servent *p3; | ||||
|         struct servent_data p4; | ||||
|         getservbyport_r(p1, p2, p3, &p4); | ||||
|       ]]) | ||||
|     ],[ | ||||
|       ac_func_getservbyport_r="4" | ||||
|     ]) | ||||
|   fi | ||||
|  | ||||
|   if test "$ac_func_getservbyport_r" = "unknown"; then | ||||
|     AC_MSG_RESULT([not found]) | ||||
|   else | ||||
|     AC_MSG_RESULT($ac_func_getservbyport_r) | ||||
|     AC_DEFINE(HAVE_GETSERVBYPORT_R, 1, | ||||
|       [Specifies whether getservbyport_r is present]) | ||||
|     AC_DEFINE_UNQUOTED(GETSERVBYPORT_R_ARGS, $ac_func_getservbyport_r, | ||||
|       [Specifies the number of arguments to getservbyport_r]) | ||||
|     if test "$ac_func_getservbyport_r" = "4" ; then | ||||
|       AC_DEFINE(GETSERVBYPORT_R_BUFSIZE, sizeof(struct servent_data), | ||||
|         [Specifies the size of the buffer to pass to getservbyport_r]) | ||||
|     else | ||||
|       AC_DEFINE(GETSERVBYPORT_R_BUFSIZE, 4096, | ||||
|         [Specifies the size of the buffer to pass to getservbyport_r]) | ||||
|     fi | ||||
|   fi | ||||
| ]) | ||||
|  | ||||
|   | ||||
| @@ -47,7 +47,7 @@ | ||||
| #include <strings.h> | ||||
| #endif | ||||
|  | ||||
| #if defined(WIN32) | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
|   #include <winsock.h> | ||||
| #else | ||||
|   #include <arpa/inet.h> | ||||
| @@ -60,6 +60,25 @@ | ||||
| #include "inet_net_pton.h" | ||||
| #include "inet_ntop.h" | ||||
|  | ||||
| #ifndef HAVE_STRDUP | ||||
| #  include "ares_strdup.h" | ||||
| #  define strdup(ptr) ares_strdup(ptr) | ||||
| #endif | ||||
|  | ||||
| #ifndef HAVE_STRCASECMP | ||||
| #  include "ares_strcasecmp.h" | ||||
| #  define strcasecmp(p1,p2) ares_strcasecmp(p1,p2) | ||||
| #endif | ||||
|  | ||||
| #ifndef HAVE_STRNCASECMP | ||||
| #  include "ares_strcasecmp.h" | ||||
| #  define strncasecmp(p1,p2,n) ares_strncasecmp(p1,p2,n) | ||||
| #endif | ||||
|  | ||||
| #ifndef INADDR_NONE | ||||
| #define INADDR_NONE 0xffffffff | ||||
| #endif | ||||
|  | ||||
| static const char *usage      = "acountry [-vh?] {host|addr} ...\n"; | ||||
| static const char  nerd_fmt[] = "%u.%u.%u.%u.zz.countries.nerd.dk"; | ||||
| static const char *nerd_ver1  = nerd_fmt + 14; | ||||
| @@ -90,7 +109,7 @@ int main(int argc, char **argv) | ||||
|   ares_channel channel; | ||||
|   int    ch, status; | ||||
|  | ||||
| #ifdef WIN32 | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
|   WORD wVersionRequested = MAKEWORD(USE_WINSOCK,USE_WINSOCK); | ||||
|   WSADATA wsaData; | ||||
|   WSAStartup(wVersionRequested, &wsaData); | ||||
| @@ -158,7 +177,7 @@ int main(int argc, char **argv) | ||||
|   wait_ares(channel); | ||||
|   ares_destroy(channel); | ||||
|  | ||||
| #ifdef WIN32 | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
|   WSACleanup(); | ||||
| #endif | ||||
|  | ||||
| @@ -236,7 +255,7 @@ struct search_list { | ||||
|        const char *long_name;      /* normal country name */ | ||||
|      }; | ||||
|  | ||||
| const struct search_list *list_lookup(int number, const struct search_list *list, int num) | ||||
| static const struct search_list *list_lookup(int number, const struct search_list *list, int num) | ||||
| { | ||||
|   while (num > 0 && list->long_name) | ||||
|     { | ||||
| @@ -504,7 +523,8 @@ static int is_addr(char *str, char **end) | ||||
| { | ||||
|   int a0, a1, a2, a3, num, rc = 0, length = 0; | ||||
|  | ||||
|   if ((num = sscanf(str,"%3d.%3d.%3d.%3d%n",&a0,&a1,&a2,&a3,&length)) == 4 && | ||||
|   num = sscanf(str,"%3d.%3d.%3d.%3d%n",&a0,&a1,&a2,&a3,&length); | ||||
|   if( (num == 4) && | ||||
|       BYTE_OK(a0) && BYTE_OK(a1) && BYTE_OK(a2) && BYTE_OK(a3) && | ||||
|       length >= (3+4)) | ||||
|     { | ||||
| @@ -532,6 +552,7 @@ static void find_country_from_cname(const char *cname, struct in_addr addr) | ||||
|   z0 = tolower(cname[0]); | ||||
|   z1 = tolower(cname[1]); | ||||
|   ccopy = strdup(cname); | ||||
|   dot_4 = NULL; | ||||
|  | ||||
|   ver_1 = (z0 == 'z' && z1 == 'z' && !strcasecmp(cname+4,nerd_ver1)); | ||||
|   ver_2 = (is_addr(ccopy,&dot_4) && !strcasecmp(dot_4,nerd_ver2)); | ||||
| @@ -563,8 +584,8 @@ static void find_country_from_cname(const char *cname, struct in_addr addr) | ||||
|  | ||||
|   if (ver_1) | ||||
|     { | ||||
|       ccode_A2[0] = tolower(cname[2]); | ||||
|       ccode_A2[1] = tolower(cname[3]); | ||||
|       ccode_A2[0] = (char)tolower(cname[2]); | ||||
|       ccode_A2[1] = (char)tolower(cname[3]); | ||||
|       ccode_A2[2] = '\0'; | ||||
|     } | ||||
|   else | ||||
|   | ||||
							
								
								
									
										129
									
								
								ares/adig.c
									
									
									
									
									
								
							
							
						
						
									
										129
									
								
								ares/adig.c
									
									
									
									
									
								
							| @@ -17,24 +17,33 @@ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #else | ||||
| #ifdef HAVE_SYS_TIME_H | ||||
| #include <sys/time.h> | ||||
| #endif | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #  include <sys/socket.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #  include <netinet/in.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_INET_H | ||||
| #  include <arpa/inet.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETDB_H | ||||
| #  include <netdb.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_SYS_TIME_H | ||||
| #  include <sys/time.h> | ||||
| #endif | ||||
| #ifdef HAVE_UNISTD_H | ||||
| #  include <unistd.h> | ||||
| #endif | ||||
| #include <netdb.h> | ||||
| #endif | ||||
| #ifdef HAVE_STRINGS_H | ||||
| #  include <strings.h> | ||||
| #endif | ||||
| @@ -48,8 +57,24 @@ | ||||
| #include "ares.h" | ||||
| #include "ares_dns.h" | ||||
| #include "inet_ntop.h" | ||||
| #include "inet_net_pton.h" | ||||
| #include "ares_getopt.h" | ||||
|  | ||||
| #ifndef HAVE_STRDUP | ||||
| #  include "ares_strdup.h" | ||||
| #  define strdup(ptr) ares_strdup(ptr) | ||||
| #endif | ||||
|  | ||||
| #ifndef HAVE_STRCASECMP | ||||
| #  include "ares_strcasecmp.h" | ||||
| #  define strcasecmp(p1,p2) ares_strcasecmp(p1,p2) | ||||
| #endif | ||||
|  | ||||
| #ifndef HAVE_STRNCASECMP | ||||
| #  include "ares_strcasecmp.h" | ||||
| #  define strncasecmp(p1,p2,n) ares_strncasecmp(p1,p2,n) | ||||
| #endif | ||||
|  | ||||
| #ifdef WATT32 | ||||
| #undef WIN32  /* Redefined in MingW headers */ | ||||
| #endif | ||||
| @@ -127,6 +152,7 @@ static const char *opcodes[] = { | ||||
|   "UPDATEA", "UPDATED", "UPDATEDA", "UPDATEM", "UPDATEMA", | ||||
|   "ZONEINIT", "ZONEREF" | ||||
| }; | ||||
|   struct in_addr inaddr; | ||||
|  | ||||
| static const char *rcodes[] = { | ||||
|   "NOERROR", "FORMERR", "SERVFAIL", "NXDOMAIN", "NOTIMP", "REFUSED", | ||||
| @@ -188,12 +214,16 @@ int main(int argc, char **argv) | ||||
|  | ||||
|         case 's': | ||||
|           /* Add a server, and specify servers in the option mask. */ | ||||
|           if (ares_inet_pton(AF_INET, optarg, &inaddr) <= 0) | ||||
|             { | ||||
|               hostent = gethostbyname(optarg); | ||||
|               if (!hostent || hostent->h_addrtype != AF_INET) | ||||
|                 { | ||||
|                   fprintf(stderr, "adig: server %s not found.\n", optarg); | ||||
|                   return 1; | ||||
|                 } | ||||
|               memcpy(&inaddr, hostent->h_addr, sizeof(struct in_addr)); | ||||
|             } | ||||
|           options.servers = realloc(options.servers, (options.nservers + 1) | ||||
|                                     * sizeof(struct in_addr)); | ||||
|           if (!options.servers) | ||||
| @@ -201,7 +231,7 @@ int main(int argc, char **argv) | ||||
|               fprintf(stderr, "Out of memory!\n"); | ||||
|               return 1; | ||||
|             } | ||||
|           memcpy(&options.servers[options.nservers], hostent->h_addr, | ||||
|           memcpy(&options.servers[options.nservers], &inaddr, | ||||
|                  sizeof(struct in_addr)); | ||||
|           options.nservers++; | ||||
|           optmask |= ARES_OPT_SERVERS; | ||||
| @@ -436,13 +466,16 @@ static const unsigned char *display_rr(const unsigned char *aptr, | ||||
|                                        const unsigned char *abuf, int alen) | ||||
| { | ||||
|   const unsigned char *p; | ||||
|   char *name; | ||||
|   int type, dnsclass, ttl, dlen, status; | ||||
|   long len; | ||||
|   char addr[46]; | ||||
|   union { | ||||
|     unsigned char * as_uchar; | ||||
|              char * as_char; | ||||
|   } name; | ||||
|  | ||||
|   /* Parse the RR name. */ | ||||
|   status = ares_expand_name(aptr, abuf, alen, &name, &len); | ||||
|   status = ares_expand_name(aptr, abuf, alen, &name.as_char, &len); | ||||
|   if (status != ARES_SUCCESS) | ||||
|     return NULL; | ||||
|   aptr += len; | ||||
| @@ -452,7 +485,7 @@ static const unsigned char *display_rr(const unsigned char *aptr, | ||||
|    */ | ||||
|   if (aptr + RRFIXEDSZ > abuf + alen) | ||||
|     { | ||||
|       ares_free_string(name); | ||||
|       ares_free_string(name.as_char); | ||||
|       return NULL; | ||||
|     } | ||||
|  | ||||
| @@ -465,16 +498,16 @@ static const unsigned char *display_rr(const unsigned char *aptr, | ||||
|   aptr += RRFIXEDSZ; | ||||
|   if (aptr + dlen > abuf + alen) | ||||
|     { | ||||
|       ares_free_string(name); | ||||
|       ares_free_string(name.as_char); | ||||
|       return NULL; | ||||
|     } | ||||
|  | ||||
|   /* Display the RR name, class, and type. */ | ||||
|   printf("\t%-15s.\t%d", name, ttl); | ||||
|   printf("\t%-15s.\t%d", name.as_char, ttl); | ||||
|   if (dnsclass != C_IN) | ||||
|     printf("\t%s", class_name(dnsclass)); | ||||
|   printf("\t%s", type_name(type)); | ||||
|   ares_free_string(name); | ||||
|   ares_free_string(name.as_char); | ||||
|  | ||||
|   /* Display the RR data.  Don't touch aptr. */ | ||||
|   switch (type) | ||||
| @@ -488,11 +521,11 @@ static const unsigned char *display_rr(const unsigned char *aptr, | ||||
|     case T_NS: | ||||
|     case T_PTR: | ||||
|       /* For these types, the RR data is just a domain name. */ | ||||
|       status = ares_expand_name(aptr, abuf, alen, &name, &len); | ||||
|       status = ares_expand_name(aptr, abuf, alen, &name.as_char, &len); | ||||
|       if (status != ARES_SUCCESS) | ||||
|         return NULL; | ||||
|       printf("\t%s.", name); | ||||
|       ares_free_string(name); | ||||
|       printf("\t%s.", name.as_char); | ||||
|       ares_free_string(name.as_char); | ||||
|       break; | ||||
|  | ||||
|     case T_HINFO: | ||||
| @@ -512,17 +545,17 @@ static const unsigned char *display_rr(const unsigned char *aptr, | ||||
|     case T_MINFO: | ||||
|       /* The RR data is two domain names. */ | ||||
|       p = aptr; | ||||
|       status = ares_expand_name(p, abuf, alen, &name, &len); | ||||
|       status = ares_expand_name(p, abuf, alen, &name.as_char, &len); | ||||
|       if (status != ARES_SUCCESS) | ||||
|         return NULL; | ||||
|       printf("\t%s.", name); | ||||
|       ares_free_string(name); | ||||
|       printf("\t%s.", name.as_char); | ||||
|       ares_free_string(name.as_char); | ||||
|       p += len; | ||||
|       status = ares_expand_name(p, abuf, alen, &name, &len); | ||||
|       status = ares_expand_name(p, abuf, alen, &name.as_char, &len); | ||||
|       if (status != ARES_SUCCESS) | ||||
|         return NULL; | ||||
|       printf("\t%s.", name); | ||||
|       ares_free_string(name); | ||||
|       printf("\t%s.", name.as_char); | ||||
|       ares_free_string(name.as_char); | ||||
|       break; | ||||
|  | ||||
|     case T_MX: | ||||
| @@ -532,11 +565,11 @@ static const unsigned char *display_rr(const unsigned char *aptr, | ||||
|       if (dlen < 2) | ||||
|         return NULL; | ||||
|       printf("\t%d", DNS__16BIT(aptr)); | ||||
|       status = ares_expand_name(aptr + 2, abuf, alen, &name, &len); | ||||
|       status = ares_expand_name(aptr + 2, abuf, alen, &name.as_char, &len); | ||||
|       if (status != ARES_SUCCESS) | ||||
|         return NULL; | ||||
|       printf("\t%s.", name); | ||||
|       ares_free_string(name); | ||||
|       printf("\t%s.", name.as_char); | ||||
|       ares_free_string(name.as_char); | ||||
|       break; | ||||
|  | ||||
|     case T_SOA: | ||||
| @@ -544,17 +577,17 @@ static const unsigned char *display_rr(const unsigned char *aptr, | ||||
|        * numbers giving the serial number and some timeouts. | ||||
|        */ | ||||
|       p = aptr; | ||||
|       status = ares_expand_name(p, abuf, alen, &name, &len); | ||||
|       status = ares_expand_name(p, abuf, alen, &name.as_char, &len); | ||||
|       if (status != ARES_SUCCESS) | ||||
|         return NULL; | ||||
|       printf("\t%s.\n", name); | ||||
|       ares_free_string(name); | ||||
|       printf("\t%s.\n", name.as_char); | ||||
|       ares_free_string(name.as_char); | ||||
|       p += len; | ||||
|       status = ares_expand_name(p, abuf, alen, &name, &len); | ||||
|       status = ares_expand_name(p, abuf, alen, &name.as_char, &len); | ||||
|       if (status != ARES_SUCCESS) | ||||
|         return NULL; | ||||
|       printf("\t\t\t\t\t\t%s.\n", name); | ||||
|       ares_free_string(name); | ||||
|       printf("\t\t\t\t\t\t%s.\n", name.as_char); | ||||
|       ares_free_string(name.as_char); | ||||
|       p += len; | ||||
|       if (p + 20 > aptr + dlen) | ||||
|         return NULL; | ||||
| @@ -605,11 +638,11 @@ static const unsigned char *display_rr(const unsigned char *aptr, | ||||
|       printf(" %d", DNS__16BIT(aptr + 2)); | ||||
|       printf(" %d", DNS__16BIT(aptr + 4)); | ||||
|  | ||||
|       status = ares_expand_name(aptr + 6, abuf, alen, &name, &len); | ||||
|       status = ares_expand_name(aptr + 6, abuf, alen, &name.as_char, &len); | ||||
|       if (status != ARES_SUCCESS) | ||||
|         return NULL; | ||||
|       printf("\t%s.", name); | ||||
|       ares_free_string(name); | ||||
|       printf("\t%s.", name.as_char); | ||||
|       ares_free_string(name.as_char); | ||||
|       break; | ||||
|  | ||||
|     case T_NAPTR: | ||||
| @@ -618,32 +651,32 @@ static const unsigned char *display_rr(const unsigned char *aptr, | ||||
|       printf(" %d\n", DNS__16BIT(aptr + 2)); /* preference */ | ||||
|  | ||||
|       p = aptr + 4; | ||||
|       status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len); | ||||
|       status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len); | ||||
|       if (status != ARES_SUCCESS) | ||||
|         return NULL; | ||||
|       printf("\t\t\t\t\t\t%s\n", name); | ||||
|       ares_free_string(name); | ||||
|       printf("\t\t\t\t\t\t%s\n", name.as_char); | ||||
|       ares_free_string(name.as_char); | ||||
|       p += len; | ||||
|  | ||||
|       status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len); | ||||
|       status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len); | ||||
|       if (status != ARES_SUCCESS) | ||||
|         return NULL; | ||||
|       printf("\t\t\t\t\t\t%s\n", name); | ||||
|       ares_free_string(name); | ||||
|       printf("\t\t\t\t\t\t%s\n", name.as_char); | ||||
|       ares_free_string(name.as_char); | ||||
|       p += len; | ||||
|  | ||||
|       status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len); | ||||
|       status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len); | ||||
|       if (status != ARES_SUCCESS) | ||||
|         return NULL; | ||||
|       printf("\t\t\t\t\t\t%s\n", name); | ||||
|       ares_free_string(name); | ||||
|       printf("\t\t\t\t\t\t%s\n", name.as_char); | ||||
|       ares_free_string(name.as_char); | ||||
|       p += len; | ||||
|  | ||||
|       status = ares_expand_string(p, abuf, alen, (unsigned char **)&name, &len); | ||||
|       status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len); | ||||
|       if (status != ARES_SUCCESS) | ||||
|         return NULL; | ||||
|       printf("\t\t\t\t\t\t%s", name); | ||||
|       ares_free_string(name); | ||||
|       printf("\t\t\t\t\t\t%s", name.as_char); | ||||
|       ares_free_string(name.as_char); | ||||
|       break; | ||||
|  | ||||
|  | ||||
|   | ||||
							
								
								
									
										15
									
								
								ares/ahost.c
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								ares/ahost.c
									
									
									
									
									
								
							| @@ -43,6 +43,21 @@ | ||||
| #include "inet_net_pton.h" | ||||
| #include "ares_getopt.h" | ||||
|  | ||||
| #ifndef HAVE_STRDUP | ||||
| #  include "ares_strdup.h" | ||||
| #  define strdup(ptr) ares_strdup(ptr) | ||||
| #endif | ||||
|  | ||||
| #ifndef HAVE_STRCASECMP | ||||
| #  include "ares_strcasecmp.h" | ||||
| #  define strcasecmp(p1,p2) ares_strcasecmp(p1,p2) | ||||
| #endif | ||||
|  | ||||
| #ifndef HAVE_STRNCASECMP | ||||
| #  include "ares_strcasecmp.h" | ||||
| #  define strncasecmp(p1,p2,n) ares_strncasecmp(p1,p2,n) | ||||
| #endif | ||||
|  | ||||
| static void callback(void *arg, int status, int timeouts, struct hostent *host); | ||||
| static void usage(void); | ||||
|  | ||||
|   | ||||
| @@ -114,6 +114,7 @@ extern "C" { | ||||
| #define ARES_OPT_SOCK_SNDBUF    (1 << 11) | ||||
| #define ARES_OPT_SOCK_RCVBUF    (1 << 12) | ||||
| #define ARES_OPT_TIMEOUTMS      (1 << 13) | ||||
| #define ARES_OPT_ROTATE         (1 << 14) | ||||
|  | ||||
| /* Nameinfo flag values */ | ||||
| #define ARES_NI_NOFQDN                  (1 << 0) | ||||
| @@ -184,6 +185,7 @@ struct ares_options { | ||||
|   int timeout; /* in seconds or milliseconds, depending on options */ | ||||
|   int tries; | ||||
|   int ndots; | ||||
|   int rotate; | ||||
|   unsigned short udp_port; | ||||
|   unsigned short tcp_port; | ||||
|   int socket_send_buffer_size; | ||||
|   | ||||
| @@ -18,11 +18,19 @@ | ||||
| #include "setup.h" | ||||
|  | ||||
| #if !defined(WIN32) || defined(WATT32) | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #include <sys/socket.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #include <netinet/in.h> | ||||
| #include <arpa/inet.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETDB_H | ||||
| #include <netdb.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_INET_H | ||||
| #include <arpa/inet.h> | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| @@ -30,8 +38,8 @@ | ||||
| #include <ctype.h> | ||||
|  | ||||
| #include "ares.h" | ||||
| #include "ares_private.h" | ||||
| #include "inet_net_pton.h" | ||||
| #include "ares_private.h" | ||||
|  | ||||
| int ares__get_hostent(FILE *fp, int family, struct hostent **host) | ||||
| { | ||||
|   | ||||
| @@ -46,9 +46,24 @@ struct timeval ares__tvnow(void) | ||||
|   */ | ||||
|   struct timeval now; | ||||
|   struct timespec tsnow; | ||||
|   (void)clock_gettime(CLOCK_MONOTONIC, &tsnow); | ||||
|   if(0 == clock_gettime(CLOCK_MONOTONIC, &tsnow)) { | ||||
|     now.tv_sec = tsnow.tv_sec; | ||||
|     now.tv_usec = tsnow.tv_nsec / 1000; | ||||
|   } | ||||
|   /* | ||||
|   ** Even when the configure process has truly detected monotonic clock | ||||
|   ** availability, it might happen that it is not actually available at | ||||
|   ** run-time. When this occurs simply fallback to other time source. | ||||
|   */ | ||||
| #ifdef HAVE_GETTIMEOFDAY | ||||
|   else | ||||
|     (void)gettimeofday(&now, NULL); | ||||
| #else | ||||
|   else { | ||||
|     now.tv_sec = (long)time(NULL); | ||||
|     now.tv_usec = 0; | ||||
|   } | ||||
| #endif | ||||
|   return now; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -17,15 +17,17 @@ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #else | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #  include <netinet/in.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #include <stdlib.h> | ||||
| #include "ares.h" | ||||
|   | ||||
| @@ -17,11 +17,13 @@ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #else | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #  include <netinet/in.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
|  | ||||
| #include <string.h> | ||||
|   | ||||
| @@ -16,25 +16,34 @@ | ||||
|  */ | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #else | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #  include <sys/socket.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #  include <netinet/in.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETDB_H | ||||
| #  include <netdb.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_INET_H | ||||
| #  include <arpa/inet.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
|  | ||||
| #include "ares.h" | ||||
| #include "ares_private.h" | ||||
| #include "inet_net_pton.h" | ||||
| #include "ares_private.h" | ||||
|  | ||||
| #ifdef WATT32 | ||||
| #undef WIN32 | ||||
|   | ||||
| @@ -17,20 +17,26 @@ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #else | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #  include <sys/socket.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #  include <netinet/in.h> | ||||
| #include <arpa/inet.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETDB_H | ||||
| #  include <netdb.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_INET_H | ||||
| #  include <arpa/inet.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| @@ -41,9 +47,9 @@ | ||||
| #endif | ||||
|  | ||||
| #include "ares.h" | ||||
| #include "ares_private.h" | ||||
| #include "inet_net_pton.h" | ||||
| #include "bitncmp.h" | ||||
| #include "ares_private.h" | ||||
|  | ||||
| #ifdef WATT32 | ||||
| #undef WIN32 | ||||
| @@ -176,6 +182,15 @@ static void host_callback(void *arg, int status, int timeouts, | ||||
|       else if (hquery->family == AF_INET6) | ||||
|         { | ||||
|           status = ares_parse_aaaa_reply(abuf, alen, &host, NULL, NULL); | ||||
|           if (status == ARES_ENODATA) | ||||
|             { | ||||
|               /* The query returned something (e.g. CNAME) but there were no | ||||
|                  AAAA records.  Try looking up A instead.  */ | ||||
|               hquery->family = AF_INET; | ||||
|               ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback, | ||||
|                           hquery); | ||||
|               return; | ||||
|             } | ||||
|           if (host && channel->nsort) | ||||
|             sort6_addresses(host, channel->sortlist, channel->nsort); | ||||
|         } | ||||
|   | ||||
| @@ -16,18 +16,33 @@ | ||||
|  */ | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #else | ||||
| #ifdef HAVE_GETSERVBYPORT_R | ||||
| #  if !defined(GETSERVBYPORT_R_ARGS) || \ | ||||
|      (GETSERVBYPORT_R_ARGS < 4) || (GETSERVBYPORT_R_ARGS > 6) | ||||
| #    error "you MUST specifiy a valid number of arguments for getservbyport_r" | ||||
| #  endif | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #  include <sys/socket.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #  include <netinet/in.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETDB_H | ||||
| #  include <netdb.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_INET_H | ||||
| #  include <arpa/inet.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_NET_IF_H | ||||
| #include <net/if.h> | ||||
| @@ -42,9 +57,9 @@ | ||||
| #include <string.h> | ||||
|  | ||||
| #include "ares.h" | ||||
| #include "ares_private.h" | ||||
| #include "ares_ipv6.h" | ||||
| #include "inet_ntop.h" | ||||
| #include "ares_private.h" | ||||
|  | ||||
| #ifdef WATT32 | ||||
| #undef WIN32 | ||||
|   | ||||
							
								
								
									
										139
									
								
								ares/ares_init.c
									
									
									
									
									
								
							
							
						
						
									
										139
									
								
								ares/ares_init.c
									
									
									
									
									
								
							| @@ -19,11 +19,10 @@ | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #include <iphlpapi.h> | ||||
| #include <malloc.h> | ||||
| #endif | ||||
|  | ||||
| #else | ||||
| #ifdef HAVE_SYS_PARAM_H | ||||
| #include <sys/param.h> | ||||
| #endif | ||||
| @@ -36,20 +35,30 @@ | ||||
| #include <sys/socket.h> | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #include <netinet/in.h> | ||||
| #include <arpa/inet.h> | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_NETDB_H | ||||
| #include <netdb.h> | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_ARPA_INET_H | ||||
| #include <arpa/inet.h> | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_UNISTD_H | ||||
| #include <unistd.h> | ||||
| #endif | ||||
| #ifdef HAVE_PROCESS_H | ||||
| #include <process.h>  /* Some have getpid() here */ | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| @@ -58,8 +67,8 @@ | ||||
| #include <time.h> | ||||
| #include <errno.h> | ||||
| #include "ares.h" | ||||
| #include "ares_private.h" | ||||
| #include "inet_net_pton.h" | ||||
| #include "ares_private.h" | ||||
|  | ||||
| #ifdef WATT32 | ||||
| #undef WIN32  /* Redefined in MingW/MSVC headers */ | ||||
| @@ -135,6 +144,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options, | ||||
|   channel->timeout = -1; | ||||
|   channel->tries = -1; | ||||
|   channel->ndots = -1; | ||||
|   channel->rotate = -1; | ||||
|   channel->udp_port = -1; | ||||
|   channel->tcp_port = -1; | ||||
|   channel->socket_send_buffer_size = -1; | ||||
| @@ -150,6 +160,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options, | ||||
|   channel->sock_state_cb = NULL; | ||||
|   channel->sock_state_cb_data = NULL; | ||||
|  | ||||
|   channel->last_server = 0; | ||||
|   channel->last_timeout_processed = (time_t)now.tv_sec; | ||||
|  | ||||
|   /* Initialize our lists of queries */ | ||||
| @@ -343,6 +354,8 @@ static int init_by_options(ares_channel channel, | ||||
|     channel->tries = options->tries; | ||||
|   if ((optmask & ARES_OPT_NDOTS) && channel->ndots == -1) | ||||
|     channel->ndots = options->ndots; | ||||
|   if ((optmask & ARES_OPT_ROTATE) && channel->rotate == -1) | ||||
|     channel->rotate = options->rotate; | ||||
|   if ((optmask & ARES_OPT_UDP_PORT) && channel->udp_port == -1) | ||||
|     channel->udp_port = options->udp_port; | ||||
|   if ((optmask & ARES_OPT_TCP_PORT) && channel->tcp_port == -1) | ||||
| @@ -675,7 +688,7 @@ DhcpNameServer | ||||
|       { | ||||
|         if (bytes) | ||||
|         { | ||||
|           line = (char *)malloc(bytes+1); | ||||
|           line = malloc(bytes+1); | ||||
|           if (RegQueryValueEx(mykey, NAMESERVER, NULL, &data_type, | ||||
|                               (unsigned char *)line, &bytes) == | ||||
|               ERROR_SUCCESS) | ||||
| @@ -912,7 +925,8 @@ okay: | ||||
|  | ||||
| static int init_by_defaults(ares_channel channel) | ||||
| { | ||||
|   char hostname[MAXHOSTNAMELEN + 1]; | ||||
|   char *hostname = NULL; | ||||
|   int rc = ARES_SUCCESS; | ||||
|  | ||||
|   if (channel->flags == -1) | ||||
|     channel->flags = 0; | ||||
| @@ -922,58 +936,110 @@ static int init_by_defaults(ares_channel channel) | ||||
|     channel->tries = DEFAULT_TRIES; | ||||
|   if (channel->ndots == -1) | ||||
|     channel->ndots = 1; | ||||
|   if (channel->rotate == -1) | ||||
|     channel->rotate = 0; | ||||
|   if (channel->udp_port == -1) | ||||
|     channel->udp_port = htons(NAMESERVER_PORT); | ||||
|   if (channel->tcp_port == -1) | ||||
|     channel->tcp_port = htons(NAMESERVER_PORT); | ||||
|  | ||||
|   if (channel->nservers == -1) | ||||
|     { | ||||
|   if (channel->nservers == -1) { | ||||
|     /* If nobody specified servers, try a local named. */ | ||||
|     channel->servers = malloc(sizeof(struct server_state)); | ||||
|       if (!channel->servers) | ||||
|         return ARES_ENOMEM; | ||||
|     if (!channel->servers) { | ||||
|       rc = ARES_ENOMEM; | ||||
|       goto error; | ||||
|     } | ||||
|     channel->servers[0].addr.s_addr = htonl(INADDR_LOOPBACK); | ||||
|     channel->nservers = 1; | ||||
|   } | ||||
|  | ||||
|   if (channel->ndomains == -1) | ||||
|     { | ||||
| #ifdef ENAMETOOLONG | ||||
| #define toolong(x) (x == -1) && ((ENAMETOOLONG == errno) || (EINVAL == errno)) | ||||
| #else | ||||
| #define toolong(x) (x == -1) && (EINVAL == errno) | ||||
| #endif | ||||
|  | ||||
|   if (channel->ndomains == -1) { | ||||
|     /* Derive a default domain search list from the kernel hostname, | ||||
|      * or set it to empty if the hostname isn't helpful. | ||||
|      */ | ||||
|       if (gethostname(hostname, sizeof(hostname)) == -1 | ||||
|           || !strchr(hostname, '.')) | ||||
|         { | ||||
|           channel->ndomains = 0; | ||||
|     size_t len = 64; | ||||
|     int res; | ||||
|  | ||||
|     hostname = malloc(len); | ||||
|     if(!hostname) { | ||||
|       rc = ARES_ENOMEM; | ||||
|       goto error; | ||||
|     } | ||||
|       else | ||||
|         { | ||||
|  | ||||
|     do { | ||||
|       res = gethostname(hostname, len); | ||||
|  | ||||
|       if(toolong(res)) { | ||||
|         char *p; | ||||
|         len *= 2; | ||||
|         p = realloc(hostname, len); | ||||
|         if(!p) { | ||||
|           rc = ARES_ENOMEM; | ||||
|           goto error; | ||||
|         } | ||||
|         hostname = p; | ||||
|         continue; | ||||
|       } | ||||
|       else if(res) { | ||||
|         rc = ARES_EBADNAME; | ||||
|         goto error; | ||||
|       } | ||||
|  | ||||
|     } while(0); | ||||
|  | ||||
|     channel->ndomains = 0; /* default to none */ | ||||
|     if (strchr(hostname, '.'))  { | ||||
|       /* a dot was found */ | ||||
|  | ||||
|       channel->domains = malloc(sizeof(char *)); | ||||
|           if (!channel->domains) | ||||
|             return ARES_ENOMEM; | ||||
|           channel->ndomains = 0; | ||||
|       if (!channel->domains) { | ||||
|         rc = ARES_ENOMEM; | ||||
|         goto error; | ||||
|       } | ||||
|       channel->domains[0] = strdup(strchr(hostname, '.') + 1); | ||||
|           if (!channel->domains[0]) | ||||
|             return ARES_ENOMEM; | ||||
|       if (!channel->domains[0]) { | ||||
|         rc = ARES_ENOMEM; | ||||
|         goto error; | ||||
|       } | ||||
|       channel->ndomains = 1; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   if (channel->nsort == -1) | ||||
|     { | ||||
|   if (channel->nsort == -1) { | ||||
|     channel->sortlist = NULL; | ||||
|     channel->nsort = 0; | ||||
|   } | ||||
|  | ||||
|   if (!channel->lookups) | ||||
|     { | ||||
|   if (!channel->lookups) { | ||||
|     channel->lookups = strdup("fb"); | ||||
|     if (!channel->lookups) | ||||
|         return ARES_ENOMEM; | ||||
|       rc = ARES_ENOMEM; | ||||
|   } | ||||
|  | ||||
|   return ARES_SUCCESS; | ||||
|   error: | ||||
|   if(rc) { | ||||
|     if(channel->servers) | ||||
|       free(channel->servers); | ||||
|  | ||||
|     if(channel->domains && channel->domains[0]) | ||||
|       free(channel->domains[0]); | ||||
|     if(channel->domains) | ||||
|       free(channel->domains); | ||||
|     if(channel->lookups) | ||||
|       free(channel->lookups); | ||||
|   } | ||||
|  | ||||
|   if(hostname) | ||||
|     free(hostname); | ||||
|  | ||||
|   return rc; | ||||
| } | ||||
|  | ||||
| #ifndef WIN32 | ||||
| @@ -1242,6 +1308,9 @@ static int set_options(ares_channel channel, const char *str) | ||||
|       val = try_option(p, q, "retry:"); | ||||
|       if (val && channel->tries == -1) | ||||
|         channel->tries = atoi(val); | ||||
|       val = try_option(p, q, "rotate"); | ||||
|       if (val && channel->rotate == -1) | ||||
|         channel->rotate = 1; | ||||
|       p = q; | ||||
|       while (ISSPACE(*p)) | ||||
|         p++; | ||||
| @@ -1314,7 +1383,7 @@ static char *try_config(char *s, const char *opt) | ||||
| static const char *try_option(const char *p, const char *q, const char *opt) | ||||
| { | ||||
|   size_t len = strlen(opt); | ||||
|   return ((size_t)(q - p) > len && !strncmp(p, opt, len)) ? &p[len] : NULL; | ||||
|   return ((size_t)(q - p) >= len && !strncmp(p, opt, len)) ? &p[len] : NULL; | ||||
| } | ||||
|  | ||||
| #ifndef WIN32 | ||||
| @@ -1413,11 +1482,11 @@ static int init_id_key(rc4_key* key,int key_data_len) | ||||
|   if (!key_data_ptr) | ||||
|     return ARES_ENOMEM; | ||||
|  | ||||
|   randomize_key(key->state,key_data_len); | ||||
|   state = &key->state[0]; | ||||
|   for(counter = 0; counter < 256; counter++) | ||||
|     /* unnecessary AND but it keeps some compilers happier */ | ||||
|     state[counter] = (unsigned char)(counter & 0xff); | ||||
|   randomize_key(key->state,key_data_len); | ||||
|   key->x = 0; | ||||
|   key->y = 0; | ||||
|   index1 = 0; | ||||
|   | ||||
| @@ -17,15 +17,17 @@ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #else | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #  include <netinet/in.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
|   | ||||
| @@ -17,18 +17,27 @@ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #else | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #  include <sys/socket.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #  include <netinet/in.h> | ||||
| #include <arpa/inet.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETDB_H | ||||
| #  include <netdb.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_INET_H | ||||
| #  include <arpa/inet.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_STRINGS_H | ||||
| #  include <strings.h> | ||||
| #endif | ||||
|   | ||||
| @@ -17,20 +17,27 @@ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #else | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #  include <sys/socket.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #  include <netinet/in.h> | ||||
| #include <arpa/inet.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETDB_H | ||||
| #  include <netdb.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_INET_H | ||||
| #  include <arpa/inet.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_STRINGS_H | ||||
| #  include <strings.h> | ||||
| #endif | ||||
|   | ||||
| @@ -20,18 +20,26 @@ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #else | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #  include <sys/socket.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #  include <netinet/in.h> | ||||
| #include <arpa/inet.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETDB_H | ||||
| #  include <netdb.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_INET_H | ||||
| #  include <arpa/inet.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
|   | ||||
| @@ -17,17 +17,24 @@ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #else | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #  include <sys/socket.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #  include <netinet/in.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETDB_H | ||||
| #  include <netdb.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_STRINGS_H | ||||
| #  include <strings.h> | ||||
| #endif | ||||
| @@ -77,7 +84,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, | ||||
|  | ||||
|   /* Examine each answer resource record (RR) in turn. */ | ||||
|   hostname = NULL; | ||||
|   aliases = (char **) malloc(8 * sizeof(char *)); | ||||
|   aliases = malloc(8 * sizeof(char *)); | ||||
|   if (!aliases) | ||||
|     { | ||||
|       free(ptrname); | ||||
| @@ -119,7 +126,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, | ||||
|           strncpy(aliases[aliascnt], rr_data, strlen(rr_data)+1); | ||||
|           aliascnt++; | ||||
|           if ((aliascnt%8)==0) | ||||
|             aliases = (char **) realloc(aliases, (aliascnt/16+1) * sizeof(char *)); | ||||
|             aliases = realloc(aliases, (aliascnt/16+1) * sizeof(char *)); | ||||
|         } | ||||
|  | ||||
|       if (rr_class == C_IN && rr_type == T_CNAME) | ||||
|   | ||||
| @@ -43,6 +43,7 @@ | ||||
| #undef  closesocket | ||||
| #define closesocket(s)    close_s(s) | ||||
| #define writev(s,v,c)     writev_s(s,v,c) | ||||
| #define HAVE_WRITEV 1 | ||||
| #endif | ||||
|  | ||||
| #ifdef NETWARE | ||||
| @@ -94,6 +95,26 @@ | ||||
| #include "ares_ipv6.h" | ||||
| #include "ares_llist.h" | ||||
|  | ||||
| #ifndef HAVE_STRDUP | ||||
| #  include "ares_strdup.h" | ||||
| #  define strdup(ptr) ares_strdup(ptr) | ||||
| #endif | ||||
|  | ||||
| #ifndef HAVE_STRCASECMP | ||||
| #  include "ares_strcasecmp.h" | ||||
| #  define strcasecmp(p1,p2) ares_strcasecmp(p1,p2) | ||||
| #endif | ||||
|  | ||||
| #ifndef HAVE_STRNCASECMP | ||||
| #  include "ares_strcasecmp.h" | ||||
| #  define strncasecmp(p1,p2,n) ares_strncasecmp(p1,p2,n) | ||||
| #endif | ||||
|  | ||||
| #ifndef HAVE_WRITEV | ||||
| #  include "ares_writev.h" | ||||
| #  define writev(s,ptr,cnt) ares_writev(s,ptr,cnt) | ||||
| #endif | ||||
|  | ||||
| struct query; | ||||
|  | ||||
| struct send_request { | ||||
| @@ -174,8 +195,8 @@ struct query { | ||||
|   void *arg; | ||||
|  | ||||
|   /* Query status */ | ||||
|   int try; | ||||
|   int server; | ||||
|   int try; /* Number of times we tried this query already. */ | ||||
|   int server; /* Server this query has last been sent to. */ | ||||
|   struct query_server_info *server_info;   /* per-server state */ | ||||
|   int using_tcp; | ||||
|   int error_status; | ||||
| @@ -221,6 +242,7 @@ struct ares_channeldata { | ||||
|   int timeout; /* in milliseconds */ | ||||
|   int tries; | ||||
|   int ndots; | ||||
|   int rotate; /* if true, all servers specified are used */ | ||||
|   int udp_port; | ||||
|   int tcp_port; | ||||
|   int socket_send_buffer_size; | ||||
| @@ -247,6 +269,9 @@ struct ares_channeldata { | ||||
|      just to draw the line somewhere. */ | ||||
|   time_t last_timeout_processed; | ||||
|  | ||||
|   /* Last server we sent a query to. */ | ||||
|   int last_server; | ||||
|  | ||||
|   /* Circular, doubly-linked list of queries, bucketed various ways.... */ | ||||
|   /* All active queries in a single list: */ | ||||
|   struct list_node all_queries; | ||||
| @@ -268,7 +293,7 @@ int ares__timedout(struct timeval *now, | ||||
| int ares__timeadd(struct timeval *now, | ||||
|                   int millisecs); | ||||
| /* return time offset between now and (future) check, in milliseconds */ | ||||
| int ares__timeoffset(struct timeval *now, | ||||
| long ares__timeoffset(struct timeval *now, | ||||
|                       struct timeval *check); | ||||
| void ares__rc4(rc4_key* key,unsigned char *buffer_ptr, int buffer_len); | ||||
| void ares__send_query(ares_channel channel, struct query *query, | ||||
|   | ||||
| @@ -18,10 +18,6 @@ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
|  | ||||
| #else | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #  include <sys/socket.h> | ||||
| #endif | ||||
| @@ -29,24 +25,26 @@ | ||||
| #  include <sys/uio.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #include <netinet/in.h> /* <netinet/tcp.h> may need it */ | ||||
| #  include <netinet/in.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETINET_TCP_H | ||||
| #include <netinet/tcp.h> /* for TCP_NODELAY */ | ||||
| #  include <netinet/tcp.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETDB_H | ||||
| #  include <netdb.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_SYS_TIME_H | ||||
| #  include <sys/time.h> | ||||
| #endif | ||||
| #endif /* WIN32 && !WATT32 */ | ||||
|  | ||||
| #ifdef HAVE_STRINGS_H | ||||
| #  include <strings.h> | ||||
| @@ -133,13 +131,11 @@ int ares__timeadd(struct timeval *now, | ||||
| } | ||||
|  | ||||
| /* return time offset between now and (future) check, in milliseconds */ | ||||
| int ares__timeoffset(struct timeval *now, | ||||
| long ares__timeoffset(struct timeval *now, | ||||
|                       struct timeval *check) | ||||
| { | ||||
|   int secs = (check->tv_sec - now->tv_sec); /* this many seconds */ | ||||
|   int us = (check->tv_usec - now->tv_usec); /* this many microseconds */ | ||||
|  | ||||
|   return secs*1000 + us/1000; /* return them combined as milliseconds */ | ||||
|   return (check->tv_sec - now->tv_sec)*1000 + | ||||
|          (check->tv_usec - now->tv_usec)/1000; | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -431,6 +427,10 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds, | ||||
|   int i; | ||||
|   ssize_t count; | ||||
|   unsigned char buf[PACKETSZ + 1]; | ||||
| #ifdef HAVE_RECVFROM | ||||
|   struct sockaddr_in from; | ||||
|   socklen_t fromlen; | ||||
| #endif | ||||
|  | ||||
|   if(!read_fds && (read_fd == ARES_SOCKET_BAD)) | ||||
|     /* no possible action */ | ||||
| @@ -464,11 +464,24 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds, | ||||
|       /* To reduce event loop overhead, read and process as many | ||||
|        * packets as we can. */ | ||||
|       do { | ||||
| #ifdef HAVE_RECVFROM | ||||
|         fromlen = sizeof(from); | ||||
|         count = (ssize_t)recvfrom(server->udp_socket, (void *)buf, sizeof(buf), | ||||
|                                   0, (struct sockaddr *)&from, &fromlen); | ||||
| #else | ||||
|         count = sread(server->udp_socket, buf, sizeof(buf)); | ||||
| #endif | ||||
|         if (count == -1 && try_again(SOCKERRNO)) | ||||
|           continue; | ||||
|         else if (count <= 0) | ||||
|           handle_error(channel, i, now); | ||||
| #ifdef HAVE_RECVFROM | ||||
|         else if (from.sin_addr.s_addr != server->addr.s_addr) | ||||
|           /* Address response came from did not match the address | ||||
|            * we sent the request to.  Someone may be attempting | ||||
|            * to perform a cache poisoning attack */ | ||||
|           break; | ||||
| #endif | ||||
|         else | ||||
|           process_answer(channel, buf, (int)count, i, 0, now); | ||||
|        } while (count > 0); | ||||
| @@ -657,13 +670,18 @@ static void skip_server(ares_channel channel, struct query *query, | ||||
| static void next_server(ares_channel channel, struct query *query, | ||||
|                         struct timeval *now) | ||||
| { | ||||
|   /* Advance to the next server or try. */ | ||||
|   query->server++; | ||||
|   for (; query->try < channel->tries; query->try++) | ||||
|   /* We need to try each server channel->tries times. We have channel->nservers | ||||
|    * servers to try. In total, we need to do channel->nservers * channel->tries | ||||
|    * attempts. Use query->try to remember how many times we already attempted | ||||
|    * this query. Use modular arithmetic to find the next server to try. */ | ||||
|   while (++(query->try) < (channel->nservers * channel->tries)) | ||||
|     { | ||||
|       for (; query->server < channel->nservers; query->server++) | ||||
|         { | ||||
|           struct server_state *server = &channel->servers[query->server]; | ||||
|       struct server_state *server; | ||||
|  | ||||
|       /* Move on to the next server. */ | ||||
|       query->server = (query->server + 1) % channel->nservers; | ||||
|       server = &channel->servers[query->server]; | ||||
|  | ||||
|       /* We don't want to use this server if (1) we decided this | ||||
|        * connection is broken, and thus about to be closed, (2) | ||||
|        * we've decided to skip this server because of earlier | ||||
| @@ -679,8 +697,6 @@ static void next_server(ares_channel channel, struct query *query, | ||||
|            ares__send_query(channel, query, now); | ||||
|            return; | ||||
|         } | ||||
|         } | ||||
|       query->server = 0; | ||||
|  | ||||
|       /* You might think that with TCP we only need one try. However, | ||||
|        * even when using TCP, servers can time-out our connection just | ||||
| @@ -689,6 +705,8 @@ static void next_server(ares_channel channel, struct query *query, | ||||
|        * tickle a bug that drops our request. | ||||
|        */ | ||||
|     } | ||||
|  | ||||
|   /* If we are here, all attempts to perform query failed. */ | ||||
|   end_query(channel, query, query->error_status, NULL, 0); | ||||
| } | ||||
|  | ||||
| @@ -762,8 +780,7 @@ void ares__send_query(ares_channel channel, struct query *query, | ||||
|     } | ||||
|     query->timeout = *now; | ||||
|     ares__timeadd(&query->timeout, | ||||
|                   (query->try == 0) ? channel->timeout | ||||
|                   : channel->timeout << query->try / channel->nservers); | ||||
|                   channel->timeout << (query->try / channel->nservers)); | ||||
|     /* Keep track of queries bucketed by timeout, so we can process | ||||
|      * timeout events quickly. | ||||
|      */ | ||||
| @@ -893,7 +910,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server) | ||||
|   /* Configure it. */ | ||||
|   if (configure_socket(s, channel) < 0) | ||||
|     { | ||||
|        close(s); | ||||
|        closesocket(s); | ||||
|        return -1; | ||||
|     } | ||||
|  | ||||
| @@ -907,7 +924,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server) | ||||
|   if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, | ||||
|                  (void *)&opt, sizeof(opt)) == -1) | ||||
|     { | ||||
|        close(s); | ||||
|        closesocket(s); | ||||
|        return -1; | ||||
|     } | ||||
|  | ||||
| @@ -916,10 +933,12 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server) | ||||
|   sockin.sin_family = AF_INET; | ||||
|   sockin.sin_addr = server->addr; | ||||
|   sockin.sin_port = (unsigned short)(channel->tcp_port & 0xffff); | ||||
|   if (connect(s, (struct sockaddr *) &sockin, sizeof(sockin)) == -1) { | ||||
|   if (connect(s, (struct sockaddr *) &sockin, sizeof(sockin)) == -1) | ||||
|     { | ||||
|       int err = SOCKERRNO; | ||||
|  | ||||
|     if (err != EINPROGRESS && err != EWOULDBLOCK) { | ||||
|       if (err != EINPROGRESS && err != EWOULDBLOCK) | ||||
|         { | ||||
|           closesocket(s); | ||||
|           return -1; | ||||
|         } | ||||
| @@ -945,7 +964,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server) | ||||
|   /* Set the socket non-blocking. */ | ||||
|   if (configure_socket(s, channel) < 0) | ||||
|     { | ||||
|        close(s); | ||||
|        closesocket(s); | ||||
|        return -1; | ||||
|     } | ||||
|  | ||||
| @@ -955,10 +974,15 @@ static int open_udp_socket(ares_channel channel, struct server_state *server) | ||||
|   sockin.sin_addr = server->addr; | ||||
|   sockin.sin_port = (unsigned short)(channel->udp_port & 0xffff); | ||||
|   if (connect(s, (struct sockaddr *) &sockin, sizeof(sockin)) == -1) | ||||
|     { | ||||
|       int err = SOCKERRNO; | ||||
|  | ||||
|       if (err != EINPROGRESS && err != EWOULDBLOCK) | ||||
|         { | ||||
|           closesocket(s); | ||||
|           return -1; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|   SOCK_STATE_CALLBACK(channel, s, 1, 0); | ||||
|  | ||||
|   | ||||
| @@ -17,15 +17,17 @@ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #else | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #  include <netinet/in.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #include <stdlib.h> | ||||
| #include "ares.h" | ||||
|   | ||||
| @@ -16,14 +16,15 @@ | ||||
|  */ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
| #include <ctype.h> | ||||
| #include <errno.h> | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #ifdef HAVE_STRINGS_H | ||||
| #  include <strings.h> | ||||
| #endif | ||||
|  | ||||
| #include "ares.h" | ||||
|   | ||||
| @@ -17,15 +17,17 @@ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #else | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #  include <netinet/in.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
| @@ -74,7 +76,8 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, | ||||
|  | ||||
|   /* Compute the query ID.  Start with no timeout. */ | ||||
|   query->qid = (unsigned short)DNS_HEADER_QID(qbuf); | ||||
|   query->timeout.tv_sec = query->timeout.tv_usec = 0; | ||||
|   query->timeout.tv_sec = 0; | ||||
|   query->timeout.tv_usec = 0; | ||||
|  | ||||
|   /* Form the TCP query buffer by prepending qlen (as two | ||||
|    * network-order bytes) to qbuf. | ||||
| @@ -92,7 +95,13 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, | ||||
|  | ||||
|   /* Initialize query status. */ | ||||
|   query->try = 0; | ||||
|   query->server = 0; | ||||
|  | ||||
|   /* Choose the server to send the query to. If rotation is enabled, keep track | ||||
|    * of the next server we want to use. */ | ||||
|   query->server = channel->last_server; | ||||
|   if (channel->rotate == 1) | ||||
|     channel->last_server = (channel->last_server + 1) % channel->nservers; | ||||
|  | ||||
|   for (i = 0; i < channel->nservers; i++) | ||||
|     { | ||||
|       query->server_info[i].skip_server = 0; | ||||
|   | ||||
							
								
								
									
										67
									
								
								ares/ares_strcasecmp.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								ares/ares_strcasecmp.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,67 @@ | ||||
|  | ||||
| /* $Id$ */ | ||||
|  | ||||
| /* Copyright 1998 by the Massachusetts Institute of Technology. | ||||
|  * | ||||
|  * Permission to use, copy, modify, and distribute this | ||||
|  * software and its documentation for any purpose and without | ||||
|  * fee is hereby granted, provided that the above copyright | ||||
|  * notice appear in all copies and that both that copyright | ||||
|  * notice and this permission notice appear in supporting | ||||
|  * documentation, and that the name of M.I.T. not be used in | ||||
|  * advertising or publicity pertaining to distribution of the | ||||
|  * software without specific, written prior permission. | ||||
|  * M.I.T. makes no representations about the suitability of | ||||
|  * this software for any purpose.  It is provided "as is" | ||||
|  * without express or implied warranty. | ||||
|  */ | ||||
|  | ||||
| #include "setup.h" | ||||
| #include "ares_strcasecmp.h" | ||||
|  | ||||
| #ifndef HAVE_STRCASECMP | ||||
| int ares_strcasecmp(const char *a, const char *b) | ||||
| { | ||||
| #if defined(HAVE_STRCMPI) | ||||
|   return strcmpi(a, b); | ||||
| #elif defined(HAVE_STRICMP) | ||||
|   return stricmp(a, b); | ||||
| #else | ||||
|   size_t i; | ||||
|  | ||||
|   for (i = 0; i < (size_t)-1; i++) { | ||||
|     int c1 = ISUPPER(a[i]) ? tolower(a[i]) : a[i]; | ||||
|     int c2 = ISUPPER(b[i]) ? tolower(b[i]) : b[i]; | ||||
|     if (c1 != c2) | ||||
|       return c1-c2; | ||||
|     if (!c1) | ||||
|       break; | ||||
|   } | ||||
|   return 0; | ||||
| #endif | ||||
| } | ||||
| #endif | ||||
|  | ||||
| #ifndef HAVE_STRNCASECMP | ||||
| int ares_strncasecmp(const char *a, const char *b, size_t n) | ||||
| { | ||||
| #if defined(HAVE_STRNCMPI) | ||||
|   return strncmpi(a, b, n); | ||||
| #elif defined(HAVE_STRNICMP) | ||||
|   return strnicmp(a, b, n); | ||||
| #else | ||||
|   size_t i; | ||||
|  | ||||
|   for (i = 0; i < n; i++) { | ||||
|     int c1 = ISUPPER(a[i]) ? tolower(a[i]) : a[i]; | ||||
|     int c2 = ISUPPER(b[i]) ? tolower(b[i]) : b[i]; | ||||
|     if (c1 != c2) | ||||
|       return c1-c2; | ||||
|     if (!c1) | ||||
|       break; | ||||
|   } | ||||
|   return 0; | ||||
| #endif | ||||
| } | ||||
| #endif | ||||
|  | ||||
							
								
								
									
										31
									
								
								ares/ares_strcasecmp.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								ares/ares_strcasecmp.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| #ifndef HEADER_CARES_STRCASECMP_H | ||||
| #define HEADER_CARES_STRCASECMP_H | ||||
|  | ||||
| /* $Id$ */ | ||||
|  | ||||
| /* Copyright 1998 by the Massachusetts Institute of Technology. | ||||
|  * | ||||
|  * Permission to use, copy, modify, and distribute this | ||||
|  * software and its documentation for any purpose and without | ||||
|  * fee is hereby granted, provided that the above copyright | ||||
|  * notice appear in all copies and that both that copyright | ||||
|  * notice and this permission notice appear in supporting | ||||
|  * documentation, and that the name of M.I.T. not be used in | ||||
|  * advertising or publicity pertaining to distribution of the | ||||
|  * software without specific, written prior permission. | ||||
|  * M.I.T. makes no representations about the suitability of | ||||
|  * this software for any purpose.  It is provided "as is" | ||||
|  * without express or implied warranty. | ||||
|  */ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #ifndef HAVE_STRCASECMP | ||||
| extern int ares_strcasecmp(const char *a, const char *b); | ||||
| #endif | ||||
|  | ||||
| #ifndef HAVE_STRNCASECMP | ||||
| extern int ares_strncasecmp(const char *a, const char *b, size_t n); | ||||
| #endif | ||||
|  | ||||
| #endif /* HEADER_CARES_STRCASECMP_H */ | ||||
							
								
								
									
										43
									
								
								ares/ares_strdup.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								ares/ares_strdup.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | ||||
|  | ||||
| /* $Id$ */ | ||||
|  | ||||
| /* Copyright 1998 by the Massachusetts Institute of Technology. | ||||
|  * | ||||
|  * Permission to use, copy, modify, and distribute this | ||||
|  * software and its documentation for any purpose and without | ||||
|  * fee is hereby granted, provided that the above copyright | ||||
|  * notice appear in all copies and that both that copyright | ||||
|  * notice and this permission notice appear in supporting | ||||
|  * documentation, and that the name of M.I.T. not be used in | ||||
|  * advertising or publicity pertaining to distribution of the | ||||
|  * software without specific, written prior permission. | ||||
|  * M.I.T. makes no representations about the suitability of | ||||
|  * this software for any purpose.  It is provided "as is" | ||||
|  * without express or implied warranty. | ||||
|  */ | ||||
|  | ||||
| #include "setup.h" | ||||
| #include "ares_strdup.h" | ||||
|  | ||||
| #ifndef HAVE_STRDUP | ||||
| char *ares_strdup(const char *s1) | ||||
| { | ||||
|   size_t sz; | ||||
|   char * s2; | ||||
|  | ||||
|   if(s1) { | ||||
|     sz = strlen(s1); | ||||
|     if(sz < (size_t)-1) { | ||||
|       sz++; | ||||
|       if(sz < ((size_t)-1) / sizeof(char)) { | ||||
|         s2 = malloc(sz * sizeof(char)); | ||||
|         if(s2) { | ||||
|           memcpy(s2, s1, sz * sizeof(char)); | ||||
|           return s2; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   return (char *)NULL; | ||||
| } | ||||
| #endif | ||||
							
								
								
									
										27
									
								
								ares/ares_strdup.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								ares/ares_strdup.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| #ifndef HEADER_CARES_STRDUP_H | ||||
| #define HEADER_CARES_STRDUP_H | ||||
|  | ||||
| /* $Id$ */ | ||||
|  | ||||
| /* Copyright 1998 by the Massachusetts Institute of Technology. | ||||
|  * | ||||
|  * Permission to use, copy, modify, and distribute this | ||||
|  * software and its documentation for any purpose and without | ||||
|  * fee is hereby granted, provided that the above copyright | ||||
|  * notice appear in all copies and that both that copyright | ||||
|  * notice and this permission notice appear in supporting | ||||
|  * documentation, and that the name of M.I.T. not be used in | ||||
|  * advertising or publicity pertaining to distribution of the | ||||
|  * software without specific, written prior permission. | ||||
|  * M.I.T. makes no representations about the suitability of | ||||
|  * this software for any purpose.  It is provided "as is" | ||||
|  * without express or implied warranty. | ||||
|  */ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #ifndef HAVE_STRDUP | ||||
| extern char *ares_strdup(const char *s1); | ||||
| #endif | ||||
|  | ||||
| #endif /* HEADER_CARES_STRDUP_H */ | ||||
| @@ -5,11 +5,11 @@ | ||||
|  | ||||
| #define ARES_VERSION_MAJOR 1 | ||||
| #define ARES_VERSION_MINOR 5 | ||||
| #define ARES_VERSION_PATCH 3 | ||||
| #define ARES_VERSION_PATCH 4 | ||||
| #define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\ | ||||
|                        (ARES_VERSION_MINOR<<8)|\ | ||||
|                        (ARES_VERSION_PATCH)) | ||||
| #define ARES_VERSION_STR "1.5.3-CVS" | ||||
| #define ARES_VERSION_STR "1.5.4-CVS" | ||||
|  | ||||
| #ifdef  __cplusplus | ||||
| extern "C" { | ||||
|   | ||||
							
								
								
									
										77
									
								
								ares/ares_writev.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								ares/ares_writev.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,77 @@ | ||||
|  | ||||
| /* $Id$ */ | ||||
|  | ||||
| /* Copyright 1998 by the Massachusetts Institute of Technology. | ||||
|  * | ||||
|  * Permission to use, copy, modify, and distribute this | ||||
|  * software and its documentation for any purpose and without | ||||
|  * fee is hereby granted, provided that the above copyright | ||||
|  * notice appear in all copies and that both that copyright | ||||
|  * notice and this permission notice appear in supporting | ||||
|  * documentation, and that the name of M.I.T. not be used in | ||||
|  * advertising or publicity pertaining to distribution of the | ||||
|  * software without specific, written prior permission. | ||||
|  * M.I.T. makes no representations about the suitability of | ||||
|  * this software for any purpose.  It is provided "as is" | ||||
|  * without express or implied warranty. | ||||
|  */ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #include <limits.h> | ||||
| #include "ares.h" | ||||
| #include "ares_private.h" | ||||
|  | ||||
| #ifndef HAVE_WRITEV | ||||
| ssize_t ares_writev(ares_socket_t s, const struct iovec *iov, int iovcnt) | ||||
| { | ||||
|   char *buffer, *bp; | ||||
|   int i; | ||||
|   size_t bytes = 0; | ||||
|   ssize_t result; | ||||
|  | ||||
|   /* Validate iovcnt */ | ||||
|   if (iovcnt <= 0) | ||||
|   { | ||||
|     SET_ERRNO(EINVAL); | ||||
|     return (-1); | ||||
|   } | ||||
|  | ||||
|   /* Validate and find the sum of the iov_len values in the iov array */ | ||||
|   for (i = 0; i < iovcnt; i++) | ||||
|   { | ||||
|     if (iov[i].iov_len > INT_MAX - bytes) | ||||
|     { | ||||
|       SET_ERRNO(EINVAL); | ||||
|       return (-1); | ||||
|     } | ||||
|     bytes += iov[i].iov_len; | ||||
|   } | ||||
|  | ||||
|   if (bytes == 0) | ||||
|     return (0); | ||||
|  | ||||
|   /* Allocate a temporary buffer to hold the data */ | ||||
|   buffer = malloc(bytes); | ||||
|   if (!buffer) | ||||
|   { | ||||
|     SET_ERRNO(ENOMEM); | ||||
|     return (-1); | ||||
|   } | ||||
|  | ||||
|   /* Copy the data into buffer */ | ||||
|   for (bp = buffer, i = 0; i < iovcnt; ++i) | ||||
|   { | ||||
|     memcpy (bp, iov[i].iov_base, iov[i].iov_len); | ||||
|     bp += iov[i].iov_len; | ||||
|   } | ||||
|  | ||||
|   /* Send buffer contents */ | ||||
|   result = swrite(s, buffer, bytes); | ||||
|  | ||||
|   free(buffer); | ||||
|  | ||||
|   return (result); | ||||
| } | ||||
| #endif | ||||
|  | ||||
							
								
								
									
										37
									
								
								ares/ares_writev.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								ares/ares_writev.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,37 @@ | ||||
| #ifndef HEADER_CARES_WRITEV_H | ||||
| #define HEADER_CARES_WRITEV_H | ||||
|  | ||||
| /* $Id$ */ | ||||
|  | ||||
| /* Copyright 1998 by the Massachusetts Institute of Technology. | ||||
|  * | ||||
|  * Permission to use, copy, modify, and distribute this | ||||
|  * software and its documentation for any purpose and without | ||||
|  * fee is hereby granted, provided that the above copyright | ||||
|  * notice appear in all copies and that both that copyright | ||||
|  * notice and this permission notice appear in supporting | ||||
|  * documentation, and that the name of M.I.T. not be used in | ||||
|  * advertising or publicity pertaining to distribution of the | ||||
|  * software without specific, written prior permission. | ||||
|  * M.I.T. makes no representations about the suitability of | ||||
|  * this software for any purpose.  It is provided "as is" | ||||
|  * without express or implied warranty. | ||||
|  */ | ||||
|  | ||||
| #include "setup.h" | ||||
| #include "ares.h" | ||||
|  | ||||
| #ifndef HAVE_WRITEV | ||||
|  | ||||
| /* Structure for scatter/gather I/O. */ | ||||
| struct iovec | ||||
| { | ||||
|   void *iov_base;  /* Pointer to data. */ | ||||
|   size_t iov_len;  /* Length of data.  */ | ||||
| }; | ||||
|  | ||||
| extern ssize_t ares_writev(ares_socket_t s, const struct iovec *iov, int iovcnt); | ||||
|  | ||||
| #endif | ||||
|  | ||||
| #endif /* HEADER_CARES_WRITEV_H */ | ||||
| @@ -1,7 +1,7 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| ${LIBTOOLIZE:-libtoolize} --copy --automake --force | ||||
| ${ACLOCAL:-aclocal} $ACLOCAL_FLAGS | ||||
| ${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS | ||||
| ${AUTOHEADER:-autoheader} | ||||
| ${AUTOCONF:-autoconf} | ||||
| ${AUTOMAKE:-automake} --add-missing | ||||
|   | ||||
| @@ -3,7 +3,7 @@ | ||||
|  | ||||
| /* $Id$ */ | ||||
|  | ||||
| /* Copyright (C) 2004 - 2006 by Daniel Stenberg et al | ||||
| /* Copyright (C) 2004 - 2008 by Daniel Stenberg et al | ||||
|  * | ||||
|  * Permission to use, copy, modify, and distribute this software and its | ||||
|  * documentation for any purpose and without fee is hereby granted, provided | ||||
| @@ -79,6 +79,21 @@ | ||||
| /* Define if you have the ioctlsocket function.  */ | ||||
| #define HAVE_IOCTLSOCKET 1 | ||||
|  | ||||
| /* Define if you have the strcasecmp function. */ | ||||
| /* #define HAVE_STRCASECMP 1 */ | ||||
|  | ||||
| /* Define if you have the strdup function. */ | ||||
| #define HAVE_STRDUP 1 | ||||
|  | ||||
| /* Define if you have the stricmp function. */ | ||||
| #define HAVE_STRICMP 1 | ||||
|  | ||||
| /* Define if you have the strncasecmp function. */ | ||||
| /* #define HAVE_STRNCASECMP 1 */ | ||||
|  | ||||
| /* Define if you have the strnicmp function. */ | ||||
| #define HAVE_STRNICMP 1 | ||||
|  | ||||
| /* Define if you have the recv function. */ | ||||
| #define HAVE_RECV 1 | ||||
|  | ||||
| @@ -97,6 +112,30 @@ | ||||
| /* Define to the function return type for recv. */ | ||||
| #define RECV_TYPE_RETV int | ||||
|  | ||||
| /* Define if you have the recvfrom function. */ | ||||
| #define HAVE_RECVFROM 1 | ||||
|  | ||||
| /* Define to the type of arg 1 for recvfrom. */ | ||||
| #define RECVFROM_TYPE_ARG1 SOCKET | ||||
|  | ||||
| /* Define to the type pointed by arg 2 for recvfrom. */ | ||||
| #define RECVFROM_TYPE_ARG2 char | ||||
|  | ||||
| /* Define to the type of arg 3 for recvfrom. */ | ||||
| #define RECVFROM_TYPE_ARG3 int | ||||
|  | ||||
| /* Define to the type of arg 4 for recvfrom. */ | ||||
| #define RECVFROM_TYPE_ARG4 int | ||||
|  | ||||
| /* Define to the type pointed by arg 5 for recvfrom. */ | ||||
| #define RECVFROM_TYPE_ARG5 struct sockaddr | ||||
|  | ||||
| /* Define to the type pointed by arg 6 for recvfrom. */ | ||||
| #define RECVFROM_TYPE_ARG6 int | ||||
|  | ||||
| /* Define to the function return type for recvfrom. */ | ||||
| #define RECVFROM_TYPE_RETV int | ||||
|  | ||||
| /* Define if you have the send function. */ | ||||
| #define HAVE_SEND 1 | ||||
|  | ||||
| @@ -183,6 +222,20 @@ | ||||
| #  endif | ||||
| #endif | ||||
|  | ||||
| /* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is quite */ | ||||
| /* convoluted, compiler dependant and in some cases even build target dependat. */ | ||||
| #if defined(HAVE_WS2TCPIP_H) | ||||
| #  if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501) | ||||
| #    define HAVE_FREEADDRINFO 1 | ||||
| #    define HAVE_GETADDRINFO  1 | ||||
| #    define HAVE_GETNAMEINFO  1 | ||||
| #  elif defined(_MSC_VER) && (_MSC_VER >= 1200) | ||||
| #    define HAVE_FREEADDRINFO 1 | ||||
| #    define HAVE_GETADDRINFO  1 | ||||
| #    define HAVE_GETNAMEINFO  1 | ||||
| #  endif | ||||
| #endif | ||||
|  | ||||
| /* ---------------------------------------------------------------- */ | ||||
| /*                         IPV6 COMPATIBILITY                       */ | ||||
| /* ---------------------------------------------------------------- */ | ||||
|   | ||||
| @@ -1,9 +1,64 @@ | ||||
| AC_INIT([c-ares],[1.5.1],[daniel@haxx.se]) | ||||
| AC_PREREQ(2.57) | ||||
|  | ||||
| dnl Version not hardcoded here. Fetched later from ares_version.h | ||||
| AC_INIT([c-ares], [-], | ||||
|   [c-ares mailing list => http://cool.haxx.se/mailman/listinfo/c-ares]) | ||||
|  | ||||
| AC_CONFIG_SRCDIR([ares_ipv6.h]) | ||||
| AM_CONFIG_HEADER([config.h]) | ||||
| AM_MAINTAINER_MODE | ||||
| AM_INIT_AUTOMAKE | ||||
|  | ||||
| CARES_CHECK_OPTION_DEBUG | ||||
| CARES_CHECK_OPTION_OPTIMIZE | ||||
| CARES_CHECK_OPTION_WARNINGS | ||||
|  | ||||
| dnl SED is mandatory for configure process and libtool. | ||||
| dnl Set it now, allowing it to be changed later. | ||||
| AC_PATH_PROG([SED], [sed], [not_found], | ||||
|   [$PATH:/usr/bin:/usr/local/bin]) | ||||
| if test -z "$SED" || test "$SED" = "not_found"; then | ||||
|   AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.]) | ||||
| fi | ||||
| AC_SUBST([SED]) | ||||
|  | ||||
| dnl GREP is mandatory for configure process and libtool. | ||||
| dnl Set it now, allowing it to be changed later. | ||||
| AC_PATH_PROG([GREP], [grep], [not_found], | ||||
|   [$PATH:/usr/bin:/usr/local/bin]) | ||||
| if test -z "$GREP" || test "$GREP" = "not_found"; then | ||||
|   AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.]) | ||||
| fi | ||||
| AC_SUBST([GREP]) | ||||
|  | ||||
| dnl EGREP is mandatory for configure process and libtool. | ||||
| dnl Set it now, allowing it to be changed later. | ||||
| if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then | ||||
|   AC_MSG_CHECKING([for egrep]) | ||||
|   EGREP="$GREP -E" | ||||
|   AC_MSG_RESULT([$EGREP]) | ||||
| else | ||||
|   AC_PATH_PROG([EGREP], [egrep], [not_found], | ||||
|     [$PATH:/usr/bin:/usr/local/bin]) | ||||
| fi | ||||
| if test -z "$EGREP" || test "$EGREP" = "not_found"; then | ||||
|   AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.]) | ||||
| fi | ||||
| AC_SUBST([EGREP]) | ||||
|  | ||||
| dnl AR is mandatory for configure process and libtool. | ||||
| dnl This is target dependant, so check it as a tool. | ||||
| AC_PATH_TOOL([AR], [ar], [not_found], | ||||
|   [$PATH:/usr/bin:/usr/local/bin]) | ||||
| if test -z "$AR" || test "$AR" = "not_found"; then | ||||
|   AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.]) | ||||
| fi | ||||
| AC_SUBST([AR]) | ||||
|  | ||||
| dnl Fetch c-ares version from ares_version.h | ||||
| VERSION=`$SED -ne 's/^#define ARES_VERSION_STR "\(.*\)"/\1/p' ${srcdir}/ares_version.h` | ||||
| AM_INIT_AUTOMAKE([c-ares], [$VERSION]) | ||||
| AC_MSG_CHECKING([c-ares version]) | ||||
| AC_MSG_RESULT([$VERSION]) | ||||
|  | ||||
| dnl | ||||
| dnl Detect the canonical host and target build environment | ||||
| @@ -13,11 +68,19 @@ AC_CANONICAL_HOST | ||||
| dnl Get system canonical name | ||||
| AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS]) | ||||
|  | ||||
| AC_AIX | ||||
| AC_PROG_CC | ||||
| CARES_CHECK_PROG_CC | ||||
| AM_PROG_CC_C_O | ||||
| AC_PROG_INSTALL | ||||
|  | ||||
| dnl This defines _ALL_SOURCE for AIX | ||||
| CARES_CHECK_AIX_ALL_SOURCE | ||||
|  | ||||
| dnl Our configure and build reentrant settings | ||||
| CARES_CONFIGURE_REENTRANT | ||||
|  | ||||
| dnl check for how to do large files | ||||
| AC_SYS_LARGEFILE | ||||
|  | ||||
| case $host_os in | ||||
|   solaris*) | ||||
|     AC_DEFINE(ETC_INET, 1, [if a /etc/inet dir is being used]) | ||||
| @@ -27,51 +90,10 @@ esac | ||||
| dnl support building of Windows DLLs | ||||
| AC_LIBTOOL_WIN32_DLL | ||||
|  | ||||
| dnl ************************************************************ | ||||
| dnl Option to switch on debug options. This makes an assumption that | ||||
| dnl this is built as an 'ares' subdir in the curl source tree. Subject for | ||||
| dnl improval in the future! | ||||
| dnl | ||||
| AC_MSG_CHECKING([whether to enable debug options]) | ||||
| AC_ARG_ENABLE(debug, | ||||
| AC_HELP_STRING([--enable-debug],[Enable pedantic debug options]) | ||||
| AC_HELP_STRING([--disable-debug],[Disable debug options]), | ||||
| [ case "$enableval" in | ||||
|   no) | ||||
|        AC_MSG_RESULT(no) | ||||
|        ;; | ||||
|   *)   AC_MSG_RESULT(yes) | ||||
| CARES_PROCESS_DEBUG_BUILD_OPTS | ||||
|  | ||||
|     dnl when doing the debug stuff, use static library only | ||||
|     AC_DISABLE_SHARED | ||||
|  | ||||
|     debugbuild="yes" | ||||
|  | ||||
|     dnl the entire --enable-debug is a hack that lives and runs on top of | ||||
|     dnl libcurl stuff so this BUILDING_LIBCURL is not THAT much uglier | ||||
|     AC_DEFINE(BUILDING_LIBCURL, 1, [when building as static part of libcurl]) | ||||
|  | ||||
|     CPPFLAGS="$CPPFLAGS -DCURLDEBUG -I$srcdir/../include" | ||||
|     CFLAGS="$CFLAGS -g"  | ||||
|  | ||||
|     dnl check for how to do large files, needed to get the curl_off_t check | ||||
|     dnl done right | ||||
|     AC_SYS_LARGEFILE | ||||
|  | ||||
|     AC_CHECK_SIZEOF(curl_off_t, ,[ | ||||
| #include <stdio.h> | ||||
| #include "$srcdir/../include/curl/curl.h" | ||||
|     ]) | ||||
|  | ||||
|     dnl set compiler "debug" options to become more picky, and remove | ||||
|     dnl optimize options from CFLAGS | ||||
|     CURL_CC_DEBUG_OPTS | ||||
|  | ||||
|        ;; | ||||
|   esac ], | ||||
|        AC_MSG_RESULT(no) | ||||
| ) | ||||
| AM_CONDITIONAL(DEBUGBUILD, test x$debugbuild = xyes) | ||||
| AM_CONDITIONAL(DEBUGBUILD, test x$want_debug = xyes) | ||||
| AM_CONDITIONAL(CURLDEBUG, test x$want_debug = xyes) | ||||
|  | ||||
| dnl skip libtool C++ and Fortran compiler checks | ||||
| m4_ifdef([AC_PROG_CXX], [m4_undefine([AC_PROG_CXX])]) | ||||
| @@ -89,10 +111,10 @@ m4_defun([AC_LIBTOOL_CXXCPP],[true]) | ||||
| m4_ifdef([AC_LIBTOOL_F77], [m4_undefine([AC_LIBTOOL_F77])]) | ||||
| m4_defun([AC_LIBTOOL_F77],[]) | ||||
|  | ||||
| dnl force libtool to build static libraries with PIC on AMD64-linux | ||||
| AC_MSG_CHECKING([if arch-OS host is AMD64-linux (to build static libraries with PIC)]) | ||||
| dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD | ||||
| AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)]) | ||||
| case $host in | ||||
|   x86_64*linux*) | ||||
|   x86_64*linux*|amd64*freebsd*|ia64*freebsd*) | ||||
|     AC_MSG_RESULT([yes]) | ||||
|     with_pic=yes | ||||
|     ;; | ||||
| @@ -117,11 +139,43 @@ AC_MSG_RESULT($need_no_undefined) | ||||
| AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes) | ||||
|  | ||||
| dnl ********************************************************************** | ||||
| dnl check if this is the Intel ICC compiler, and if so make it stricter | ||||
| dnl (convert warning 147 into an error) so that it properly can detect the | ||||
| dnl gethostbyname_r() version | ||||
| dnl platform/compiler/architecture specific checks/flags | ||||
| dnl ********************************************************************** | ||||
|  | ||||
| CARES_CHECK_COMPILER | ||||
| CARES_SET_COMPILER_BASIC_OPTS | ||||
| CARES_SET_COMPILER_DEBUG_OPTS | ||||
| CARES_SET_COMPILER_OPTIMIZE_OPTS | ||||
| CARES_SET_COMPILER_WARNING_OPTS | ||||
|  | ||||
| case $host in | ||||
|   # | ||||
|   x86_64*linux*|amd64*freebsd*|ia64*freebsd*) | ||||
|     # | ||||
|     if test "$compiler_id" = "INTEL_UNIX_C"; then | ||||
|       # | ||||
|       if test "$compiler_num" -ge "900" && | ||||
|         test "$compiler_num" -lt "1000"; then | ||||
|         dnl icc 9.X specific | ||||
|         CFLAGS="$CFLAGS -i-dynamic" | ||||
|       fi | ||||
|       # | ||||
|       if test "$compiler_num" -ge "1000"; then | ||||
|         dnl icc 10.X or later | ||||
|         CFLAGS="$CFLAGS -shared-intel" | ||||
|       fi | ||||
|       # | ||||
|     fi | ||||
|     ;; | ||||
|   # | ||||
| esac | ||||
|  | ||||
| CURL_CHECK_COMPILER_HALT_ON_ERROR | ||||
| CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE | ||||
|  | ||||
| dnl ********************************************************************** | ||||
| dnl Compilation based checks should not be done before this point. | ||||
| dnl ********************************************************************** | ||||
| CURL_DETECT_ICC([CFLAGS="$CFLAGS -we 147"]) | ||||
|  | ||||
| dnl ********************************************************************** | ||||
| dnl Make sure that our checks for headers windows.h winsock.h winsock2.h  | ||||
| @@ -145,43 +199,6 @@ case X-"$ac_cv_native_windows" in | ||||
|     ;; | ||||
| esac | ||||
|  | ||||
| dnl ********************************************************************** | ||||
| dnl platform/compiler/architecture specific checks/flags | ||||
| dnl ********************************************************************** | ||||
|  | ||||
| case $host in | ||||
|   # | ||||
|   x86_64*linux*) | ||||
|     # | ||||
|     dnl find out if icc is being used | ||||
|     if test "z$ICC" = "z"; then | ||||
|       CURL_DETECT_ICC | ||||
|     fi | ||||
|     # | ||||
|     if test "$ICC" = "yes"; then | ||||
|       dnl figure out icc version | ||||
|       AC_MSG_CHECKING([icc version]) | ||||
|       iccver=`$CC -dumpversion` | ||||
|       iccnhi=`echo $iccver | cut -d . -f1` | ||||
|       iccnlo=`echo $iccver | cut -d . -f2` | ||||
|       iccnum=`(expr $iccnhi "*" 100 + $iccnlo) 2>/dev/null` | ||||
|       AC_MSG_RESULT($iccver) | ||||
|       # | ||||
|       if test "$iccnum" -ge "900" && test "$iccnum" -lt "1000"; then | ||||
|         dnl icc 9.X specific | ||||
|         CFLAGS="$CFLAGS -i-dynamic" | ||||
|       fi | ||||
|       # | ||||
|       if test "$iccnum" -ge "1000"; then | ||||
|         dnl icc 10.X or later | ||||
|         CFLAGS="$CFLAGS -shared-intel" | ||||
|       fi | ||||
|       # | ||||
|     fi | ||||
|     ;; | ||||
|   # | ||||
| esac | ||||
|  | ||||
| dnl ********************************************************************** | ||||
| dnl Checks for libraries. | ||||
| dnl ********************************************************************** | ||||
| @@ -340,6 +357,7 @@ if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then | ||||
|                , | ||||
|                -lnsl) | ||||
| fi | ||||
| ac_cv_func_strcasecmp="no" | ||||
|  | ||||
| dnl socket lib? | ||||
| AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ]) | ||||
| @@ -415,26 +433,6 @@ if test "x$RECENTAIX" = "xyes"; then | ||||
|  | ||||
|   AC_DEFINE(_THREAD_SAFE, 1, [define this if you need it to compile thread-safe code]) | ||||
|  | ||||
|   dnl check if this is the IBM xlc compiler | ||||
|   dnl Details thanks to => http://predef.sourceforge.net/ | ||||
|   AC_MSG_CHECKING([if this is the xlc compiler]) | ||||
|   AC_EGREP_CPP([^__xlC__], [__xlC__], | ||||
|          dnl action if the text is found, this it has not been replaced by the | ||||
|          dnl cpp | ||||
|          XLC="no" | ||||
|          AC_MSG_RESULT([no]), | ||||
|          dnl the text was not found, it was replaced by the cpp | ||||
|          XLC="yes" | ||||
|          AC_MSG_RESULT([yes]) | ||||
|          CFLAGS="$CFLAGS -qthreaded" | ||||
|          dnl AIX xlc has to have strict aliasing turned off. If not, | ||||
|          dnl the optimizer assumes that pointers can only point to | ||||
|          dnl an object of the same type. | ||||
|          CFLAGS="$CFLAGS -qnoansialias" | ||||
|          dnl Force AIX xlc to stop after the compilation phase, and not | ||||
|          dnl generate object code, when the source compiles with errors. | ||||
|          CFLAGS="$CFLAGS -qhalt=e" | ||||
|        ) | ||||
| fi | ||||
|  | ||||
|  | ||||
| @@ -455,6 +453,7 @@ AC_CHECK_HEADERS( | ||||
|        sys/socket.h \ | ||||
|        sys/ioctl.h \ | ||||
|        sys/param.h \ | ||||
|        sys/uio.h \ | ||||
|        netdb.h \ | ||||
|        netinet/in.h \ | ||||
|        netinet/tcp.h \ | ||||
| @@ -506,7 +505,8 @@ AC_CHECK_SIZEOF(long) | ||||
| AC_CHECK_SIZEOF(time_t) | ||||
|  | ||||
| AC_CHECK_TYPE(long long, | ||||
|    [AC_DEFINE(HAVE_LONGLONG, 1, [if your compiler supports long long])] | ||||
|    [AC_DEFINE(HAVE_LONGLONG, 1, | ||||
|      [Define to 1 if the compiler supports the 'long long' data type.])] | ||||
|    longlong="yes"   | ||||
| ) | ||||
|  | ||||
| @@ -549,11 +549,26 @@ TYPE_SIG_ATOMIC_T | ||||
| AC_TYPE_SIGNAL | ||||
|  | ||||
| CURL_CHECK_FUNC_RECV | ||||
|  | ||||
| CURL_CHECK_FUNC_RECVFROM | ||||
| CURL_CHECK_FUNC_SEND | ||||
|  | ||||
| CURL_CHECK_MSG_NOSIGNAL | ||||
|  | ||||
| CARES_CHECK_FUNC_FREEADDRINFO | ||||
| CARES_CHECK_FUNC_GETADDRINFO | ||||
| CARES_CHECK_FUNC_GETHOSTNAME | ||||
| CARES_CHECK_FUNC_GETSERVBYPORT_R | ||||
| CARES_CHECK_FUNC_INET_NTOP | ||||
| CARES_CHECK_FUNC_INET_PTON | ||||
| CARES_CHECK_FUNC_STRCASECMP | ||||
| CARES_CHECK_FUNC_STRCMPI | ||||
| CARES_CHECK_FUNC_STRDUP | ||||
| CARES_CHECK_FUNC_STRICMP | ||||
| CARES_CHECK_FUNC_STRNCASECMP | ||||
| CARES_CHECK_FUNC_STRNCMPI | ||||
| CARES_CHECK_FUNC_STRNICMP | ||||
| CARES_CHECK_FUNC_WRITEV | ||||
|  | ||||
|  | ||||
| dnl check for AF_INET6 | ||||
| CARES_CHECK_CONSTANT( | ||||
|   [ | ||||
| @@ -720,54 +735,29 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags, | ||||
| ) | ||||
|  | ||||
|  | ||||
| AC_CHECK_FUNCS( bitncmp \ | ||||
| AC_CHECK_FUNCS([bitncmp \ | ||||
|   gettimeofday \ | ||||
|                 if_indextoname, | ||||
| dnl if found | ||||
| [], | ||||
| dnl if not found, $ac_func is the name we check for | ||||
|   if_indextoname | ||||
| ],[ | ||||
| ],[ | ||||
|   func="$ac_func" | ||||
|   AC_MSG_CHECKING([deeper for $func]) | ||||
| AC_TRY_LINK( [], | ||||
|              [ $func ();], | ||||
|              AC_MSG_RESULT(yes!) | ||||
|              eval "ac_cv_func_$func=yes" | ||||
|              def=`echo "HAVE_$func" | tr 'a-z' 'A-Z'` | ||||
|              AC_DEFINE_UNQUOTED($def, 1, [If you have $func]), | ||||
|              AC_MSG_RESULT(but still no) | ||||
|              ) | ||||
| ) | ||||
|  | ||||
|  | ||||
| dnl check for inet_pton | ||||
| AC_CHECK_FUNCS(inet_pton) | ||||
| dnl Some systems have it, but not IPv6 | ||||
| if test "$ac_cv_func_inet_pton" = "yes" ; then | ||||
| AC_MSG_CHECKING(if inet_pton supports IPv6) | ||||
| AC_TRY_RUN( | ||||
|   [ | ||||
| #ifdef HAVE_SYS_TYPES_H | ||||
| #include <sys/types.h> | ||||
| #endif | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #include <sys/socket.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #include <netinet/in.h> | ||||
| #endif | ||||
| int main() | ||||
|   { | ||||
|     struct in6_addr addr6; | ||||
|     if (inet_pton(AF_INET6, "::1", &addr6) < 1) | ||||
|       exit(1); | ||||
|     else | ||||
|       exit(0); | ||||
|   } | ||||
|   AC_LINK_IFELSE([ | ||||
|     AC_LANG_PROGRAM([[ | ||||
|     ]],[[ | ||||
|       $func (); | ||||
|     ]]) | ||||
|   ],[ | ||||
|        AC_MSG_RESULT(yes) | ||||
|        AC_DEFINE_UNQUOTED(HAVE_INET_PTON_IPV6,1,[Define to 1 if inet_pton supports IPv6.]) | ||||
|      ], AC_MSG_RESULT(no),AC_MSG_RESULT(no)) | ||||
| fi | ||||
|     AC_MSG_RESULT([yes]) | ||||
|     eval "ac_cv_func_$func=yes" | ||||
|     AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$func])], [1], | ||||
|       [Define to 1 if you have the $func function.]) | ||||
|   ],[ | ||||
|     AC_MSG_RESULT([but still no]) | ||||
|   ]) | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl Check for inet_net_pton | ||||
| AC_CHECK_FUNCS(inet_net_pton) | ||||
| dnl Again, some systems have it, but not IPv6 | ||||
| @@ -799,39 +789,6 @@ int main() | ||||
| fi | ||||
|  | ||||
|  | ||||
| dnl Check for inet_ntop | ||||
| AC_CHECK_FUNCS(inet_ntop) | ||||
| dnl Again, some systems have it, but not IPv6 | ||||
| if test "$ac_cv_func_inet_ntop" = "yes" ; then | ||||
| AC_MSG_CHECKING(if inet_ntop supports IPv6) | ||||
| AC_TRY_RUN( | ||||
|   [ | ||||
| #ifdef HAVE_SYS_TYPES_H | ||||
| #include <sys/types.h> | ||||
| #endif | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #include <sys/socket.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #include <netinet/in.h> | ||||
| #endif | ||||
| #include <errno.h> | ||||
| int main() | ||||
|   { | ||||
|     struct in6_addr addr6; | ||||
|     char buf[128]; | ||||
|     if (inet_ntop(AF_INET6, &addr6, buf, 128) == 0 && errno == EAFNOSUPPORT) | ||||
|       exit(1); | ||||
|     else | ||||
|       exit(0); | ||||
|   } | ||||
|   ], [ | ||||
|        AC_MSG_RESULT(yes) | ||||
|        AC_DEFINE_UNQUOTED(HAVE_INET_NTOP_IPV6,1, | ||||
|           [Define to 1 if inet_ntop supports IPv6.]) | ||||
|      ], AC_MSG_RESULT(no),AC_MSG_RESULT(no)) | ||||
| fi | ||||
|  | ||||
| AC_CHECK_SIZEOF(struct in6_addr, , | ||||
| [ | ||||
| #undef inline | ||||
| @@ -894,10 +851,6 @@ dnl and get the types of five of its arguments. | ||||
| CURL_CHECK_FUNC_GETNAMEINFO | ||||
|  | ||||
|  | ||||
| dnl God bless non-standardized functions! We need to see which getservbyport_r | ||||
| dnl variant is available | ||||
| CARES_CHECK_GETSERVBYPORT_R | ||||
|  | ||||
| CURL_CHECK_NONBLOCKING_SOCKET | ||||
|  | ||||
| AC_C_BIGENDIAN( | ||||
| @@ -930,5 +883,18 @@ if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then | ||||
|         [a suitable file/device to read random data from]) | ||||
| fi | ||||
|  | ||||
| CARES_PRIVATE_LIBS="$LIBS" | ||||
| AC_SUBST(CARES_PRIVATE_LIBS) | ||||
|  | ||||
| dnl squeeze whitespace out of some variables | ||||
|  | ||||
| squeeze CFLAGS | ||||
| squeeze CPPFLAGS | ||||
| squeeze DEFS | ||||
| squeeze LDFLAGS | ||||
| squeeze LIBS | ||||
|  | ||||
| squeeze CARES_PRIVATE_LIBS | ||||
|  | ||||
| AC_CONFIG_FILES([Makefile libcares.pc]) | ||||
| AC_OUTPUT | ||||
|   | ||||
| @@ -19,23 +19,22 @@ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #else | ||||
|  | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #  include <sys/socket.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #  include <netinet/in.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #include <arpa/nameser.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_INET_H | ||||
| #  include <arpa/inet.h> | ||||
| #endif | ||||
|  | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
|  | ||||
| #include <ctype.h> | ||||
| @@ -47,8 +46,7 @@ | ||||
| #include "ares_ipv6.h" | ||||
| #include "inet_net_pton.h" | ||||
|  | ||||
| #if !defined(HAVE_INET_NET_PTON) || !defined(HAVE_INET_NET_PTON_IPV6) || \ | ||||
|     !defined(HAVE_INET_PTON) || !defined(HAVE_INET_PTON_IPV6) | ||||
| #if !defined(HAVE_INET_NET_PTON) || !defined(HAVE_INET_NET_PTON_IPV6) | ||||
|  | ||||
| /* | ||||
|  * static int | ||||
| @@ -425,7 +423,7 @@ ares_inet_net_pton(int af, const char *src, void *dst, size_t size) | ||||
|  | ||||
| #endif | ||||
|  | ||||
| #if !defined(HAVE_INET_PTON) || !defined(HAVE_INET_PTON_IPV6) | ||||
| #ifndef HAVE_INET_PTON | ||||
| int ares_inet_pton(int af, const char *src, void *dst) | ||||
| { | ||||
|   int size, result; | ||||
|   | ||||
| @@ -18,7 +18,7 @@ | ||||
|  * without express or implied warranty. | ||||
|  */ | ||||
|  | ||||
| #if defined(HAVE_INET_PTON) && defined(HAVE_INET_PTON_IPV6) | ||||
| #ifdef HAVE_INET_PTON | ||||
| #define ares_inet_pton(x,y,z) inet_pton(x,y,z) | ||||
| #else | ||||
| int ares_inet_pton(int af, const char *src, void *dst); | ||||
|   | ||||
| @@ -18,21 +18,22 @@ | ||||
|  | ||||
| #include "setup.h" | ||||
|  | ||||
| #if defined(WIN32) && !defined(WATT32) | ||||
| #include "nameser.h" | ||||
| #else | ||||
| #ifdef HAVE_SYS_SOCKET_H | ||||
| #  include <sys/socket.h> | ||||
| #endif | ||||
| #ifdef HAVE_NETINET_IN_H | ||||
| #  include <netinet/in.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #include <arpa/nameser.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_INET_H | ||||
| #  include <arpa/inet.h> | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_H | ||||
| #  include <arpa/nameser.h> | ||||
| #else | ||||
| #  include "nameser.h" | ||||
| #endif | ||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||
| #  include <arpa/nameser_compat.h> | ||||
| #endif | ||||
|  | ||||
| #include <ctype.h> | ||||
| @@ -45,7 +46,7 @@ | ||||
| #include "inet_ntop.h" | ||||
|  | ||||
|  | ||||
| #if !defined(HAVE_INET_NTOP) || !defined(HAVE_INET_NTOP_IPV6) | ||||
| #ifndef HAVE_INET_NTOP | ||||
|  | ||||
| #ifdef SPRINTF_CHAR | ||||
| # define SPRINTF(x) strlen(sprintf/**/x) | ||||
|   | ||||
| @@ -18,7 +18,7 @@ | ||||
|  * without express or implied warranty. | ||||
|  */ | ||||
|  | ||||
| #if defined(HAVE_INET_NTOP) && defined(HAVE_INET_NTOP_IPV6) | ||||
| #ifdef HAVE_INET_NTOP | ||||
| #define ares_inet_ntop(w,x,y,z) inet_ntop(w,x,y,z) | ||||
| #else | ||||
| const char *ares_inet_ntop(int af, const void *src, char *dst, size_t size); | ||||
|   | ||||
| @@ -3,7 +3,7 @@ | ||||
| #               / __|____ / _` | '__/ _ \/ __| | ||||
| #              | (_|_____| (_| | | |  __/\__ \ | ||||
| #               \___|     \__,_|_|  \___||___/ | ||||
| # $id: $ | ||||
| # $Id$ | ||||
| # | ||||
| prefix=@prefix@ | ||||
| exec_prefix=@exec_prefix@ | ||||
| @@ -18,3 +18,4 @@ Requires: | ||||
| Requires.private:  | ||||
| Cflags: -I${includedir} | ||||
| Libs: -L${libdir} -lcares | ||||
| Libs.private: @CARES_PRIVATE_LIBS@ | ||||
|   | ||||
							
								
								
									
										1219
									
								
								ares/m4/cares-compilers.m4
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1219
									
								
								ares/m4/cares-compilers.m4
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										142
									
								
								ares/m4/cares-confopts.m4
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										142
									
								
								ares/m4/cares-confopts.m4
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,142 @@ | ||||
| #*************************************************************************** | ||||
| # $Id$ | ||||
| # | ||||
| # Copyright (C) 2008 by Daniel Stenberg et al | ||||
| # | ||||
| # Permission to use, copy, modify, and distribute this software and its | ||||
| # documentation for any purpose and without fee is hereby granted, provided | ||||
| # that the above copyright notice appear in all copies and that both that | ||||
| # copyright notice and this permission notice appear in supporting | ||||
| # documentation, and that the name of M.I.T. not be used in advertising or | ||||
| # publicity pertaining to distribution of the software without specific, | ||||
| # written prior permission.  M.I.T. makes no representations about the | ||||
| # suitability of this software for any purpose.  It is provided "as is" | ||||
| # without express or implied warranty. | ||||
| # | ||||
| #*************************************************************************** | ||||
|  | ||||
| # File version for 'aclocal' use. Keep it a single number. | ||||
| # serial 2 | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_OPTION_DEBUG | ||||
| dnl ------------------------------------------------- | ||||
| dnl Verify if configure has been invoked with option | ||||
| dnl --enable-debug or --disable-debug, and set shell | ||||
| dnl variable want_debug value as appropriate. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_OPTION_DEBUG], [ | ||||
|   AC_BEFORE([$0],[CARES_CHECK_OPTION_WARNINGS])dnl | ||||
|   AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl | ||||
|   AC_MSG_CHECKING([whether to enable debug build options]) | ||||
|   OPT_DEBUG_BUILD="default" | ||||
|   AC_ARG_ENABLE(debug, | ||||
| AC_HELP_STRING([--enable-debug],[Enable debug build options]) | ||||
| AC_HELP_STRING([--disable-debug],[Disable debug build options]), | ||||
|   OPT_DEBUG_BUILD=$enableval) | ||||
|   case "$OPT_DEBUG_BUILD" in | ||||
|     no) | ||||
|       dnl --disable-debug option used | ||||
|       want_debug="no" | ||||
|       ;; | ||||
|     default) | ||||
|       dnl configure option not specified | ||||
|       want_debug="no" | ||||
|       ;; | ||||
|     *) | ||||
|       dnl --enable-debug option used | ||||
|       want_debug="yes" | ||||
|       ;; | ||||
|   esac | ||||
|   AC_MSG_RESULT([$want_debug]) | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_OPTION_OPTIMIZE | ||||
| dnl ------------------------------------------------- | ||||
| dnl Verify if configure has been invoked with option | ||||
| dnl --enable-optimize or --disable-optimize, and set | ||||
| dnl shell variable want_optimize value as appropriate. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_OPTION_OPTIMIZE], [ | ||||
|   AC_REQUIRE([CARES_CHECK_OPTION_DEBUG])dnl | ||||
|   AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl | ||||
|   AC_MSG_CHECKING([whether to enable compiler optimizer]) | ||||
|   OPT_COMPILER_OPTIMIZE="default" | ||||
|   AC_ARG_ENABLE(optimize, | ||||
| AC_HELP_STRING([--enable-optimize(=OPT)],[Enable compiler optimizations (default=-O2)]) | ||||
| AC_HELP_STRING([--disable-optimize],[Disable compiler optimizations]), | ||||
|   OPT_COMPILER_OPTIMIZE=$enableval) | ||||
|   case "$OPT_COMPILER_OPTIMIZE" in | ||||
|     no) | ||||
|       dnl --disable-optimize option used. We will handle this as | ||||
|       dnl a request to disable compiler optimizations if possible. | ||||
|       dnl If the compiler is known CFLAGS and CPPFLAGS will be | ||||
|       dnl overridden, otherwise this can not be honored. | ||||
|       want_optimize="no" | ||||
|       AC_MSG_RESULT([no]) | ||||
|       ;; | ||||
|     default) | ||||
|       dnl configure's optimize option not specified. Initially we will | ||||
|       dnl handle this as a a request contrary to configure's setting | ||||
|       dnl for --enable-debug. IOW, initially, for debug-enabled builds | ||||
|       dnl this will be handled as a request to disable optimizations if | ||||
|       dnl possible, and for debug-disabled builds this will be handled | ||||
|       dnl initially as a request to enable optimizations if possible. | ||||
|       dnl Finally, if the compiler is known and CFLAGS and CPPFLAGS do | ||||
|       dnl not have any optimizer flag the request will be honored, in | ||||
|       dnl any other case the request can not be honored. | ||||
|       dnl IOW, existing optimizer flags defined in CFLAGS or CPPFLAGS | ||||
|       dnl will always take precedence over any initial assumption. | ||||
|       if test "$want_debug" = "yes"; then | ||||
|         want_optimize="assume_no" | ||||
|         AC_MSG_RESULT([not specified (assuming no)]) | ||||
|       else | ||||
|         want_optimize="assume_yes" | ||||
|         AC_MSG_RESULT([not specified (assuming yes)]) | ||||
|       fi | ||||
|       ;; | ||||
|     *) | ||||
|       dnl --enable-optimize option used. We will handle this as | ||||
|       dnl a request to enable compiler optimizations if possible. | ||||
|       dnl If the compiler is known CFLAGS and CPPFLAGS will be | ||||
|       dnl overridden, otherwise this can not be honored. | ||||
|       want_optimize="yes" | ||||
|       AC_MSG_RESULT([yes]) | ||||
|       ;; | ||||
|   esac | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_OPTION_WARNINGS | ||||
| dnl ------------------------------------------------- | ||||
| dnl Verify if configure has been invoked with option | ||||
| dnl --enable-warnings or --disable-warnings, and set | ||||
| dnl shell variable want_warnings as appropriate. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_OPTION_WARNINGS], [ | ||||
|   AC_REQUIRE([CARES_CHECK_OPTION_DEBUG])dnl | ||||
|   AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl | ||||
|   AC_MSG_CHECKING([whether to enable strict compiler warnings]) | ||||
|   OPT_COMPILER_WARNINGS="default" | ||||
|   AC_ARG_ENABLE(warnings, | ||||
| AC_HELP_STRING([--enable-warnings],[Enable strict compiler warnings]) | ||||
| AC_HELP_STRING([--disable-warnings],[Disable strict compiler warnings]), | ||||
|   OPT_COMPILER_WARNINGS=$enableval) | ||||
|   case "$OPT_COMPILER_WARNINGS" in | ||||
|     no) | ||||
|       dnl --disable-warnings option used | ||||
|       want_warnings="no" | ||||
|       ;; | ||||
|     default) | ||||
|       dnl configure option not specified, so | ||||
|       dnl use same setting as --enable-debug | ||||
|       want_warnings="$want_debug" | ||||
|       ;; | ||||
|     *) | ||||
|       dnl --enable-warnings option used | ||||
|       want_warnings="yes" | ||||
|       ;; | ||||
|   esac | ||||
|   AC_MSG_RESULT([$want_warnings]) | ||||
| ]) | ||||
							
								
								
									
										1698
									
								
								ares/m4/cares-functions.m4
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1698
									
								
								ares/m4/cares-functions.m4
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										460
									
								
								ares/m4/cares-reentrant.m4
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										460
									
								
								ares/m4/cares-reentrant.m4
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,460 @@ | ||||
| #*************************************************************************** | ||||
| # $Id$ | ||||
| # | ||||
| # Copyright (C) 2008 by Daniel Stenberg et al | ||||
| # | ||||
| # Permission to use, copy, modify, and distribute this software and its | ||||
| # documentation for any purpose and without fee is hereby granted, provided | ||||
| # that the above copyright notice appear in all copies and that both that | ||||
| # copyright notice and this permission notice appear in supporting | ||||
| # documentation, and that the name of M.I.T. not be used in advertising or | ||||
| # publicity pertaining to distribution of the software without specific, | ||||
| # written prior permission.  M.I.T. makes no representations about the | ||||
| # suitability of this software for any purpose.  It is provided "as is" | ||||
| # without express or implied warranty. | ||||
| # | ||||
| #*************************************************************************** | ||||
|  | ||||
| # File version for 'aclocal' use. Keep it a single number. | ||||
| # serial 3 | ||||
|  | ||||
| dnl Note 1 | ||||
| dnl ------ | ||||
| dnl None of the CARES_CHECK_NEED_REENTRANT_* macros shall use HAVE_FOO_H to | ||||
| dnl conditionally include header files. These macros are used early in the | ||||
| dnl configure process much before header file availability is known. | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_NEED_REENTRANT_GMTIME_R | ||||
| dnl ------------------------------------------------- | ||||
| dnl Checks if the preprocessor _REENTRANT definition | ||||
| dnl makes function gmtime_r compiler visible. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_NEED_REENTRANT_GMTIME_R], [ | ||||
|   AC_LINK_IFELSE([ | ||||
|     AC_LANG_FUNC_LINK_TRY([gmtime_r]) | ||||
|   ],[ | ||||
|     tmp_gmtime_r="yes" | ||||
|   ],[ | ||||
|     tmp_gmtime_r="no" | ||||
|   ]) | ||||
|   if test "$tmp_gmtime_r" = "yes"; then | ||||
|     AC_EGREP_CPP([gmtime_r],[ | ||||
| #include <sys/types.h> | ||||
| #include <time.h> | ||||
|     ],[ | ||||
|       tmp_gmtime_r="proto_declared" | ||||
|     ],[ | ||||
|       AC_EGREP_CPP([gmtime_r],[ | ||||
| #define _REENTRANT | ||||
| #include <sys/types.h> | ||||
| #include <time.h> | ||||
|       ],[ | ||||
|         tmp_gmtime_r="proto_needs_reentrant" | ||||
|         tmp_need_reentrant="yes" | ||||
|       ]) | ||||
|     ]) | ||||
|   fi | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_NEED_REENTRANT_LOCALTIME_R | ||||
| dnl ------------------------------------------------- | ||||
| dnl Checks if the preprocessor _REENTRANT definition | ||||
| dnl makes function localtime_r compiler visible. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_NEED_REENTRANT_LOCALTIME_R], [ | ||||
|   AC_LINK_IFELSE([ | ||||
|     AC_LANG_FUNC_LINK_TRY([localtime_r]) | ||||
|   ],[ | ||||
|     tmp_localtime_r="yes" | ||||
|   ],[ | ||||
|     tmp_localtime_r="no" | ||||
|   ]) | ||||
|   if test "$tmp_localtime_r" = "yes"; then | ||||
|     AC_EGREP_CPP([localtime_r],[ | ||||
| #include <sys/types.h> | ||||
| #include <time.h> | ||||
|     ],[ | ||||
|       tmp_localtime_r="proto_declared" | ||||
|     ],[ | ||||
|       AC_EGREP_CPP([localtime_r],[ | ||||
| #define _REENTRANT | ||||
| #include <sys/types.h> | ||||
| #include <time.h> | ||||
|       ],[ | ||||
|         tmp_localtime_r="proto_needs_reentrant" | ||||
|         tmp_need_reentrant="yes" | ||||
|       ]) | ||||
|     ]) | ||||
|   fi | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_NEED_REENTRANT_STRERROR_R | ||||
| dnl ------------------------------------------------- | ||||
| dnl Checks if the preprocessor _REENTRANT definition | ||||
| dnl makes function strerror_r compiler visible. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_NEED_REENTRANT_STRERROR_R], [ | ||||
|   AC_LINK_IFELSE([ | ||||
|     AC_LANG_FUNC_LINK_TRY([strerror_r]) | ||||
|   ],[ | ||||
|     tmp_strerror_r="yes" | ||||
|   ],[ | ||||
|     tmp_strerror_r="no" | ||||
|   ]) | ||||
|   if test "$tmp_strerror_r" = "yes"; then | ||||
|     AC_EGREP_CPP([strerror_r],[ | ||||
| #include <sys/types.h> | ||||
| #include <string.h> | ||||
|     ],[ | ||||
|       tmp_strerror_r="proto_declared" | ||||
|     ],[ | ||||
|       AC_EGREP_CPP([strerror_r],[ | ||||
| #define _REENTRANT | ||||
| #include <sys/types.h> | ||||
| #include <string.h> | ||||
|       ],[ | ||||
|         tmp_strerror_r="proto_needs_reentrant" | ||||
|         tmp_need_reentrant="yes" | ||||
|       ]) | ||||
|     ]) | ||||
|   fi | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_NEED_REENTRANT_STRTOK_R | ||||
| dnl ------------------------------------------------- | ||||
| dnl Checks if the preprocessor _REENTRANT definition | ||||
| dnl makes function strtok_r compiler visible. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_NEED_REENTRANT_STRTOK_R], [ | ||||
|   AC_LINK_IFELSE([ | ||||
|     AC_LANG_FUNC_LINK_TRY([strtok_r]) | ||||
|   ],[ | ||||
|     tmp_strtok_r="yes" | ||||
|   ],[ | ||||
|     tmp_strtok_r="no" | ||||
|   ]) | ||||
|   if test "$tmp_strtok_r" = "yes"; then | ||||
|     AC_EGREP_CPP([strtok_r],[ | ||||
| #include <sys/types.h> | ||||
| #include <string.h> | ||||
|     ],[ | ||||
|       tmp_strtok_r="proto_declared" | ||||
|     ],[ | ||||
|       AC_EGREP_CPP([strtok_r],[ | ||||
| #define _REENTRANT | ||||
| #include <sys/types.h> | ||||
| #include <string.h> | ||||
|       ],[ | ||||
|         tmp_strtok_r="proto_needs_reentrant" | ||||
|         tmp_need_reentrant="yes" | ||||
|       ]) | ||||
|     ]) | ||||
|   fi | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_NEED_REENTRANT_INET_NTOA_R | ||||
| dnl ------------------------------------------------- | ||||
| dnl Checks if the preprocessor _REENTRANT definition | ||||
| dnl makes function inet_ntoa_r compiler visible. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_NEED_REENTRANT_INET_NTOA_R], [ | ||||
|   AC_LINK_IFELSE([ | ||||
|     AC_LANG_FUNC_LINK_TRY([inet_ntoa_r]) | ||||
|   ],[ | ||||
|     tmp_inet_ntoa_r="yes" | ||||
|   ],[ | ||||
|     tmp_inet_ntoa_r="no" | ||||
|   ]) | ||||
|   if test "$tmp_inet_ntoa_r" = "yes"; then | ||||
|     AC_EGREP_CPP([inet_ntoa_r],[ | ||||
| #include <sys/types.h> | ||||
| #include <sys/socket.h> | ||||
| #include <netinet/in.h> | ||||
| #include <arpa/inet.h> | ||||
|     ],[ | ||||
|       tmp_inet_ntoa_r="proto_declared" | ||||
|     ],[ | ||||
|       AC_EGREP_CPP([inet_ntoa_r],[ | ||||
| #define _REENTRANT | ||||
| #include <sys/types.h> | ||||
| #include <sys/socket.h> | ||||
| #include <netinet/in.h> | ||||
| #include <arpa/inet.h> | ||||
|       ],[ | ||||
|         tmp_inet_ntoa_r="proto_needs_reentrant" | ||||
|         tmp_need_reentrant="yes" | ||||
|       ]) | ||||
|     ]) | ||||
|   fi | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R | ||||
| dnl ------------------------------------------------- | ||||
| dnl Checks if the preprocessor _REENTRANT definition | ||||
| dnl makes function gethostbyaddr_r compiler visible. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R], [ | ||||
|   AC_LINK_IFELSE([ | ||||
|     AC_LANG_FUNC_LINK_TRY([gethostbyaddr_r]) | ||||
|   ],[ | ||||
|     tmp_gethostbyaddr_r="yes" | ||||
|   ],[ | ||||
|     tmp_gethostbyaddr_r="no" | ||||
|   ]) | ||||
|   if test "$tmp_gethostbyaddr_r" = "yes"; then | ||||
|     AC_EGREP_CPP([gethostbyaddr_r],[ | ||||
| #include <sys/types.h> | ||||
| #include <netdb.h> | ||||
|     ],[ | ||||
|       tmp_gethostbyaddr_r="proto_declared" | ||||
|     ],[ | ||||
|       AC_EGREP_CPP([gethostbyaddr_r],[ | ||||
| #define _REENTRANT | ||||
| #include <sys/types.h> | ||||
| #include <netdb.h> | ||||
|       ],[ | ||||
|         tmp_gethostbyaddr_r="proto_needs_reentrant" | ||||
|         tmp_need_reentrant="yes" | ||||
|       ]) | ||||
|     ]) | ||||
|   fi | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_NEED_REENTRANT_GETHOSTBYNAME_R | ||||
| dnl ------------------------------------------------- | ||||
| dnl Checks if the preprocessor _REENTRANT definition | ||||
| dnl makes function gethostbyname_r compiler visible. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_NEED_REENTRANT_GETHOSTBYNAME_R], [ | ||||
|   AC_LINK_IFELSE([ | ||||
|     AC_LANG_FUNC_LINK_TRY([gethostbyname_r]) | ||||
|   ],[ | ||||
|     tmp_gethostbyname_r="yes" | ||||
|   ],[ | ||||
|     tmp_gethostbyname_r="no" | ||||
|   ]) | ||||
|   if test "$tmp_gethostbyname_r" = "yes"; then | ||||
|     AC_EGREP_CPP([gethostbyname_r],[ | ||||
| #include <sys/types.h> | ||||
| #include <netdb.h> | ||||
|     ],[ | ||||
|       tmp_gethostbyname_r="proto_declared" | ||||
|     ],[ | ||||
|       AC_EGREP_CPP([gethostbyname_r],[ | ||||
| #define _REENTRANT | ||||
| #include <sys/types.h> | ||||
| #include <netdb.h> | ||||
|       ],[ | ||||
|         tmp_gethostbyname_r="proto_needs_reentrant" | ||||
|         tmp_need_reentrant="yes" | ||||
|       ]) | ||||
|     ]) | ||||
|   fi | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_NEED_REENTRANT_GETPROTOBYNAME_R | ||||
| dnl ------------------------------------------------- | ||||
| dnl Checks if the preprocessor _REENTRANT definition | ||||
| dnl makes function getprotobyname_r compiler visible. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_NEED_REENTRANT_GETPROTOBYNAME_R], [ | ||||
|   AC_LINK_IFELSE([ | ||||
|     AC_LANG_FUNC_LINK_TRY([getprotobyname_r]) | ||||
|   ],[ | ||||
|     tmp_getprotobyname_r="yes" | ||||
|   ],[ | ||||
|     tmp_getprotobyname_r="no" | ||||
|   ]) | ||||
|   if test "$tmp_getprotobyname_r" = "yes"; then | ||||
|     AC_EGREP_CPP([getprotobyname_r],[ | ||||
| #include <sys/types.h> | ||||
| #include <netdb.h> | ||||
|     ],[ | ||||
|       tmp_getprotobyname_r="proto_declared" | ||||
|     ],[ | ||||
|       AC_EGREP_CPP([getprotobyname_r],[ | ||||
| #define _REENTRANT | ||||
| #include <sys/types.h> | ||||
| #include <netdb.h> | ||||
|       ],[ | ||||
|         tmp_getprotobyname_r="proto_needs_reentrant" | ||||
|         tmp_need_reentrant="yes" | ||||
|       ]) | ||||
|     ]) | ||||
|   fi | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_NEED_REENTRANT_GETSERVBYPORT_R | ||||
| dnl ------------------------------------------------- | ||||
| dnl Checks if the preprocessor _REENTRANT definition | ||||
| dnl makes function getservbyport_r compiler visible. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_NEED_REENTRANT_GETSERVBYPORT_R], [ | ||||
|   AC_LINK_IFELSE([ | ||||
|     AC_LANG_FUNC_LINK_TRY([getservbyport_r]) | ||||
|   ],[ | ||||
|     tmp_getservbyport_r="yes" | ||||
|   ],[ | ||||
|     tmp_getservbyport_r="no" | ||||
|   ]) | ||||
|   if test "$tmp_getservbyport_r" = "yes"; then | ||||
|     AC_EGREP_CPP([getservbyport_r],[ | ||||
| #include <sys/types.h> | ||||
| #include <netdb.h> | ||||
|     ],[ | ||||
|       tmp_getservbyport_r="proto_declared" | ||||
|     ],[ | ||||
|       AC_EGREP_CPP([getservbyport_r],[ | ||||
| #define _REENTRANT | ||||
| #include <sys/types.h> | ||||
| #include <netdb.h> | ||||
|       ],[ | ||||
|         tmp_getservbyport_r="proto_needs_reentrant" | ||||
|         tmp_need_reentrant="yes" | ||||
|       ]) | ||||
|     ]) | ||||
|   fi | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_NEED_REENTRANT_FUNCTIONS_R | ||||
| dnl ------------------------------------------------- | ||||
| dnl Checks if the preprocessor _REENTRANT definition | ||||
| dnl makes several _r functions compiler visible. | ||||
| dnl Internal macro for CARES_CONFIGURE_REENTRANT. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_NEED_REENTRANT_FUNCTIONS_R], [ | ||||
|   if test "$tmp_need_reentrant" = "no"; then | ||||
|     CARES_CHECK_NEED_REENTRANT_GMTIME_R | ||||
|   fi | ||||
|   if test "$tmp_need_reentrant" = "no"; then | ||||
|     CARES_CHECK_NEED_REENTRANT_LOCALTIME_R | ||||
|   fi | ||||
|   if test "$tmp_need_reentrant" = "no"; then | ||||
|     CARES_CHECK_NEED_REENTRANT_STRERROR_R | ||||
|   fi | ||||
|   if test "$tmp_need_reentrant" = "no"; then | ||||
|     CARES_CHECK_NEED_REENTRANT_STRTOK_R | ||||
|   fi | ||||
|   if test "$tmp_need_reentrant" = "no"; then | ||||
|     CARES_CHECK_NEED_REENTRANT_INET_NTOA_R | ||||
|   fi | ||||
|   if test "$tmp_need_reentrant" = "no"; then | ||||
|     CARES_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R | ||||
|   fi | ||||
|   if test "$tmp_need_reentrant" = "no"; then | ||||
|     CARES_CHECK_NEED_REENTRANT_GETHOSTBYNAME_R | ||||
|   fi | ||||
|   if test "$tmp_need_reentrant" = "no"; then | ||||
|     CARES_CHECK_NEED_REENTRANT_GETPROTOBYNAME_R | ||||
|   fi | ||||
|   if test "$tmp_need_reentrant" = "no"; then | ||||
|     CARES_CHECK_NEED_REENTRANT_GETSERVBYPORT_R | ||||
|   fi | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CHECK_NEED_REENTRANT_SYSTEM | ||||
| dnl ------------------------------------------------- | ||||
| dnl Checks if the preprocessor _REENTRANT definition | ||||
| dnl must be unconditionally done for this platform. | ||||
| dnl Internal macro for CARES_CONFIGURE_REENTRANT. | ||||
|  | ||||
| AC_DEFUN([CARES_CHECK_NEED_REENTRANT_SYSTEM], [ | ||||
|   case $host in | ||||
|     *-*-solaris*) | ||||
|       tmp_need_reentrant="yes" | ||||
|       ;; | ||||
|     *) | ||||
|       tmp_need_reentrant="no" | ||||
|       ;; | ||||
|   esac | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT | ||||
| dnl ------------------------------------------------- | ||||
| dnl This macro ensures that configuration tests done | ||||
| dnl after this will execute with preprocessor symbol | ||||
| dnl _REENTRANT defined. This macro also ensures that | ||||
| dnl the generated config file defines NEED_REENTRANT | ||||
| dnl and that in turn setup.h will define _REENTRANT. | ||||
| dnl Internal macro for CARES_CONFIGURE_REENTRANT. | ||||
|  | ||||
| AC_DEFUN([CARES_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT], [ | ||||
| AC_DEFINE(NEED_REENTRANT, 1, | ||||
|   [Define to 1 if _REENTRANT preprocessor symbol must be defined.]) | ||||
| cat >>confdefs.h <<_EOF | ||||
| #ifndef _REENTRANT | ||||
| #  define _REENTRANT | ||||
| #endif | ||||
| _EOF | ||||
| ]) | ||||
|  | ||||
|  | ||||
| dnl CARES_CONFIGURE_REENTRANT | ||||
| dnl ------------------------------------------------- | ||||
| dnl This first checks if the preprocessor _REENTRANT | ||||
| dnl symbol is already defined. If it isn't currently | ||||
| dnl defined a set of checks are performed to verify | ||||
| dnl if its definition is required to make visible to | ||||
| dnl the compiler a set of *_r functions. Finally, if | ||||
| dnl _REENTRANT is already defined or needed it takes | ||||
| dnl care of making adjustments necessary to ensure | ||||
| dnl that it is defined equally for further configure | ||||
| dnl tests and generated config file. | ||||
|  | ||||
| AC_DEFUN([CARES_CONFIGURE_REENTRANT], [ | ||||
|   AC_PREREQ([2.50])dnl | ||||
|   # | ||||
|   AC_MSG_CHECKING([if _REENTRANT is already defined]) | ||||
|   AC_COMPILE_IFELSE([ | ||||
|     AC_LANG_PROGRAM([[ | ||||
|     ]],[[ | ||||
| #ifdef _REENTRANT | ||||
|       int dummy=1; | ||||
| #else | ||||
|       force compilation error | ||||
| #endif | ||||
|     ]]) | ||||
|   ],[ | ||||
|     AC_MSG_RESULT([yes]) | ||||
|     tmp_reentrant_initially_defined="yes" | ||||
|   ],[ | ||||
|     AC_MSG_RESULT([no]) | ||||
|     tmp_reentrant_initially_defined="no" | ||||
|   ]) | ||||
|   # | ||||
|   if test "$tmp_reentrant_initially_defined" = "no"; then | ||||
|     AC_MSG_CHECKING([if _REENTRANT is actually needed]) | ||||
|     CARES_CHECK_NEED_REENTRANT_SYSTEM | ||||
|     if test "$tmp_need_reentrant" = "no"; then | ||||
|       CARES_CHECK_NEED_REENTRANT_FUNCTIONS_R | ||||
|     fi | ||||
|     if test "$tmp_need_reentrant" = "yes"; then | ||||
|       AC_MSG_RESULT([yes]) | ||||
|     else | ||||
|       AC_MSG_RESULT([no]) | ||||
|     fi | ||||
|   fi | ||||
|   # | ||||
|   AC_MSG_CHECKING([if _REENTRANT is onwards defined]) | ||||
|   if test "$tmp_reentrant_initially_defined" = "yes" || | ||||
|     test "$tmp_need_reentrant" = "yes"; then | ||||
|     CARES_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT | ||||
|     AC_MSG_RESULT([yes]) | ||||
|   else | ||||
|     AC_MSG_RESULT([no]) | ||||
|   fi | ||||
|   # | ||||
| ]) | ||||
|  | ||||
| @@ -38,7 +38,7 @@ if(!-f "configure") { | ||||
|     `./buildconf`; | ||||
| } | ||||
| print "adding $version in the configure.ac file\n"; | ||||
| `sed -e 's/AC_INIT.*/AC_INIT([c-ares], [$version])/' < configure.ac > configure.ac.dist`; | ||||
| `sed -e 's/AC_INIT.*/AC_INIT([c-ares], [$version],/' < configure.ac > configure.ac.dist`; | ||||
|  | ||||
| # now make a new configure script with this | ||||
| print "makes a new configure script\n"; | ||||
| @@ -50,9 +50,11 @@ print "running configure\n"; | ||||
|  | ||||
| # now make the actual tarball | ||||
| print "running make dist\n"; | ||||
| `make dist`; | ||||
| `make dist VERSION=$version`; | ||||
|  | ||||
| print "removing temporary configure.ac file\n"; | ||||
| `rm configure.ac.dist`; | ||||
| print "removing temporary ares_version.h file\n"; | ||||
| `rm ares_version.h.dist`; | ||||
|  | ||||
| print "NOTE: now cvs tag this release!\n"; | ||||
|   | ||||
| @@ -3,41 +3,22 @@ | ||||
| #ifndef ARES_NAMESER_H | ||||
| #define ARES_NAMESER_H | ||||
|  | ||||
| /* Windows-only header file provided by liren@vivisimo.com to make his Windows | ||||
|    port build */ | ||||
| /* header file provided by liren@vivisimo.com */ | ||||
|  | ||||
| #ifndef NETWARE | ||||
| #include <process.h> /* for the _getpid() proto */ | ||||
| #endif  /* !NETWARE */ | ||||
| #include <sys/types.h> | ||||
| #ifndef HAVE_ARPA_NAMESER_H | ||||
|  | ||||
| #ifndef NETWARE | ||||
|  | ||||
| #define MAXHOSTNAMELEN 256 | ||||
|  | ||||
| /* Structure for scatter/gather I/O.  */ | ||||
| struct iovec | ||||
| { | ||||
|     void *iov_base;     /* Pointer to data.  */ | ||||
|     size_t iov_len;     /* Length of data.  */ | ||||
| }; | ||||
|  | ||||
| #ifndef __WATCOMC__ | ||||
| #define getpid() _getpid() | ||||
| #endif | ||||
|  | ||||
| int ares_writev (SOCKET s, const struct iovec *vector, size_t count); | ||||
| #define writev(s,vect,count)  ares_writev(s,vect,count) | ||||
|  | ||||
| #endif  /* !NETWARE */ | ||||
|  | ||||
| #define NS_CMPRSFLGS  0xc0 | ||||
| #define NS_IN6ADDRSZ  16 | ||||
| #define NS_PACKETSZ     512   /* maximum packet size */ | ||||
| #define NS_MAXDNAME     256   /* maximum domain name */ | ||||
| #define NS_MAXCDNAME    255   /* maximum compressed domain name */ | ||||
| #define NS_MAXLABEL     63 | ||||
| #define NS_HFIXEDSZ     12    /* #/bytes of fixed data in header */ | ||||
| #define NS_QFIXEDSZ     4     /* #/bytes of fixed data in query */ | ||||
| #define NS_RRFIXEDSZ    10    /* #/bytes of fixed data in r record */ | ||||
| #define NS_INT16SZ      2 | ||||
| #define NS_INADDRSZ     4 | ||||
|  | ||||
|   /* Flag bits indicating name compression. */ | ||||
| #define INDIR_MASK    NS_CMPRSFLGS | ||||
| #define NS_IN6ADDRSZ    16 | ||||
| #define NS_CMPRSFLGS    0xc0  /* Flag bits indicating name compression. */ | ||||
| #define NS_DEFAULTPORT  53    /* For both TCP and UDP. */ | ||||
|  | ||||
| typedef enum __ns_class { | ||||
|     ns_c_invalid = 0,       /* Cookie. */ | ||||
| @@ -51,8 +32,6 @@ typedef enum __ns_class { | ||||
|     ns_c_max = 65536 | ||||
| } ns_class; | ||||
|  | ||||
| #define C_IN           ns_c_in | ||||
|  | ||||
| typedef enum __ns_type { | ||||
|     ns_t_invalid = 0,       /* Cookie. */ | ||||
|     ns_t_a = 1,             /* Host address. */ | ||||
| @@ -96,6 +75,8 @@ typedef enum __ns_type { | ||||
|     ns_t_dname = 39,        /* Non-terminal DNAME (for IPv6) */ | ||||
|     ns_t_sink = 40,         /* Kitchen sink (experimentatl) */ | ||||
|     ns_t_opt = 41,          /* EDNS0 option (meta-RR) */ | ||||
|     ns_t_apl = 42,          /* Address prefix list (RFC3123) */ | ||||
|     ns_t_tkey = 249,        /* Transaction key */ | ||||
|     ns_t_tsig = 250,        /* Transaction signature. */ | ||||
|     ns_t_ixfr = 251,        /* Incremental zone transfer. */ | ||||
|     ns_t_axfr = 252,        /* Transfer zone of authority. */ | ||||
| @@ -106,19 +87,6 @@ typedef enum __ns_type { | ||||
|     ns_t_max = 65536 | ||||
| } ns_type; | ||||
|  | ||||
| #define T_PTR          ns_t_ptr | ||||
| #define T_A            ns_t_a | ||||
|  | ||||
|  | ||||
| #define NS_DEFAULTPORT        53      /* For both TCP and UDP. */ | ||||
| #define NAMESERVER_PORT        NS_DEFAULTPORT | ||||
|  | ||||
| #define NS_HFIXEDSZ   12      /* #/bytes of fixed data in header */ | ||||
| #define HFIXEDSZ      NS_HFIXEDSZ | ||||
|  | ||||
| #define NS_QFIXEDSZ   4       /* #/bytes of fixed data in query */ | ||||
| #define QFIXEDSZ       NS_QFIXEDSZ | ||||
|  | ||||
| typedef enum __ns_opcode { | ||||
|     ns_o_query = 0,         /* Standard query. */ | ||||
|     ns_o_iquery = 1,        /* Inverse query (deprecated/unsupported). */ | ||||
| @@ -129,25 +97,6 @@ typedef enum __ns_opcode { | ||||
|     ns_o_max = 6 | ||||
| } ns_opcode; | ||||
|  | ||||
| #define QUERY          ns_o_query | ||||
|  | ||||
| #define NS_MAXLABEL   63 | ||||
| #define MAXLABEL       NS_MAXLABEL | ||||
|  | ||||
| #define NS_RRFIXEDSZ  10      /* #/bytes of fixed data in r record */ | ||||
| #define RRFIXEDSZ      NS_RRFIXEDSZ | ||||
|  | ||||
| #define T_CNAME                ns_t_cname | ||||
|  | ||||
| #define NS_MAXDNAME   256     /* maximum domain name */ | ||||
| #define MAXDNAME      NS_MAXDNAME | ||||
|  | ||||
| #define NS_MAXCDNAME  255     /* maximum compressed domain name */ | ||||
| #define MAXCDNAME     NS_MAXCDNAME | ||||
|  | ||||
| #define NS_PACKETSZ   512     /* maximum packet size */ | ||||
| #define PACKETSZ       NS_PACKETSZ | ||||
|  | ||||
| typedef enum __ns_rcode { | ||||
|     ns_r_noerror = 0,       /* No error occurred. */ | ||||
|     ns_r_formerr = 1,       /* Format error. */ | ||||
| @@ -168,6 +117,22 @@ typedef enum __ns_rcode { | ||||
|     ns_r_badtime = 18 | ||||
| } ns_rcode; | ||||
|  | ||||
| #endif /* HAVE_ARPA_NAMESER_H */ | ||||
|  | ||||
| #ifndef HAVE_ARPA_NAMESER_COMPAT_H | ||||
|  | ||||
| #define PACKETSZ         NS_PACKETSZ | ||||
| #define MAXDNAME         NS_MAXDNAME | ||||
| #define MAXCDNAME        NS_MAXCDNAME | ||||
| #define MAXLABEL         NS_MAXLABEL | ||||
| #define HFIXEDSZ         NS_HFIXEDSZ | ||||
| #define QFIXEDSZ         NS_QFIXEDSZ | ||||
| #define RRFIXEDSZ        NS_RRFIXEDSZ | ||||
| #define INDIR_MASK       NS_CMPRSFLGS | ||||
| #define NAMESERVER_PORT  NS_DEFAULTPORT | ||||
|  | ||||
| #define QUERY           ns_o_query | ||||
|  | ||||
| #define SERVFAIL        ns_r_servfail | ||||
| #define NOTIMP          ns_r_notimpl | ||||
| #define REFUSED         ns_r_refused | ||||
| @@ -176,6 +141,7 @@ typedef enum __ns_rcode { | ||||
| #define FORMERR         ns_r_formerr | ||||
| #define NXDOMAIN        ns_r_nxdomain | ||||
|  | ||||
| #define C_IN            ns_c_in | ||||
| #define C_CHAOS         ns_c_chaos | ||||
| #define C_HS            ns_c_hs | ||||
| #define C_NONE          ns_c_none | ||||
| @@ -223,4 +189,6 @@ typedef enum __ns_rcode { | ||||
| #define T_MAILA         ns_t_maila | ||||
| #define T_ANY           ns_t_any | ||||
|  | ||||
| #endif /* HAVE_ARPA_NAMESER_COMPAT_H */ | ||||
|  | ||||
| #endif /* ARES_NAMESER_H */ | ||||
|   | ||||
							
								
								
									
										32
									
								
								ares/setup.h
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								ares/setup.h
									
									
									
									
									
								
							| @@ -3,7 +3,7 @@ | ||||
|  | ||||
| /* $Id$ */ | ||||
|  | ||||
| /* Copyright (C) 2004 - 2007 by Daniel Stenberg et al | ||||
| /* Copyright (C) 2004 - 2008 by Daniel Stenberg et al | ||||
|  * | ||||
|  * Permission to use, copy, modify, and distribute this software and its | ||||
|  * documentation for any purpose and without fee is hereby granted, provided | ||||
| @@ -39,6 +39,18 @@ | ||||
|  | ||||
| #endif /* HAVE_CONFIG_H */ | ||||
|  | ||||
| /* | ||||
|  * Tru64 needs _REENTRANT set for a few function prototypes and | ||||
|  * things to appear in the system header files. Unixware needs it | ||||
|  * to build proper reentrant code. Others may also need it. | ||||
|  */ | ||||
|  | ||||
| #ifdef NEED_REENTRANT | ||||
| #  ifndef _REENTRANT | ||||
| #    define _REENTRANT | ||||
| #  endif | ||||
| #endif | ||||
|  | ||||
| /* | ||||
|  * Include header files for windows builds before redefining anything. | ||||
|  * Use this preproessor block only to include or exclude windows.h, | ||||
| @@ -127,24 +139,6 @@ | ||||
| #define HAVE_SYS_UIO_H | ||||
| #endif | ||||
|  | ||||
| #if (defined(WIN32) || defined(WATT32)) && \ | ||||
|    !(defined(__MINGW32__) || defined(NETWARE) || defined(__DJGPP__)) | ||||
| /* protos for the functions we provide in windows_port.c */ | ||||
| int ares_strncasecmp(const char *s1, const char *s2, int n); | ||||
| int ares_strcasecmp(const char *s1, const char *s2); | ||||
|  | ||||
| /* use this define magic to prevent us from adding symbol names to the library | ||||
|    that is a high-risk to collide with another libraries' attempts to do the | ||||
|    same */ | ||||
| #define strncasecmp(a,b,c) ares_strncasecmp(a,b,c) | ||||
| #define strcasecmp(a,b) ares_strcasecmp(a,b) | ||||
| #ifdef _MSC_VER | ||||
| #  if _MSC_VER >= 1400 | ||||
| #    define strdup(a) _strdup(a) | ||||
| #  endif | ||||
| #endif | ||||
| #endif | ||||
|  | ||||
| /* IPv6 compatibility */ | ||||
| #if !defined(HAVE_AF_INET6) | ||||
| #if defined(HAVE_PF_INET6) | ||||
|   | ||||
| @@ -3,7 +3,7 @@ | ||||
|  | ||||
| /* $Id$ */ | ||||
|  | ||||
| /* Copyright (C) 2004 - 2007 by Daniel Stenberg et al | ||||
| /* Copyright (C) 2004 - 2008 by Daniel Stenberg et al | ||||
|  * | ||||
|  * Permission to use, copy, modify, and distribute this software and its | ||||
|  * documentation for any purpose and without fee is hereby granted, provided | ||||
| @@ -191,6 +191,46 @@ struct timeval { | ||||
| #endif /* HAVE_SEND */ | ||||
|  | ||||
|  | ||||
| #if 0 | ||||
| #if defined(HAVE_RECVFROM) | ||||
| /* | ||||
|  * Currently recvfrom is only used on udp sockets. | ||||
|  */ | ||||
| #if !defined(RECVFROM_TYPE_ARG1) || \ | ||||
|     !defined(RECVFROM_TYPE_ARG2) || \ | ||||
|     !defined(RECVFROM_TYPE_ARG3) || \ | ||||
|     !defined(RECVFROM_TYPE_ARG4) || \ | ||||
|     !defined(RECVFROM_TYPE_ARG5) || \ | ||||
|     !defined(RECVFROM_TYPE_ARG6) || \ | ||||
|     !defined(RECVFROM_TYPE_RETV) | ||||
|   /* */ | ||||
|   Error Missing_definition_of_return_and_arguments_types_of_recvfrom | ||||
|   /* */ | ||||
| #else | ||||
| #define sreadfrom(s,b,bl,f,fl) (ssize_t)recvfrom((RECVFROM_TYPE_ARG1)  (s),  \ | ||||
|                                                  (RECVFROM_TYPE_ARG2 *)(b),  \ | ||||
|                                                  (RECVFROM_TYPE_ARG3)  (bl), \ | ||||
|                                                  (RECVFROM_TYPE_ARG4)  (0),  \ | ||||
|                                                  (RECVFROM_TYPE_ARG5 *)(f),  \ | ||||
|                                                  (RECVFROM_TYPE_ARG6 *)(fl)) | ||||
| #endif | ||||
| #else /* HAVE_RECVFROM */ | ||||
| #ifndef sreadfrom | ||||
|   /* */ | ||||
|   Error Missing_definition_of_macro_sreadfrom | ||||
|   /* */ | ||||
| #endif | ||||
| #endif /* HAVE_RECVFROM */ | ||||
|  | ||||
|  | ||||
| #ifdef RECVFROM_TYPE_ARG6_IS_VOID | ||||
| #  define RECVFROM_ARG6_T int | ||||
| #else | ||||
| #  define RECVFROM_ARG6_T RECVFROM_TYPE_ARG6 | ||||
| #endif | ||||
| #endif /* if 0 */ | ||||
|  | ||||
|  | ||||
| /* | ||||
|  * Uppercase macro versions of ANSI/ISO is*() functions/macros which | ||||
|  * avoid negative number inputs with argument byte codes > 127. | ||||
|   | ||||
| @@ -181,6 +181,10 @@ SOURCE=..\..\ares_send.c | ||||
| # End Source File | ||||
| # Begin Source File | ||||
|  | ||||
| SOURCE=..\..\ares_strcasecmp.c | ||||
| # End Source File | ||||
| # Begin Source File | ||||
|  | ||||
| SOURCE=..\..\ares_strerror.c | ||||
| # End Source File | ||||
| # Begin Source File | ||||
| @@ -193,6 +197,10 @@ SOURCE=..\..\ares_version.c | ||||
| # End Source File | ||||
| # Begin Source File | ||||
|  | ||||
| SOURCE=..\..\ares_writev.c | ||||
| # End Source File | ||||
| # Begin Source File | ||||
|  | ||||
| SOURCE=..\..\bitncmp.c | ||||
| # End Source File | ||||
| # Begin Source File | ||||
| @@ -233,10 +241,18 @@ SOURCE=..\..\ares_private.h | ||||
| # End Source File | ||||
| # Begin Source File | ||||
|  | ||||
| SOURCE=..\..\ares_strcasecmp.h | ||||
| # End Source File | ||||
| # Begin Source File | ||||
|  | ||||
| SOURCE=..\..\ares_version.h | ||||
| # End Source File | ||||
| # Begin Source File | ||||
|  | ||||
| SOURCE=..\..\ares_writev.h | ||||
| # End Source File | ||||
| # Begin Source File | ||||
|  | ||||
| SOURCE=..\..\bitncmp.h | ||||
| # End Source File | ||||
| # Begin Source File | ||||
|   | ||||
| @@ -5,20 +5,6 @@ | ||||
| /* only do the following on windows | ||||
|  */ | ||||
| #if (defined(WIN32) || defined(WATT32)) && !defined(MSDOS) | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <ctype.h> | ||||
| #include <string.h> | ||||
| #include <errno.h> | ||||
| #include <malloc.h> | ||||
|  | ||||
| #ifdef WATT32 | ||||
| #include <sys/socket.h> | ||||
| #else | ||||
| #include "nameser.h" | ||||
| #endif | ||||
| #include "ares.h" | ||||
| #include "ares_private.h" | ||||
|  | ||||
| #ifdef __WATCOMC__ | ||||
| /* | ||||
| @@ -34,57 +20,4 @@ WINAPI DllMain (HINSTANCE hnd, DWORD reason, LPVOID reserved) | ||||
| } | ||||
| #endif | ||||
|  | ||||
| #ifndef __MINGW32__ | ||||
| int | ||||
| ares_strncasecmp(const char *a, const char *b, int n) | ||||
| { | ||||
|     int i; | ||||
|  | ||||
|     for (i = 0; i < n; i++) { | ||||
|         int c1 = ISUPPER(a[i]) ? tolower(a[i]) : a[i]; | ||||
|         int c2 = ISUPPER(b[i]) ? tolower(b[i]) : b[i]; | ||||
|         if (c1 != c2) return c1-c2; | ||||
|     } | ||||
|     return 0; | ||||
| } | ||||
|  | ||||
| int | ||||
| ares_strcasecmp(const char *a, const char *b) | ||||
| { | ||||
|     return strncasecmp(a, b, strlen(a)+1); | ||||
| } | ||||
| #endif | ||||
|  | ||||
| int | ||||
| ares_writev (ares_socket_t s, const struct iovec *vector, size_t count) | ||||
| { | ||||
|   char *buffer, *bp; | ||||
|   size_t i, bytes = 0; | ||||
|  | ||||
|   /* Find the total number of bytes to write | ||||
|    */ | ||||
|   for (i = 0; i < count; i++) | ||||
|       bytes += vector[i].iov_len; | ||||
|  | ||||
|   if (bytes == 0)   /* not an error */ | ||||
|      return (0); | ||||
|  | ||||
|   /* Allocate a temporary buffer to hold the data | ||||
|    */ | ||||
|   buffer = bp = (char*) alloca (bytes); | ||||
|   if (!buffer) | ||||
|   { | ||||
|     SET_ERRNO(ENOMEM); | ||||
|     return (-1); | ||||
|   } | ||||
|  | ||||
|   /* Copy the data into buffer. | ||||
|    */ | ||||
|   for (i = 0; i < count; ++i) | ||||
|   { | ||||
|     memcpy (bp, vector[i].iov_base, vector[i].iov_len); | ||||
|     bp += vector[i].iov_len; | ||||
|   } | ||||
|   return (int)swrite(s, buffer, bytes); | ||||
| } | ||||
| #endif /* WIN32 builds only */ | ||||
|   | ||||
							
								
								
									
										104
									
								
								buildconf
									
									
									
									
									
								
							
							
						
						
									
										104
									
								
								buildconf
									
									
									
									
									
								
							| @@ -6,7 +6,7 @@ | ||||
| #                            | (__| |_| |  _ <| |___ | ||||
| #                             \___|\___/|_| \_\_____| | ||||
| # | ||||
| # Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al. | ||||
| # Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al. | ||||
| # | ||||
| # This software is licensed as described in the file COPYING, which | ||||
| # you should have received as part of this distribution. The terms | ||||
| @@ -27,22 +27,57 @@ die(){ | ||||
| 	exit | ||||
| } | ||||
|  | ||||
| # this works as 'which' but we use a different name to make it more obvious we | ||||
| # aren't using 'which'! ;-) | ||||
| #-------------------------------------------------------------------------- | ||||
| # findtool works as 'which' but we use a different name to make it more | ||||
| # obvious we aren't using 'which'! ;-) | ||||
| # | ||||
| findtool(){ | ||||
|   file="$1" | ||||
|  | ||||
|   IFS=":" | ||||
|   old_IFS=$IFS; IFS=':' | ||||
|   for path in $PATH | ||||
|   do | ||||
|     IFS=$old_IFS | ||||
|     # echo "checks for $file in $path" >&2 | ||||
|     if test -f "$path/$file"; then | ||||
|       echo "$path/$file" | ||||
|       return | ||||
|     fi | ||||
|   done | ||||
|   IFS=$old_IFS | ||||
| } | ||||
|  | ||||
| #-------------------------------------------------------------------------- | ||||
| # removethis() removes all files and subdirectories with the given name, | ||||
| # inside and below the current subdirectory at invocation time. | ||||
| # | ||||
| removethis(){ | ||||
|   if test "$#" = "1"; then | ||||
|     find . -depth -name $1 -print > buildconf.tmp.$$ | ||||
|     while read fdname | ||||
|     do | ||||
|       if test -f "$fdname"; then | ||||
|         rm -f "$fdname" | ||||
|       elif test -d "$fdname"; then | ||||
|         rm -f -r "$fdname" | ||||
|       fi | ||||
|     done < buildconf.tmp.$$ | ||||
|     rm -f buildconf.tmp.$$ | ||||
|   fi | ||||
| } | ||||
|  | ||||
| #-------------------------------------------------------------------------- | ||||
| # Ensure that buildconf runs from the subdirectory where configure.ac lives | ||||
| # | ||||
| if test ! -f configure.ac || | ||||
|   test ! -f src/main.c || | ||||
|   test ! -f lib/urldata.h || | ||||
|   test ! -f include/curl/curl.h; then | ||||
|   echo "Can not run buildconf from outside of curl's source subdirectory!" | ||||
|   echo "Change to the subdirectory where buildconf is found, and try again." | ||||
|   exit 1 | ||||
| fi | ||||
|  | ||||
| #-------------------------------------------------------------------------- | ||||
| # autoconf 2.57 or newer | ||||
| # | ||||
| @@ -65,6 +100,18 @@ fi | ||||
|  | ||||
| echo "buildconf: autoconf version $ac_version (ok)" | ||||
|  | ||||
| am4te_version=`${AUTOM4TE:-autom4te} --version 2>/dev/null|head -n 1| sed -e 's/autom4te\(.*\)/\1/' -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'` | ||||
| if test -z "$am4te_version"; then | ||||
|   echo "buildconf: autom4te not found. Weird autoconf installation!" | ||||
|   exit 1 | ||||
| fi | ||||
| if test "$am4te_version" = "$ac_version"; then | ||||
|   echo "buildconf: autom4te version $am4te_version (ok)" | ||||
| else | ||||
|   echo "buildconf: autom4te version $am4te_version (ERROR: does not match autoconf version)" | ||||
|   exit 1 | ||||
| fi | ||||
|  | ||||
| #-------------------------------------------------------------------------- | ||||
| # autoheader 2.50 or newer | ||||
| # | ||||
| @@ -108,12 +155,16 @@ fi | ||||
|  | ||||
| echo "buildconf: automake version $am_version (ok)" | ||||
|  | ||||
| ac=`findtool ${ACLOCAL:-aclocal}` | ||||
| if test -z "$ac"; then | ||||
| acloc_version=`${ACLOCAL:-aclocal} --version 2>/dev/null|head -n 1| sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//' -e 's/\(.*\)\(-p.*\)/\1/'` | ||||
| if test -z "$acloc_version"; then | ||||
|   echo "buildconf: aclocal not found. Weird automake installation!" | ||||
|   exit 1 | ||||
| fi | ||||
| if test "$acloc_version" = "$am_version"; then | ||||
|   echo "buildconf: aclocal version $acloc_version (ok)" | ||||
| else | ||||
|   echo "buildconf: aclocal found" | ||||
|   echo "buildconf: aclocal version $acloc_version (ERROR: does not match automake version)" | ||||
|   exit 1 | ||||
| fi | ||||
|  | ||||
| #-------------------------------------------------------------------------- | ||||
| @@ -202,14 +253,46 @@ fi | ||||
| # | ||||
| PERL=`findtool ${PERL:-perl}` | ||||
|  | ||||
| # ------------------------------------------------------------ | ||||
| #-------------------------------------------------------------------------- | ||||
| # Remove files generated on previous buildconf/configure run. | ||||
| # | ||||
| for fname in .deps \ | ||||
|     Makefile.in \ | ||||
|     aclocal.m4 \ | ||||
|     aclocal.m4.bak \ | ||||
|     autom4te.cache \ | ||||
|     compile \ | ||||
|     config.guess \ | ||||
|     config.h \ | ||||
|     config.h.in \ | ||||
|     config.log \ | ||||
|     config.status \ | ||||
|     config.sub \ | ||||
|     configure \ | ||||
|     curl-config \ | ||||
|     curlbuild.h \ | ||||
|     depcomp \ | ||||
|     libcares.pc \ | ||||
|     libcurl.pc \ | ||||
|     libtool \ | ||||
|     libtool.m4 \ | ||||
|     ltmain.sh \ | ||||
|     stamp-h1 \ | ||||
|     stamp-h2 \ | ||||
|     stamp-h3 ; do | ||||
|   removethis "$fname" | ||||
| done | ||||
|  | ||||
| #-------------------------------------------------------------------------- | ||||
| # run the correct scripts now | ||||
| # | ||||
|  | ||||
| echo "buildconf: running libtoolize" | ||||
| $libtoolize --copy --automake --force || die "The libtoolize command failed" | ||||
|  | ||||
| echo "buildconf: running aclocal" | ||||
| ${ACLOCAL:-aclocal} $ACLOCAL_FLAGS || die "The aclocal command line failed" | ||||
| ${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS || die "The aclocal command line failed" | ||||
|  | ||||
| if test -n "$PERL"; then | ||||
|   echo "buildconf: running aclocal hack to convert all mv to mv -f" | ||||
|   $PERL -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4 | ||||
| @@ -217,10 +300,13 @@ else | ||||
|   echo "buildconf: perl not found" | ||||
|   exit 1 | ||||
| fi | ||||
|  | ||||
| echo "buildconf: running autoheader" | ||||
| ${AUTOHEADER:-autoheader} || die "The autoheader command failed" | ||||
|  | ||||
| echo "buildconf: cp lib/config.h.in src/config.h.in" | ||||
| cp lib/config.h.in src/config.h.in | ||||
|  | ||||
| echo "buildconf: running autoconf" | ||||
| ${AUTOCONF:-autoconf}     || die "The autoconf command failed" | ||||
|  | ||||
|   | ||||
| @@ -8,3 +8,6 @@ copy src\hugehelp.c.cvs src\hugehelp.c | ||||
|  | ||||
| REM create Makefile | ||||
| copy Makefile.dist Makefile | ||||
|  | ||||
| REM create curlbuild.h | ||||
| copy include\curl\curlbuild.h.dist include\curl\curlbuild.h | ||||
|   | ||||
							
								
								
									
										574
									
								
								configure.ac
									
									
									
									
									
								
							
							
						
						
									
										574
									
								
								configure.ac
									
									
									
									
									
								
							| @@ -19,7 +19,7 @@ | ||||
| # KIND, either express or implied. | ||||
| # | ||||
| # $Id$ | ||||
| ########################################################################### | ||||
| #*************************************************************************** | ||||
| dnl Process this file with autoconf to produce a configure script. | ||||
|  | ||||
| AC_PREREQ(2.57) | ||||
| @@ -33,28 +33,55 @@ This configure script may be copied, distributed and modified under the | ||||
| terms of the curl license; see COPYING for more details]) | ||||
|  | ||||
| AC_CONFIG_SRCDIR([lib/urldata.h]) | ||||
| AM_CONFIG_HEADER(lib/config.h src/config.h) | ||||
| AM_CONFIG_HEADER(lib/config.h src/config.h include/curl/curlbuild.h) | ||||
| AM_MAINTAINER_MODE | ||||
|  | ||||
| dnl SED is needed by some of the tools | ||||
| AC_PATH_PROG( SED, sed, sed-was-not-found-by-configure, | ||||
|               $PATH:/usr/bin:/usr/local/bin) | ||||
| AC_SUBST(SED) | ||||
| CURL_CHECK_OPTION_DEBUG | ||||
| CURL_CHECK_OPTION_OPTIMIZE | ||||
| CURL_CHECK_OPTION_WARNINGS | ||||
|  | ||||
| if test "x$SED" = "xsed-was-not-found-by-configure"; then | ||||
|   AC_MSG_WARN([sed was not found, this may ruin your chances to build fine]) | ||||
| dnl SED is mandatory for configure process and libtool. | ||||
| dnl Set it now, allowing it to be changed later. | ||||
| AC_PATH_PROG([SED], [sed], [not_found], | ||||
|   [$PATH:/usr/bin:/usr/local/bin]) | ||||
| if test -z "$SED" || test "$SED" = "not_found"; then | ||||
|   AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.]) | ||||
| fi | ||||
| AC_SUBST([SED]) | ||||
|  | ||||
| dnl AR is used by libtool, and try the odd Solaris path too | ||||
| dnl we use AC_CHECK_TOOL since this should make a library for the target | ||||
| dnl platform | ||||
| AC_CHECK_TOOL(AR, ar, | ||||
|               ar-was-not-found-by-configure, | ||||
|               $PATH:/usr/bin:/usr/local/bin:/usr/ccs/bin) | ||||
| AC_SUBST(AR) | ||||
| if test "x$AR" = "xar-was-not-found-by-configure"; then | ||||
|   AC_MSG_WARN([ar was not found, this may ruin your chances to build fine]) | ||||
| dnl GREP is mandatory for configure process and libtool. | ||||
| dnl Set it now, allowing it to be changed later. | ||||
| AC_PATH_PROG([GREP], [grep], [not_found], | ||||
|   [$PATH:/usr/bin:/usr/local/bin]) | ||||
| if test -z "$GREP" || test "$GREP" = "not_found"; then | ||||
|   AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.]) | ||||
| fi | ||||
| AC_SUBST([GREP]) | ||||
|  | ||||
| dnl EGREP is mandatory for configure process and libtool. | ||||
| dnl Set it now, allowing it to be changed later. | ||||
| if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then | ||||
|   AC_MSG_CHECKING([for egrep]) | ||||
|   EGREP="$GREP -E" | ||||
|   AC_MSG_RESULT([$EGREP]) | ||||
| else | ||||
|   AC_PATH_PROG([EGREP], [egrep], [not_found], | ||||
|     [$PATH:/usr/bin:/usr/local/bin]) | ||||
| fi | ||||
| if test -z "$EGREP" || test "$EGREP" = "not_found"; then | ||||
|   AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.]) | ||||
| fi | ||||
| AC_SUBST([EGREP]) | ||||
|  | ||||
| dnl AR is mandatory for configure process and libtool. | ||||
| dnl This is target dependant, so check it as a tool. | ||||
| AC_PATH_TOOL([AR], [ar], [not_found], | ||||
|   [$PATH:/usr/bin:/usr/local/bin]) | ||||
| if test -z "$AR" || test "$AR" = "not_found"; then | ||||
|   AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.]) | ||||
| fi | ||||
| AC_SUBST([AR]) | ||||
|  | ||||
| AC_SUBST(libext) | ||||
|  | ||||
| dnl figure out the libcurl version | ||||
| @@ -106,11 +133,17 @@ AC_CANONICAL_HOST | ||||
| dnl Get system canonical name | ||||
| AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS]) | ||||
|  | ||||
| dnl Check for AIX weirdos | ||||
| AC_AIX | ||||
|  | ||||
| dnl Checks for programs. | ||||
| AC_PROG_CC | ||||
| CURL_CHECK_PROG_CC | ||||
|  | ||||
| dnl Our curl_off_t internal and external configure settings | ||||
| CURL_CONFIGURE_CURL_OFF_T | ||||
|  | ||||
| dnl This defines _ALL_SOURCE for AIX | ||||
| CURL_CHECK_AIX_ALL_SOURCE | ||||
|  | ||||
| dnl Our configure and build reentrant settings | ||||
| CURL_CONFIGURE_REENTRANT | ||||
|  | ||||
| dnl check for how to do large files | ||||
| AC_SYS_LARGEFILE | ||||
| @@ -118,6 +151,8 @@ AC_SYS_LARGEFILE | ||||
| dnl support building of Windows DLLs | ||||
| AC_LIBTOOL_WIN32_DLL | ||||
|  | ||||
| CURL_PROCESS_DEBUG_BUILD_OPTS | ||||
|  | ||||
| dnl skip libtool C++ and Fortran compiler checks | ||||
| m4_ifdef([AC_PROG_CXX], [m4_undefine([AC_PROG_CXX])]) | ||||
| m4_defun([AC_PROG_CXX],[]) | ||||
| @@ -134,10 +169,10 @@ m4_defun([AC_LIBTOOL_CXXCPP],[true]) | ||||
| m4_ifdef([AC_LIBTOOL_F77], [m4_undefine([AC_LIBTOOL_F77])]) | ||||
| m4_defun([AC_LIBTOOL_F77],[]) | ||||
|  | ||||
| dnl force libtool to build static libraries with PIC on AMD64-linux | ||||
| AC_MSG_CHECKING([if arch-OS host is AMD64-linux (to build static libraries with PIC)]) | ||||
| dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD | ||||
| AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)]) | ||||
| case $host in | ||||
|   x86_64*linux*) | ||||
|   x86_64*linux*|amd64*freebsd*|ia64*freebsd*) | ||||
|     AC_MSG_RESULT([yes]) | ||||
|     with_pic=yes | ||||
|     ;; | ||||
| @@ -212,6 +247,45 @@ AC_PROG_MAKE_SET | ||||
| dnl check if there's a way to force code inline | ||||
| AC_C_INLINE | ||||
|  | ||||
| dnl ********************************************************************** | ||||
| dnl platform/compiler/architecture specific checks/flags | ||||
| dnl ********************************************************************** | ||||
|  | ||||
| CURL_CHECK_COMPILER | ||||
| CURL_SET_COMPILER_BASIC_OPTS | ||||
| CURL_SET_COMPILER_DEBUG_OPTS | ||||
| CURL_SET_COMPILER_OPTIMIZE_OPTS | ||||
| CURL_SET_COMPILER_WARNING_OPTS | ||||
|  | ||||
| case $host in | ||||
|   # | ||||
|   x86_64*linux*|amd64*freebsd*|ia64*freebsd*) | ||||
|     # | ||||
|     if test "$compiler_id" = "INTEL_UNIX_C"; then | ||||
|       # | ||||
|       if test "$compiler_num" -ge "900" && | ||||
|         test "$compiler_num" -lt "1000"; then | ||||
|         dnl icc 9.X specific | ||||
|         CFLAGS="$CFLAGS -i-dynamic" | ||||
|       fi | ||||
|       # | ||||
|       if test "$compiler_num" -ge "1000"; then | ||||
|         dnl icc 10.X or later | ||||
|         CFLAGS="$CFLAGS -shared-intel" | ||||
|       fi | ||||
|       # | ||||
|     fi | ||||
|     ;; | ||||
|   # | ||||
| esac | ||||
|  | ||||
| CURL_CHECK_COMPILER_HALT_ON_ERROR | ||||
| CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE | ||||
|  | ||||
| dnl ********************************************************************** | ||||
| dnl Compilation based checks should not be done before this point. | ||||
| dnl ********************************************************************** | ||||
|  | ||||
| dnl ********************************************************************** | ||||
| dnl Make sure that our checks for headers windows.h winsock.h winsock2.h | ||||
| dnl and ws2tcpip.h take precedence over any other further checks which | ||||
| @@ -237,43 +311,7 @@ case X-"$ac_cv_native_windows" in | ||||
|     ac_cv_header_winber_h="no" | ||||
|     ;; | ||||
| esac | ||||
|  | ||||
| dnl ********************************************************************** | ||||
| dnl platform/compiler/architecture specific checks/flags | ||||
| dnl ********************************************************************** | ||||
|  | ||||
| case $host in | ||||
|   # | ||||
|   x86_64*linux*) | ||||
|     # | ||||
|     dnl find out if icc is being used | ||||
|     if test "z$ICC" = "z"; then | ||||
|       CURL_DETECT_ICC | ||||
|     fi | ||||
|     # | ||||
|     if test "$ICC" = "yes"; then | ||||
|       dnl figure out icc version | ||||
|       AC_MSG_CHECKING([icc version]) | ||||
|       iccver=`$CC -dumpversion` | ||||
|       iccnhi=`echo $iccver | cut -d . -f1` | ||||
|       iccnlo=`echo $iccver | cut -d . -f2` | ||||
|       iccnum=`(expr $iccnhi "*" 100 + $iccnlo) 2>/dev/null` | ||||
|       AC_MSG_RESULT($iccver) | ||||
|       # | ||||
|       if test "$iccnum" -ge "900" && test "$iccnum" -lt "1000"; then | ||||
|         dnl icc 9.X specific | ||||
|         CFLAGS="$CFLAGS -i-dynamic" | ||||
|       fi | ||||
|       # | ||||
|       if test "$iccnum" -ge "1000"; then | ||||
|         dnl icc 10.X or later | ||||
|         CFLAGS="$CFLAGS -shared-intel" | ||||
|       fi | ||||
|       # | ||||
|     fi | ||||
|     ;; | ||||
|   # | ||||
| esac | ||||
| CURL_CHECK_WIN32_LARGEFILE | ||||
|  | ||||
| dnl ************************************************************ | ||||
| dnl switch off particular protocols | ||||
| @@ -384,6 +422,22 @@ AC_HELP_STRING([--disable-ldaps],[Disable LDAPS support]), | ||||
|        AC_SUBST(CURL_DISABLE_LDAPS, [1]) | ||||
| ) | ||||
|  | ||||
| AC_MSG_CHECKING([whether to support proxies]) | ||||
| AC_ARG_ENABLE(proxy, | ||||
| AC_HELP_STRING([--enable-proxy],[Enable proxy support]) | ||||
| AC_HELP_STRING([--disable-proxy],[Disable proxy support]), | ||||
| [ case "$enableval" in | ||||
|   no) | ||||
|        AC_MSG_RESULT(no) | ||||
|        AC_DEFINE(CURL_DISABLE_PROXY, 1, [to disable proxies]) | ||||
|        AC_SUBST(CURL_DISABLE_PROXY, [1]) | ||||
|        ;; | ||||
|   *)   AC_MSG_RESULT(yes) | ||||
|        ;; | ||||
|   esac ], | ||||
|        AC_MSG_RESULT(yes) | ||||
| ) | ||||
|  | ||||
| AC_MSG_CHECKING([whether to support dict]) | ||||
| AC_ARG_ENABLE(dict, | ||||
| AC_HELP_STRING([--enable-dict],[Enable DICT support]) | ||||
| @@ -452,13 +506,6 @@ AC_HELP_STRING([--disable-manual],[Disable built-in manual]), | ||||
| dnl The actual use of the USE_MANUAL variable is done much later in this | ||||
| dnl script to allow other actions to disable it as well. | ||||
|  | ||||
| dnl ********************************************************************** | ||||
| dnl check if this is the Intel ICC compiler, and if so make it stricter | ||||
| dnl (convert warning 147 into an error) so that it properly can detect the | ||||
| dnl gethostbyname_r() version | ||||
| dnl ********************************************************************** | ||||
| CURL_DETECT_ICC([CFLAGS="$CFLAGS -we 147"]) | ||||
|  | ||||
| dnl ********************************************************************** | ||||
| dnl Checks for libraries. | ||||
| dnl ********************************************************************** | ||||
| @@ -626,6 +673,7 @@ if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then | ||||
|                , | ||||
|                -lnsl) | ||||
| fi | ||||
| ac_cv_func_strcasecmp="no" | ||||
|  | ||||
| dnl socket lib? | ||||
| AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ]) | ||||
| @@ -1045,24 +1093,25 @@ if test x"$want_gss" = xyes; then | ||||
|         AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries]) | ||||
|         dnl check if we have a really old MIT kerberos (<= 1.2) | ||||
|         AC_MSG_CHECKING([if gssapi headers declare GSS_C_NT_HOSTBASED_SERVICE]) | ||||
|         AC_TRY_COMPILE([ | ||||
|         AC_COMPILE_IFELSE([ | ||||
|           AC_LANG_PROGRAM([[ | ||||
| #include <gssapi/gssapi.h> | ||||
| #include <gssapi/gssapi_generic.h> | ||||
| #include <gssapi/gssapi_krb5.h> | ||||
|           ],[ | ||||
|           ]],[[ | ||||
|             gss_import_name( | ||||
|                             (OM_uint32 *)0, | ||||
|                             (gss_buffer_t)0, | ||||
|                             GSS_C_NT_HOSTBASED_SERVICE, | ||||
|                             (gss_name_t *)0); | ||||
|           ]]) | ||||
|         ],[ | ||||
|           AC_MSG_RESULT([yes]) | ||||
|         ],[ | ||||
|           AC_MSG_RESULT([no]) | ||||
|             AC_DEFINE(HAVE_OLD_GSSMIT, 1, [if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE]) | ||||
|           ] | ||||
|          ) | ||||
|  | ||||
|           AC_DEFINE(HAVE_OLD_GSSMIT, 1, | ||||
|             [if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE]) | ||||
|         ]) | ||||
|       fi | ||||
|     ] | ||||
|   ) | ||||
| @@ -1178,11 +1227,7 @@ if test X"$OPT_SSL" != Xno; then | ||||
|  | ||||
|   dnl This is for Msys/Mingw | ||||
|   case $host in | ||||
|     *-*-cygwin*) | ||||
|       dnl Under Cygwin this is extraneous and causes an unnecessary -lgdi32 | ||||
|       dnl to be added to LIBS and recorded in the .la file. | ||||
|       ;; | ||||
|     *) | ||||
|     *-*-msys* | *-*-mingw*) | ||||
|       AC_MSG_CHECKING([for gdi32]) | ||||
|       my_ac_save_LIBS=$LIBS | ||||
|       LIBS="-lgdi32 $LIBS" | ||||
| @@ -1773,22 +1818,22 @@ then | ||||
|   AC_DEFINE(DISABLED_THREADSAFE, 1, | ||||
|     [Set to explicitly specify we don't want to use thread-safe functions]) | ||||
| else | ||||
|   if test "$ipv6" != "yes"; then | ||||
|   dnl if test "$ipv6" != "yes"; then | ||||
|     dnl dig around for gethostbyname_r() | ||||
|     CURL_CHECK_GETHOSTBYNAME_R() | ||||
|     dnl the old gethostbyname_r check was done here | ||||
|  | ||||
|     dnl dig around for gethostbyaddr_r() | ||||
|     dnl CURL_CHECK_GETHOSTBYADDR_R() | ||||
|   fi | ||||
|     dnl the old gethostbyaddr_r check was here BUT COMMENTED OUT | ||||
|   dnl fi | ||||
|  | ||||
|   dnl poke around for inet_ntoa_r() | ||||
|   CURL_CHECK_INET_NTOA_R() | ||||
|   dnl the old inet_ntoa_r check was done here | ||||
|  | ||||
|   dnl is there a localtime_r() | ||||
|   CURL_CHECK_LOCALTIME_R() | ||||
|   dnl the old localtime_r check was done here | ||||
|  | ||||
|   dnl is there a strerror_r() | ||||
|   CURL_CHECK_STRERROR_R() | ||||
|   dnl the old strerror_r check was done here | ||||
|  | ||||
|   checkfor_gmtime_r="yes" | ||||
| fi | ||||
| @@ -1805,78 +1850,15 @@ if test "x$RECENTAIX" = "xyes"; then | ||||
|  | ||||
|   AC_DEFINE(_THREAD_SAFE, 1, [define this if you need it to compile thread-safe code]) | ||||
|  | ||||
|   dnl check if this is the IMB xlc compiler | ||||
|   dnl Details thanks to => http://predef.sourceforge.net/ | ||||
|   AC_MSG_CHECKING([if this is the xlc compiler]) | ||||
|   AC_EGREP_CPP([^__xlC__], [__xlC__], | ||||
|          dnl action if the text is found, this it has not been replaced by the | ||||
|          dnl cpp | ||||
|          XLC="no" | ||||
|          AC_MSG_RESULT([no]), | ||||
|          dnl the text was not found, it was replaced by the cpp | ||||
|          XLC="yes" | ||||
|          AC_MSG_RESULT([yes]) | ||||
|          CFLAGS="$CFLAGS -qthreaded" | ||||
|          dnl AIX xlc has to have strict aliasing turned off. If not, | ||||
|          dnl the optimizer assumes that pointers can only point to | ||||
|          dnl an object of the same type. | ||||
|          CFLAGS="$CFLAGS -qnoansialias" | ||||
|          dnl Force AIX xlc to stop after the compilation phase, and not | ||||
|          dnl generate object code, when the source compiles with errors. | ||||
|          CFLAGS="$CFLAGS -qhalt=e" | ||||
|        ) | ||||
|  | ||||
|  | ||||
|   dnl is there a localtime_r() | ||||
|   CURL_CHECK_LOCALTIME_R() | ||||
|   dnl the old localtime_r check was done here | ||||
|  | ||||
|   dnl is there a strerror_r() | ||||
|   CURL_CHECK_STRERROR_R() | ||||
|   dnl the old strerror_r check was done here | ||||
|  | ||||
|   checkfor_gmtime_r="yes" | ||||
| fi | ||||
|  | ||||
| if test x$cross_compiling != xyes; then | ||||
|  | ||||
|   if test x$checkfor_gmtime_r = xyes; then | ||||
|  | ||||
|     dnl if gmtime_r was found, verify that it actually works, as (at least) HPUX | ||||
|     dnl 10.20 is known to have a buggy one. If it doesn't work, disable use of | ||||
|     dnl it. | ||||
|  | ||||
|     AC_MSG_CHECKING([if gmtime_r exists and works]) | ||||
|     AC_RUN_IFELSE([[ | ||||
|     #include <time.h> | ||||
|     int main(void) | ||||
|     { | ||||
|     time_t local = 1170352587; | ||||
|     struct tm *gmt; | ||||
|     struct tm keeper; | ||||
|     putenv("TZ=CST6CDT"); | ||||
|     tzset(); | ||||
|     gmt = gmtime_r(&local, &keeper); | ||||
|     if(gmt) { | ||||
|       return 0; | ||||
|     } | ||||
|     return 1; /* failure */ | ||||
|     } | ||||
|      ]], | ||||
|      dnl success, do nothing | ||||
|      AC_MSG_RESULT(yes) | ||||
|      AC_DEFINE(HAVE_GMTIME_R, 1, [if you have (a working) gmtime_r]) | ||||
|      , | ||||
|      dnl failure, now disable the function | ||||
|      AC_MSG_RESULT(no) | ||||
|     , | ||||
|     dnl not invoked when crosscompiling) | ||||
|      echo "hej" | ||||
|     ) | ||||
|   fi | ||||
| else | ||||
|   dnl and for crosscompiling | ||||
|   AC_CHECK_FUNCS(gmtime_r) | ||||
| fi | ||||
|  | ||||
|  | ||||
| dnl ********************************************************************** | ||||
| dnl Back to "normal" configuring | ||||
| @@ -1895,6 +1877,7 @@ AC_CHECK_HEADERS( | ||||
|         sys/select.h \ | ||||
|         sys/socket.h \ | ||||
|         sys/ioctl.h \ | ||||
|         sys/uio.h \ | ||||
|         assert.h \ | ||||
|         unistd.h \ | ||||
|         stdlib.h \ | ||||
| @@ -1963,17 +1946,25 @@ AC_HEADER_TIME | ||||
| CURL_CHECK_STRUCT_TIMEVAL | ||||
| CURL_VERIFY_RUNTIMELIBS | ||||
|  | ||||
| AC_CHECK_SIZEOF(curl_off_t, ,[ | ||||
| #include <stdio.h> | ||||
| #include "$srcdir/include/curl/curl.h" | ||||
| ]) | ||||
| AC_CHECK_SIZEOF(size_t) | ||||
| AC_CHECK_SIZEOF(int) | ||||
| AC_CHECK_SIZEOF(long) | ||||
| CURL_CONFIGURE_LONG | ||||
| AC_CHECK_SIZEOF(time_t) | ||||
| AC_CHECK_SIZEOF(off_t) | ||||
|  | ||||
| soname_bump=no | ||||
| if test x"$ac_cv_native_windows" != "xyes" && | ||||
|    test $ac_cv_sizeof_off_t -ne $curl_sizeof_curl_off_t; then | ||||
|   AC_MSG_WARN([This libcurl built is probably not ABI compatible with previous]) | ||||
|   AC_MSG_WARN([builds! You MUST read lib/README.curl_off_t to figure it out.]) | ||||
|   soname_bump=yes | ||||
| fi | ||||
|  | ||||
|  | ||||
| AC_CHECK_TYPE(long long, | ||||
|    [AC_DEFINE(HAVE_LONGLONG, 1, [if your compiler supports long long])] | ||||
|    [AC_DEFINE(HAVE_LONGLONG, 1, | ||||
|       [Define to 1 if the compiler supports the 'long long' data type.])] | ||||
|    longlong="yes" | ||||
| ) | ||||
|  | ||||
| @@ -2018,11 +2009,45 @@ AC_TYPE_SIGNAL | ||||
| CURL_CHECK_FUNC_SELECT | ||||
|  | ||||
| CURL_CHECK_FUNC_RECV | ||||
|  | ||||
| CURL_CHECK_FUNC_RECVFROM | ||||
| CURL_CHECK_FUNC_SEND | ||||
|  | ||||
| CURL_CHECK_MSG_NOSIGNAL | ||||
|  | ||||
| CURL_CHECK_FUNC_ALARM | ||||
| CURL_CHECK_FUNC_FDOPEN | ||||
| CURL_CHECK_FUNC_FREEADDRINFO | ||||
| CURL_CHECK_FUNC_FREEIFADDRS | ||||
| CURL_CHECK_FUNC_FTRUNCATE | ||||
| CURL_CHECK_FUNC_GETADDRINFO | ||||
| CURL_CHECK_FUNC_GETHOSTBYADDR_R | ||||
| CURL_CHECK_FUNC_GETHOSTBYNAME_R | ||||
| CURL_CHECK_FUNC_GETHOSTNAME | ||||
| CURL_CHECK_FUNC_GETIFADDRS | ||||
| CURL_CHECK_FUNC_GETSERVBYPORT_R | ||||
| CURL_CHECK_FUNC_GMTIME_R | ||||
| CURL_CHECK_FUNC_INET_NTOA_R | ||||
| CURL_CHECK_FUNC_INET_NTOP | ||||
| CURL_CHECK_FUNC_INET_PTON | ||||
| CURL_CHECK_FUNC_LOCALTIME_R | ||||
| CURL_CHECK_FUNC_SIGACTION | ||||
| CURL_CHECK_FUNC_SIGINTERRUPT | ||||
| CURL_CHECK_FUNC_SIGNAL | ||||
| CURL_CHECK_FUNC_SIGSETJMP | ||||
| CURL_CHECK_FUNC_STRCASECMP | ||||
| CURL_CHECK_FUNC_STRCASESTR | ||||
| CURL_CHECK_FUNC_STRCMPI | ||||
| CURL_CHECK_FUNC_STRDUP | ||||
| CURL_CHECK_FUNC_STRERROR_R | ||||
| CURL_CHECK_FUNC_STRICMP | ||||
| CURL_CHECK_FUNC_STRLCAT | ||||
| CURL_CHECK_FUNC_STRNCASECMP | ||||
| CURL_CHECK_FUNC_STRNCMPI | ||||
| CURL_CHECK_FUNC_STRNICMP | ||||
| CURL_CHECK_FUNC_STRSTR | ||||
| CURL_CHECK_FUNC_STRTOK_R | ||||
| CURL_CHECK_FUNC_STRTOLL | ||||
| CURL_CHECK_FUNC_WRITEV | ||||
|  | ||||
| dnl Checks for library functions. | ||||
| dnl AC_PROG_GCC_TRADITIONAL | ||||
|  | ||||
| @@ -2034,79 +2059,50 @@ case $host in | ||||
|      AC_MSG_NOTICE([skip check for pipe on msdosdjgpp]) | ||||
|     ;; | ||||
| esac | ||||
| AC_CHECK_FUNCS( strtoll \ | ||||
|                 socket \ | ||||
|                 strdup \ | ||||
|                 strstr \ | ||||
|                 strcasestr \ | ||||
|                 strtok_r \ | ||||
|                 uname \ | ||||
|                 strcasecmp \ | ||||
|                 stricmp \ | ||||
|                 strcmpi \ | ||||
|  | ||||
| AC_CHECK_FUNCS([basename \ | ||||
|   closesocket \ | ||||
|   fork \ | ||||
|   geteuid \ | ||||
|   gethostbyaddr \ | ||||
|   getpass_r \ | ||||
|   getppid \ | ||||
|   getprotobyname \ | ||||
|   getpwuid \ | ||||
|   getrlimit \ | ||||
|   gettimeofday \ | ||||
|   inet_addr \ | ||||
|                 inet_ntoa \ | ||||
|                 inet_pton \ | ||||
|   perror \ | ||||
|                 closesocket \ | ||||
|                 siginterrupt \ | ||||
|                 sigaction \ | ||||
|                 signal \ | ||||
|                 getpass_r \ | ||||
|                 strlcat \ | ||||
|                 getpwuid \ | ||||
|                 geteuid \ | ||||
|                 getppid \ | ||||
|                 utime \ | ||||
|                 sigsetjmp \ | ||||
|                 basename \ | ||||
|                 setlocale \ | ||||
|                 ftruncate \ | ||||
|   pipe \ | ||||
|   poll \ | ||||
|                 getprotobyname \ | ||||
|                 getrlimit \ | ||||
|   setlocale \ | ||||
|   setmode \ | ||||
|   setrlimit \ | ||||
|                 fork \ | ||||
|                 setmode, | ||||
| dnl if found | ||||
| [], | ||||
| dnl if not found, $ac_func is the name we check for | ||||
|   socket \ | ||||
|   uname \ | ||||
|   utime | ||||
| ],[ | ||||
| ],[ | ||||
|   func="$ac_func" | ||||
|   eval skipcheck=\$skipcheck_$func | ||||
|   if test "x$skipcheck" != "xyes"; then | ||||
|     AC_MSG_CHECKING([deeper for $func]) | ||||
|   AC_TRY_LINK( [], | ||||
|                [ $func ();], | ||||
|                AC_MSG_RESULT(yes!) | ||||
|                eval "ac_cv_func_$func=yes" | ||||
|                def=`echo "HAVE_$func" | tr 'a-z' 'A-Z'` | ||||
|                AC_DEFINE_UNQUOTED($def, 1, [If you have $func]), | ||||
|                AC_MSG_RESULT(but still no) | ||||
|                ) | ||||
| fi | ||||
| ) | ||||
|  | ||||
| dnl sigsetjmp() might be a macro and no function so if it isn't found already | ||||
| dnl we make an extra check here! | ||||
| if test "$ac_cv_func_sigsetjmp" != "yes"; then | ||||
|   AC_MSG_CHECKING([for sigsetjmp defined as macro]) | ||||
|     AC_LINK_IFELSE([ | ||||
|       AC_LANG_PROGRAM([[ | ||||
| #include <setjmp.h> | ||||
|       ]],[[ | ||||
|       sigjmp_buf jmpenv; | ||||
|       sigsetjmp(jmpenv, 1); | ||||
|         $func (); | ||||
|       ]]) | ||||
|     ],[ | ||||
|       AC_MSG_RESULT([yes]) | ||||
|     AC_DEFINE(HAVE_SIGSETJMP, 1, [If you have sigsetjmp]) | ||||
|       eval "ac_cv_func_$func=yes" | ||||
|       AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$func])], [1], | ||||
|         [Define to 1 if you have the $func function.]) | ||||
|     ],[ | ||||
|     AC_MSG_RESULT([no]) | ||||
|       AC_MSG_RESULT([but still no]) | ||||
|     ]) | ||||
|   fi | ||||
| ]) | ||||
|  | ||||
|  | ||||
| AC_CHECK_DECL(basename, , | ||||
|               AC_DEFINE(NEED_BASENAME_PROTO, 1, [If you lack a fine basename() prototype]), | ||||
| @@ -2121,22 +2117,17 @@ AC_CHECK_DECL(basename, , | ||||
| #endif | ||||
| ) | ||||
|  | ||||
| AC_CHECK_DECL(inet_pton, , | ||||
|               AC_DEFINE(HAVE_NO_INET_PTON_PROTO, 1, | ||||
|                         [Defined if no inet_pton() prototype available]), | ||||
| [ | ||||
| #ifdef HAVE_ARPA_INET_H | ||||
| #include <arpa/inet.h> | ||||
| #endif | ||||
| ] | ||||
| ) | ||||
|  | ||||
| dnl Check if the getnameinfo function is available | ||||
| dnl and get the types of five of its arguments. | ||||
| CURL_CHECK_FUNC_GETNAMEINFO | ||||
|  | ||||
| if test "$ipv6" = "yes"; then | ||||
|   CURL_CHECK_WORKING_GETADDRINFO | ||||
|   if test "$ac_cv_func_getaddrinfo" = "yes"; then | ||||
|     AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support]) | ||||
|     IPV6_ENABLED=1 | ||||
|     AC_SUBST(IPV6_ENABLED) | ||||
|   fi | ||||
|   CURL_CHECK_NI_WITHSCOPEID | ||||
| fi | ||||
|  | ||||
| @@ -2350,31 +2341,6 @@ AC_HELP_STRING([--disable-sspi],[Disable SSPI]), | ||||
|        AC_MSG_RESULT(no) | ||||
| ) | ||||
|  | ||||
| dnl ************************************************************ | ||||
| dnl lame option to switch on debug options | ||||
| dnl | ||||
| AC_MSG_CHECKING([whether to enable debug options]) | ||||
| AC_ARG_ENABLE(debug, | ||||
| AC_HELP_STRING([--enable-debug],[Enable pedantic debug options]) | ||||
| AC_HELP_STRING([--disable-debug],[Disable debug options]), | ||||
| [ case "$enableval" in | ||||
|   no) | ||||
|        AC_MSG_RESULT(no) | ||||
|        ;; | ||||
|   *)   AC_MSG_RESULT(yes) | ||||
|  | ||||
|     CPPFLAGS="$CPPFLAGS -DCURLDEBUG" | ||||
|     CFLAGS="$CFLAGS -g" | ||||
|  | ||||
|     dnl set compiler "debug" options to become more picky, and remove | ||||
|     dnl optimize options from CFLAGS | ||||
|     CURL_CC_DEBUG_OPTS | ||||
|        ;; | ||||
|   esac | ||||
|  ], | ||||
|        AC_MSG_RESULT(no) | ||||
| ) | ||||
|  | ||||
| dnl ************************************************************ | ||||
| dnl disable cryptographic authentication | ||||
| dnl | ||||
| @@ -2452,6 +2418,27 @@ AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibi | ||||
|        AC_MSG_RESULT(no) | ||||
| ) | ||||
|  | ||||
| dnl ************************************************************ | ||||
| dnl enforce SONAME bump | ||||
| dnl  | ||||
|  | ||||
| AC_MSG_CHECKING([whether to enforce SONAME bump]) | ||||
| AC_ARG_ENABLE(soname-bump, | ||||
| AC_HELP_STRING([--enable-soname-bump],[Enable enforced SONAME bump]) | ||||
| AC_HELP_STRING([--disable-soname-bump],[Disable enforced SONAME bump]), | ||||
| [ case "$enableval" in | ||||
|   yes)   AC_MSG_RESULT(yes) | ||||
|          soname_bump=yes | ||||
|          ;; | ||||
|   *) | ||||
|          AC_MSG_RESULT(no) | ||||
|          ;; | ||||
|   esac ], | ||||
|         AC_MSG_RESULT($soname_bump) | ||||
| ) | ||||
| AM_CONDITIONAL(SONAME_BUMP, test x$soname_bump = xyes) | ||||
|  | ||||
|  | ||||
| dnl ************************************************************ | ||||
| if test ! -z "$winsock_LIB"; then | ||||
|  | ||||
| @@ -2480,6 +2467,90 @@ LIBS=$ALL_LIBS  dnl LIBS is a magic variable that's used for every link | ||||
|  | ||||
| AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes) | ||||
|  | ||||
| dnl | ||||
| dnl For keeping supported features and protocols also in pkg-config file | ||||
| dnl since it is more cross-compile frient than curl-config | ||||
| dnl | ||||
|  | ||||
| if test "x$USE_SSLEAY" = "x1"; then | ||||
|   SUPPORT_FEATURES="$SUPPORT_FEATURES SSL" | ||||
| elif test -n "$SSL_ENABLED"; then | ||||
|   SUPPORT_FEATURES="$SUPPORT_FEATURES SSL" | ||||
| fi | ||||
| if test "@KRB4_ENABLED@" = "x1"; then | ||||
|   SUPPORT_FEATURES="$SUPPORT_FEATURES KRB4" | ||||
| fi | ||||
| if test "x$IPV6_ENABLED" = "x1"; then | ||||
|   SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6" | ||||
| fi | ||||
| if test "x$HAVE_LIBZ" = "x1"; then | ||||
|   SUPPORT_FEATURES="$SUPPORT_FEATURES libz" | ||||
| fi | ||||
| if test "x$HAVE_ARES" = "x1"; then | ||||
|   SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS" | ||||
| fi | ||||
| if test "x$IDN_ENABLED" = "x1"; then | ||||
|   SUPPORT_FEATURES="$SUPPORT_FEATURES IDN" | ||||
| fi | ||||
| if test "x$USE_WINDOWS_SSPI" = "x1"; then | ||||
|   SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI" | ||||
| fi | ||||
| if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1"; then | ||||
|   SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM" | ||||
| fi | ||||
|  | ||||
| AC_SUBST(SUPPORT_FEATURES) | ||||
|  | ||||
| dnl For supported protocols in pkg-config file | ||||
| if test "x$CURL_DISABLE_HTTP" != "x1"; then | ||||
|   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP" | ||||
|   if test "x$SSL_ENABLED" = "x1"; then | ||||
|     SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS" | ||||
|   fi | ||||
| fi | ||||
| if test "x$CURL_DISABLE_FTP" != "x1"; then | ||||
|   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP" | ||||
|   if test "x$SSL_ENABLED" = "x1"; then | ||||
|     SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS" | ||||
|   fi | ||||
| fi | ||||
| if test "x$CURL_DISABLE_FILE" != "x1"; then | ||||
|   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE" | ||||
| fi | ||||
| if test "x$CURL_DISABLE_TELNET" != "x1"; then | ||||
|   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET" | ||||
| fi | ||||
| if test "x$CURL_DISABLE_LDAP" != "x1"; then | ||||
|   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP" | ||||
| fi | ||||
| if test "x$CURL_DISABLE_LDAPS" != "x1"; then | ||||
|   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS" | ||||
| fi | ||||
| if test "x$CURL_DISABLE_DICT" != "x1"; then | ||||
|   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT" | ||||
| fi | ||||
| if test "x$CURL_DISABLE_TFTP" != "x1"; then | ||||
|   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP" | ||||
| fi | ||||
| if test "x$USE_LIBSSH2" = "x1"; then | ||||
|   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP" | ||||
|   SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP" | ||||
| fi | ||||
|  | ||||
| AC_SUBST(SUPPORT_PROTOCOLS) | ||||
|  | ||||
| dnl squeeze whitespace out of some variables | ||||
|  | ||||
| squeeze CFLAGS | ||||
| squeeze CPPFLAGS | ||||
| squeeze DEFS | ||||
| squeeze LDFLAGS | ||||
| squeeze LIBS | ||||
|  | ||||
| squeeze CURL_LIBS | ||||
| squeeze LIBCURL_LIBS | ||||
| squeeze TEST_SERVER_LIBS | ||||
|  | ||||
| AC_CONFIG_FILES([Makefile \ | ||||
|            docs/Makefile \ | ||||
|            docs/examples/Makefile \ | ||||
| @@ -2536,3 +2607,14 @@ AC_MSG_NOTICE([Configured to build curl/libcurl: | ||||
|   LDAP support:    ${curl_ldap_msg} | ||||
|   LDAPS support:   ${curl_ldaps_msg}  | ||||
| ]) | ||||
|  | ||||
| if test "x$soname_bump" = "xyes"; then | ||||
|  | ||||
| cat <<EOM | ||||
|   SONAME bump:     yes - WARNING: this library will be built with the SONAME | ||||
|                    number bumped due to (a detected) ABI breakage. | ||||
|                    See lib/README.curl_off_t for details on this. | ||||
| EOM | ||||
|  | ||||
| fi | ||||
|  | ||||
|   | ||||
| @@ -80,71 +80,15 @@ while test $# -gt 0; do | ||||
| 	;; | ||||
|  | ||||
|     --feature|--features) | ||||
| 	if test "@USE_SSLEAY@" = "1"; then | ||||
|           echo "SSL" | ||||
|           NTLM=1 # OpenSSL implies NTLM | ||||
|         elif test -n "@SSL_ENABLED@"; then | ||||
|           echo "SSL" | ||||
|         fi | ||||
| 	if test "@KRB4_ENABLED@" = "1"; then | ||||
|           echo "KRB4" | ||||
|         fi | ||||
| 	if test "@IPV6_ENABLED@" = "1"; then | ||||
|           echo "IPv6" | ||||
|         fi | ||||
| 	if test "@HAVE_LIBZ@" = "1"; then | ||||
|           echo "libz" | ||||
|         fi | ||||
| 	if test "@HAVE_ARES@" = "1"; then | ||||
|           echo "AsynchDNS" | ||||
|         fi | ||||
| 	if test "@IDN_ENABLED@" = "1"; then | ||||
|           echo "IDN" | ||||
|         fi | ||||
| 	if test "@USE_WINDOWS_SSPI@" = "1"; then | ||||
|           echo "SSPI" | ||||
|           NTLM=1 | ||||
|         fi | ||||
| 	if test "$NTLM" = "1"; then | ||||
|           echo "NTLM" | ||||
|         fi | ||||
|         for feature in @SUPPORT_FEATURES@ ""; do | ||||
|             test -n "$feature" && echo "$feature" | ||||
|         done | ||||
| 	;; | ||||
|  | ||||
|     --protocols) | ||||
| 	if test "@CURL_DISABLE_HTTP@" != "1"; then | ||||
|           echo "HTTP" | ||||
| 	  if test "@SSL_ENABLED@" = "1"; then | ||||
|             echo "HTTPS" | ||||
|           fi | ||||
|         fi | ||||
| 	if test "@CURL_DISABLE_FTP@" != "1"; then | ||||
|           echo "FTP" | ||||
| 	  if test "@SSL_ENABLED@" = "1"; then | ||||
|             echo "FTPS" | ||||
|           fi | ||||
|         fi | ||||
| 	if test "@CURL_DISABLE_FILE@" != "1"; then | ||||
|           echo "FILE" | ||||
|         fi | ||||
| 	if test "@CURL_DISABLE_TELNET@" != "1"; then | ||||
|           echo "TELNET" | ||||
|         fi | ||||
| 	if test "@CURL_DISABLE_LDAP@" != "1"; then | ||||
|           echo "LDAP" | ||||
|         fi | ||||
| 	if test "@CURL_DISABLE_LDAPS@" != "1"; then | ||||
|           echo "LDAPS" | ||||
|         fi | ||||
| 	if test "@CURL_DISABLE_DICT@" != "1"; then | ||||
|           echo "DICT" | ||||
|         fi | ||||
| 	if test "@CURL_DISABLE_TFTP@" != "1"; then | ||||
|           echo "TFTP" | ||||
|         fi | ||||
| 	if test "@USE_LIBSSH2@" = "1"; then | ||||
|           echo "SCP" | ||||
|           echo "SFTP" | ||||
|         fi | ||||
|         for protocol in @SUPPORT_PROTOCOLS@; do | ||||
|             echo "$protocol" | ||||
|         done | ||||
| 	;; | ||||
|     --version) | ||||
| 	echo libcurl @VERSION@ | ||||
|   | ||||
| @@ -181,6 +181,7 @@ Smalltalk | ||||
|   http://www.squeaksource.com/CurlPlugin/ | ||||
|  | ||||
| SP-Forth | ||||
|  | ||||
|   SP-Forth binding by ygrek | ||||
|   http://www.forth.org.ru/~ac/lib/lin/curl/ | ||||
|  | ||||
| @@ -199,6 +200,11 @@ Visual Basic | ||||
|   libcurl-vb by Jeffrey Phillips | ||||
|   http://sourceforge.net/projects/libcurl-vb/ | ||||
|  | ||||
| Visual Foxpro | ||||
|  | ||||
|   by Carlos Alloatti | ||||
|   http://www.ctl32.com.ar/libcurl.asp | ||||
|  | ||||
| Q | ||||
|   The libcurl module is part of the default install | ||||
|   http://q-lang.sourceforge.net/ | ||||
|   | ||||
							
								
								
									
										36
									
								
								docs/FAQ
									
									
									
									
									
								
							
							
						
						
									
										36
									
								
								docs/FAQ
									
									
									
									
									
								
							| @@ -1,4 +1,4 @@ | ||||
| Updated: Feb 18, 2008 (http://curl.haxx.se/docs/faq.html) | ||||
| Updated: Sep 24, 2008 (http://curl.haxx.se/docs/faq.html) | ||||
|                                   _   _ ____  _ | ||||
|                               ___| | | |  _ \| | | ||||
|                              / __| | | | |_) | | | ||||
| @@ -70,6 +70,7 @@ FAQ | ||||
|   4.13 Why is curl -R on Windows one hour off? | ||||
|   4.14 Redirects work in browser but not with curl! | ||||
|   4.15 FTPS doesn't work | ||||
|   4.16 My HTTP POST or PUT requests are slow! | ||||
|  | ||||
|  5. libcurl Issues | ||||
|   5.1 Is libcurl thread-safe? | ||||
| @@ -85,6 +86,7 @@ FAQ | ||||
|   5.11 How do I make libcurl not receive the whole HTTP response? | ||||
|   5.12 Can I make libcurl fake or hide my real IP address? | ||||
|   5.13 How do I stop an ongoing transfer? | ||||
|   5.14 Using C++ non-static functions for callbacks? | ||||
|  | ||||
|  6. License Issues | ||||
|   6.1 I have a GPL program, can I use the libcurl library? | ||||
| @@ -867,6 +869,20 @@ FAQ | ||||
|   mandated by RFC4217. This kind of connection then of course uses the | ||||
|   standard FTP port 21 by default. | ||||
|  | ||||
|   4.16 My HTTP POST or PUT requests are slow! | ||||
|  | ||||
|   libcurl makes all POST and PUT requests (except for POST requests with a | ||||
|   very tiny request body) use the "Expect: 100-continue" header. This header | ||||
|   allows the server to deny the operation early so that libcurl can bail out | ||||
|   already before having to send any data. This is useful in authentication | ||||
|   cases and others. | ||||
|  | ||||
|   However, many servers don't implement the Expect: stuff properly and if the | ||||
|   server doesn't respond (positively) within 1 second libcurl will continue | ||||
|   and send off the data anyway. | ||||
|  | ||||
|   You can disable libcurl's use of the Expect: header the same way you disable | ||||
|   any header, using -H / CURLOPT_HTTPHEADER, or by forcing it to use HTTP 1.0. | ||||
|  | ||||
| 5. libcurl Issues | ||||
|  | ||||
| @@ -1070,6 +1086,24 @@ FAQ | ||||
|   If you're using the multi interface, you also stop a transfer by removing | ||||
|   the particular easy handle from the multi stack. | ||||
|  | ||||
|   5.14 Using C++ non-static functions for callbacks? | ||||
|  | ||||
|   libcurl is a C library, it doesn't know anything about C++ member functions. | ||||
|  | ||||
|   You can overcome this "limitation" with a relative ease using a static | ||||
|   member function that is passed a pointer to the class: | ||||
|  | ||||
|      // f is the pointer to your object. | ||||
|      static YourClass::staticFunction(void *buffer, size_t sz, size_t n, void *f) | ||||
|      { | ||||
|        // Call non-static member function. | ||||
|        static_cast<YourClass*>(f)->nonStaticFunction(); | ||||
|      } | ||||
|  | ||||
|      // This is how you pass pointer to the static function: | ||||
|      curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:staticFunction); | ||||
|      curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, this); | ||||
|  | ||||
| 6. License Issues | ||||
|  | ||||
|   Curl and libcurl are released under a MIT/X derivate license. The license is | ||||
|   | ||||
							
								
								
									
										122
									
								
								docs/INSTALL
									
									
									
									
									
								
							
							
						
						
									
										122
									
								
								docs/INSTALL
									
									
									
									
									
								
							| @@ -53,8 +53,12 @@ UNIX | ||||
|  | ||||
|         ./configure --with-ssl | ||||
|  | ||||
|    If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL,) | ||||
|    you can run configure like this: | ||||
|    If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL) | ||||
|    and you have pkg-config installed, set the pkg-config path first, like this: | ||||
|  | ||||
|         env PKG_CONFIG_PATH=/opt/OpenSSL/lib/pkgconfig ./configure --with-ssl | ||||
|  | ||||
|    Without pkg-config installed, use this: | ||||
|  | ||||
|         ./configure --with-ssl=/opt/OpenSSL | ||||
|  | ||||
| @@ -83,9 +87,10 @@ UNIX | ||||
|    provide the -R option to ld on some operating systems to set a hard-coded | ||||
|    path to the run-time linker: | ||||
|  | ||||
|         LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl | ||||
|         env LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl | ||||
|  | ||||
|    MORE OPTIONS | ||||
|    ------------ | ||||
|  | ||||
|      To force configure to use the standard cc compiler if both cc and gcc are | ||||
|      present, run configure like | ||||
| @@ -127,7 +132,7 @@ UNIX | ||||
|      To build with GnuTLS support instead of OpenSSL for SSL/TLS, note that | ||||
|      you need to use both --without-ssl and --with-gnutls. | ||||
|  | ||||
|      To build with yassl support instead of OpenSSL or GunTLS, you must build | ||||
|      To build with yassl support instead of OpenSSL or GnuTLS, you must build | ||||
|      yassl with its OpenSSL emulation enabled and point to that directory root | ||||
|      with configure --with-ssl. | ||||
|  | ||||
| @@ -140,6 +145,16 @@ UNIX | ||||
|      To get support for SCP and SFTP, build with --with-libssh2 and have | ||||
|      libssh2 0.16 or later installed. | ||||
|       | ||||
|    SPECIAL CASES | ||||
|    ------------- | ||||
|    Some versions of uClibc require configuring with CPPFLAGS=-D_GNU_SOURCE=1 | ||||
|    to get correct large file support. | ||||
|  | ||||
|    The Open Watcom C compiler on Linux requires configuring with the variables: | ||||
|  | ||||
|        ./configure CC=owcc AR="$WATCOM/binl/wlib" AR_FLAGS=-q \ | ||||
|            RANLIB=/bin/true STRIP="$WATCOM/binl/wstrip" CFLAGS=-Wextra | ||||
|  | ||||
|  | ||||
| Win32 | ||||
| ===== | ||||
| @@ -272,6 +287,37 @@ Win32 | ||||
|    at runtime. | ||||
|    Run 'nmake vc-ssl-zlib' to build with both ssl and zlib support. | ||||
|  | ||||
|    MSVC 6 IDE | ||||
|    ---------- | ||||
|  | ||||
|    A minimal VC++ 6.0 reference workspace (vc6curl.dsw) is available with the | ||||
|    source distribution archive to allow proper building of the two included | ||||
|    projects, the libcurl library and the curl tool. | ||||
|  | ||||
|    1) Open the vc6curl.dsw workspace with MSVC6's IDE. | ||||
|    2) Select 'Build' from top menu. | ||||
|    3) Select 'Batch Build' from dropdown menu. | ||||
|    4) Make sure that the eight project configurations are 'checked'. | ||||
|    5) Click on the 'Build' button. | ||||
|    6) Once the eight project configurations are built you are done. | ||||
|  | ||||
|    Dynamic and static libcurl libraries are built in debug and release flavours, | ||||
|    and can be located each one in its own subdirectory, DLL-Debug, DLL-Release, | ||||
|    LIB-Debug and LIB-Release, all of them below the 'lib' subdirectory. | ||||
|  | ||||
|    In the same way four curl executables are created, each using its respective | ||||
|    library. The resulting curl executables are located in its own subdirectory, | ||||
|    DLL-Debug, DLL-Release, LIB-Debug and LIB-Release, below the 'src' subdir. | ||||
|  | ||||
|    These reference VC++ 6.0 configurations are generated using the dynamic CRT. | ||||
|  | ||||
|    Intentionally, these reference VC++ 6.0 projects and configurations don't use | ||||
|    third party libraries, such as OpenSSL or Zlib, to allow proper compilation | ||||
|    and configuration for all new users without further requirements. | ||||
|  | ||||
|    If you need something more 'involved' you might adjust them for your own use, | ||||
|    or explore the world of makefiles described above 'MSVC from command line'. | ||||
|  | ||||
|    Borland C++ compiler | ||||
|    --------------------- | ||||
|  | ||||
| @@ -300,9 +346,8 @@ Win32 | ||||
|                                  -L c:\openssl\out32\ssleay32.lib | ||||
|                                  simplessl.c | ||||
|  | ||||
|  | ||||
|    MSVC IDE | ||||
|    -------- | ||||
|    OTHER MSVC IDEs | ||||
|    --------------- | ||||
|  | ||||
|    If you use VC++, Borland or similar compilers. Include all lib source | ||||
|    files in a static lib "project" (all .c and .h files that is). | ||||
| @@ -311,9 +356,6 @@ Win32 | ||||
|    Make the sources in the src/ drawer be a "win32 console application" | ||||
|    project. Name it curl. | ||||
|  | ||||
|    For VC++ 6, there's an included Makefile.vc6 that should be possible | ||||
|    to use out-of-the-box. | ||||
|  | ||||
|  | ||||
|    Disabling Specific Protocols in Win32 builds | ||||
|    -------------------------------------------- | ||||
| @@ -332,10 +374,12 @@ Win32 | ||||
|    CURL_DISABLE_DICT     disables DICT | ||||
|    CURL_DISABLE_FILE     disables FILE | ||||
|    CURL_DISABLE_TFTP     disables TFTP | ||||
|    CURL_DISABLE_HTTP     disables HTTP | ||||
|  | ||||
|    If you want to set any of these defines you have the following | ||||
|    possibilities: | ||||
|  | ||||
|    - Modify lib/config-win32.h | ||||
|    - Modify lib/setup.h | ||||
|    - Modify lib/Makefile.vc6 | ||||
|    - Add defines to Project/Settings/C/C++/General/Preprocessor Definitions | ||||
| @@ -618,40 +662,29 @@ eCos | ||||
| Minix | ||||
| ===== | ||||
|    curl can be compiled on Minix 3 using gcc or ACK (starting with | ||||
|    ver. 3.1.3).  The default heap size allocated to several required | ||||
|    programs is inadequate for configuring and compiling curl and will | ||||
|    result in strange errors unless fixed (which only needs to be done | ||||
|    once). | ||||
|    ver. 3.1.3). | ||||
|     | ||||
|    ACK | ||||
|    --- | ||||
|    Increase heap sizes with the commands: | ||||
|    Increase the heap sizes of the compiler with the command: | ||||
|  | ||||
|      chmem =1024000 /usr/lib/em_cemcom.ansi | ||||
|      chmem =512000 /usr/lib/i386/as | ||||
|  | ||||
|    If you have bash installed: | ||||
|  | ||||
|      chmem =2048000 /usr/local/bin/bash | ||||
|      binsizes xxl | ||||
|  | ||||
|    Configure and compile with: | ||||
|  | ||||
|      ./configure CC=cc LD=cc GREP=grep CPPFLAGS=-D_POSIX_SOURCE=1 | ||||
|      ./configure CONFIG_SHELL=/bin/bigsh CC=cc LD=cc AR=/usr/bin/aal \ | ||||
|                  GREP=grep CPPFLAGS=-D_POSIX_SOURCE=1 | ||||
|      make | ||||
|  | ||||
|    GCC | ||||
|    --- | ||||
|    If you have bash installed: | ||||
|  | ||||
|      chmem =2048000 /usr/local/bin/bash | ||||
|  | ||||
|    Make sure gcc is in your PATH with the command: | ||||
|     | ||||
|      export PATH=/usr/gnu/bin:$PATH | ||||
|     | ||||
|    then configure and compile curl with: | ||||
|  | ||||
|      ./configure CC=gcc GREP=grep AR=/usr/gnu/bin/gar | ||||
|      ./configure CONFIG_SHELL=/bin/bigsh CC=gcc AR=/usr/gnu/bin/gar GREP=grep | ||||
|      make | ||||
|  | ||||
|  | ||||
| @@ -673,7 +706,7 @@ CROSS COMPILE | ||||
|    (This section was graciously brought to us by Jim Duey, with additions by | ||||
|    Dan Fandrich) | ||||
|  | ||||
|    Download and unpack the cURL package.  Version should be 7.9.1 or later. | ||||
|    Download and unpack the cURL package. | ||||
|  | ||||
|    'cd' to the new directory. (e.g. cd curl-7.12.3) | ||||
|  | ||||
| @@ -723,12 +756,12 @@ REDUCING SIZE | ||||
|    important factor.  First, be sure to set the CFLAGS variable when | ||||
|    configuring with any relevant compiler optimization flags to reduce the | ||||
|    size of the binary.  For gcc, this would mean at minimum the -Os option, | ||||
|    potentially the -march=X and -mdynamic-no-pic options as well, e.g.: | ||||
|    and potentially the -march=X and -mdynamic-no-pic options as well, e.g. | ||||
|  | ||||
|       ./configure CFLAGS='-Os' ... | ||||
|  | ||||
|    Note that newer compilers often produce smaller code than older versions | ||||
|    due to better optimization. | ||||
|    due to improved optimization. | ||||
|  | ||||
|    Be sure to specify as many --disable- and --without- flags on the configure | ||||
|    command-line as you can to disable all the libcurl features that you | ||||
| @@ -737,10 +770,12 @@ REDUCING SIZE | ||||
|    will not use, here are some other flags that can reduce the size of the | ||||
|    library: | ||||
|  | ||||
|      --disable-ares (disables support for the ARES DNS library) | ||||
|      --disable-ares (disables support for the C-ARES DNS library) | ||||
|      --disable-cookies (disables support for HTTP cookies) | ||||
|      --disable-crypto-auth (disables HTTP cryptographic authentication) | ||||
|      --disable-ipv6 (disables support for IPv6) | ||||
|      --disable-manual (disables support for the built-in documentation) | ||||
|      --disable-proxy (disables support for HTTP and SOCKS proxies) | ||||
|      --disable-verbose (eliminates debugging strings and error code strings) | ||||
|      --enable-hidden-symbols (eliminates unneeded symbols in the shared library) | ||||
|      --without-libidn (disables support for the libidn DNS library) | ||||
| @@ -756,12 +791,24 @@ REDUCING SIZE | ||||
|    sections of the shared library using the -R option to objcopy (e.g. the | ||||
|    .comment section). | ||||
|  | ||||
|    Using these techniques it is possible to create an HTTP-only shared libcurl | ||||
|    library for i386 Linux platforms that is only 96 KiB in size (as of libcurl | ||||
|    version 7.17.1, using gcc 4.2.2). | ||||
|    Using these techniques it is possible to create a basic HTTP-only shared | ||||
|    libcurl library for i386 Linux platforms that is only 94 KiB in size, and | ||||
|    an FTP-only library that is 87 KiB in size (as of libcurl version 7.19.1, | ||||
|    using gcc 4.2.2). | ||||
|  | ||||
|    You may find that statically linking libcurl to your application will | ||||
|    result in a lower total size. | ||||
|    result in a lower total size than dynamically linking. | ||||
|  | ||||
|    Note that the curl test harness can detect the use of some, but not all, of | ||||
|    the --disable statements suggested above. Use will cause tests relying on | ||||
|    those features to fail.  The test harness can be manually forced to skip | ||||
|    the relevant tests by specifying certain key words on the runtests.pl | ||||
|    command line.  Following is a list of appropriate key words: | ||||
|  | ||||
|      --disable-cookies          !cookies | ||||
|      --disable-crypto-auth      !HTTP\ Digest\ auth !HTTP\ proxy\ Digest\ auth | ||||
|      --disable-manual           !--manual | ||||
|      --disable-proxy            !HTTP\ proxy !proxytunnel !SOCKS4 !SOCKS5 | ||||
|  | ||||
|  | ||||
| PORTS | ||||
| @@ -778,6 +825,7 @@ PORTS | ||||
|         - Alpha OpenBSD 3.0 | ||||
|         - Alpha OpenVMS V7.1-1H2 | ||||
|         - Alpha Tru64 v5.0 5.1 | ||||
|         - AVR32 Linux | ||||
|         - HP-PA HP-UX 9.X 10.X 11.X | ||||
|         - HP-PA Linux | ||||
|         - HP3000 MPE/iX | ||||
| @@ -787,6 +835,7 @@ PORTS | ||||
|         - Pocket PC/Win CE 3.0 | ||||
|         - Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2 | ||||
|         - PowerPC Darwin 1.0 | ||||
|         - PowerPC INTEGRITY | ||||
|         - PowerPC Linux | ||||
|         - PowerPC Mac OS 9 | ||||
|         - PowerPC Mac OS X | ||||
| @@ -799,7 +848,8 @@ PORTS | ||||
|         - StrongARM (and other ARM) RISC OS 3.1, 4.02 | ||||
|         - StrongARM/ARM7/ARM9 Linux 2.4, 2.6 | ||||
|         - StrongARM NetBSD 1.4.1 | ||||
|         - Symbian OS (P.I.P.S.) | ||||
|         - ARM INTEGRITY | ||||
|         - Symbian OS (P.I.P.S.) 9.x | ||||
|         - TPF | ||||
|         - Ultrix 4.3a | ||||
|         - UNICOS 9.0 | ||||
|   | ||||
| @@ -22,6 +22,56 @@ CVS | ||||
|  Tagging shall be used extensively, and by the time we release new archives we | ||||
|  should tag the sources with a name similar to the released version number. | ||||
|  | ||||
| Portability | ||||
| =========== | ||||
|  | ||||
|  We write curl and libcurl to compile with C89 compilers.  On 32bit and up | ||||
|  machines. Most of libcurl assumes more or less POSIX compliance but that's | ||||
|  not a requirement. | ||||
|  | ||||
|  We write libcurl to build and work with lots of third party tools, and we | ||||
|  want it to remain functional and buildable with these and later versions | ||||
|  (older versions may still work but is not what we work hard to maintain): | ||||
|  | ||||
|  OpenSSL      0.9.6 | ||||
|  GnuTLS       1.2 | ||||
|  zlib         1.1.4 | ||||
|  libssh2      0.16 | ||||
|  c-ares       1.5.0 | ||||
|  libidn       0.4.1 | ||||
|  *yassl       1.4.0 (http://curl.haxx.se/mail/lib-2008-02/0093.html) | ||||
|  openldap     2.0 | ||||
|  MIT krb5 lib 1.2.4 | ||||
|  qsossl       V5R2M0 | ||||
|  NSS          3.11.x | ||||
|  Heimdal      ? | ||||
|  | ||||
|  * = only partly functional, but that's due to bugs in the third party lib, not | ||||
|      because of libcurl code | ||||
|  | ||||
|  On systems where configure runs, we aim at working on them all - if they have | ||||
|  a suitable C compiler. On systems that don't run configure, we strive to keep | ||||
|  curl running fine on: | ||||
|  | ||||
|  Windows      98 | ||||
|  AS/400       V5R2M0 | ||||
|  Symbian      9.1 | ||||
|  Windows CE   ? | ||||
|  TPF          ? | ||||
|  | ||||
|  When writing code (mostly for generating stuff included in release tarballs) | ||||
|  we use a few "build tools" and we make sure that we remain functional with | ||||
|  these versions: | ||||
|  | ||||
|  GNU Libtool  1.4.2 | ||||
|  GNU Autoconf 2.57 | ||||
|  GNU Automake 1.7 (we currently avoid 1.10 due to Solaris-related bugs) | ||||
|  GNU M4       1.4 | ||||
|  perl         4 | ||||
|  roffit       0.5 | ||||
|  groff        ? (any version that supports "groff -Tps -man [in] [out]") | ||||
|  ps2pdf (gs)  ? | ||||
|  | ||||
| Windows vs Unix | ||||
| =============== | ||||
|  | ||||
|   | ||||
| @@ -3,14 +3,28 @@ join in and help us correct one or more of these! Also be sure to check the | ||||
| changelog of the current development status, as one or more of these problems | ||||
| may have been fixed since this was written! | ||||
|  | ||||
| 58.  It seems sensible to be able to use CURLOPT_NOBODY and | ||||
|   CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is | ||||
|   not working: http://curl.haxx.se/mail/lib-2008-07/0295.html | ||||
|  | ||||
| 57. On VMS-Alpha: When using an http-file-upload the file is not sent to the | ||||
|   Server with the correct content-length.  Sending a file with 511 or less | ||||
|   bytes, content-length 512 is used.  Sending a file with 513 - 1023 bytes, | ||||
|   content-length 1024 is used.  Files with a length of a multiple of 512 Bytes | ||||
|   show the correct content-length. Only these files work for upload. | ||||
|   http://curl.haxx.se/bug/view.cgi?id=2057858 | ||||
|  | ||||
| 56. When libcurl sends CURLOPT_POSTQUOTE commands when connected to a SFTP | ||||
|   server using the multi interface, the commands are not being sent correctly | ||||
|   and instead the connection is "cancelled" (the operation is considered done) | ||||
|   prematurely. There is a half-baked (busy-looping) patch provided in the bug | ||||
|   report but it cannot be accepted as-is. See | ||||
|   http://curl.haxx.se/bug/view.cgi?id=2006544 | ||||
|  | ||||
| 55. libcurl fails to build with MIT Kerberos for Windows (KfW) due to KfW's | ||||
|   library header files exporting symbols/macros that should be kept private | ||||
|   to the KfW library. See ticket #5601 at http://krbdev.mit.edu/rt/ | ||||
|  | ||||
| 54. User names embedded in URLs without a password are parsed incorrectly--the | ||||
|   host name is treated as part of the user name and the port number becomes the | ||||
|   password.  This can be observed test 279. | ||||
|  | ||||
| 53. SFTP busy-loop problem. When doing SFTP uploads, we can see that libcurl | ||||
|   occasionally will busy-loop while waiting for certain network conditions. | ||||
|   Reported by Pavel Shalagin, explained somewhat by Daniel Stenberg here: | ||||
| @@ -146,11 +160,6 @@ may have been fixed since this was written! | ||||
|   doesn't do a HEAD first to get the initial size. This needs to be done | ||||
|   manually for HTTP PUT resume to work, and then '-C [index]'. | ||||
|  | ||||
| 7. CURLOPT_USERPWD and CURLOPT_PROXYUSERPWD have no way of providing user names | ||||
|   that contain a colon. This can't be fixed easily in a backwards compatible | ||||
|   way without adding new options (and then, they should most probably allow | ||||
|   setting user name and password separately). | ||||
|  | ||||
| 6. libcurl ignores empty path parts in FTP URLs, whereas RFC1738 states that | ||||
|   such parts should be sent to the server as 'CWD ' (without an argument). | ||||
|   The only exception to this rule, is that we knowingly break this if the | ||||
|   | ||||
							
								
								
									
										55
									
								
								docs/MANUAL
									
									
									
									
									
								
							
							
						
						
									
										55
									
								
								docs/MANUAL
									
									
									
									
									
								
							| @@ -48,6 +48,9 @@ SIMPLE USAGE | ||||
|         curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \ | ||||
|         	scp://shell.example.com/~/personal.txt | ||||
|  | ||||
|   Get the main page from an IPv6 web server: | ||||
|  | ||||
|         curl -g "http://[2001:1890:1112:1::20]/" | ||||
|  | ||||
| DOWNLOAD TO A FILE | ||||
|  | ||||
| @@ -86,6 +89,13 @@ USING PASSWORDS | ||||
|    standards while the recommended "explicit" way is done by using FTP:// and | ||||
|    the --ftp-ssl option. | ||||
|  | ||||
|  SFTP / SCP | ||||
|  | ||||
|    This is similar to FTP, but you can specify a private key to use instead of | ||||
|    a password. Note that the private key may itself be protected by a password | ||||
|    that is unrelated to the login password of the remote system.  If you | ||||
|    provide a private key file you must also provide a public key file. | ||||
|  | ||||
|  HTTP | ||||
|  | ||||
|    Curl also supports user and password in HTTP URLs, thus you can pick a file | ||||
| @@ -154,9 +164,9 @@ RANGES | ||||
|  | ||||
| UPLOADING | ||||
|  | ||||
|  FTP | ||||
|  FTP / FTPS / SFTP / SCP | ||||
|  | ||||
|   Upload all data on stdin to a specified ftp site: | ||||
|   Upload all data on stdin to a specified server: | ||||
|  | ||||
|         curl -T - ftp://ftp.upload.com/myfile | ||||
|  | ||||
| @@ -169,7 +179,7 @@ UPLOADING | ||||
|   | ||||
|         curl -T uploadfile -u user:passwd ftp://ftp.upload.com/ | ||||
|  | ||||
|   Upload a local file to get appended to the remote file using ftp: | ||||
|   Upload a local file to get appended to the remote file: | ||||
|  | ||||
|         curl -T localfile -a ftp://ftp.upload.com/remotefile | ||||
|  | ||||
| @@ -331,7 +341,7 @@ REFERRER | ||||
|  | ||||
|         curl -e www.coolsite.com http://www.showme.com/ | ||||
|  | ||||
|   NOTE: The referer field is defined in the HTTP spec to be a full URL. | ||||
|   NOTE: The Referer: [sic] field is defined in the HTTP spec to be a full URL. | ||||
|  | ||||
| USER AGENT | ||||
|  | ||||
| @@ -496,7 +506,7 @@ CONFIG FILE | ||||
|   with = or :. Comments can be used within the file. If the first letter on a | ||||
|   line is a '#'-letter the rest of the line is treated as a comment. | ||||
|  | ||||
|   If you want the parameter to contain spaces, you must inclose the entire | ||||
|   If you want the parameter to contain spaces, you must enclose the entire | ||||
|   parameter within double quotes ("). Within those quotes, you specify a | ||||
|   quote as \". | ||||
|  | ||||
| @@ -564,10 +574,18 @@ FTP and PATH NAMES | ||||
|  | ||||
|   (I.e with an extra slash in front of the file name.) | ||||
|  | ||||
| SFTP and SCP and PATH NAMES | ||||
|  | ||||
|   With sftp: and scp: URLs, the path name given is the absolute name on the | ||||
|   server. To access a file relative to the remote user's home directory, | ||||
|   prefix the file with /~/ , such as: | ||||
|  | ||||
|         curl -u $USER sftp://home.example.com/~/.bashrc | ||||
|  | ||||
| FTP and firewalls | ||||
|  | ||||
|   The FTP protocol requires one of the involved parties to open a second | ||||
|   connction as soon as data is about to get transfered. There are two ways to | ||||
|   connection as soon as data is about to get transfered. There are two ways to | ||||
|   do this. | ||||
|  | ||||
|   The default way for curl is to issue the PASV command which causes the | ||||
| @@ -875,7 +893,8 @@ MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE | ||||
|   As is mentioned above, you can download multiple files with one command line | ||||
|   by simply adding more URLs. If you want those to get saved to a local file | ||||
|   instead of just printed to stdout, you need to add one save option for each | ||||
|   URL you specify. Note that this also goes for the -O option. | ||||
|   URL you specify. Note that this also goes for the -O option (but not | ||||
|   --remote-name-all). | ||||
|  | ||||
|   For example: get two files and use -O for the first and a custom file | ||||
|   name for the second: | ||||
| @@ -886,6 +905,28 @@ MULTIPLE TRANSFERS WITH A SINGLE COMMAND LINE | ||||
|  | ||||
|     curl -T local1 ftp://ftp.com/moo.exe -T local2 ftp://ftp.com/moo2.txt | ||||
|  | ||||
| IPv6 | ||||
|  | ||||
|   curl will connect to a server with IPv6 when a host lookup returns an IPv6 | ||||
|   address and fall back to IPv4 if the connection fails. The --ipv4 and --ipv6 | ||||
|   options can specify which address to use when both are available. IPv6 | ||||
|   addresses can also be specified directly in URLs using the syntax: | ||||
|  | ||||
|     http://[2001:1890:1112:1::20]/overview.html | ||||
|  | ||||
|   When this style is used, the -g option must be given to stop curl from | ||||
|   interpreting the square brackets as special globbing characters.  Link local | ||||
|   and site local addresses including a scope identifier, such as fe80::1234%1, | ||||
|   may also be used, but the scope portion must be numeric and the percent | ||||
|   character must be URL escaped. The previous example in an SFTP URL might | ||||
|   look like: | ||||
|  | ||||
|     sftp://[fe80::1234%251]/ | ||||
|  | ||||
|   IPv6 addresses provided other than in URLs (e.g. to the --proxy, --interface | ||||
|   or --ftp-port options) should not be URL encoded. | ||||
|  | ||||
|  | ||||
| MAILING LISTS | ||||
|  | ||||
|   For your convenience, we have several open mailing lists to discuss curl, | ||||
|   | ||||
							
								
								
									
										46
									
								
								docs/THANKS
									
									
									
									
									
								
							
							
						
						
									
										46
									
								
								docs/THANKS
									
									
									
									
									
								
							| @@ -31,9 +31,11 @@ Anders Gustafsson | ||||
| Andi Jahja | ||||
| Andre Guibert de Bruet | ||||
| Andreas Damm | ||||
| Andreas Faerber | ||||
| Andreas Ntaflos | ||||
| Andreas Olsson | ||||
| Andreas Rieke | ||||
| Andreas Schuldei | ||||
| Andres Garcia | ||||
| Andrew Benham | ||||
| Andrew Biggs | ||||
| @@ -45,17 +47,22 @@ Andrew Wansink | ||||
| Andr<EFBFBD>s Garc<72>a | ||||
| Andy Cedilnik | ||||
| Andy Serpa | ||||
| Andy Tsouladze | ||||
| Angus Mackay | ||||
| Antoine Calando | ||||
| Anton Kalmykov | ||||
| Arkadiusz Miskiewicz | ||||
| Armel Asselin | ||||
| Arnaud Ebalard | ||||
| Arve Knudsen | ||||
| Ates Goral | ||||
| Augustus Saunders | ||||
| Avery Fay | ||||
| Axel Tillequin | ||||
| Bart Whiteley | ||||
| Ben Greear | ||||
| Ben Madsen | ||||
| Ben Van Hof | ||||
| Benjamin Gerard | ||||
| Bernard Leak | ||||
| Bertrand Demiddelaer | ||||
| @@ -71,6 +78,7 @@ Brian Akins | ||||
| Brian Dessent | ||||
| Brian R Duffy | ||||
| Brian Ulm | ||||
| Brock Noland | ||||
| Bruce Mitchener | ||||
| Bryan Henderson | ||||
| Bryan Kemp | ||||
| @@ -87,6 +95,7 @@ Christian Robottom Reis | ||||
| Christian Vogt | ||||
| Christophe Demory | ||||
| Christophe Legry | ||||
| Christopher Palow | ||||
| Christopher R. Palmer | ||||
| Ciprian Badescu | ||||
| Clarence Gardner | ||||
| @@ -95,6 +104,7 @@ Cody Jones | ||||
| Colin Hogben | ||||
| Colin Watson | ||||
| Colm Buckley | ||||
| Constantine Sapuntzakis | ||||
| Cory Nelson | ||||
| Craig Davison | ||||
| Craig Markwardt | ||||
| @@ -111,6 +121,7 @@ Dan Zitter | ||||
| Daniel Black | ||||
| Daniel Cater | ||||
| Daniel Egger | ||||
| Daniel Fandrich | ||||
| Daniel Johnson | ||||
| Daniel Stenberg | ||||
| Daniel at touchtunes | ||||
| @@ -120,6 +131,7 @@ Dave Halbakken | ||||
| Dave Hamilton | ||||
| Dave May | ||||
| Dave Vasilevsky | ||||
| David Bau | ||||
| David Byron | ||||
| David Cohen | ||||
| David Eriksson | ||||
| @@ -133,11 +145,13 @@ David LeBlanc | ||||
| David McCreedy | ||||
| David Odin | ||||
| David Phillips | ||||
| David Rosenstrauch | ||||
| David Shaw | ||||
| David Tarendash | ||||
| David Thiel | ||||
| David Wright | ||||
| David Yan | ||||
| Dengminwen | ||||
| Detlef Schmier | ||||
| Diego Casorran | ||||
| Dima Barsky | ||||
| @@ -165,8 +179,10 @@ Dylan Ellicott | ||||
| Dylan Salisbury | ||||
| Early Ehlinger | ||||
| Edin Kadribasic | ||||
| Eduard Bloch | ||||
| Eetu Ojanen | ||||
| Ellis Pritchard | ||||
| Emanuele Bovisio | ||||
| Emil Romanus | ||||
| Emiliano Ida | ||||
| Enrico Scholz | ||||
| @@ -234,6 +250,7 @@ Hamish Mackenzie | ||||
| Hang Kin Lau | ||||
| Hanno Kranzhoff | ||||
| Hans Steegers | ||||
| Hans-Jurgen May | ||||
| Hardeep Singh | ||||
| Harshal Pradhan | ||||
| Heikki Korpela | ||||
| @@ -241,10 +258,12 @@ Henrik Storner | ||||
| Hzhijun | ||||
| Ian Ford | ||||
| Ian Gulliver | ||||
| Ian Lynagh | ||||
| Ian Turner | ||||
| Ian Wilkes | ||||
| Ignacio Vazquez-Abrams | ||||
| Igor Franchuk | ||||
| Igor Novoseltsev | ||||
| Igor Polyakov | ||||
| Ilguiz Latypov | ||||
| Ilja van Sprundel | ||||
| @@ -273,6 +292,7 @@ Jayesh A Shah | ||||
| Jaz Fresh | ||||
| Jean Jacques Drouin | ||||
| Jean-Claude Chauve | ||||
| Jean-Francois Bertrand | ||||
| Jean-Louis Lemaire | ||||
| Jean-Marc Ranger | ||||
| Jean-Philippe Barrette-LaPierre | ||||
| @@ -280,6 +300,7 @@ Jeff Johnson | ||||
| Jeff Lawson | ||||
| Jeff Phillips | ||||
| Jeff Pohlmeyer | ||||
| Jeff Weber | ||||
| Jeffrey Pohlmeyer | ||||
| Jeremy Friesner | ||||
| Jerome Muffat-Meridol | ||||
| @@ -297,7 +318,9 @@ John Crow | ||||
| John Janssen | ||||
| John Kelly | ||||
| John Lask | ||||
| John Lightsey | ||||
| John McGowan | ||||
| John Wilkinson | ||||
| Johnny Luong | ||||
| Jon Grubbs | ||||
| Jon Travis | ||||
| @@ -329,6 +352,7 @@ Katie Wang | ||||
| Kees Cook | ||||
| Keith MacDonald | ||||
| Keith McGuigan | ||||
| Keith Mok | ||||
| Ken Hirsch | ||||
| Ken Rastatter | ||||
| Kent Boortz | ||||
| @@ -357,6 +381,8 @@ Lau Hang Kin | ||||
| Legoff Vincent | ||||
| Lehel Bernadt | ||||
| Len Krause | ||||
| Lenny Rachitsky | ||||
| Liam Healy | ||||
| Linas Vepstas | ||||
| Ling Thio | ||||
| Linus Nielsen Feltzing | ||||
| @@ -386,6 +412,7 @@ Markus Moeller | ||||
| Markus Oberhumer | ||||
| Martijn Koster | ||||
| Martin C. Martin | ||||
| Martin Drasar | ||||
| Martin Hedenfalk | ||||
| Martin Skinner | ||||
| Marty Kuhrt | ||||
| @@ -401,12 +428,14 @@ Matthew Blain | ||||
| Matthew Clarke | ||||
| Maurice Barnum | ||||
| Max Katsev | ||||
| Maxim Ivanov | ||||
| Maxim Perenesenko | ||||
| Mekonikum | ||||
| Mettgut Jamalla | ||||
| Michael Benedict | ||||
| Michael Calmer | ||||
| Michael Curtis | ||||
| Michael Goffioul | ||||
| Michael Jahn | ||||
| Michael Jerris | ||||
| Michael Mealling | ||||
| @@ -420,6 +449,7 @@ Mike Bytnar | ||||
| Mike Dobbs | ||||
| Mike Hommey | ||||
| Mike Protts | ||||
| Mike Revi | ||||
| Miklos Nemeth | ||||
| Mitz Wark | ||||
| Mohamed Lrhazi | ||||
| @@ -443,15 +473,18 @@ Niels van Tongeren | ||||
| Nikita Schmidt | ||||
| Nikitinskit Dmitriy | ||||
| Niklas Angebrand | ||||
| Nikolai Kondrashov | ||||
| Nir Soffer | ||||
| Nis Jorgensen | ||||
| Nodak Sodak | ||||
| Norbert Frese | ||||
| Norbert Novotny | ||||
| Ofer | ||||
| Olaf Stueben | ||||
| Olaf St<53>ben | ||||
| Oren Tirosh | ||||
| P R Schaffner | ||||
| Pascal Terjan | ||||
| Patrick Bihan-Faou | ||||
| Patrick Monnerat | ||||
| Patrick Smith | ||||
| @@ -468,6 +501,7 @@ Pete Su | ||||
| Peter Bray | ||||
| Peter Forret | ||||
| Peter Heuchert | ||||
| Peter Lamberg | ||||
| Peter O'Gorman | ||||
| Peter Pentchev | ||||
| Peter Silva | ||||
| @@ -477,7 +511,9 @@ Peter Todd | ||||
| Peter Verhas | ||||
| Peter Wullinger | ||||
| Peteris Krumins | ||||
| Phil Blundell | ||||
| Phil Karn | ||||
| Phil Pellouchoud | ||||
| Philip Gladstone | ||||
| Philip Langdale | ||||
| Philippe Hameau | ||||
| @@ -485,8 +521,10 @@ Philippe Raoult | ||||
| Philippe Vaucher | ||||
| Pierre | ||||
| Pooyan McSporran | ||||
| Pramod Sharma | ||||
| Puneet Pawaia | ||||
| Quagmire | ||||
| Rafa Muyo | ||||
| Rafael Sagula | ||||
| Ralf S. Engelschall | ||||
| Ralph Beckmann | ||||
| @@ -528,6 +566,7 @@ Rodney Simmons | ||||
| Roland Blom | ||||
| Roland Krikava | ||||
| Roland Zimmermann | ||||
| Rolland Dudemaine | ||||
| Roman Koifman | ||||
| Ron Zapp | ||||
| Rosimildo da Silva | ||||
| @@ -542,9 +581,12 @@ Sampo Kellomaki | ||||
| Samuel D<>az Garc<72>a | ||||
| Samuel Listopad | ||||
| Sander Gates | ||||
| Sandor Feldi | ||||
| Saul good | ||||
| Scott Barrett | ||||
| Scott Cantor | ||||
| Scott Davis | ||||
| Scott McCreary | ||||
| Sebastien Willemijns | ||||
| Sergio Ballestrero | ||||
| Seshubabu Pasam | ||||
| @@ -574,6 +616,7 @@ Steve Lhomme | ||||
| Steve Little | ||||
| Steve Marx | ||||
| Steve Oliphant | ||||
| Steve Roskowski | ||||
| Steven Bazyl | ||||
| Steven G. Johnson | ||||
| Stoned Elipot | ||||
| @@ -620,6 +663,7 @@ Victor Snezhko | ||||
| Vikram Saxena | ||||
| Vilmos Nebehaj | ||||
| Vincent Bronner | ||||
| Vincent Le Normand | ||||
| Vincent Penquerc'h | ||||
| Vincent Sanders | ||||
| Vladimir Lazarenko | ||||
| @@ -635,6 +679,8 @@ Wojciech Zwiefka | ||||
| Xavier Bouchoux | ||||
| Yang Tse | ||||
| Yarram Sunil | ||||
| Yehoshua Hershberg | ||||
| Yuriy Sosov | ||||
| Yves Lejeune | ||||
| Zmey Petroff | ||||
| Zvi Har'El | ||||
|   | ||||
							
								
								
									
										114
									
								
								docs/TODO
									
									
									
									
									
								
							
							
						
						
									
										114
									
								
								docs/TODO
									
									
									
									
									
								
							| @@ -15,15 +15,12 @@ | ||||
|  1.1 Zero-copy interface | ||||
|  1.2 More data sharing | ||||
|  1.3 struct lifreq | ||||
|  1.4 Get IP address | ||||
|  1.5 c-ares ipv6 | ||||
|  1.6 configure-based info in public headers | ||||
|  1.4 signal-based resolver timeouts | ||||
|  | ||||
|  2. libcurl - multi interface | ||||
|  2.1 More non-blocking | ||||
|  2.2 Pause transfers | ||||
|  2.3 Remove easy interface internally | ||||
|  2.4 Avoid having to remove/readd handles | ||||
|  2.2 Remove easy interface internally | ||||
|  2.3 Avoid having to remove/readd handles | ||||
|  | ||||
|  3. Documentation | ||||
|  3.1  More and better | ||||
| @@ -38,9 +35,8 @@ | ||||
|  4.7 ASCII support | ||||
|  | ||||
|  5. HTTP | ||||
|  5.1 Other HTTP versions with CONNECT | ||||
|  5.2 Better persistency for HTTP 1.0 | ||||
|  5.3 support FF3 sqlite cookie files | ||||
|  5.1 Better persistency for HTTP 1.0 | ||||
|  5.2 support FF3 sqlite cookie files | ||||
|  | ||||
|  6. TELNET | ||||
|  6.1 ditch stdin | ||||
| @@ -50,15 +46,14 @@ | ||||
|  | ||||
|  7. SSL | ||||
|  7.1 Disable specific versions | ||||
|  7.2 Provide mytex locking API | ||||
|  7.3 dumpcert | ||||
|  7.4 Evaluate SSL patches | ||||
|  7.5 Cache OpenSSL contexts | ||||
|  7.6 Export session ids | ||||
|  7.7 Provide callback for cert verification | ||||
|  7.8 Support other SSL libraries | ||||
|  7.9  Support SRP on the TLS layer | ||||
|  7.10 improve configure --with-ssl | ||||
|  7.2 Provide mutex locking API | ||||
|  7.3 Evaluate SSL patches | ||||
|  7.4 Cache OpenSSL contexts | ||||
|  7.5 Export session ids | ||||
|  7.6 Provide callback for cert verification | ||||
|  7.7 Support other SSL libraries | ||||
|  7.8  Support SRP on the TLS layer | ||||
|  7.9 improve configure --with-ssl | ||||
|  | ||||
|  8. GnuTLS | ||||
|  8.1 Make NTLM work without OpenSSL functions | ||||
| @@ -131,54 +126,26 @@ | ||||
|  SIOCGIFADDR on newer Solaris versions as they claim the latter is obsolete. | ||||
|  To support ipv6 interface addresses for network interfaces properly. | ||||
|  | ||||
| 1.4 Get IP address | ||||
| 1.4 signal-based resolver timeouts | ||||
|  | ||||
|  Add the following to curl_easy_getinfo(): GET_HTTP_IP, GET_FTP_IP and | ||||
|  GET_FTP_DATA_IP. Return a string with the used IP. | ||||
|  libcurl built without an asynchronous resolver library uses alarm() to time | ||||
|  out DNS lookups. When a timeout occurs, this causes libcurl to jump from the | ||||
|  signal handler back into the library with a sigsetjmp, which effectively  | ||||
|  causes libcurl to continue running within the signal handler. This is | ||||
|  non-portable and could cause problems on some platforms. A discussion on the | ||||
|  problem is available at http://curl.haxx.se/mail/lib-2008-09/0197.html | ||||
|  | ||||
| 1.5 c-ares ipv6 | ||||
|  | ||||
|  Make libcurl built with c-ares use c-ares' IPv6 abilities. They weren't | ||||
|  present when we first added c-ares support but they have been added since! | ||||
|  When this is done and works, we can actually start considering making c-ares | ||||
|  powered libcurl the default build (which of course would require that we'd | ||||
|  bundle the c-ares source code in the libcurl source code releases). | ||||
|  | ||||
| 1.6 configure-based info in public headers | ||||
|  | ||||
|  Make the public headers include the proper system includes based on what was | ||||
|  present at the time when configure was run. Currently, the sys/select.h | ||||
|  header is for example included by curl/multi.h only on specific platforms we | ||||
|  know MUST have it. This is error-prone. We therefore want the header files to | ||||
|  adapt to configure results. Those results must be stored in a new header and | ||||
|  they must use a curl name space, i.e not be HAVE_* prefix (as that would risk | ||||
|  collide with other apps that use libcurl and that runs configure). | ||||
|  | ||||
|  Work on this has been started but hasn't been finished, and the initial patch | ||||
|  and some details are found here: | ||||
|  http://curl.haxx.se/mail/lib-2006-12/0084.html | ||||
|  | ||||
|  The remaining problems to solve involve the platforms that can't run | ||||
|  configure. | ||||
|  Also, alarm() provides timeout resolution only to the nearest second. alarm | ||||
|  ought to be replaced by setitimer on systems that support it. | ||||
|  | ||||
| 2. libcurl - multi interface | ||||
|  | ||||
| 2.1 More non-blocking | ||||
|  | ||||
|  Make sure we don't ever loop because of non-blocking sockets return | ||||
|  Make sure we don't ever loop because of non-blocking sockets returning | ||||
|  EWOULDBLOCK or similar. The GnuTLS connection etc. | ||||
|  | ||||
| 2.2 Pause transfers | ||||
|  | ||||
|  Make transfers treated more carefully. We need a way to tell libcurl we have | ||||
|  data to write, as the current system expects us to upload data each time the | ||||
|  socket is writable and there is no way to say that we want to upload data | ||||
|  soon just not right now, without that aborting the upload. The opposite | ||||
|  situation should be possible as well, that we tell libcurl we're ready to | ||||
|  accept read data. Today libcurl feeds the data as soon as it is available for | ||||
|  reading, no matter what. | ||||
|  | ||||
| 2.3 Remove easy interface internally | ||||
| 2.2 Remove easy interface internally | ||||
|  | ||||
|  Make curl_easy_perform() a wrapper-function that simply creates a multi | ||||
|  handle, adds the easy handle to it, runs curl_multi_perform() until the | ||||
| @@ -187,7 +154,7 @@ | ||||
|  internally use and assume the multi interface. The select()-loop should use | ||||
|  curl_multi_socket(). | ||||
|  | ||||
| 2.4 Avoid having to remove/readd handles | ||||
| 2.3 Avoid having to remove/readd handles | ||||
|  | ||||
|  curl_multi_handle_control() - this can control the easy handle (while) added | ||||
|  to a multi handle in various ways: | ||||
| @@ -256,18 +223,12 @@ | ||||
|  | ||||
| 5. HTTP | ||||
|  | ||||
| 5.1 Other HTTP versions with CONNECT | ||||
|  | ||||
|  When doing CONNECT to a HTTP proxy, libcurl always uses HTTP/1.0. This has | ||||
|  never been reported as causing trouble to anyone, but should be considered to | ||||
|  use the HTTP version the user has chosen. | ||||
|  | ||||
| 5.2 Better persistency for HTTP 1.0 | ||||
| 5.1 Better persistency for HTTP 1.0 | ||||
|  | ||||
|  "Better" support for persistent connections over HTTP 1.0 | ||||
|  http://curl.haxx.se/bug/feature.cgi?id=1089001 | ||||
|  | ||||
| 5.3 support FF3 sqlite cookie files | ||||
| 5.2 support FF3 sqlite cookie files | ||||
|  | ||||
|  Firefox 3 is changing from its former format to a a sqlite database instead. | ||||
|  We should consider how (lib)curl can/should support this. | ||||
| @@ -304,23 +265,18 @@ to provide the data to send. | ||||
|  Provide an option that allows for disabling specific SSL versions, such as | ||||
|  SSLv2 http://curl.haxx.se/bug/feature.cgi?id=1767276 | ||||
|  | ||||
| 7.2 Provide mytex locking API | ||||
| 7.2 Provide mutex locking API | ||||
|  | ||||
|  Provide a libcurl API for setting mutex callbacks in the underlying SSL | ||||
|  library, so that the same application code can use mutex-locking | ||||
|  independently of OpenSSL or GnutTLS being used. | ||||
|  | ||||
| 7.3 dumpcert | ||||
|  | ||||
|  Anton Fedorov's "dumpcert" patch: | ||||
|  http://curl.haxx.se/mail/lib-2004-03/0088.html | ||||
|  | ||||
| 7.4 Evaluate SSL patches | ||||
| 7.3 Evaluate SSL patches | ||||
|  | ||||
|  Evaluate/apply Gertjan van Wingerde's SSL patches: | ||||
|  http://curl.haxx.se/mail/lib-2004-03/0087.html | ||||
|  | ||||
| 7.5 Cache OpenSSL contexts | ||||
| 7.4 Cache OpenSSL contexts | ||||
|  | ||||
|  "Look at SSL cafile - quick traces look to me like these are done on every | ||||
|  request as well, when they should only be necessary once per ssl context (or | ||||
| @@ -330,7 +286,7 @@ to provide the data to send. | ||||
|  style connections are re-used. It will make us use slightly more memory but | ||||
|  it will libcurl do less creations and deletions of SSL contexts. | ||||
|  | ||||
| 7.6 Export session ids | ||||
| 7.5 Export session ids | ||||
|  | ||||
|  Add an interface to libcurl that enables "session IDs" to get | ||||
|  exported/imported. Cris Bailiff said: "OpenSSL has functions which can | ||||
| @@ -338,24 +294,24 @@ to provide the data to send. | ||||
|  the state from such a buffer at a later date - this is used by mod_ssl for | ||||
|  apache to implement and SSL session ID cache". | ||||
|  | ||||
| 7.7 Provide callback for cert verification | ||||
| 7.6 Provide callback for cert verification | ||||
|  | ||||
|  OpenSSL supports a callback for customised verification of the peer | ||||
|  certificate, but this doesn't seem to be exposed in the libcurl APIs. Could | ||||
|  it be? There's so much that could be done if it were! | ||||
|  | ||||
| 7.8 Support other SSL libraries | ||||
| 7.7 Support other SSL libraries | ||||
|  | ||||
|  Make curl's SSL layer capable of using other free SSL libraries.  Such as | ||||
|  MatrixSSL (http://www.matrixssl.org/). | ||||
|  | ||||
| 7.9  Support SRP on the TLS layer | ||||
| 7.8  Support SRP on the TLS layer | ||||
|  | ||||
|  Peter Sylvester's patch for SRP on the TLS layer.  Awaits OpenSSL support for | ||||
|  this, no need to support this in libcurl before there's an OpenSSL release | ||||
|  that does it. | ||||
|  | ||||
| 7.10 improve configure --with-ssl | ||||
| 7.9 improve configure --with-ssl | ||||
|  | ||||
|  make the configure --with-ssl option first check for OpenSSL, then GnuTLS, | ||||
|  then NSS... | ||||
|   | ||||
| @@ -375,12 +375,11 @@ Date:    May 28, 2008 | ||||
|  11.1 Certificates | ||||
|  | ||||
|   In the HTTPS world, you use certificates to validate that you are the one | ||||
|   you you claim to be, as an addition to normal passwords. Curl supports | ||||
|   client-side certificates. All certificates are locked with a pass phrase, | ||||
|   which you need to enter before the certificate can be used by curl. The pass | ||||
|   phrase can be specified on the command line or if not, entered interactively | ||||
|   when curl queries for it. Use a certificate with curl on a HTTPS server | ||||
|   like: | ||||
|   you claim to be, as an addition to normal passwords. Curl supports client- | ||||
|   side certificates. All certificates are locked with a pass phrase, which you | ||||
|   need to enter before the certificate can be used by curl. The pass phrase | ||||
|   can be specified on the command line or if not, entered interactively when | ||||
|   curl queries for it. Use a certificate with curl on a HTTPS server like: | ||||
|  | ||||
|         curl -E mycert.pem https://that.secure.server.com | ||||
|  | ||||
|   | ||||
							
								
								
									
										421
									
								
								docs/curl.1
									
									
									
									
									
								
							
							
						
						
									
										421
									
								
								docs/curl.1
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -16,11 +16,10 @@ | ||||
| #include <errno.h> | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
| #ifndef WIN32 | ||||
| #  include <unistd.h> | ||||
| #include <curl/multi.h> | ||||
| #ifdef WIN32 | ||||
| #include <windows.h> | ||||
| #endif | ||||
| #include <curl/multi.h> | ||||
|  | ||||
| static const char *urls[] = { | ||||
|   "http://www.microsoft.com", | ||||
| @@ -114,7 +113,7 @@ int main(void) | ||||
|  | ||||
|   /* we can optionally limit the total amount of connections this multi handle | ||||
|      uses */ | ||||
|   curl_multi_setopt(cm, CURLMOPT_MAXCONNECTS, MAX); | ||||
|   curl_multi_setopt(cm, CURLMOPT_MAXCONNECTS, (long)MAX); | ||||
|  | ||||
|   for (C = 0; C < MAX; ++C) { | ||||
|     init(cm, C); | ||||
|   | ||||
| @@ -7,7 +7,16 @@ AUTOMAKE_OPTIONS = foreign nostdinc | ||||
| EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \ | ||||
| 	makefile.dj $(COMPLICATED_EXAMPLES) | ||||
|  | ||||
| INCLUDES = -I$(top_srcdir)/include | ||||
| # Specify our include paths here, and do it relative to $(top_srcdir) and | ||||
| # $(top_builddir), to ensure that these paths which belong to the library | ||||
| # being currently built and tested are searched before the library which | ||||
| # might possibly already be installed in the system. | ||||
| # | ||||
| # $(top_builddir)/include is for libcurl's generated curl/curlbuild.h file | ||||
| # $(top_srcdir)/include is for libcurl's external include files | ||||
|  | ||||
| INCLUDES = -I$(top_builddir)/include \ | ||||
|            -I$(top_srcdir)/include | ||||
|  | ||||
| LIBDIR = $(top_builddir)/lib | ||||
|  | ||||
|   | ||||
| @@ -5,7 +5,7 @@ check_PROGRAMS = 10-at-a-time anyauthput cookie_interface \ | ||||
|   https multi-app multi-debugcallback multi-double \ | ||||
|   multi-post multi-single persistant post-callback \ | ||||
|   postit2 sepheaders simple simplepost simplessl \ | ||||
|   sendrecv | ||||
|   sendrecv httpcustomheader certinfo | ||||
|  | ||||
| # These examples require external dependencies that may not be commonly | ||||
| # available on POSIX systems, so don't bother attempting to compile them here. | ||||
| @@ -14,4 +14,3 @@ COMPLICATED_EXAMPLES = \ | ||||
|  ghiper.c hiperfifo.c htmltidy.c multithread.c \ | ||||
|  opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -9,10 +9,23 @@ | ||||
|  */ | ||||
|  | ||||
| #include <stdio.h> | ||||
| #include <stdint.h> | ||||
| #include <fcntl.h> | ||||
| #include <sys/stat.h> | ||||
| #ifdef WIN32 | ||||
| #  include <io.h> | ||||
| #else | ||||
| #  include <stdint.h> | ||||
| #  include <unistd.h> | ||||
| #endif | ||||
| #include <sys/types.h> | ||||
| #include <sys/stat.h> | ||||
|  | ||||
| #ifdef _MSC_VER | ||||
| #  ifdef _WIN64 | ||||
|      typedef __int64 intptr_t; | ||||
| #  else | ||||
|      typedef int intptr_t; | ||||
| #  endif | ||||
| #endif | ||||
|  | ||||
| #include <curl/curl.h> | ||||
|  | ||||
|   | ||||
							
								
								
									
										62
									
								
								docs/examples/certinfo.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								docs/examples/certinfo.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,62 @@ | ||||
| /***************************************************************************** | ||||
|  */ | ||||
|  | ||||
| #include <stdio.h> | ||||
|  | ||||
| #include <curl/curl.h> | ||||
| #include <curl/types.h> | ||||
| #include <curl/easy.h> | ||||
|  | ||||
| static size_t wrfu(void *ptr,  size_t  size,  size_t  nmemb,  void *stream) | ||||
| { | ||||
|   return size * nmemb; | ||||
| } | ||||
| int main(int argc, char **argv) | ||||
| { | ||||
|   CURL *curl; | ||||
|   CURLcode res; | ||||
|  | ||||
|   curl_global_init(CURL_GLOBAL_DEFAULT); | ||||
|  | ||||
|   curl = curl_easy_init(); | ||||
|   if(curl) { | ||||
|     curl_easy_setopt(curl, CURLOPT_URL, "https://www.networking4all.com/"); | ||||
|  | ||||
|     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, wrfu); | ||||
|  | ||||
|     curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); | ||||
|     curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); | ||||
|  | ||||
|     curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L); | ||||
|     curl_easy_setopt(curl, CURLOPT_CERTINFO, 1L); | ||||
|  | ||||
|     res = curl_easy_perform(curl); | ||||
|  | ||||
|     if(!res) { | ||||
|       struct curl_certinfo *ci = NULL; | ||||
|  | ||||
|       res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ci); | ||||
|  | ||||
|       if(!res && ci) { | ||||
|         int i; | ||||
|         printf("%d certs!\n", ci->num_of_certs); | ||||
|  | ||||
|         for(i=0; i<ci->num_of_certs; i++) { | ||||
|           struct curl_slist *slist; | ||||
|  | ||||
|           for(slist = ci->certinfo[i]; slist; slist = slist->next) | ||||
|             printf("%s\n", slist->data); | ||||
|  | ||||
|         } | ||||
|       } | ||||
|  | ||||
|     } | ||||
|  | ||||
|  | ||||
|     curl_easy_cleanup(curl); | ||||
|   } | ||||
|  | ||||
|   curl_global_cleanup(); | ||||
|  | ||||
|   return 0; | ||||
| } | ||||
| @@ -281,7 +281,7 @@ int main(int argc, char **argv) { | ||||
|   struct curl_slist * headers=NULL; | ||||
|   int badarg=0; | ||||
|  | ||||
|   binaryptr=(char*)malloc(tabLength); | ||||
|   binaryptr = malloc(tabLength); | ||||
|  | ||||
|   p.verbose = 0; | ||||
|   p.errorbio = BIO_new_fp (stderr, BIO_NOCLOSE); | ||||
| @@ -404,7 +404,7 @@ int main(int argc, char **argv) { | ||||
|   /* determine URL to go */ | ||||
|  | ||||
|   if (hostporturl) { | ||||
|     serverurl=(char*) malloc(9+strlen(hostporturl)); | ||||
|     serverurl = malloc(9+strlen(hostporturl)); | ||||
|     sprintf(serverurl,"https://%s",hostporturl); | ||||
|   } | ||||
|   else if (p.accesstype != 0) { /* see whether we can find an AIA or SIA for a given access type */ | ||||
| @@ -442,7 +442,7 @@ int main(int argc, char **argv) { | ||||
|  | ||||
|   /* pass our list of custom made headers */ | ||||
|  | ||||
|   contenttype=(char*) malloc(15+strlen(mimetype)); | ||||
|   contenttype = malloc(15+strlen(mimetype)); | ||||
|   sprintf(contenttype,"Content-type: %s",mimetype); | ||||
|   headers = curl_slist_append(headers,contenttype); | ||||
|   curl_easy_setopt(p.curl, CURLOPT_HTTPHEADER, headers); | ||||
| @@ -469,7 +469,7 @@ int main(int argc, char **argv) { | ||||
|       i+=lu; | ||||
|       if (i== tabLength) { | ||||
|         tabLength+=100; | ||||
|         binaryptr=(char*)realloc(binaryptr,tabLength); /* should be more careful */ | ||||
|         binaryptr=realloc(binaryptr,tabLength); /* should be more careful */ | ||||
|       } | ||||
|     } | ||||
|     tabLength = i; | ||||
|   | ||||
| @@ -27,7 +27,11 @@ int main(void) | ||||
|     return 1; /* can't continue */ | ||||
|   } | ||||
|  | ||||
|   stat("debugit", &file_info); /* to get the file size */ | ||||
|   /* to get the file size */ | ||||
|   if(fstat(fileno(fd), &file_info) != 0) { | ||||
|  | ||||
|     return 1; /* can't continue */ | ||||
|   } | ||||
|  | ||||
|   curl = curl_easy_init(); | ||||
|   if(curl) { | ||||
|   | ||||
| @@ -45,7 +45,9 @@ | ||||
|  | ||||
| #include <stdio.h> | ||||
| #include <string.h> | ||||
| #ifndef WIN32 | ||||
| #  include <sys/time.h> | ||||
| #endif | ||||
| #include <stdlib.h> | ||||
| #include <errno.h> | ||||
|  | ||||
| @@ -219,7 +221,7 @@ url_fopen(const char *url,const char *operation) | ||||
|     URL_FILE *file; | ||||
|     (void)operation; | ||||
|  | ||||
|     file = (URL_FILE *)malloc(sizeof(URL_FILE)); | ||||
|     file = malloc(sizeof(URL_FILE)); | ||||
|     if(!file) | ||||
|         return NULL; | ||||
|  | ||||
|   | ||||
| @@ -21,6 +21,9 @@ | ||||
|  | ||||
| #include <curl/curl.h> | ||||
|  | ||||
| #if defined(_MSC_VER) && (_MSC_VER < 1300) | ||||
| #  error _snscanf requires MSVC 7.0 or later. | ||||
| #endif | ||||
|  | ||||
| /* The MinGW headers are missing a few Win32 function definitions, | ||||
|    you shouldn't need this if you use VC++ */ | ||||
|   | ||||
| @@ -26,6 +26,8 @@ struct MemoryStruct { | ||||
|   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 | ||||
| @@ -42,7 +44,7 @@ WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) | ||||
|   size_t realsize = size * nmemb; | ||||
|   struct MemoryStruct *mem = (struct MemoryStruct *)data; | ||||
|  | ||||
|   mem->memory = (char *)myrealloc(mem->memory, mem->size + realsize + 1); | ||||
|   mem->memory = myrealloc(mem->memory, mem->size + realsize + 1); | ||||
|   if (mem->memory) { | ||||
|     memcpy(&(mem->memory[mem->size]), ptr, realsize); | ||||
|     mem->size += realsize; | ||||
|   | ||||
							
								
								
									
										38
									
								
								docs/examples/httpcustomheader.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								docs/examples/httpcustomheader.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| /***************************************************************************** | ||||
|  *                                  _   _ ____  _ | ||||
|  *  Project                     ___| | | |  _ \| | | ||||
|  *                             / __| | | | |_) | | | ||||
|  *                            | (__| |_| |  _ <| |___ | ||||
|  *                             \___|\___/|_| \_\_____| | ||||
|  * | ||||
|  * $Id$ | ||||
|  */ | ||||
|  | ||||
| #include <stdio.h> | ||||
| #include <curl/curl.h> | ||||
|  | ||||
| int main(void) | ||||
| { | ||||
|   CURL *curl; | ||||
|   CURLcode res; | ||||
|  | ||||
|   curl = curl_easy_init(); | ||||
|   if(curl) { | ||||
|     struct curl_slist *chunk = NULL; | ||||
|  | ||||
|     chunk = curl_slist_append(chunk, "Accept: moo"); | ||||
|  | ||||
|     /* request with the built-in Accept: */ | ||||
|     curl_easy_setopt(curl, CURLOPT_URL, "localhost"); | ||||
|     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); | ||||
|     res = curl_easy_perform(curl); | ||||
|  | ||||
|     /* redo request with our own custom Accept: */ | ||||
|     res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); | ||||
|     res = curl_easy_perform(curl); | ||||
|  | ||||
|     /* always cleanup */ | ||||
|     curl_easy_cleanup(curl); | ||||
|   } | ||||
|   return 0; | ||||
| } | ||||
| @@ -16,16 +16,15 @@ ifeq ($(USE_SSL),1) | ||||
|   LIBS += $(OPENSSL_ROOT)/lib/libssl.a $(OPENSSL_ROOT)/lib/libcrypt.a | ||||
| endif | ||||
|  | ||||
| ifeq ($(USE_IDNA),1) | ||||
|   LIBS += $(LIBIDN_ROOT)/lib/dj_obj/libidn.a -liconv | ||||
| endif | ||||
|  | ||||
| LIBS += $(WATT32_ROOT)/lib/libwatt.a $(ZLIB_ROOT)/libz.a | ||||
|  | ||||
| CSOURCES = fopen.c ftpget.c ftpgetresp.c ftpupload.c getinmemory.c  \ | ||||
|            http-post.c httpput.c https.c multi-app.c multi-double.c \ | ||||
|            multi-post.c multi-single.c persistant.c post-callback.c \ | ||||
|            postit2.c sepheaders.c simple.c simplepost.c simplessl.c \ | ||||
|            multi-debugcallback.c fileupload.c getinfo.c anyauthput.c \ | ||||
|            10-at-a-time.c # ftpuploadresume.c cookie_interface.c | ||||
| include Makefile.inc | ||||
|  | ||||
| PROGRAMS = $(CSOURCES:.c=.exe) | ||||
| PROGRAMS = $(patsubst %,%.exe,$(check_PROGRAMS)) | ||||
|  | ||||
| all: $(PROGRAMS) | ||||
| 	@echo Welcome to libcurl example program | ||||
|   | ||||
| @@ -56,7 +56,7 @@ int thread_setup(void) | ||||
| { | ||||
|   int i; | ||||
|  | ||||
|   mutex_buf = (MUTEX_TYPE *)malloc(CRYPTO_num_locks(  ) * sizeof(MUTEX_TYPE)); | ||||
|   mutex_buf = malloc(CRYPTO_num_locks(  ) * sizeof(MUTEX_TYPE)); | ||||
|   if (!mutex_buf) | ||||
|     return 0; | ||||
|   for (i = 0;  i < CRYPTO_num_locks(  );  i++) | ||||
|   | ||||
| @@ -18,7 +18,6 @@ | ||||
| static int wait_on_socket(int sockfd, int for_recv, long timeout_ms) | ||||
| { | ||||
|   struct timeval tv; | ||||
|   long seconds, usecs; | ||||
|   fd_set infd, outfd, errfd; | ||||
|   int res; | ||||
|  | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
| ABI - Application Binary Interface | ||||
|  | ||||
|   First, allow me to define the word for this context: ABI describes the | ||||
|   low-level interface between an application program a library. Calling | ||||
|   low-level interface between an application program and a library. Calling | ||||
|   conventions, function arguments, return values, struct sizes/defines and | ||||
|   more. | ||||
|  | ||||
|   | ||||
| @@ -21,7 +21,7 @@ | ||||
| .\" * $Id$ | ||||
| .\" ************************************************************************** | ||||
| .\" | ||||
| .TH curl_easy_getinfo 3 "21 Mar 2006" "libcurl 7.15.4" "libcurl Manual" | ||||
| .TH curl_easy_getinfo 3 "16 Oct 2008" "libcurl 7.19.1" "libcurl Manual" | ||||
| .SH NAME | ||||
| curl_easy_getinfo - extract information from a curl handle | ||||
| .SH SYNOPSIS | ||||
| @@ -71,6 +71,12 @@ start until the name resolving was completed. | ||||
| .IP CURLINFO_CONNECT_TIME | ||||
| Pass a pointer to a double to receive the time, in seconds, it took from the | ||||
| start until the connect to the remote host (or proxy) was completed. | ||||
| .IP CURLINFO_APPCONNECT_TIME | ||||
| Pass a pointer to a double to receive the time, in seconds, it took from the | ||||
| start until the SSL/SSH connect/handshake to the remote host was completed. | ||||
| This time is most often very near to the PRETRANSFER time, except for cases | ||||
| such as HTTP pippelining where the pretransfer time can be delayed due to | ||||
| waits in line for the pipeline and more. (Added in 7.19.0) | ||||
| .IP CURLINFO_PRETRANSFER_TIME | ||||
| Pass a pointer to a double to receive the time, in seconds, it took from the | ||||
| start until the file transfer is just about to begin. This includes all | ||||
| @@ -159,6 +165,12 @@ counted).  Combined with \fICURLINFO_REDIRECT_COUNT\fP you are able to know | ||||
| how many times libcurl successfully reused existing connection(s) or not.  See | ||||
| the Connection Options of \fIcurl_easy_setopt(3)\fP to see how libcurl tries | ||||
| to make persistent connections to save time.  (Added in 7.12.3) | ||||
| .IP CURLINFO_PRIMARY_IP | ||||
| Pass a pointer to a char pointer to receive the pointer to a zero-terminated | ||||
| 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_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 | ||||
| @@ -178,35 +190,49 @@ Pass a pointer to a 'char *' 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) | ||||
| .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 | ||||
| chain, assuming you had CURLOPT_CERTINFO enabled when the previous request was | ||||
| done. The struct reports how many certs it found and then you can extract info | ||||
| for each of those certs by following the linked lists. The info chain is | ||||
| provided in a series of data in the format "name:content" where the content is | ||||
| for the specific named data. See also the certinfo.c example. NOTE: this | ||||
| option is only available in libcurl built with OpenSSL support. (Added in | ||||
| 7.19.1) | ||||
| .SH TIMES | ||||
| .NF | ||||
| An overview of the six time values available from curl_easy_getinfo() | ||||
|  | ||||
| curl_easy_perform() | ||||
|     | | ||||
|     |--NT | ||||
|     |--|--CT | ||||
|     |--|--|--PT | ||||
|     |--|--|--|--ST | ||||
|     |--|--|--|--|--TT | ||||
|     |--|--|--|--|--RT | ||||
|     |--NAMELOOKUP | ||||
|     |--|--CONNECT | ||||
|     |--|--|--APPCONNECT | ||||
|     |--|--|--|--PRETRANSFER | ||||
|     |--|--|--|--|--STARTTRANSFER | ||||
|     |--|--|--|--|--|--TOTAL | ||||
|     |--|--|--|--|--|--REDIRECT | ||||
| .FI | ||||
| .IP NT | ||||
| .IP NAMELOOKUP | ||||
| \fICURLINFO_NAMELOOKUP_TIME\fP. The time it took from the start until the name | ||||
| resolving was completed. | ||||
| .IP CT | ||||
| .IP CONNECT | ||||
| \fICURLINFO_CONNECT_TIME\fP. The time it took from the start until the connect | ||||
| to the remote host (or proxy) was completed. | ||||
| .IP PT | ||||
| .IP APPCONNECT | ||||
| \fICURLINFO_APPCONNECT_TIME\fP. The time it took from the start until the SSL | ||||
| connect/handshake with the remote host was completed. (Added in in 7.19.0) | ||||
| .IP PRETRANSFER | ||||
| \fICURLINFO_PRETRANSFER_TIME\fP. The time it took from the start until the | ||||
| file transfer is just about to begin. This includes all pre-transfer commands | ||||
| and negotiations that are specific to the particular protocol(s) involved. | ||||
| .IP ST | ||||
| .IP STARTTRANSFER | ||||
| \fICURLINFO_STARTTRANSFER_TIME\fP. The time it took from the start until the | ||||
| first byte is just about to be transferred. | ||||
| .IP TT | ||||
| .IP TOTAL | ||||
| \fICURLINFO_TOTAL_TIME\fP. Total time of the previous request. | ||||
| .IP RT | ||||
| .IP REDIRECT | ||||
| \fICURLINFO_REDIRECT_TIME\fP. The time it took for all redirection steps | ||||
| include name lookup, connect, pretransfer and transfer before final | ||||
| transaction was started. So, this is zero if no redirection took place. | ||||
|   | ||||
| @@ -12,7 +12,7 @@ curl_easy_pause - pause and unpause a connection | ||||
| Using this function, you can explicitly mark a running connection to get | ||||
| paused, and you can unpause a connection that was previously paused. | ||||
|  | ||||
| A connection can made to pause by using this function or by letting the read | ||||
| A connection can be paused by using this function or by letting the read | ||||
| or the write callbacks return the proper magic return code | ||||
| (\fICURL_READFUNC_PAUSE\fP and \fICURL_WRITEFUNC_PAUSE\fP). A write callback | ||||
| that returns pause signals to the library that it couldn't take care of any | ||||
| @@ -56,7 +56,7 @@ it in an allocated buffer until the reading is again unpaused using this | ||||
| function. | ||||
|  | ||||
| If the downloaded data is compressed and is asked to get uncompressed | ||||
| automatially on download, libcurl will continue to uncompress the entire | ||||
| automatically on download, libcurl will continue to uncompress the entire | ||||
| downloaded chunk and it will cache the data uncompressed. This has the side- | ||||
| effect that if you download something that is compressed a lot, it can result | ||||
| in a very large data amount needing to be allocated to save the data during | ||||
|   | ||||
| @@ -21,7 +21,7 @@ | ||||
| .\" * $Id$ | ||||
| .\" ************************************************************************** | ||||
| .\" | ||||
| .TH curl_easy_setopt 3 "5 Jan 2008" "libcurl 7.18.0" "libcurl Manual" | ||||
| .TH curl_easy_setopt 3 "28 Oct 2008" "libcurl 7.19.1" "libcurl Manual" | ||||
| .SH NAME | ||||
| curl_easy_setopt \- set options for a curl easy handle | ||||
| .SH SYNOPSIS | ||||
| @@ -56,7 +56,7 @@ The \fIhandle\fP is the return code from a \fIcurl_easy_init(3)\fP or | ||||
| \fIcurl_easy_duphandle(3)\fP call. | ||||
| .SH BEHAVIOR OPTIONS | ||||
| .IP CURLOPT_VERBOSE | ||||
| Set the parameter to non-zero to get the library to display a lot of verbose | ||||
| Set the parameter to 1 to get the library to display a lot of verbose | ||||
| information about its operations. Very useful for libcurl and/or protocol | ||||
| debugging and understanding. The verbose information will be sent to stderr, | ||||
| or the stream set with \fICURLOPT_STDERR\fP. | ||||
| @@ -65,24 +65,26 @@ You hardly ever want this set in production use, you will almost always want | ||||
| this when you debug/report problems. Another neat option for debugging is the | ||||
| \fICURLOPT_DEBUGFUNCTION\fP. | ||||
| .IP CURLOPT_HEADER | ||||
| A non-zero parameter tells the library to include the header in the body | ||||
| A parameter set to 1 tells the library to include the header in the body | ||||
| output. This is only relevant for protocols that actually have headers | ||||
| preceding the data (like HTTP). | ||||
| .IP CURLOPT_NOPROGRESS | ||||
| A non-zero parameter tells the library to shut off the built-in progress meter | ||||
| A parameter set to 1 tells the library to shut off the built-in progress meter | ||||
| completely. | ||||
|  | ||||
| Future versions of libcurl is likely to not have any built-in progress meter | ||||
| at all. | ||||
| .IP CURLOPT_NOSIGNAL | ||||
| Pass a long. If it is non-zero, libcurl will not use any functions that | ||||
| Pass a long. If it is 1, libcurl will not use any functions that | ||||
| install signal handlers or any functions that cause signals to be sent to the | ||||
| process. This option is mainly here to allow multi-threaded unix applications | ||||
| to still set/use all timeout options etc, without risking getting signals. | ||||
| (Added in 7.10) | ||||
|  | ||||
| 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 ares support to enable asynchronous DNS | ||||
| lookups. It enables nice timeouts for name resolves without signals. | ||||
| lookups, which enables nice timeouts for name resolves without signals. | ||||
| .PP | ||||
| .SH CALLBACK OPTIONS | ||||
| .IP CURLOPT_WRITEFUNCTION | ||||
| @@ -188,7 +190,7 @@ rewind a stream when doing a HTTP PUT or POST with a multi-pass authentication | ||||
| method. The function shall work like "fseek" or "lseek" and accepted SEEK_SET, | ||||
| SEEK_CUR and SEEK_END as argument for origin, although (in 7.18.0) libcurl | ||||
| only passes SEEK_SET. The callback must return 0 on success as returning | ||||
| non-zero will cause the upload operation to fail. | ||||
| something else will cause the upload operation to fail. | ||||
|  | ||||
| If you forward the input arguments directly to "fseek" or "lseek", note that | ||||
| the data type for \fIoffset\fP is not the same as defined for curl_off_t on | ||||
| @@ -251,7 +253,7 @@ If you transfer data with the multi interface, this function will not be | ||||
| called during periods of idleness unless you call the appropriate libcurl | ||||
| function that performs transfers. | ||||
|  | ||||
| \fICURLOPT_NOPROGRESS\fP must be set to FALSE to make this function actually | ||||
| \fICURLOPT_NOPROGRESS\fP must be set to 0 to make this function actually | ||||
| get called. | ||||
| .IP CURLOPT_PROGRESSDATA | ||||
| Pass a pointer that will be untouched by libcurl and passed as the first | ||||
| @@ -410,7 +412,7 @@ touched. Do not rely on the contents in those cases. | ||||
| Pass a FILE * as parameter. Tell libcurl to use this stream instead of stderr | ||||
| when showing the progress meter and displaying \fICURLOPT_VERBOSE\fP data. | ||||
| .IP CURLOPT_FAILONERROR | ||||
| A non-zero parameter tells the library to fail silently if the HTTP code | ||||
| A parameter set to 1 tells the library to fail silently if the HTTP code | ||||
| returned is equal to or larger than 400. The default action would be to return | ||||
| the page normally, ignoring that code. | ||||
|  | ||||
| @@ -473,16 +475,10 @@ this are \fICURLPROXY_HTTP\fP, \fICURLPROXY_SOCKS4\fP (added in 7.15.2), | ||||
| \fICURLPROXY_SOCKS5_HOSTNAME\fP (added in 7.18.0). The HTTP type is | ||||
| default. (Added in 7.10) | ||||
| .IP CURLOPT_HTTPPROXYTUNNEL | ||||
| Set the parameter to non-zero to get the library to tunnel all operations | ||||
| through a given HTTP proxy. There is a big difference between using a proxy | ||||
| and to tunnel through it. If you don't know what this means, you probably | ||||
| don't want this tunneling option. | ||||
| .IP CURLOPT_SOCKS5_RESOLVE_LOCAL | ||||
| Set the parameter to 1 to get the library to resolve the host name locally | ||||
| instead of passing it to the proxy to resolve, when using a SOCKS5 proxy. | ||||
|  | ||||
| Note that libcurl before 7.18.0 always resolved the host name locally even | ||||
| when SOCKS5 was used. (Added in 7.18.0) | ||||
| Set the parameter to 1 to make the library tunnel all operations through a | ||||
| given HTTP proxy. There is a big difference between using a proxy and to | ||||
| tunnel through it. If you don't know what this means, you probably don't want | ||||
| this tunneling option. | ||||
| .IP CURLOPT_INTERFACE | ||||
| Pass a char * as parameter. This set the interface name to use as outgoing | ||||
| network interface. The name can be an interface name, an IP address or a host | ||||
| @@ -495,18 +491,24 @@ set. Note that port numbers are only valid 1 - 65535. (Added in 7.15.2) | ||||
| .IP CURLOPT_LOCALPORTRANGE | ||||
| Pass a long. This is the number of attempts libcurl should do to find a | ||||
| working local port number. It starts with the given \fICURLOPT_LOCALPORT\fP | ||||
| and adds one to the number for each retry. Setting this value to 1 or below | ||||
| will make libcurl do only one try for exact port number. Note that port | ||||
| numbers by nature is a scarce resource that will be busy at times so setting | ||||
| this value to something too low might cause unnecessary connection setup | ||||
| and adds one to the number for each retry. Setting this to 1 or below will | ||||
| make libcurl do only one try for the exact port number. Note that port numbers | ||||
| by nature are scarce resources that will be busy at times so setting this | ||||
| value to something too low might cause unnecessary connection setup | ||||
| failures. (Added in 7.15.2) | ||||
| .IP CURLOPT_DNS_CACHE_TIMEOUT | ||||
| Pass a long, this sets the timeout in seconds. Name resolves will be kept in | ||||
| memory for this number of seconds. Set to zero (0) to completely disable | ||||
| memory for this number of seconds. Set to zero to completely disable | ||||
| caching, or set to -1 to make the cached entries remain forever. By default, | ||||
| libcurl caches this info for 60 seconds. | ||||
|  | ||||
| NOTE: the name resolve functions of various libc implementations don't re-read | ||||
| name server information unless explicitly told so (by for example calling | ||||
| \fIres_init(3)\fP. This may cause libcurl to keep using the older server even | ||||
| if DHCP has updated the server info, and this may look like a DNS cache issue | ||||
| to the casual libcurl-app user. | ||||
| .IP CURLOPT_DNS_USE_GLOBAL_CACHE | ||||
| Pass a long. If the value is non-zero, it tells curl to use a global DNS cache | ||||
| Pass a long. If the value is 1, it tells curl to use a global DNS cache | ||||
| that will survive between easy handle creations and deletions. This is not | ||||
| thread-safe and this will use a global variable. | ||||
|  | ||||
| @@ -541,6 +543,9 @@ notably telnet or rlogin) small segments may need to be sent | ||||
| without delay. This is less efficient than sending larger amounts of | ||||
| data at a time, and can contribute to congestion on the network if | ||||
| overdone. | ||||
| .IP CURLOPT_ADDRESS_SCOPE | ||||
| Pass a long specifying the scope_id value to use when connecting to IPv6 | ||||
| link-local or site-local addresses. | ||||
| .SH NAMES and PASSWORDS OPTIONS (Authentication) | ||||
| .IP CURLOPT_NETRC | ||||
| This parameter controls the preference of libcurl between using user names and | ||||
| @@ -554,11 +559,11 @@ parameter. | ||||
| Pass a long, set to one of the values described below. | ||||
| .RS | ||||
| .IP CURL_NETRC_OPTIONAL | ||||
| The use of your \fI~/.netrc\fP file is optional, | ||||
| and information in the URL is to be preferred.  The file will be scanned | ||||
| with the host and user name (to find the password only) or with the host only, | ||||
| to find the first user name and password after that \fImachine\fP, | ||||
| which ever information is not specified in the URL. | ||||
| The use of your \fI~/.netrc\fP file is optional, and information in the URL is | ||||
| to be preferred.  The file will be scanned with the host and user name (to | ||||
| find the password only) or with the host only, to find the first user name and | ||||
| password after that \fImachine\fP, which ever information is not specified in | ||||
| the URL. | ||||
|  | ||||
| Undefined values of the option will have this effect. | ||||
| .IP CURL_NETRC_IGNORED | ||||
| @@ -566,9 +571,8 @@ The library will ignore the file and use only the information in the URL. | ||||
|  | ||||
| This is the default. | ||||
| .IP CURL_NETRC_REQUIRED | ||||
| This value tells the library that use of the file is required, | ||||
| to ignore the information in the URL, | ||||
| and to search the file with the host only. | ||||
| This value tells the library that use of the file is required, to ignore the | ||||
| information in the URL, and to search the file with the host only. | ||||
| .RE | ||||
| Only machine name, user name and password are taken into account | ||||
| (init macros and similar things aren't supported). | ||||
| @@ -579,7 +583,7 @@ standard Unix ftp client does). It should only be readable by user. | ||||
| Pass a char * as parameter, pointing to a zero terminated string containing | ||||
| the full path name to the file you want libcurl to use as .netrc file. If this | ||||
| option is omitted, and \fICURLOPT_NETRC\fP is set, libcurl will attempt to | ||||
| find the a .netrc file in the current user's home directory. (Added in 7.10.9) | ||||
| find a .netrc file in the current user's home directory. (Added in 7.10.9) | ||||
| .IP CURLOPT_USERPWD | ||||
| Pass a char * as parameter, which should be [user name]:[password] to use for | ||||
| the connection. Use \fICURLOPT_HTTPAUTH\fP to decide authentication method. | ||||
| @@ -599,14 +603,54 @@ to prevent accidental information leakage. | ||||
| Pass a char * as parameter, which should be [user name]:[password] to use for | ||||
| the connection to the HTTP proxy.  Use \fICURLOPT_PROXYAUTH\fP to decide | ||||
| authentication method. | ||||
| .IP CURLOPT_USERNAME | ||||
| Pass a char * as parameter, which should be pointing to the zero terminated | ||||
| user name to use for the transfer. | ||||
|  | ||||
| The CURLOPT_USERNAME option should be used in same way as the | ||||
| \fICURLOPT_USERPWD\fP is used.  In comparison to \fICURLOPT_USERPWD\fP the | ||||
| CURLOPT_USERNAME allows the username to contain colon, like in following | ||||
| example: "sip:user@example.com".  Note the CURLOPT_USERNAME option is an | ||||
| alternative way to set the user name.  There is no meaning to use it together | ||||
| with the \fICURLOPT_USERPWD\fP option. | ||||
|  | ||||
| In order to specify the password to be used in conjunction with the user name | ||||
| use the \fICURLOPT_PASSWORD\fP option.  (Added in 7.19.1) | ||||
| .IP CURLOPT_PASSWORD | ||||
| Pass a char * as parameter, which should be pointing to the zero terminated | ||||
| password to use for the transfer. | ||||
|  | ||||
| The CURLOPT_PASSWORD option should be used in conjunction with | ||||
| as the \fICURLOPT_USERNAME\fP option. (Added in 7.19.1) | ||||
| .IP CURLOPT_PROXYUSERNAME | ||||
| Pass a char * as parameter, which should be pointing to the zero terminated | ||||
| user name to use for the transfer while connecting to Proxy. | ||||
|  | ||||
| The CURLOPT_PROXYUSERNAME option should be used in same way as the | ||||
| \fICURLOPT_PROXYUSERPWD\fP is used.  In comparison to \fICURLOPT_PROXYUSERPWD\fP | ||||
| the CURLOPT_PROXYUSERNAME allows the username to contain colon, | ||||
| like in following example: "sip:user@example.com". | ||||
| Note the CURLOPT_PROXYUSERNAME option is an alternative way to set the user name | ||||
| while connecting to Proxy.  There is no meaning to use it together | ||||
| with the \fICURLOPT_PROXYUSERPWD\fP option. | ||||
|  | ||||
| In order to specify the password to be used in conjunction with the user name | ||||
| use the \fICURLOPT_PROXYPASSWORD\fP option.  (Added in 7.19.1) | ||||
| .IP CURLOPT_PROXYPASSWORD | ||||
| Pass a char * as parameter, which should be pointing to the zero terminated | ||||
| password to use for the transfer while connecting to Proxy. | ||||
|  | ||||
| The CURLOPT_PROXYPASSWORD option should be used in conjunction with | ||||
| as the \fICURLOPT_PROXYUSERNAME\fP option. (Added in 7.19.1) | ||||
| .IP CURLOPT_HTTPAUTH | ||||
| Pass a long as parameter, which is set to a bitmask, to tell libcurl what | ||||
| authentication method(s) you want it to use. The available bits are listed | ||||
| below. If more than one bit is set, libcurl will first query the site to see | ||||
| what authentication methods it supports and then pick the best one you allow | ||||
| it to use. For some methods, this will induce an extra network round-trip. Set | ||||
| the actual name and password with the \fICURLOPT_USERPWD\fP option. (Added in | ||||
| 7.10.6) | ||||
| the actual name and password with the \fICURLOPT_USERPWD\fP option or | ||||
| with the \fICURLOPT_USERNAME\fP and the \fICURLOPT_USERPASSWORD\fP options. | ||||
| (Added in 7.10.6) | ||||
| .RS | ||||
| .IP CURLAUTH_BASIC | ||||
| HTTP Basic authentication. This is the default choice, and the only method | ||||
| @@ -653,24 +697,23 @@ bitmask can be constructed by or'ing together the bits listed above for the | ||||
| work. (Added in 7.10.7) | ||||
| .SH HTTP OPTIONS | ||||
| .IP CURLOPT_AUTOREFERER | ||||
| Pass a non-zero parameter to enable this. When enabled, libcurl will | ||||
| Pass a parameter set to 1 to enable this. When enabled, libcurl will | ||||
| automatically set the Referer: field in requests where it follows a Location: | ||||
| redirect. | ||||
| .IP CURLOPT_ENCODING | ||||
| Sets the contents of the Accept-Encoding: header sent in an HTTP | ||||
| request, and enables decoding of a response when a Content-Encoding: | ||||
| header is received.  Three encodings are supported: \fIidentity\fP, | ||||
| which does nothing, \fIdeflate\fP which requests the server to | ||||
| compress its response using the zlib algorithm, and \fIgzip\fP which | ||||
| requests the gzip algorithm.  If a zero-length string is set, then an | ||||
| Accept-Encoding: header containing all supported encodings is sent. | ||||
| Sets the contents of the Accept-Encoding: header sent in an HTTP request, and | ||||
| enables decoding of a response when a Content-Encoding: header is received. | ||||
| Three encodings are supported: \fIidentity\fP, which does nothing, | ||||
| \fIdeflate\fP which requests the server to compress its response using the | ||||
| zlib algorithm, and \fIgzip\fP which requests the gzip algorithm.  If a | ||||
| zero-length string is set, then an Accept-Encoding: header containing all | ||||
| supported encodings is sent. | ||||
|  | ||||
| This is a request, not an order; the server may or may not do it.  This | ||||
| option must be set (to any non-NULL value) or else any unsolicited | ||||
| encoding done by the server is ignored. See the special file | ||||
| lib/README.encoding for details. | ||||
| This is a request, not an order; the server may or may not do it.  This option | ||||
| must be set (to any non-NULL value) or else any unsolicited encoding done by | ||||
| the server is ignored. See the special file lib/README.encoding for details. | ||||
| .IP CURLOPT_FOLLOWLOCATION | ||||
| A non-zero parameter tells the library to follow any Location: header that the | ||||
| A parameter set to 1 tells the library to follow any Location: header that the | ||||
| server sends as part of an HTTP header. | ||||
|  | ||||
| This means that the library will re-send the same request on the new location | ||||
| @@ -678,7 +721,7 @@ and follow new Location: headers all the way until no more such headers are | ||||
| returned. \fICURLOPT_MAXREDIRS\fP can be used to limit the number of redirects | ||||
| libcurl will follow. | ||||
| .IP CURLOPT_UNRESTRICTED_AUTH | ||||
| A non-zero parameter tells the library it can continue to send authentication | ||||
| A parameter set to 1 tells the library it can continue to send authentication | ||||
| (user+password) when following locations, even when hostname changed. This | ||||
| option is meaningful only when setting \fICURLOPT_FOLLOWLOCATION\fP. | ||||
| .IP CURLOPT_MAXREDIRS | ||||
| @@ -688,22 +731,23 @@ redirections have been followed, the next redirect will cause an error | ||||
| \fICURLOPT_FOLLOWLOCATION\fP is used at the same time. Added in 7.15.1: | ||||
| Setting the limit to 0 will make libcurl refuse any redirect. Set it to -1 for | ||||
| an infinite number of redirects (which is the default) | ||||
| .IP CURLOPT_POST301 | ||||
| A non-zero parameter tells the library to respect RFC 2616/10.3.2 and not | ||||
| .IP CURLOPT_POSTREDIR | ||||
| A parameter set to 1 tells the library to respect RFC 2616/10.3.2 and not | ||||
| convert POST requests into GET requests when following a 301 redirection. The | ||||
| non-RFC behaviour is ubiquitous in web browsers, so the library does the | ||||
| conversion by default to maintain consistency. However, a server may requires | ||||
| a POST to remain a POST after such a redirection. This option is meaningful | ||||
| only when setting \fICURLOPT_FOLLOWLOCATION\fP.  (Added in 7.17.1) | ||||
| (This option was known as CURLOPT_POST301 up to 7.19.0) | ||||
| .IP CURLOPT_PUT | ||||
| A non-zero parameter tells the library to use HTTP PUT to transfer data. The | ||||
| A parameter set to 1 tells the library to use HTTP PUT to transfer data. The | ||||
| data should be set with \fICURLOPT_READDATA\fP and \fICURLOPT_INFILESIZE\fP. | ||||
|  | ||||
| This option is deprecated and starting with version 7.12.1 you should instead | ||||
| use \fICURLOPT_UPLOAD\fP. | ||||
| .IP CURLOPT_POST | ||||
| A non-zero parameter tells the library to do a regular HTTP post. This will | ||||
| also make the library use the a "Content-Type: | ||||
| A parameter set to 1 tells the library to do a regular HTTP post. This will | ||||
| also make the library use a "Content-Type: | ||||
| application/x-www-form-urlencoded" header. (This is by far the most commonly | ||||
| used POST method). | ||||
|  | ||||
| @@ -732,7 +776,7 @@ adding a header like "Transfer-Encoding: chunked" with | ||||
| \fICURLOPT_HTTPHEADER\fP. With HTTP 1.0 or without chunked transfer, you must | ||||
| specify the size in the request. | ||||
|  | ||||
| When setting \fICURLOPT_POST\fP to a non-zero value, it will automatically set | ||||
| When setting \fICURLOPT_POST\fP to 1, it will automatically set | ||||
| \fICURLOPT_NOBODY\fP to 0 (since 7.14.1). | ||||
|  | ||||
| If you issue a POST request and then want to make a HEAD or GET using the same | ||||
| @@ -894,12 +938,12 @@ error for this. Using \fICURLOPT_VERBOSE\fP or \fICURLOPT_DEBUGFUNCTION\fP | ||||
| will get a warning to display, but that is the only visible feedback you get | ||||
| about this possibly lethal situation. | ||||
| .IP CURLOPT_COOKIESESSION | ||||
| Pass a long set to non-zero to mark this as a new cookie "session". It will | ||||
| force libcurl to ignore all cookies it is about to load that are "session | ||||
| cookies" from the previous session. By default, libcurl always stores and | ||||
| loads all cookies, independent if they are session cookies are not. Session | ||||
| cookies are cookies without expiry date and they are meant to be alive and | ||||
| existing for this "session" only. | ||||
| Pass a long set to 1 to mark this as a new cookie "session". It will force | ||||
| libcurl to ignore all cookies it is about to load that are "session cookies" | ||||
| from the previous session. By default, libcurl always stores and loads all | ||||
| cookies, independent if they are session cookies are not. Session cookies are | ||||
| cookies without expiry date and they are meant to be alive and existing for | ||||
| this "session" only. | ||||
| .IP CURLOPT_COOKIELIST | ||||
| Pass a char * to a cookie string. Cookie can be either in Netscape / Mozilla | ||||
| format or just regular HTTP-style header (Set-Cookie: ...) format. If cURL | ||||
| @@ -910,12 +954,12 @@ by cURL. (Added in 7.15.4) Passing the special string \&"FLUSH" will write | ||||
| all cookies known by cURL to the file specified by \fICURLOPT_COOKIEJAR\fP. | ||||
| (Added in 7.17.1) | ||||
| .IP CURLOPT_HTTPGET | ||||
| Pass a long. If the long is non-zero, this forces the HTTP request to get back | ||||
| Pass a long. If the long is 1, this forces the HTTP request to get back | ||||
| to GET. usable if a POST, HEAD, PUT or a custom request have been used | ||||
| previously using the same curl handle. | ||||
|  | ||||
| When setting \fICURLOPT_HTTPGET\fP to a non-zero value, it will automatically | ||||
| set \fICURLOPT_NOBODY\fP to 0 (since 7.14.1). | ||||
| When setting \fICURLOPT_HTTPGET\fP to 1, it will automatically set | ||||
| \fICURLOPT_NOBODY\fP to 0 (since 7.14.1). | ||||
| .IP CURLOPT_HTTP_VERSION | ||||
| Pass a long, set to one of the values described below. They force libcurl to | ||||
| use the specific HTTP versions. This is not sensible to do unless you have a | ||||
| @@ -965,8 +1009,12 @@ properly filled in with text strings. Use \fIcurl_slist_append(3)\fP | ||||
| to append strings (commands) to the list, and clear the entire list | ||||
| afterwards with \fIcurl_slist_free_all(3)\fP. Disable this operation | ||||
| again by setting a NULL to this option. | ||||
| The set of valid FTP commands depends on the server (see RFC959 for a | ||||
| list of mandatory commands). | ||||
| The valid SFTP commands are: chgrp, chmod, chown, ln, mkdir, pwd, | ||||
| rename, rm, rmdir, symlink. (SFTP support added in 7.16.3) | ||||
| rename, rm, rmdir, symlink (see | ||||
| .BR curl (1)) | ||||
| (SFTP support added in 7.16.3) | ||||
| .IP CURLOPT_POSTQUOTE | ||||
| Pass a pointer to a linked list of FTP or SFTP commands to pass to the | ||||
| server after your ftp transfer request. The linked list should be a | ||||
| @@ -978,10 +1026,10 @@ Pass a pointer to a linked list of FTP commands to pass to the server after | ||||
| the transfer type is set. The linked list should be a fully valid list of | ||||
| struct curl_slist structs properly filled in as described for | ||||
| \fICURLOPT_QUOTE\fP. Disable this operation again by setting a NULL to this | ||||
| option. Before version 7.15.6, if you also set \fICURLOPT_NOBODY\fP non-zero, | ||||
| this option didn't work. | ||||
| option. Before version 7.15.6, if you also set \fICURLOPT_NOBODY\fP to 1, this | ||||
| option didn't work. | ||||
| .IP CURLOPT_DIRLISTONLY | ||||
| A non-zero parameter tells the library to just list the names of files in a | ||||
| 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. | ||||
|  | ||||
| @@ -991,27 +1039,27 @@ might not include subdirectories and symbolic links. | ||||
|  | ||||
| (This option was known as CURLOPT_FTPLISTONLY up to 7.16.4) | ||||
| .IP CURLOPT_APPEND | ||||
| A non-zero parameter tells the library to append to the remote file instead of | ||||
| A parameter set to 1 tells the library to append to the remote file instead of | ||||
| overwrite it. This is only useful when uploading to an ftp site. | ||||
|  | ||||
| (This option was known as CURLOPT_FTPAPPEND up to 7.16.4) | ||||
| .IP CURLOPT_FTP_USE_EPRT | ||||
| Pass a long. If the value is non-zero, it tells curl to use the EPRT (and | ||||
| Pass a long. If the value is 1, it tells curl to use the EPRT (and | ||||
| LPRT) command when doing active FTP downloads (which is enabled by | ||||
| \fICURLOPT_FTPPORT\fP). Using EPRT means that it will first attempt to use | ||||
| EPRT and then LPRT before using PORT, but if you pass FALSE (zero) to this | ||||
| EPRT and then LPRT before using PORT, but if you pass zero to this | ||||
| option, it will not try using EPRT or LPRT, only plain PORT. (Added in 7.10.5) | ||||
|  | ||||
| If the server is an IPv6 host, this option will have no effect as of 7.12.3. | ||||
| .IP CURLOPT_FTP_USE_EPSV | ||||
| Pass a long. If the value is non-zero, it tells curl to use the EPSV command | ||||
| Pass a long. If the value is 1, it tells curl to use the EPSV command | ||||
| when doing passive FTP downloads (which it always does by default). Using EPSV | ||||
| means that it will first attempt to use EPSV before using PASV, but if you | ||||
| pass FALSE (zero) to this option, it will not try using EPSV, only plain PASV. | ||||
| pass zero to this option, it will not try using EPSV, only plain PASV. | ||||
|  | ||||
| If the server is an IPv6 host, this option will have no effect as of 7.12.3. | ||||
| .IP CURLOPT_FTP_CREATE_MISSING_DIRS | ||||
| Pass a long. If the value is non-zero, curl will attempt to create any remote | ||||
| Pass a long. If the value is 1, curl will attempt to create any remote | ||||
| directory that it fails to CWD into. CWD is the command that changes working | ||||
| directory. (Added in 7.10.7) | ||||
|  | ||||
| @@ -1034,11 +1082,11 @@ fails. This is currently only known to be required when connecting to | ||||
| Tumbleweed's Secure Transport FTPS server using client certificates for | ||||
| authentication. (Added in 7.15.5) | ||||
| .IP CURLOPT_FTP_SKIP_PASV_IP | ||||
| Pass a long. If set to a non-zero value, it instructs libcurl to not use the | ||||
| IP address the server suggests in its 227-response to libcurl's PASV command | ||||
| when libcurl connects the data connection. Instead libcurl will re-use the | ||||
| same IP address it already uses for the control connection. But it will use | ||||
| the port number from the 227-response. (Added in 7.14.2) | ||||
| Pass a long. If set to 1, it instructs libcurl to not use the IP address the | ||||
| server suggests in its 227-response to libcurl's PASV command when libcurl | ||||
| connects the data connection. Instead libcurl will re-use the same IP address | ||||
| 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 | ||||
| @@ -1060,7 +1108,7 @@ Require SSL for all communication or fail with \fICURLE_USE_SSL_FAILED\fP. | ||||
| .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 | ||||
| \fICURLOPT_FTP_SSL\fP). (Added in 7.12.2) | ||||
| \fICURLOPT_USE_SSL\fP). (Added in 7.12.2) | ||||
| .RS | ||||
| .IP CURLFTPAUTH_DEFAULT | ||||
| Allow libcurl to decide | ||||
| @@ -1107,7 +1155,7 @@ compliant than 'nocwd' but without the full penalty of 'multicwd'. | ||||
| .RE | ||||
| .SH PROTOCOL OPTIONS | ||||
| .IP CURLOPT_TRANSFERTEXT | ||||
| A non-zero parameter tells the library to use ASCII mode for ftp transfers, | ||||
| A parameter set to 1 tells the library to use ASCII mode for ftp transfers, | ||||
| instead of the default binary transfer. For win32 systems it does not set the | ||||
| stdout to binary mode. This option can be usable when transferring text data | ||||
| between systems with different views on certain characters, such as newlines | ||||
| @@ -1119,10 +1167,10 @@ simply sets the mode to ascii and performs a standard transfer. | ||||
| .IP CURLOPT_PROXY_TRANSFER_MODE | ||||
| Pass a long. If the value is set to 1 (one), it tells libcurl to set the | ||||
| transfer mode (binary or ASCII) for FTP transfers done via an HTTP proxy, by | ||||
| appending ;type=a or ;type=i to the URL. Without this setting, or it being | ||||
| set 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) | ||||
| appending ;type=a or ;type=i to the URL. Without this setting, or it being set | ||||
| 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. | ||||
| .IP CURLOPT_RANGE | ||||
| @@ -1167,13 +1215,13 @@ possibly confuse the remote server badly. Use \fICURLOPT_POST\fP and | ||||
| replace or extend the set of headers sent by libcurl. Use | ||||
| \fICURLOPT_HTTP_VERSION\fP to change HTTP version. | ||||
| .IP CURLOPT_FILETIME | ||||
| Pass a long. If it is a non-zero value, libcurl will attempt to get the | ||||
| modification date of the remote document in this operation. This requires that | ||||
| the remote server sends the time or replies to a time querying command. The | ||||
| Pass a long. If it is 1, libcurl will attempt to get the modification date of | ||||
| the remote document in this operation. This requires that the remote server | ||||
| sends the time or replies to a time querying command. The | ||||
| \fIcurl_easy_getinfo(3)\fP function with the \fICURLINFO_FILETIME\fP argument | ||||
| can be used after a transfer to extract the received time (if any). | ||||
| .IP CURLOPT_NOBODY | ||||
| A non-zero parameter tells the library to not include the body-part in the | ||||
| A parameter set to 1 tells the library to not include the body-part in the | ||||
| output. This is only relevant for protocols that have separate header and body | ||||
| parts. On HTTP(S) servers, this will make libcurl do a HEAD request. | ||||
|  | ||||
| @@ -1199,7 +1247,7 @@ For uploading using SCP, this option or \fICURLOPT_INFILESIZE\fP is mandatory. | ||||
| Note that this option does not limit how much data libcurl will actually send, | ||||
| as that is controlled entirely by what the read callback returns. | ||||
| .IP CURLOPT_UPLOAD | ||||
| A non-zero parameter tells the library to prepare for an upload. The | ||||
| A parameter set to 1 tells the library to prepare for an upload. The | ||||
| \fICURLOPT_READDATA\fP and \fICURLOPT_INFILESIZE\fP or | ||||
| \fICURLOPT_INFILESIZE_LARGE\fP options are also interesting for uploads. If | ||||
| the protocol is HTTP, uploading means using the PUT request unless you tell | ||||
| @@ -1254,8 +1302,10 @@ In unix-like systems, this might cause signals to be used unless | ||||
| \fICURLOPT_NOSIGNAL\fP is set. | ||||
| .IP CURLOPT_TIMEOUT_MS | ||||
| Like \fICURLOPT_TIMEOUT\fP but takes number of milliseconds instead. If | ||||
| libcurl is built to use the standard system name resolver, that part will | ||||
| still use full-second resolution for timeouts. (Added in 7.16.2) | ||||
| libcurl is built to use the standard system name resolver, that portion | ||||
| of the transfer will still use full-second resolution for timeouts with | ||||
| a minimum timeout allowed of one second. | ||||
| (Added in 7.16.2) | ||||
| .IP CURLOPT_LOW_SPEED_LIMIT | ||||
| Pass a long as parameter. It contains the transfer speed in bytes per second | ||||
| that the transfer should be below during \fICURLOPT_LOW_SPEED_TIME\fP seconds | ||||
| @@ -1265,15 +1315,15 @@ Pass a long as parameter. It contains the time in seconds that the transfer | ||||
| should be below the \fICURLOPT_LOW_SPEED_LIMIT\fP for the library to consider | ||||
| it too slow and abort. | ||||
| .IP CURLOPT_MAX_SEND_SPEED_LARGE | ||||
| Pass a curl_off_t as parameter.  If an upload exceeds this speed on cumulative | ||||
| average during the transfer, the transfer will pause to keep the average rate | ||||
| less than or equal to the parameter value.  Defaults to unlimited | ||||
| speed. (Added in 7.15.5) | ||||
| Pass a curl_off_t as parameter.  If an upload exceeds this speed (counted in | ||||
| bytes per second) on cumulative average during the transfer, the transfer will | ||||
| pause to keep the average rate less than or equal to the parameter value. | ||||
| Defaults to unlimited speed. (Added in 7.15.5) | ||||
| .IP CURLOPT_MAX_RECV_SPEED_LARGE | ||||
| Pass a curl_off_t as parameter.  If a download exceeds this speed on | ||||
| cumulative average during the transfer, the transfer will pause to keep the | ||||
| average rate less than or equal to the parameter value. Defaults to unlimited | ||||
| speed. (Added in 7.15.5) | ||||
| Pass a curl_off_t as parameter.  If a download exceeds this speed (counted in | ||||
| bytes per second) on cumulative average during the transfer, the transfer will | ||||
| pause to keep the average rate less than or equal to the parameter | ||||
| value. Defaults to unlimited speed. (Added in 7.15.5) | ||||
| .IP CURLOPT_MAXCONNECTS | ||||
| Pass a long. The set number will be the persistent connection cache size. The | ||||
| set amount will be the maximum amount of simultaneously open connections that | ||||
| @@ -1295,14 +1345,14 @@ the \fICURLMOPT_MAXCONNECTS\fP option. | ||||
| .IP CURLOPT_CLOSEPOLICY | ||||
| (Obsolete) This option does nothing. | ||||
| .IP CURLOPT_FRESH_CONNECT | ||||
| Pass a long. Set to non-zero to make the next transfer use a new (fresh) | ||||
| connection by force. If the connection cache is full before this connection, | ||||
| one of the existing connections will be closed as according to the selected or | ||||
| default policy. This option should be used with caution and only if you | ||||
| understand what it does. Set this to 0 to have libcurl attempt re-using an | ||||
| existing connection (default behavior). | ||||
| Pass a long. Set to 1 to make the next transfer use a new (fresh) connection | ||||
| by force. If the connection cache is full before this connection, one of the | ||||
| existing connections will be closed as according to the selected or default | ||||
| policy. This option should be used with caution and only if you understand | ||||
| what it does. Set this to 0 to have libcurl attempt re-using an existing | ||||
| connection (default behavior). | ||||
| .IP CURLOPT_FORBID_REUSE | ||||
| Pass a long. Set to non-zero to make the next transfer explicitly close the | ||||
| Pass a long. Set to 1 to make the next transfer explicitly close the | ||||
| connection when done. Normally, libcurl keep all connections alive when done | ||||
| with one transfer in case there comes a succeeding one that can re-use them. | ||||
| This option should be used with caution and only if you understand what it | ||||
| @@ -1318,9 +1368,11 @@ timeouts). See also the \fICURLOPT_TIMEOUT\fP option. | ||||
| In unix-like systems, this might cause signals to be used unless | ||||
| \fICURLOPT_NOSIGNAL\fP is set. | ||||
| .IP CURLOPT_CONNECTTIMEOUT_MS | ||||
| Like \fICURLOPT_CONNECTTIMEOUT\fP but takes number of milliseconds instead. If | ||||
| libcurl is built to use the standard system name resolver, that part will | ||||
| still use full-second resolution for timeouts. (Added in 7.16.2) | ||||
| Like \fICURLOPT_CONNECTTIMEOUT\fP but takes the number of milliseconds | ||||
| instead. If libcurl is built to use the standard system name resolver, | ||||
| that portion of the connect will still use full-second resolution for | ||||
| timeouts with a minimum timeout allowed of one second. | ||||
| (Added in 7.16.2) | ||||
| .IP CURLOPT_IPRESOLVE | ||||
| Allows an application to select what kind of IP addresses to use when | ||||
| resolving host names. This is only interesting when using host names that | ||||
| @@ -1334,8 +1386,8 @@ Resolve to ipv4 addresses. | ||||
| Resolve to ipv6 addresses. | ||||
| .RE | ||||
| .IP CURLOPT_CONNECT_ONLY | ||||
| Pass a long. A non-zero parameter tells the library to perform any required | ||||
| proxy authentication and connection setup, but no data transfer. | ||||
| Pass a long. If the parameter equals 1, it tells the library to perform all | ||||
| the required proxy authentication and connection setup, but no data transfer. | ||||
|  | ||||
| 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 | ||||
| @@ -1410,26 +1462,25 @@ Force SSLv3 | ||||
| .IP CURLOPT_SSL_VERIFYPEER | ||||
| Pass a long as parameter. | ||||
|  | ||||
| This option determines whether curl verifies the authenticity of the | ||||
| peer's certificate.  A nonzero value means curl verifies; zero means it | ||||
| doesn't.  The default is nonzero, but before 7.10, it was zero. | ||||
| 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. | ||||
|  | ||||
| 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 | ||||
| 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. | ||||
|  | ||||
| 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. | ||||
| 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. | ||||
|  | ||||
| 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 | ||||
| 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. | ||||
| .IP CURLOPT_CAINFO | ||||
| Pass a char * to a zero terminated string naming a file holding one or more | ||||
| @@ -1443,6 +1494,22 @@ bundle is assumed to be stored, as established at build time. | ||||
|  | ||||
| When built against NSS this is the directory that the NSS certificate | ||||
| database resides in. | ||||
| .IP CURLOPT_ISSUERCERT | ||||
| Pass a char * to a zero terminated string naming a file holding a CA | ||||
| certificate in PEM format. If the option is set, an additional check against | ||||
| the peer certificate is performed to verify the issuer is indeed the one | ||||
| associated with the certificate provided by the option. This additional check | ||||
| is useful in multi-level PKI where one need to enforce the peer certificate is | ||||
| from a specific branch of the tree. | ||||
|  | ||||
| This option makes sense only when used in combination with the | ||||
| \fICURLOPT_SSL_VERIFYPEER\fP option. Otherwise, the result of the check is not | ||||
| considered as failure. | ||||
|  | ||||
| A specific error code (CURLE_SSL_ISSUER_ERROR) is defined with the option, | ||||
| which is returned if the setup of the SSL/TLS session has failed due to a | ||||
| 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 | ||||
| @@ -1452,6 +1519,31 @@ in combination with the \fICURLOPT_SSL_VERIFYPEER\fP option.  If | ||||
| 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. | ||||
| .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 | ||||
| the SSL exchange. | ||||
|  | ||||
| When curl is built to use NSS or GnuTLS, there is no way to influence the use | ||||
| of CRL passed to help in the verification process. When libcurl is built with | ||||
| OpenSSL support, X509_V_FLAG_CRL_CHECK and X509_V_FLAG_CRL_CHECK_ALL are both | ||||
| set, requiring CRL check against all the elements of the certificate chain if | ||||
| a CRL file is passed. | ||||
|  | ||||
| This option makes sense only when used in combination with the | ||||
| \fICURLOPT_SSL_VERIFYPEER\fP option. | ||||
|  | ||||
| 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. | ||||
| Note that 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 certificate's 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, | ||||
| @@ -1531,7 +1623,7 @@ CURLSSH_AUTH_KEYBOARD. Set CURLSSH_AUTH_ANY to let libcurl pick one. | ||||
| (Added in 7.16.1) | ||||
| .IP CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 | ||||
| Pass a char * pointing to a string containing 32 hexadecimal digits. The | ||||
| string should be the 128 bit MD5 cheksum of the remote host's public key, and | ||||
| string should be the 128 bit MD5 checksum of the remote host's public key, and | ||||
| libcurl will reject the connection to the host unless the md5sums match. This | ||||
| option is only for SCP and SFTP transfers. (Added in 7.17.1) | ||||
| .IP CURLOPT_SSH_PUBLIC_KEYFILE | ||||
| @@ -1590,4 +1682,4 @@ If you try to set an option that libcurl doesn't know about, perhaps because | ||||
| the library is too old to support it or the option was removed in a recent | ||||
| version, this function will return \fICURLE_FAILED_INIT\fP. | ||||
| .SH "SEE ALSO" | ||||
| .BR curl_easy_init "(3), " curl_easy_cleanup "(3), " curl_easy_reset "(3), " | ||||
| .BR curl_easy_init "(3), " curl_easy_cleanup "(3), " curl_easy_reset "(3)" | ||||
|   | ||||
| @@ -128,9 +128,9 @@ you've called \fIcurl_easy_cleanup(3)\fP for the curl handle. | ||||
|  | ||||
| See example below. | ||||
| .SH RETURN VALUE | ||||
| 0 means everything was ok, non-zero means an error occurred as | ||||
| 0 means everything was ok, non-zero means an error occurred corresponding | ||||
| to a CURL_FORMADD_* constant defined in | ||||
| .I <curl/curl.h> | ||||
| defines. | ||||
| .SH EXAMPLE | ||||
| .nf | ||||
|  | ||||
|   | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user