Compare commits
	
		
			1122 Commits
		
	
	
		
			curl-7_18_
			...
			curl-7_19_
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 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 | ||
|   | 323273382c | ||
|   | 6f0a2608b4 | ||
|   | ea86edbd82 | ||
|   | e7b5a8e6cb | ||
|   | 27eaf0cf02 | ||
|   | c84904d8c8 | ||
|   | 01e1c85304 | ||
|   | 4774582dfb | ||
|   | 1ed09ff7a4 | ||
|   | d89cf27d65 | ||
|   | 35d5ba2626 | ||
|   | e5f0c38fa9 | ||
|   | 47925f3dd7 | ||
|   | 82c5950c7e | ||
|   | 1806879bb2 | ||
|   | 998b046d70 | ||
|   | ec4f6e93c2 | ||
|   | b49dcfb52b | ||
|   | c62d55342d | ||
|   | f7815fa93c | ||
|   | 6e305e11e3 | ||
|   | b97606f0b0 | ||
|   | f26154bfa9 | ||
|   | d220ac8582 | ||
|   | c57e748107 | ||
|   | d6f8f16068 | ||
|   | 466429efb0 | ||
|   | 89977c73d1 | ||
|   | a9a05a32bd | ||
|   | 2045c79e37 | ||
|   | e60b5245d3 | ||
|   | 90bbabce56 | ||
|   | ddfbe8b649 | ||
|   | d001f6a396 | ||
|   | d31da176eb | ||
|   | e664cd5826 | ||
|   | b8abeab6d3 | ||
|   | 4aa176c127 | ||
|   | 498e939f0e | ||
|   | 9a22b893b6 | ||
|   | 76d0d40946 | ||
|   | 791ad1210e | ||
|   | 100945694a | ||
|   | abe2e6ecf7 | ||
|   | d8efc99217 | ||
|   | 0163b5b8be | ||
|   | baee3996ab | ||
|   | 8ad1928d93 | ||
|   | 24bf52bc69 | ||
|   | 862049c490 | ||
|   | a8fc98aa30 | ||
|   | d70f33748c | ||
|   | b006c31b7b | ||
|   | ae45a462e0 | ||
|   | 3cb0dd6685 | ||
|   | c2a84aa6f0 | ||
|   | 9346e55d5a | ||
|   | 8fc2f8ef62 | ||
|   | 512b9ac194 | ||
|   | 560a82aeaf | ||
|   | 7358db5c27 | ||
|   | e059efda1b | ||
|   | 164a985115 | ||
|   | ade57a781c | ||
|   | 9f12ed83f2 | ||
|   | 8aabd9839b | ||
|   | 882fbb0433 | ||
|   | 15eee5dbbb | ||
|   | cfc1d037ff | ||
|   | c24ed07596 | ||
|   | 08aab6a620 | ||
|   | 2748c64d60 | ||
|   | c4f1ab3cc5 | ||
|   | 5e06ec8409 | ||
|   | 04d0a84ae5 | ||
|   | c1dfe2c529 | ||
|   | 7f88e8badb | ||
|   | 2f66ff2e4f | ||
|   | 76c251513e | ||
|   | 80afddacc8 | ||
|   | 7543c9df50 | ||
|   | 83fb13329d | ||
|   | e06c923605 | ||
|   | ab1169895f | ||
|   | 01e81c7e10 | ||
|   | 7bf1142ae0 | ||
|   | af9f7a952b | ||
|   | 514592b892 | ||
|   | d72efff878 | ||
|   | e4c60e2030 | ||
|   | ed80eb5b0f | ||
|   | 60dd765b3d | ||
|   | b380dd030f | ||
|   | 19479ea021 | ||
|   | d708ef6731 | ||
|   | d1238baecb | ||
|   | 0510759bc4 | ||
|   | 6d5cca5ed0 | ||
|   | e2b82b4325 | ||
|   | cf4570a06f | ||
|   | 6df5dddd90 | ||
|   | d4e9b141db | ||
|   | ec0665a931 | ||
|   | 836fa69e2e | ||
|   | 9026dc2da4 | ||
|   | 98c9af4c59 | ||
|   | e481d679b2 | ||
|   | eb68aa38e3 | ||
|   | 082237e2b5 | ||
|   | dd08a7a4f6 | ||
|   | a60c9ef88e | ||
|   | 4e3d235e04 | ||
|   | 19da3606f9 | ||
|   | fc9e0d2249 | ||
|   | 21a0f09081 | ||
|   | b84b71f524 | ||
|   | 3d29bda9f8 | ||
|   | 459c664043 | ||
|   | 45edad84cb | ||
|   | fd31f7e7e5 | ||
|   | 7b2531da24 | ||
|   | 848a13654d | ||
|   | 1cca8f5a30 | ||
|   | 12ffcf0b45 | ||
|   | 852989856d | ||
|   | 7dfdbf8fbe | ||
|   | 1eebb90030 | ||
|   | ab71654078 | ||
|   | 7a6cff4b3a | ||
|   | c3ba2198b1 | ||
|   | ff748f1a41 | ||
|   | b8193b6321 | ||
|   | 113d0937de | ||
|   | d0a506661f | ||
|   | 4e71173928 | ||
|   | e0f0a2ccee | ||
|   | 96edebf4d9 | ||
|   | 3783b455c0 | ||
|   | 7ee5238f5e | ||
|   | b398169567 | ||
|   | 1960eebc2d | ||
|   | ad1dd08693 | ||
|   | 95fd093c4a | ||
|   | ed1ad28e29 | ||
|   | 7076505c24 | ||
|   | 5825cf9457 | ||
|   | ff40415aee | ||
|   | f48eb36f75 | ||
|   | 768e3e796e | ||
|   | 3869d4a3a7 | ||
|   | a87c468c5c | ||
|   | 7abf50a5c0 | ||
|   | d3f46eb61b | ||
|   | 72c58b0d1d | ||
|   | 6c89e1b311 | ||
|   | 09777a4fc2 | ||
|   | 0331071346 | ||
|   | 614ae7b2bc | ||
|   | af41ada7aa | ||
|   | 6a33a4456e | ||
|   | e0c2a39ad4 | ||
|   | cda1f2be58 | ||
|   | 79e06c4147 | ||
|   | ead2618c31 | ||
|   | 84eb9fee76 | ||
|   | 79300cdcd9 | ||
|   | a9591ad1b7 | ||
|   | 098106b54c | ||
|   | 74bb59fa57 | ||
|   | c97d112b30 | ||
|   | 2dc20b84c1 | ||
|   | 39b689f966 | ||
|   | 6fd3ff4032 | ||
|   | ab8d1464a7 | ||
|   | bf90d11a31 | ||
|   | a08b6ae813 | ||
|   | 74c500b6ec | ||
|   | 26aeadbc3e | ||
|   | d0a4b50e19 | ||
|   | ebaf06a741 | ||
|   | 34d837c2dd | ||
|   | 7607d5145b | ||
|   | 12a90289ed | ||
|   | 592697583d | ||
|   | b50a96982e | ||
|   | aa2a54c10a | ||
|   | 532d4b5106 | ||
|   | 5788719988 | ||
|   | ac0b911eda | ||
|   | 10232bfe9e | ||
|   | a9c1ca9fc5 | ||
|   | d051dd8087 | ||
|   | bf52cef16f | ||
|   | 16a9c5e02b | ||
|   | fef1a90938 | ||
|   | 27870d48ff | ||
|   | 2f66f3ce08 | ||
|   | 369df58a0d | ||
|   | 3d08b352a2 | ||
|   | d13be06aaa | ||
|   | f1c69192da | ||
|   | a2314225e0 | ||
|   | 1e482fe6a8 | ||
|   | 80e7f9b9de | ||
|   | d219269f1b | ||
|   | 0ff0512aff | 
| @@ -4,6 +4,7 @@ Makefile | |||||||
| libtool | libtool | ||||||
| Makefile.in | Makefile.in | ||||||
| aclocal.m4 | aclocal.m4 | ||||||
|  | aclocal.m4.bak | ||||||
| configure | configure | ||||||
| config.h | config.h | ||||||
| config.status | config.status | ||||||
|   | |||||||
							
								
								
									
										17
									
								
								Makefile.am
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								Makefile.am
									
									
									
									
									
								
							| @@ -23,8 +23,11 @@ | |||||||
|  |  | ||||||
| AUTOMAKE_OPTIONS = foreign | AUTOMAKE_OPTIONS = foreign | ||||||
|  |  | ||||||
|  | ACLOCAL_AMFLAGS = -I m4 | ||||||
|  |  | ||||||
| EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist curl-config.in \ | 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 | bin_SCRIPTS = curl-config | ||||||
|  |  | ||||||
| @@ -72,7 +75,11 @@ test-torture: | |||||||
| endif | endif | ||||||
|  |  | ||||||
| examples: | examples: | ||||||
| 	@(cd docs/examples; $(MAKE) all) | 	@(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 | # Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros | ||||||
| @@ -102,7 +109,7 @@ rpm: | |||||||
| 	mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.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 | # run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format | ||||||
| # file (which ends up back in this directory). | # file (which ends up back in this directory). | ||||||
| # The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do | # 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 | ca-bundle: lib/mk-ca-bundle.pl | ||||||
| 	@echo "generate a fresh ca-bundle.crt" | 	@echo "generate a fresh ca-bundle.crt" | ||||||
| 	@perl $< -b -l -u lib/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" | 	@echo "generate a fresh ca-bundle.crt" | ||||||
| 	@perl $< -b -l -u lib/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 | 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/ |         http://curl.haxx.se/ | ||||||
|         Mirrors      http://curlm.haxx.se/ |  | ||||||
|  |  | ||||||
| CVS | CVS | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										106
									
								
								RELEASE-NOTES
									
									
									
									
									
								
							
							
						
						
									
										106
									
								
								RELEASE-NOTES
									
									
									
									
									
								
							| @@ -1,59 +1,49 @@ | |||||||
| Curl and libcurl 7.18.1 | Curl and libcurl 7.19.1 | ||||||
|  |  | ||||||
|  Public curl releases:         104 |  Public curl releases:         107 | ||||||
|  Command line options:         126 |  Command line options:         128 | ||||||
|  curl_easy_setopt() options:   150 |  curl_easy_setopt() options:   158 | ||||||
|  Public functions in libcurl:  56 |  Public functions in libcurl:  58 | ||||||
|  Public web site mirrors:      39 |  Known libcurl bindings:       37 | ||||||
|  Known libcurl bindings:       36 |  Contributors:                 672 | ||||||
|  Contributors:                 621 |  | ||||||
|  |  | ||||||
| This release includes the following changes: | This release includes the following changes: | ||||||
|   |  | ||||||
|  o added support for HttpOnly cookies |  o pkg-config can now show supported_protocols and supported_features | ||||||
|  o 'make ca-bundle' downloads and generates an updated ca bundle file |  o Added CURLOPT_CERTINFO and CURLINFO_CERTINFO | ||||||
|  o we no longer distribute or install a ca cert bundle |  o Added CURLOPT_POSTREDIR | ||||||
|  o SSLv2 is now disabled by default for SSL operations |  o Better detect HTTP 1.0 servers and don't do HTTP 1.1 requests on them | ||||||
|  o the test509-style setting URL in callback is officially no longer supported |  o configure --disable-proxy disables proxy support | ||||||
|  o support a full chain of certificates in a given PKCS12 certificate |  o Added CURLOPT_USERNAME and CURLOPT_PASSWORD | ||||||
|  o resumed transfers work with SFTP |  o --interface now works with IPv6 connections on glibc systems | ||||||
|  o added type checking macros for curl_easy_setopt() and curl_easy_getinfo(), |  o Added CURLOPT_PROXYUSERNAME and CURLOPT_PROXYPASSWORD | ||||||
|    watch out for new warnings in code using libcurl (needs gcc-4.3 and |  | ||||||
|    currently only works in C mode) |  | ||||||
|  o curl_easy_setopt(), curl_easy_getinfo(), curl_share_setopt() and |  | ||||||
|    curl_multi_setopt() uses are now checked to use exactly three arguments |  | ||||||
|  o --with-ca-path=DIR configure option allows to set an openSSL CApath instead |  | ||||||
|    of a default ca bundle. |  | ||||||
|  |  | ||||||
| This release includes the following bugfixes: | This release includes the following bugfixes: | ||||||
|  |  | ||||||
|  o improved pipelining |  o MingW32 non-configure builds are now largefile feature enabled by default | ||||||
|  o improved strdup replacement |  o NetWare LIBC builds are now largefile feature enabled by default | ||||||
|  o GnuTLS-built libcurl failed when doing global cleanup and reinit |  o curl_easy_pause() could behave wrongly on unpause | ||||||
|  o error message problem when unable to resolve a host on Windows |  o cookies with invalid expire dates are now considered expired | ||||||
|  o Accept: header replacing |  o HTTP pipelining over proxy | ||||||
|  o not verifying server certs with GnuTLS still failed if gnutls had |  o fix regression in configure script which affected OpenSSL builds on MSYS | ||||||
|    problems with the cert |  o GnuTLS-based multi interface doing HTTPS over proxy failed | ||||||
|  o when using the multi interface and a handle is removed while still having |  o recv() failures cause CURLE_RECV_ERROR | ||||||
|    a transfer going on, the connection is now closed by force |  o SFTP over SOCKS crash fixed | ||||||
|  o bad re-use of SSL connections in non-complete state |  o thread-safety issues addressed for NSS-powered libcurls | ||||||
|  o test case 405 failures with GnuTLS builds |  o removed the use of mktime() and gmtime(_r)() in date parsing and conversions | ||||||
|  o crash when connection cache size is 1 and Curl_do() failed |  o HTTP Digest with a blank realm did wrong | ||||||
|  o GnuTLS-built libcurl can now be forced to prefer SSLv3 |  o CURLINFO_REDIRECT_URL didn't work with the multi interface | ||||||
|  o crash when doing Negotiate again on a re-used connection |  o CURLOPT_RANGE now works for SFTP downloads | ||||||
|  o select/poll regression |  o FTP SIZE response 550 now causes CURLE_REMOTE_FILE_NOT_FOUND | ||||||
|  o better MIT kerberos configure check |  o CURLINFO_PRIMARY_IP fixed for persistent connection re-use cases | ||||||
|  o curl_easy_reset() + SFTP re-used connection download crash |  o remove_handle/add_handle multi interface timer callback flaw | ||||||
|  o SFTP non-existing file + SFTP existing file error |  o CURLINFO_REDIRECT_URL memory leak and wrong-doing | ||||||
|  o sharing DNS cache between easy handles running in multiple threads could |  o case insensitive string matching works in Turkish too | ||||||
|    lead to crash |  o Solaris builds get _REENTRANT defined properly and work again | ||||||
|  o SFTP upload with CURLOPT_FTP_CREATE_MISSING_DIRS on re-used connection |  o Garbage sent on chunky upload after curl_easy_pause() | ||||||
|  o SFTP infinite loop when given an invalid quote command |  o ipv4 name resolves when libcurl is built with ipv6-enabled c-ares | ||||||
|  o curl-config erroneously reported LDAPS support with missing LDAP libraries |  o undersized IPv6 address internal buffer truncated long IPv6 addresses | ||||||
|  o SCP infinite loop when downloading a zero byte file |  o CURLINFO_FILETIME works for file:// transfers as well | ||||||
|  o setting the CURLOPT_SSL_CTX_FUNCTION with libcurl built without OpenSSL |  | ||||||
|    now makes curl_easy_setopt() properly return failure |  | ||||||
|  o configure --with-libssh2 (with no given path) |  | ||||||
|  |  | ||||||
| This release includes the following known bugs: | This release includes the following known bugs: | ||||||
|  |  | ||||||
| @@ -63,17 +53,15 @@ Other curl-related news: | |||||||
|  |  | ||||||
|  o  |  o  | ||||||
|  |  | ||||||
| New curl mirrors: |  | ||||||
|  |  | ||||||
|  o http://curl.cuendet.com/ is a new mirror in Atlanta, USA |  | ||||||
|  |  | ||||||
| This release would not have looked like this without help, code, reports and | This release would not have looked like this without help, code, reports and | ||||||
| advice from friends like these: | advice from friends like these: | ||||||
|  |  | ||||||
|  Michal Marek, Dmitry Kurochkin, Niklas Angebrand, G<EFBFBD>nter Knauf, Yang Tse, |  Keith Mok, Yang Tse, Daniel Fandrich, Guenter Knauf, Dmitriy Sergeyev, | ||||||
|  Dan Fandrich, Mike Hommey, Pooyan McSporran, Jerome Muffat-Meridol, |  Linus Nielsen Feltzing, Martin Drasar, Stefan Krause, Dmitry Kurochkin, | ||||||
|  Kaspar Brand, Gautam Kachroo, Zmey Petroff, Georg Lippitsch, Sam Listopad, |  Mike Revi, Andres Garcia, Michael Goffioul, Markus Moeller, Rob Crittenden, | ||||||
|  Anatoli Tubman, Mike Protts, Michael Calmer, Brian Ulm, Dmitry Popov, |  Jamie Lokier, Emanuele Bovisio, Maxim Ivanov, Ian Lynagh, Daniel Egger, | ||||||
|  Jes Badwal, Dan Petitt, Stephen Collyer |  Igor Novoseltsev, John Wilkinson, Pascal Terjan, Steve Roskowski, | ||||||
|  |  Daniel Johnson | ||||||
|  |   | ||||||
|  |  | ||||||
|         Thanks! (and sorry if I forgot to mention someone) |         Thanks! (and sorry if I forgot to mention someone) | ||||||
|   | |||||||
							
								
								
									
										19
									
								
								TODO-RELEASE
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								TODO-RELEASE
									
									
									
									
									
								
							| @@ -1,17 +1,18 @@ | |||||||
| To be addressed before 7.18.2 (planned release: June 2008) | To be addressed before 7.19.1 (planned release: November 2008) | ||||||
| ============================= | ============================= | ||||||
|  |  | ||||||
| 128 - Phil Blundell's ares and ipv6 fix (feedback lacking) | To be addressed in 7.19.2 (planned release: January 2009) | ||||||
|  | ========================= | ||||||
|  |  | ||||||
| 129 - Pierre Reiss' libcurl + https + multi = lost information (awaiting | 188 - "Curl keep special character in filename when saving" bug #2192220 | ||||||
|      better example/clarification on how to figure out when the claimed |  | ||||||
|      problem occurs) |  | ||||||
|  |  | ||||||
| 130 - Vincent Le Normand's SFTP patch for touch | 189 - "NTLM authentication and POST wrong behavior" bug #2203193 | ||||||
|  |  | ||||||
| 131 - Scott Barrett's Support for CURLOPT_NOBODY with SFTP | 190 - "Using NTLM proxy will lose form-data. Makes NTLM unusable." bug #2210686 | ||||||
|  |  | ||||||
| 132 - Xponaut's CURLFORM_STREAM option to curl_formadd() | 191 - "proposed patch for curl/libssh2 bugfix" | ||||||
|  |       http://curl.haxx.se/mail/archive-2008-10/0000.html | ||||||
|  |  | ||||||
| 133 -  |  | ||||||
|  | 192 -  | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										2437
									
								
								acinclude.m4
									
									
									
									
									
								
							
							
						
						
									
										2437
									
								
								acinclude.m4
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -21,3 +21,4 @@ depcomp | |||||||
| libcares.la | libcares.la | ||||||
| missing | missing | ||||||
| ares_version.h.dist | ares_version.h.dist | ||||||
|  | libcares.pc | ||||||
|   | |||||||
							
								
								
									
										47
									
								
								ares/AUTHORS
									
									
									
									
									
								
							
							
						
						
									
										47
									
								
								ares/AUTHORS
									
									
									
									
									
								
							| @@ -1,28 +1,37 @@ | |||||||
| c-ares is based on ares, and these are the people that have worked on it since | c-ares is based on ares, and these are the people that have worked on it since | ||||||
| the fork was made: | the fork was made: | ||||||
|  |  | ||||||
| Daniel Stenberg | Alexander Lazic | ||||||
| Dominick Meglio | Alexey Simak | ||||||
| liren at vivisimo.com | Andreas Rieke | ||||||
| James Bursa | Ashish Sharma | ||||||
| Duncan Wilcox | Brad House | ||||||
| Dirk Manske | Brad Spencer | ||||||
|  | Bram Matthys | ||||||
| Dan Fandrich | Dan Fandrich | ||||||
|  | Daniel Stenberg | ||||||
|  | Dirk Manske | ||||||
|  | Dominick Meglio | ||||||
|  | Doug Goldstein | ||||||
|  | Duncan Wilcox | ||||||
|  | Eino Tuominen | ||||||
|  | Erik Kline | ||||||
|  | George Neill | ||||||
| Gisle Vanem | Gisle Vanem | ||||||
|  | Guilherme Balena Versiani | ||||||
| Gunter Knauf | Gunter Knauf | ||||||
| Henrik Stoerner | Henrik Stoerner | ||||||
| Yang Tse | James Bursa | ||||||
| Nick Mathewson |  | ||||||
| Alexander Lazic |  | ||||||
| Andreas Rieke |  | ||||||
| Guilherme Balena Versiani |  | ||||||
| Brad Spencer |  | ||||||
| Ravi Pratap |  | ||||||
| William Ahern |  | ||||||
| Bram Matthys |  | ||||||
| Michael Wallner | Michael Wallner | ||||||
| Vlad Dinulescu | Nick Mathewson | ||||||
| Brad House | Phil Blundell | ||||||
|  | Ravi Pratap | ||||||
|  | Robin Cornelius | ||||||
|  | Sebastian at basti79.de | ||||||
| Shmulik Regev | Shmulik Regev | ||||||
| Ashish Sharma | Steinar H. Gunderson | ||||||
| Brad Spencer | Tofu Linden | ||||||
|  | Vlad Dinulescu | ||||||
|  | William Ahern | ||||||
|  | Yang Tse | ||||||
|  | liren at vivisimo.com | ||||||
|   | |||||||
							
								
								
									
										199
									
								
								ares/CHANGES
									
									
									
									
									
								
							
							
						
						
									
										199
									
								
								ares/CHANGES
									
									
									
									
									
								
							| @@ -1,5 +1,204 @@ | |||||||
|   Changelog for the c-ares project |   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. | ||||||
|  |  | ||||||
|  | Version 1.5.2 (May 29, 2008) | ||||||
|  |  | ||||||
|  | * May 13 2008 (Daniel Stenberg) | ||||||
|  |  | ||||||
|  | - Introducing millisecond resolution support for the timeout option. See | ||||||
|  |   ares_init_options()'s ARES_OPT_TIMEOUTMS. | ||||||
|  |  | ||||||
|  | * May 9 2008 (Yang Tse) | ||||||
|  |  | ||||||
|  | - Use monotonic time source if available, for private function ares__tvnow() | ||||||
|  |  | ||||||
|  | * May 7 2008 (Daniel Stenberg) | ||||||
|  |  | ||||||
|  | - Sebastian made c-ares able to return all PTR-records when doing reverse | ||||||
|  |   lookups. It is not common practice to have multiple PTR-Records for a single | ||||||
|  |   IP, but its perfectly legal and some sites have those. | ||||||
|  |  | ||||||
|  | - Doug Goldstein provided a configure patch: updates autoconf 2.13 usage to | ||||||
|  |   autoconf 2.57 usage (which is the version you have specified as the minimum | ||||||
|  |   version). It's a minor change but it does clean up some warnings with newer | ||||||
|  |   autoconf (specifically 2.62). | ||||||
|  |  | ||||||
|  | * May 5 2008 (Yang Tse) | ||||||
|  |  | ||||||
|  | - Improved parsing of resolver configuration files. | ||||||
|  |  | ||||||
|  | * April 4 2008 (Daniel Stenberg) | ||||||
|  |  | ||||||
|  | - Eino Tuominen improved the code when a file is used to seed the randomizer. | ||||||
|  |  | ||||||
|  | - Alexey Simak made adig support NAPTR records | ||||||
|  |  | ||||||
|  | - Alexey Simak fixed the VC dsp file by adding the missing source file | ||||||
|  |   ares_expand_string.c | ||||||
|  |  | ||||||
| * December 11 2007 (Gisle Vanem) | * December 11 2007 (Gisle Vanem) | ||||||
|  |  | ||||||
| - Added another sample application; acountry.c which converts an | - Added another sample application; acountry.c which converts an | ||||||
|   | |||||||
							
								
								
									
										35
									
								
								ares/FILES
									
									
									
									
									
								
							
							
						
						
									
										35
									
								
								ares/FILES
									
									
									
									
									
								
							| @@ -1,35 +0,0 @@ | |||||||
| *.c |  | ||||||
| *.h |  | ||||||
| *.3 |  | ||||||
| NEWS |  | ||||||
| README |  | ||||||
| README.cares |  | ||||||
| CHANGES |  | ||||||
| FILES |  | ||||||
| maketgz |  | ||||||
| aclocal.m4 |  | ||||||
| acinclude.m4 |  | ||||||
| Makefile.in |  | ||||||
| Makefile.dj |  | ||||||
| Makefile.m32 |  | ||||||
| Makefile.netware |  | ||||||
| Makefile.vc6 |  | ||||||
| install-sh |  | ||||||
| mkinstalldirs |  | ||||||
| configure |  | ||||||
| configure.ac |  | ||||||
| config.guess |  | ||||||
| config.sub |  | ||||||
| vc/adig/adig.dep |  | ||||||
| vc/adig/adig.dsp |  | ||||||
| vc/adig/adig.mak |  | ||||||
| vc/adig/adig.plg |  | ||||||
| vc/vc.dsw |  | ||||||
| vc/ahost/ahost.dep |  | ||||||
| vc/ahost/ahost.dsp |  | ||||||
| vc/ahost/ahost.mak |  | ||||||
| vc/ahost/ahost.plg |  | ||||||
| vc/areslib/areslib.dep |  | ||||||
| vc/areslib/areslib.dsp |  | ||||||
| vc/areslib/areslib.mak |  | ||||||
| vc/areslib/areslib.plg |  | ||||||
| @@ -1,12 +1,37 @@ | |||||||
| AUTOMAKE_OPTIONS = foreign | AUTOMAKE_OPTIONS = foreign nostdinc | ||||||
|  |  | ||||||
|  | ACLOCAL_AMFLAGS = -I m4 | ||||||
|  |  | ||||||
|  | # Specify our include paths here, and do it relative to $(top_srcdir) and | ||||||
|  | # $(top_builddir), to ensure that these paths which belong to the library | ||||||
|  | # being currently built and tested are searched before the library which | ||||||
|  | # might possibly already be installed in the system. | ||||||
|  | # | ||||||
|  | # When using the low-level hard-hacking memory leak tracking code from | ||||||
|  | # libcurl the generated curl/curlbuild.h file must also be reachable. | ||||||
|  | # Using the libcurl lowlevel code from within c-ares library is ugly and | ||||||
|  | # only works when c-ares is built and linked with a similarly debug-build | ||||||
|  | # libcurl, but we do this anyway for convenience. | ||||||
|  | # | ||||||
|  | # $(top_builddir)/../include is for libcurl's generated curl/curlbuild.h file | ||||||
|  | # $(top_builddir) is for c-ares's generated config.h file | ||||||
|  | # $(top_srcdir) is for c-ares's lib/setup.h and other "c-ares-private" files | ||||||
|  |  | ||||||
|  | if CURLDEBUG | ||||||
|  | INCLUDES = -I$(top_builddir)/../include \ | ||||||
|  |            -I$(top_builddir)            \ | ||||||
|  |            -I$(top_srcdir) | ||||||
|  | else | ||||||
|  | INCLUDES = -I$(top_builddir) \ | ||||||
|  |            -I$(top_srcdir) | ||||||
|  | endif | ||||||
|  |  | ||||||
| lib_LTLIBRARIES = libcares.la | lib_LTLIBRARIES = libcares.la | ||||||
|  |  | ||||||
| man_MANS = $(MANPAGES) | man_MANS = $(MANPAGES) | ||||||
|  |  | ||||||
| MSVCFILES = vc/adig/adig.dep vc/adig/adig.dsp vc/vc.dsw vc/ahost/ahost.dep \ | MSVCFILES = vc/vc.dsw vc/acountry/acountry.dsp vc/adig/adig.dsp \ | ||||||
|  vc/ahost/ahost.dsp vc/areslib/areslib.dep vc/areslib/areslib.dsp	   \ |  vc/ahost/ahost.dsp vc/areslib/areslib.dsp vc/areslib/areslib.dsw | ||||||
|  vc/areslib/areslib.dsw |  | ||||||
|  |  | ||||||
| if DEBUGBUILD | if DEBUGBUILD | ||||||
| PROGS = | PROGS = | ||||||
| @@ -18,9 +43,10 @@ noinst_PROGRAMS =$(PROGS) | |||||||
|  |  | ||||||
| # adig and ahost are just sample programs and thus not mentioned with the | # adig and ahost are just sample programs and thus not mentioned with the | ||||||
| # regular sources and headers | # regular sources and headers | ||||||
| EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj \ | EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj	   \ | ||||||
|  Makefile.m32 Makefile.netware Makefile.vc6 adig.c ahost.c $(man_MANS) \ |  Makefile.m32 Makefile.netware Makefile.vc6 $(man_MANS) $(MSVCFILES)	   \ | ||||||
|  $(MSVCFILES) config-win32.h RELEASE-NOTES libcares.pc.in |  config-win32.h RELEASE-NOTES libcares.pc.in buildconf get_ver.awk maketgz \ | ||||||
|  |  TODO | ||||||
|  |  | ||||||
| pkgconfigdir = $(libdir)/pkgconfig | pkgconfigdir = $(libdir)/pkgconfig | ||||||
| pkgconfig_DATA = libcares.pc | pkgconfig_DATA = libcares.pc | ||||||
| @@ -72,13 +98,13 @@ libcares_ladir = $(includedir) | |||||||
| # what headers to install on 'make install': | # what headers to install on 'make install': | ||||||
| libcares_la_HEADERS = ares.h ares_version.h ares_dns.h | libcares_la_HEADERS = ares.h ares_version.h ares_dns.h | ||||||
|  |  | ||||||
| ahost_SOURCES = ahost.c ares_getopt.c | ahost_SOURCES = ahost.c ares_getopt.c ares_getopt.h | ||||||
| ahost_LDADD = $(top_builddir)/$(lib_LTLIBRARIES) | ahost_LDADD = $(top_builddir)/$(lib_LTLIBRARIES) | ||||||
|  |  | ||||||
| adig_SOURCES = adig.c ares_getopt.c | adig_SOURCES = adig.c ares_getopt.c ares_getopt.h | ||||||
| adig_LDADD = $(top_builddir)/$(lib_LTLIBRARIES) | adig_LDADD = $(top_builddir)/$(lib_LTLIBRARIES) | ||||||
|  |  | ||||||
| acountry_SOURCES = acountry.c ares_getopt.c | acountry_SOURCES = acountry.c ares_getopt.c ares_getopt.h | ||||||
| acountry_LDADD = $(top_builddir)/$(lib_LTLIBRARIES) | acountry_LDADD = $(top_builddir)/$(lib_LTLIBRARIES) | ||||||
|  |  | ||||||
| # Make files named *.dist replace the file without .dist extension | # Make files named *.dist replace the file without .dist extension | ||||||
|   | |||||||
| @@ -10,19 +10,26 @@ include ../packages/DOS/common.dj | |||||||
|  |  | ||||||
| include Makefile.inc | include Makefile.inc | ||||||
|  |  | ||||||
| CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_FIONBIO \ | CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_IOCTLSOCKET \ | ||||||
|           -DHAVE_STRUCT_IN6_ADDR -DHAVE_SOCKADDR_IN6_SIN6_SCOPE_ID \ |           -DHAVE_STRUCT_IN6_ADDR -DHAVE_SOCKADDR_IN6_SIN6_SCOPE_ID \ | ||||||
|           -DHAVE_SYS_TIME_H -DHAVE_STRUCT_SOCKADDR_IN6 -DHAVE_STRUCT_ADDRINFO \ |           -DHAVE_SYS_TIME_H -DHAVE_STRUCT_SOCKADDR_IN6 -DHAVE_STRUCT_ADDRINFO \ | ||||||
|           -DHAVE_SIGNAL_H -DHAVE_SIG_ATOMIC_T -DRETSIGTYPE='void' -DHAVE_PROCESS_H \ |           -DHAVE_SIGNAL_H -DHAVE_SIG_ATOMIC_T -DRETSIGTYPE='void' \ | ||||||
|           -DHAVE_ARPA_NAMESER_H -DHAVE_SYS_SOCKET_H -DHAVE_SYS_UIO_H -DHAVE_NETINET_IN_H \ |           -DHAVE_PROCESS_H -DHAVE_ARPA_NAMESER_H -DHAVE_SYS_SOCKET_H \ | ||||||
|           -DHAVE_NETINET_TCP_H -DNS_INADDRSZ=4 -DHAVE_RECV -DHAVE_SEND \ |           -DHAVE_SYS_UIO_H -DHAVE_NETINET_IN_H -DHAVE_NETINET_TCP_H \ | ||||||
|  |           -DNS_INADDRSZ=4 -DHAVE_RECV -DHAVE_SEND -DHAVE_GETTIMEOFDAY \ | ||||||
|           -DSEND_TYPE_ARG1='int'   -DSEND_QUAL_ARG2='const' \ |           -DSEND_TYPE_ARG1='int'   -DSEND_QUAL_ARG2='const' \ | ||||||
|           -DSEND_TYPE_ARG2='void*' -DSEND_TYPE_ARG3='int' \ |           -DSEND_TYPE_ARG2='void*' -DSEND_TYPE_ARG3='int' \ | ||||||
|           -DSEND_TYPE_ARG4='int'   -DSEND_TYPE_RETV='int' \ |           -DSEND_TYPE_ARG4='int'   -DSEND_TYPE_RETV='int' \ | ||||||
|           -DRECV_TYPE_ARG1='int'   -DRECV_TYPE_ARG2='void*' \ |           -DRECV_TYPE_ARG1='int'   -DRECV_TYPE_ARG2='void*' \ | ||||||
|           -DRECV_TYPE_ARG3='int'   -DRECV_TYPE_ARG4='int' \ |           -DRECV_TYPE_ARG3='int'   -DRECV_TYPE_ARG4='int' \ | ||||||
|           -DRECV_TYPE_RETV='int'   -DHAVE_STRUCT_TIMEVAL \ |           -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 | 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__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_gethostbyname.c ares_strerror.c ares_cancel.c ares_init.c		\ | ||||||
| ares_timeout.c ares_destroy.c ares_mkquery.c ares_version.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_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_getnameinfo.c inet_net_pton.c bitncmp.c inet_ntop.c ares_writev.c	\ | ||||||
| ares_parse_ns_reply.c ares_llist.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          \ | 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      \ |  nameser.h inet_net_pton.h inet_ntop.h ares_ipv6.h bitncmp.h setup_once.h   \ | ||||||
|            setup_once.h ares_llist.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 \ | MANPAGES= ares_destroy.3 ares_expand_name.3 ares_expand_string.3 ares_fds.3 \ | ||||||
|  ares_free_hostent.3 ares_free_string.3 ares_gethostbyaddr.3		    \ |  ares_free_hostent.3 ares_free_string.3 ares_gethostbyaddr.3		    \ | ||||||
|   | |||||||
| @@ -75,7 +75,7 @@ MKDIR	= mkdir | |||||||
| MPKXDC	= mkxdc | MPKXDC	= mkxdc | ||||||
|  |  | ||||||
| # Global flags for all compilers | # 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) | ifeq ($(CC),mwccnlm) | ||||||
| LD	= mwldnlm | LD	= mwldnlm | ||||||
| @@ -160,7 +160,7 @@ lib: prebuild $(LTARGET) | |||||||
|  |  | ||||||
| nlm: prebuild $(TARGETS) | nlm: prebuild $(TARGETS) | ||||||
|  |  | ||||||
| prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h arpa/nameser.h | prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h | ||||||
|  |  | ||||||
| install: $(INSTDIR) all | install: $(INSTDIR) all | ||||||
| 	@$(CP) *.nlm $(INSTDIR) | 	@$(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) >> $@ | 	@echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@ | ||||||
| ifeq ($(LIBARCH),CLIB) | ifeq ($(LIBARCH),CLIB) | ||||||
| 	@echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@ | 	@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 NETDB_USE_INTERNET 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@ | 	@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@ | ||||||
| 	@echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@ | 	@echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@ | ||||||
| 	@echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@ | 	@echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@ | ||||||
| 	@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@ | 	@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@ | ||||||
| 	@echo $(DL)#define RECV_TYPE_RETV 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_QUAL_ARG2$(DL) >> $@ | ||||||
| 	@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@ | 	@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@ | ||||||
| 	@echo $(DL)#define SEND_TYPE_ARG2 char *$(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_ARG4 int$(DL) >> $@ | ||||||
| 	@echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@ | 	@echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@ | ||||||
| 	@echo $(DL)#define socklen_t int$(DL) >> $@ | 	@echo $(DL)#define socklen_t int$(DL) >> $@ | ||||||
| 	@echo $(DL)#define strncasecmp strnicmp$(DL) >> $@ |  | ||||||
| 	@echo $(DL)#define strcasecmp stricmp$(DL) >> $@ |  | ||||||
| else | else | ||||||
| 	@echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@ | 	@echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@ | 	@echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@ | 	@echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@ | 	@echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_GETTIMEOFDAY 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_INTTYPES_H 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@ | 	@echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_LONGLONG 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_ARG3 size_t$(DL) >> $@ | ||||||
| 	@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@ | 	@echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@ | ||||||
| 	@echo $(DL)#define RECV_TYPE_RETV ssize_t$(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_QUAL_ARG2$(DL) >> $@ | ||||||
| 	@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@ | 	@echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@ | ||||||
| 	@echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@ | 	@echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@ | ||||||
| @@ -334,7 +347,6 @@ else | |||||||
| 	@echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@ | 	@echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@ | ||||||
| endif | endif | ||||||
| 	@echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@ | 	@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_ASSERT_H 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@ | 	@echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_FCNTL_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_GETPROTOBYNAME 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@ | 	@echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_INET_ADDR 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_LL 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@ | 	@echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@ | 	@echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@ | 	@echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_RECV 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_SELECT 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_SEND 1$(DL) >> $@ | 	@echo $(DL)#define HAVE_SEND 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_SETJMP_H 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_UNISTD_H 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_UTIME 1$(DL) >> $@ | 	@echo $(DL)#define HAVE_UTIME 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define HAVE_UTIME_H 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 RETSIGTYPE void$(DL) >> $@ | ||||||
| 	@echo $(DL)#define SIZEOF_CURL_OFF_T 4$(DL) >> $@ |  | ||||||
| 	@echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@ | 	@echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@ | ||||||
| 	@echo $(DL)#define STDC_HEADERS 1$(DL) >> $@ | 	@echo $(DL)#define STDC_HEADERS 1$(DL) >> $@ | ||||||
| 	@echo $(DL)#define TIME_WITH_SYS_TIME 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) >> $@ | 	@echo $(DL)#define socklen_t int$(DL) >> $@ | ||||||
| endif | endif | ||||||
|  |  | ||||||
| arpa/nameser.h: nameser.h |  | ||||||
| 	@echo Fix missing header $@ |  | ||||||
| 	@-mkdir arpa |  | ||||||
| 	@$(CP) $< arpa |  | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -57,11 +57,13 @@ OBJECTS = $(OBJ_DIR)\ares_fds.obj              \ | |||||||
|           $(OBJ_DIR)\ares__read_line.obj       \ |           $(OBJ_DIR)\ares__read_line.obj       \ | ||||||
|           $(OBJ_DIR)\ares_gethostbyname.obj    \ |           $(OBJ_DIR)\ares_gethostbyname.obj    \ | ||||||
|           $(OBJ_DIR)\ares_getnameinfo.obj      \ |           $(OBJ_DIR)\ares_getnameinfo.obj      \ | ||||||
|  |           $(OBJ_DIR)\ares_strcasecmp.obj       \ | ||||||
|           $(OBJ_DIR)\ares_strerror.obj         \ |           $(OBJ_DIR)\ares_strerror.obj         \ | ||||||
|           $(OBJ_DIR)\ares_cancel.obj           \ |           $(OBJ_DIR)\ares_cancel.obj           \ | ||||||
|           $(OBJ_DIR)\ares_init.obj             \ |           $(OBJ_DIR)\ares_init.obj             \ | ||||||
|           $(OBJ_DIR)\ares_llist.obj            \ |           $(OBJ_DIR)\ares_llist.obj            \ | ||||||
|           $(OBJ_DIR)\ares_timeout.obj          \ |           $(OBJ_DIR)\ares_timeout.obj          \ | ||||||
|  |           $(OBJ_DIR)\ares__timeval.obj         \ | ||||||
|           $(OBJ_DIR)\ares_destroy.obj          \ |           $(OBJ_DIR)\ares_destroy.obj          \ | ||||||
|           $(OBJ_DIR)\ares_mkquery.obj          \ |           $(OBJ_DIR)\ares_mkquery.obj          \ | ||||||
|           $(OBJ_DIR)\ares_version.obj          \ |           $(OBJ_DIR)\ares_version.obj          \ | ||||||
| @@ -72,6 +74,7 @@ OBJECTS = $(OBJ_DIR)\ares_fds.obj              \ | |||||||
|           $(OBJ_DIR)\windows_port.obj          \ |           $(OBJ_DIR)\windows_port.obj          \ | ||||||
|           $(OBJ_DIR)\ares_expand_string.obj    \ |           $(OBJ_DIR)\ares_expand_string.obj    \ | ||||||
|           $(OBJ_DIR)\ares_parse_ptr_reply.obj  \ |           $(OBJ_DIR)\ares_parse_ptr_reply.obj  \ | ||||||
|  |           $(OBJ_DIR)\ares_writev.obj           \ | ||||||
|           $(OBJ_DIR)\bitncmp.obj               \ |           $(OBJ_DIR)\bitncmp.obj               \ | ||||||
|           $(OBJ_DIR)\inet_net_pton.obj         \ |           $(OBJ_DIR)\inet_net_pton.obj         \ | ||||||
|           $(OBJ_DIR)\inet_ntop.obj |           $(OBJ_DIR)\inet_ntop.obj | ||||||
| @@ -110,6 +113,7 @@ $(DEF_FILE): $(OBJECTS) Makefile.VC6 | |||||||
|        @echo   ares_parse_ptr_reply   >> $@ |        @echo   ares_parse_ptr_reply   >> $@ | ||||||
|        @echo   ares_parse_ns_reply    >> $@ |        @echo   ares_parse_ns_reply    >> $@ | ||||||
|        @echo   ares_process           >> $@ |        @echo   ares_process           >> $@ | ||||||
|  |        @echo   ares_process_fd        >> $@ | ||||||
|        @echo   ares_query             >> $@ |        @echo   ares_query             >> $@ | ||||||
|        @echo   ares_search            >> $@ |        @echo   ares_search            >> $@ | ||||||
|        @echo   ares_strerror          >> $@ |        @echo   ares_strerror          >> $@ | ||||||
| @@ -122,7 +126,6 @@ $(DEF_FILE): $(OBJECTS) Makefile.VC6 | |||||||
|        @echo   ares_inet_pton         >> $@ |        @echo   ares_inet_pton         >> $@ | ||||||
|        @echo   ares_writev            >> $@ |        @echo   ares_writev            >> $@ | ||||||
|        @echo   ares_getnameinfo       >> $@ |        @echo   ares_getnameinfo       >> $@ | ||||||
|        @echo   ares_gettimeofday      >> $@ |  | ||||||
|        @echo   ares_parse_aaaa_reply  >> $@ |        @echo   ares_parse_aaaa_reply  >> $@ | ||||||
|  |  | ||||||
| ahost.exe: $(OBJ_DIR) $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib | ahost.exe: $(OBJ_DIR) $(OBJ_DIR)\ahost.obj $(OBJ_DIR)\ares_getopt.obj cares_imp.lib | ||||||
| @@ -138,7 +141,8 @@ clean: | |||||||
|        - del $(OBJ_DIR)\*.obj *.ilk *.pdb *.pbt *.pbi *.pbo *._xe *.map |        - del $(OBJ_DIR)\*.obj *.ilk *.pdb *.pbt *.pbi *.pbo *._xe *.map | ||||||
|  |  | ||||||
| vclean realclean: clean | vclean realclean: clean | ||||||
|        - del $(DEF_FILE) cares.lib cares_imp.* cares.dll ahost.exe adig.exe |        - del $(DEF_FILE) cares.lib cares_imp.* cares.dll | ||||||
|  |        - del ahost.exe adig.exe acountry.exe | ||||||
|        - rd $(OBJ_DIR) |        - rd $(OBJ_DIR) | ||||||
|  |  | ||||||
| .c{$(OBJ_DIR)}.obj: | .c{$(OBJ_DIR)}.obj: | ||||||
| @@ -182,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   \ | $(OBJ_DIR)\ares_gethostbyname.obj: ares_gethostbyname.c setup.h setup_once.h   \ | ||||||
|   nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h bitncmp.h |   nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h bitncmp.h | ||||||
|  |  | ||||||
|  | $(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_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          \ | $(OBJ_DIR)\ares_cancel.obj: ares_cancel.c setup.h setup_once.h ares.h          \ | ||||||
| @@ -193,6 +199,9 @@ $(OBJ_DIR)\ares_init.obj: ares_init.c setup.h setup_once.h nameser.h ares.h    \ | |||||||
| $(OBJ_DIR)\ares_timeout.obj: ares_timeout.c setup.h setup_once.h ares.h        \ | $(OBJ_DIR)\ares_timeout.obj: ares_timeout.c setup.h setup_once.h ares.h        \ | ||||||
|   ares_private.h ares_ipv6.h |   ares_private.h ares_ipv6.h | ||||||
|  |  | ||||||
|  | $(OBJ_DIR)\ares__timeval.obj: ares__timeval.c setup.h setup_once.h ares.h      \ | ||||||
|  |   ares_private.h ares_ipv6.h | ||||||
|  |  | ||||||
| $(OBJ_DIR)\ares_destroy.obj: ares_destroy.c setup.h setup_once.h ares.h        \ | $(OBJ_DIR)\ares_destroy.obj: ares_destroy.c setup.h setup_once.h ares.h        \ | ||||||
|   ares_private.h ares_ipv6.h |   ares_private.h ares_ipv6.h | ||||||
|  |  | ||||||
| @@ -238,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            \ | $(OBJ_DIR)\ares_llist.obj: ares_llist.c setup.h setup_once.h ares.h            \ | ||||||
|   ares_private.h ares_llist.h |   ares_private.h ares_llist.h | ||||||
|  |  | ||||||
|  | $(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 | Some features are missing from the current version of ares, relative | ||||||
| to the BIND resolver: | 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 hostname verification. | ||||||
| 	* There is no logging of unexpected events. | 	* There is no logging of unexpected events. | ||||||
| 	* There is no debugging-oriented logging. | 	* There is no debugging-oriented logging. | ||||||
|   | |||||||
| @@ -1,9 +1,11 @@ | |||||||
| This is what's new and changed in the c-ares 1.5.2 release: | This is what's new and changed in the c-ares 1.5.4 release: | ||||||
|  |  | ||||||
|  o  |  o improved configure detection of several functions | ||||||
|  |  o improved source code portability | ||||||
|  |  | ||||||
| Thanks go to these friendly people for their efforts and contributions: | Thanks go to these friendly people for their efforts and contributions: | ||||||
|  |  | ||||||
|   |   | ||||||
|  |  and obviously Daniel Stenberg | ||||||
|  |  | ||||||
| Have fun! | 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. | ||||||
							
								
								
									
										1329
									
								
								ares/acinclude.m4
									
									
									
									
									
								
							
							
						
						
									
										1329
									
								
								ares/acinclude.m4
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -43,8 +43,11 @@ | |||||||
| #ifdef HAVE_UNISTD_H | #ifdef HAVE_UNISTD_H | ||||||
| #include <unistd.h> | #include <unistd.h> | ||||||
| #endif | #endif | ||||||
|  | #ifdef HAVE_STRINGS_H | ||||||
|  | #include <strings.h> | ||||||
|  | #endif | ||||||
|  |  | ||||||
| #if defined(WIN32) | #if defined(WIN32) && !defined(WATT32) | ||||||
|   #include <winsock.h> |   #include <winsock.h> | ||||||
| #else | #else | ||||||
|   #include <arpa/inet.h> |   #include <arpa/inet.h> | ||||||
| @@ -57,6 +60,25 @@ | |||||||
| #include "inet_net_pton.h" | #include "inet_net_pton.h" | ||||||
| #include "inet_ntop.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 *usage      = "acountry [-vh?] {host|addr} ...\n"; | ||||||
| static const char  nerd_fmt[] = "%u.%u.%u.%u.zz.countries.nerd.dk"; | static const char  nerd_fmt[] = "%u.%u.%u.%u.zz.countries.nerd.dk"; | ||||||
| static const char *nerd_ver1  = nerd_fmt + 14; | static const char *nerd_ver1  = nerd_fmt + 14; | ||||||
| @@ -87,7 +109,7 @@ int main(int argc, char **argv) | |||||||
|   ares_channel channel; |   ares_channel channel; | ||||||
|   int    ch, status; |   int    ch, status; | ||||||
|  |  | ||||||
| #ifdef WIN32 | #if defined(WIN32) && !defined(WATT32) | ||||||
|   WORD wVersionRequested = MAKEWORD(USE_WINSOCK,USE_WINSOCK); |   WORD wVersionRequested = MAKEWORD(USE_WINSOCK,USE_WINSOCK); | ||||||
|   WSADATA wsaData; |   WSADATA wsaData; | ||||||
|   WSAStartup(wVersionRequested, &wsaData); |   WSAStartup(wVersionRequested, &wsaData); | ||||||
| @@ -155,7 +177,7 @@ int main(int argc, char **argv) | |||||||
|   wait_ares(channel); |   wait_ares(channel); | ||||||
|   ares_destroy(channel); |   ares_destroy(channel); | ||||||
|  |  | ||||||
| #ifdef WIN32 | #if defined(WIN32) && !defined(WATT32) | ||||||
|   WSACleanup(); |   WSACleanup(); | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| @@ -233,7 +255,7 @@ struct search_list { | |||||||
|        const char *long_name;      /* normal country name */ |        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) |   while (num > 0 && list->long_name) | ||||||
|     { |     { | ||||||
| @@ -501,7 +523,8 @@ static int is_addr(char *str, char **end) | |||||||
| { | { | ||||||
|   int a0, a1, a2, a3, num, rc = 0, length = 0; |   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) && |       BYTE_OK(a0) && BYTE_OK(a1) && BYTE_OK(a2) && BYTE_OK(a3) && | ||||||
|       length >= (3+4)) |       length >= (3+4)) | ||||||
|     { |     { | ||||||
| @@ -529,6 +552,7 @@ static void find_country_from_cname(const char *cname, struct in_addr addr) | |||||||
|   z0 = tolower(cname[0]); |   z0 = tolower(cname[0]); | ||||||
|   z1 = tolower(cname[1]); |   z1 = tolower(cname[1]); | ||||||
|   ccopy = strdup(cname); |   ccopy = strdup(cname); | ||||||
|  |   dot_4 = NULL; | ||||||
|  |  | ||||||
|   ver_1 = (z0 == 'z' && z1 == 'z' && !strcasecmp(cname+4,nerd_ver1)); |   ver_1 = (z0 == 'z' && z1 == 'z' && !strcasecmp(cname+4,nerd_ver1)); | ||||||
|   ver_2 = (is_addr(ccopy,&dot_4) && !strcasecmp(dot_4,nerd_ver2)); |   ver_2 = (is_addr(ccopy,&dot_4) && !strcasecmp(dot_4,nerd_ver2)); | ||||||
| @@ -560,8 +584,8 @@ static void find_country_from_cname(const char *cname, struct in_addr addr) | |||||||
|  |  | ||||||
|   if (ver_1) |   if (ver_1) | ||||||
|     { |     { | ||||||
|       ccode_A2[0] = tolower(cname[2]); |       ccode_A2[0] = (char)tolower(cname[2]); | ||||||
|       ccode_A2[1] = tolower(cname[3]); |       ccode_A2[1] = (char)tolower(cname[3]); | ||||||
|       ccode_A2[2] = '\0'; |       ccode_A2[2] = '\0'; | ||||||
|     } |     } | ||||||
|   else |   else | ||||||
|   | |||||||
							
								
								
									
										159
									
								
								ares/adig.c
									
									
									
									
									
								
							
							
						
						
									
										159
									
								
								ares/adig.c
									
									
									
									
									
								
							| @@ -17,20 +17,35 @@ | |||||||
|  |  | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) | #ifdef HAVE_SYS_SOCKET_H | ||||||
| #include "nameser.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 | #else | ||||||
|  | #  include "nameser.h" | ||||||
|  | #endif | ||||||
|  | #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||||
|  | #  include <arpa/nameser_compat.h> | ||||||
|  | #endif | ||||||
|  |  | ||||||
| #ifdef HAVE_SYS_TIME_H | #ifdef HAVE_SYS_TIME_H | ||||||
| #include <sys/time.h> | #  include <sys/time.h> | ||||||
| #endif | #endif | ||||||
| #include <sys/socket.h> |  | ||||||
| #include <netinet/in.h> |  | ||||||
| #include <arpa/inet.h> |  | ||||||
| #include <arpa/nameser.h> |  | ||||||
| #ifdef HAVE_UNISTD_H | #ifdef HAVE_UNISTD_H | ||||||
| #include <unistd.h> | #  include <unistd.h> | ||||||
| #endif | #endif | ||||||
| #include <netdb.h> | #ifdef HAVE_STRINGS_H | ||||||
|  | #  include <strings.h> | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
| @@ -42,8 +57,24 @@ | |||||||
| #include "ares.h" | #include "ares.h" | ||||||
| #include "ares_dns.h" | #include "ares_dns.h" | ||||||
| #include "inet_ntop.h" | #include "inet_ntop.h" | ||||||
|  | #include "inet_net_pton.h" | ||||||
| #include "ares_getopt.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 | #ifdef WATT32 | ||||||
| #undef WIN32  /* Redefined in MingW headers */ | #undef WIN32  /* Redefined in MingW headers */ | ||||||
| #endif | #endif | ||||||
| @@ -110,6 +141,7 @@ static const struct nv types[] = { | |||||||
|   { "AXFR",     T_AXFR }, |   { "AXFR",     T_AXFR }, | ||||||
|   { "MAILB",    T_MAILB }, |   { "MAILB",    T_MAILB }, | ||||||
|   { "MAILA",    T_MAILA }, |   { "MAILA",    T_MAILA }, | ||||||
|  |   { "NAPTR",    T_NAPTR }, | ||||||
|   { "ANY",      T_ANY } |   { "ANY",      T_ANY } | ||||||
| }; | }; | ||||||
| static const int ntypes = sizeof(types) / sizeof(types[0]); | static const int ntypes = sizeof(types) / sizeof(types[0]); | ||||||
| @@ -120,6 +152,7 @@ static const char *opcodes[] = { | |||||||
|   "UPDATEA", "UPDATED", "UPDATEDA", "UPDATEM", "UPDATEMA", |   "UPDATEA", "UPDATED", "UPDATEDA", "UPDATEM", "UPDATEMA", | ||||||
|   "ZONEINIT", "ZONEREF" |   "ZONEINIT", "ZONEREF" | ||||||
| }; | }; | ||||||
|  |   struct in_addr inaddr; | ||||||
|  |  | ||||||
| static const char *rcodes[] = { | static const char *rcodes[] = { | ||||||
|   "NOERROR", "FORMERR", "SERVFAIL", "NXDOMAIN", "NOTIMP", "REFUSED", |   "NOERROR", "FORMERR", "SERVFAIL", "NXDOMAIN", "NOTIMP", "REFUSED", | ||||||
| @@ -181,11 +214,15 @@ int main(int argc, char **argv) | |||||||
|  |  | ||||||
|         case 's': |         case 's': | ||||||
|           /* Add a server, and specify servers in the option mask. */ |           /* Add a server, and specify servers in the option mask. */ | ||||||
|           hostent = gethostbyname(optarg); |           if (ares_inet_pton(AF_INET, optarg, &inaddr) <= 0) | ||||||
|           if (!hostent || hostent->h_addrtype != AF_INET) |  | ||||||
|             { |             { | ||||||
|               fprintf(stderr, "adig: server %s not found.\n", optarg); |               hostent = gethostbyname(optarg); | ||||||
|               return 1; |               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) |           options.servers = realloc(options.servers, (options.nservers + 1) | ||||||
|                                     * sizeof(struct in_addr)); |                                     * sizeof(struct in_addr)); | ||||||
| @@ -194,7 +231,7 @@ int main(int argc, char **argv) | |||||||
|               fprintf(stderr, "Out of memory!\n"); |               fprintf(stderr, "Out of memory!\n"); | ||||||
|               return 1; |               return 1; | ||||||
|             } |             } | ||||||
|           memcpy(&options.servers[options.nservers], hostent->h_addr, |           memcpy(&options.servers[options.nservers], &inaddr, | ||||||
|                  sizeof(struct in_addr)); |                  sizeof(struct in_addr)); | ||||||
|           options.nservers++; |           options.nservers++; | ||||||
|           optmask |= ARES_OPT_SERVERS; |           optmask |= ARES_OPT_SERVERS; | ||||||
| @@ -303,6 +340,8 @@ static void callback(void *arg, int status, int timeouts, | |||||||
|   unsigned int qdcount, ancount, nscount, arcount, i; |   unsigned int qdcount, ancount, nscount, arcount, i; | ||||||
|   const unsigned char *aptr; |   const unsigned char *aptr; | ||||||
|  |  | ||||||
|  |   (void) timeouts; | ||||||
|  |  | ||||||
|   /* Display the query name if given. */ |   /* Display the query name if given. */ | ||||||
|   if (name) |   if (name) | ||||||
|     printf("Answer for query %s:\n", name); |     printf("Answer for query %s:\n", name); | ||||||
| @@ -427,13 +466,16 @@ static const unsigned char *display_rr(const unsigned char *aptr, | |||||||
|                                        const unsigned char *abuf, int alen) |                                        const unsigned char *abuf, int alen) | ||||||
| { | { | ||||||
|   const unsigned char *p; |   const unsigned char *p; | ||||||
|   char *name; |  | ||||||
|   int type, dnsclass, ttl, dlen, status; |   int type, dnsclass, ttl, dlen, status; | ||||||
|   long len; |   long len; | ||||||
|   char addr[46]; |   char addr[46]; | ||||||
|  |   union { | ||||||
|  |     unsigned char * as_uchar; | ||||||
|  |              char * as_char; | ||||||
|  |   } name; | ||||||
|  |  | ||||||
|   /* Parse the RR 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) |   if (status != ARES_SUCCESS) | ||||||
|     return NULL; |     return NULL; | ||||||
|   aptr += len; |   aptr += len; | ||||||
| @@ -443,7 +485,7 @@ static const unsigned char *display_rr(const unsigned char *aptr, | |||||||
|    */ |    */ | ||||||
|   if (aptr + RRFIXEDSZ > abuf + alen) |   if (aptr + RRFIXEDSZ > abuf + alen) | ||||||
|     { |     { | ||||||
|       ares_free_string(name); |       ares_free_string(name.as_char); | ||||||
|       return NULL; |       return NULL; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -456,16 +498,16 @@ static const unsigned char *display_rr(const unsigned char *aptr, | |||||||
|   aptr += RRFIXEDSZ; |   aptr += RRFIXEDSZ; | ||||||
|   if (aptr + dlen > abuf + alen) |   if (aptr + dlen > abuf + alen) | ||||||
|     { |     { | ||||||
|       ares_free_string(name); |       ares_free_string(name.as_char); | ||||||
|       return NULL; |       return NULL; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   /* Display the RR name, class, and type. */ |   /* 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) |   if (dnsclass != C_IN) | ||||||
|     printf("\t%s", class_name(dnsclass)); |     printf("\t%s", class_name(dnsclass)); | ||||||
|   printf("\t%s", type_name(type)); |   printf("\t%s", type_name(type)); | ||||||
|   ares_free_string(name); |   ares_free_string(name.as_char); | ||||||
|  |  | ||||||
|   /* Display the RR data.  Don't touch aptr. */ |   /* Display the RR data.  Don't touch aptr. */ | ||||||
|   switch (type) |   switch (type) | ||||||
| @@ -479,11 +521,11 @@ static const unsigned char *display_rr(const unsigned char *aptr, | |||||||
|     case T_NS: |     case T_NS: | ||||||
|     case T_PTR: |     case T_PTR: | ||||||
|       /* For these types, the RR data is just a domain name. */ |       /* 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) |       if (status != ARES_SUCCESS) | ||||||
|         return NULL; |         return NULL; | ||||||
|       printf("\t%s.", name); |       printf("\t%s.", name.as_char); | ||||||
|       ares_free_string(name); |       ares_free_string(name.as_char); | ||||||
|       break; |       break; | ||||||
|  |  | ||||||
|     case T_HINFO: |     case T_HINFO: | ||||||
| @@ -503,17 +545,17 @@ static const unsigned char *display_rr(const unsigned char *aptr, | |||||||
|     case T_MINFO: |     case T_MINFO: | ||||||
|       /* The RR data is two domain names. */ |       /* The RR data is two domain names. */ | ||||||
|       p = aptr; |       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) |       if (status != ARES_SUCCESS) | ||||||
|         return NULL; |         return NULL; | ||||||
|       printf("\t%s.", name); |       printf("\t%s.", name.as_char); | ||||||
|       ares_free_string(name); |       ares_free_string(name.as_char); | ||||||
|       p += len; |       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) |       if (status != ARES_SUCCESS) | ||||||
|         return NULL; |         return NULL; | ||||||
|       printf("\t%s.", name); |       printf("\t%s.", name.as_char); | ||||||
|       ares_free_string(name); |       ares_free_string(name.as_char); | ||||||
|       break; |       break; | ||||||
|  |  | ||||||
|     case T_MX: |     case T_MX: | ||||||
| @@ -523,11 +565,11 @@ static const unsigned char *display_rr(const unsigned char *aptr, | |||||||
|       if (dlen < 2) |       if (dlen < 2) | ||||||
|         return NULL; |         return NULL; | ||||||
|       printf("\t%d", DNS__16BIT(aptr)); |       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) |       if (status != ARES_SUCCESS) | ||||||
|         return NULL; |         return NULL; | ||||||
|       printf("\t%s.", name); |       printf("\t%s.", name.as_char); | ||||||
|       ares_free_string(name); |       ares_free_string(name.as_char); | ||||||
|       break; |       break; | ||||||
|  |  | ||||||
|     case T_SOA: |     case T_SOA: | ||||||
| @@ -535,17 +577,17 @@ static const unsigned char *display_rr(const unsigned char *aptr, | |||||||
|        * numbers giving the serial number and some timeouts. |        * numbers giving the serial number and some timeouts. | ||||||
|        */ |        */ | ||||||
|       p = aptr; |       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) |       if (status != ARES_SUCCESS) | ||||||
|         return NULL; |         return NULL; | ||||||
|       printf("\t%s.\n", name); |       printf("\t%s.\n", name.as_char); | ||||||
|       ares_free_string(name); |       ares_free_string(name.as_char); | ||||||
|       p += len; |       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) |       if (status != ARES_SUCCESS) | ||||||
|         return NULL; |         return NULL; | ||||||
|       printf("\t\t\t\t\t\t%s.\n", name); |       printf("\t\t\t\t\t\t%s.\n", name.as_char); | ||||||
|       ares_free_string(name); |       ares_free_string(name.as_char); | ||||||
|       p += len; |       p += len; | ||||||
|       if (p + 20 > aptr + dlen) |       if (p + 20 > aptr + dlen) | ||||||
|         return NULL; |         return NULL; | ||||||
| @@ -596,13 +638,48 @@ static const unsigned char *display_rr(const unsigned char *aptr, | |||||||
|       printf(" %d", DNS__16BIT(aptr + 2)); |       printf(" %d", DNS__16BIT(aptr + 2)); | ||||||
|       printf(" %d", DNS__16BIT(aptr + 4)); |       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) |       if (status != ARES_SUCCESS) | ||||||
|         return NULL; |         return NULL; | ||||||
|       printf("\t%s.", name); |       printf("\t%s.", name.as_char); | ||||||
|       ares_free_string(name); |       ares_free_string(name.as_char); | ||||||
|       break; |       break; | ||||||
|  |  | ||||||
|  |     case T_NAPTR: | ||||||
|  |  | ||||||
|  |       printf("\t%d", DNS__16BIT(aptr)); /* order */ | ||||||
|  |       printf(" %d\n", DNS__16BIT(aptr + 2)); /* preference */ | ||||||
|  |  | ||||||
|  |       p = aptr + 4; | ||||||
|  |       status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len); | ||||||
|  |       if (status != ARES_SUCCESS) | ||||||
|  |         return NULL; | ||||||
|  |       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, &name.as_uchar, &len); | ||||||
|  |       if (status != ARES_SUCCESS) | ||||||
|  |         return NULL; | ||||||
|  |       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, &name.as_uchar, &len); | ||||||
|  |       if (status != ARES_SUCCESS) | ||||||
|  |         return NULL; | ||||||
|  |       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, &name.as_uchar, &len); | ||||||
|  |       if (status != ARES_SUCCESS) | ||||||
|  |         return NULL; | ||||||
|  |       printf("\t\t\t\t\t\t%s", name.as_char); | ||||||
|  |       ares_free_string(name.as_char); | ||||||
|  |       break; | ||||||
|  |  | ||||||
|  |  | ||||||
|     default: |     default: | ||||||
|       printf("\t[Unknown RR; cannot parse]"); |       printf("\t[Unknown RR; cannot parse]"); | ||||||
|       break; |       break; | ||||||
|   | |||||||
							
								
								
									
										20
									
								
								ares/ahost.c
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								ares/ahost.c
									
									
									
									
									
								
							| @@ -29,6 +29,9 @@ | |||||||
| #include <unistd.h> | #include <unistd.h> | ||||||
| #endif | #endif | ||||||
| #endif | #endif | ||||||
|  | #ifdef HAVE_STRINGS_H | ||||||
|  | #include <strings.h> | ||||||
|  | #endif | ||||||
|  |  | ||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| @@ -40,6 +43,21 @@ | |||||||
| #include "inet_net_pton.h" | #include "inet_net_pton.h" | ||||||
| #include "ares_getopt.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 callback(void *arg, int status, int timeouts, struct hostent *host); | ||||||
| static void usage(void); | static void usage(void); | ||||||
|  |  | ||||||
| @@ -139,6 +157,8 @@ static void callback(void *arg, int status, int timeouts, struct hostent *host) | |||||||
| { | { | ||||||
|   char **p; |   char **p; | ||||||
|  |  | ||||||
|  |   (void)timeouts; | ||||||
|  |  | ||||||
|   if (status != ARES_SUCCESS) |   if (status != ARES_SUCCESS) | ||||||
|     { |     { | ||||||
|       fprintf(stderr, "%s: %s\n", (char *) arg, ares_strerror(status)); |       fprintf(stderr, "%s: %s\n", (char *) arg, ares_strerror(status)); | ||||||
|   | |||||||
| @@ -1,6 +1,7 @@ | |||||||
| /* $Id$ */ | /* $Id$ */ | ||||||
|  |  | ||||||
| /* Copyright 1998 by the Massachusetts Institute of Technology. | /* Copyright 1998 by the Massachusetts Institute of Technology. | ||||||
|  |  * Copyright (C) 2007 by Daniel Stenberg | ||||||
|  * |  * | ||||||
|  * Permission to use, copy, modify, and distribute this |  * Permission to use, copy, modify, and distribute this | ||||||
|  * software and its documentation for any purpose and without |  * software and its documentation for any purpose and without | ||||||
| @@ -112,6 +113,8 @@ extern "C" { | |||||||
| #define ARES_OPT_SORTLIST       (1 << 10) | #define ARES_OPT_SORTLIST       (1 << 10) | ||||||
| #define ARES_OPT_SOCK_SNDBUF    (1 << 11) | #define ARES_OPT_SOCK_SNDBUF    (1 << 11) | ||||||
| #define ARES_OPT_SOCK_RCVBUF    (1 << 12) | #define ARES_OPT_SOCK_RCVBUF    (1 << 12) | ||||||
|  | #define ARES_OPT_TIMEOUTMS      (1 << 13) | ||||||
|  | #define ARES_OPT_ROTATE         (1 << 14) | ||||||
|  |  | ||||||
| /* Nameinfo flag values */ | /* Nameinfo flag values */ | ||||||
| #define ARES_NI_NOFQDN                  (1 << 0) | #define ARES_NI_NOFQDN                  (1 << 0) | ||||||
| @@ -179,9 +182,10 @@ struct apattern; | |||||||
|  |  | ||||||
| struct ares_options { | struct ares_options { | ||||||
|   int flags; |   int flags; | ||||||
|   int timeout; |   int timeout; /* in seconds or milliseconds, depending on options */ | ||||||
|   int tries; |   int tries; | ||||||
|   int ndots; |   int ndots; | ||||||
|  |   int rotate; | ||||||
|   unsigned short udp_port; |   unsigned short udp_port; | ||||||
|   unsigned short tcp_port; |   unsigned short tcp_port; | ||||||
|   int socket_send_buffer_size; |   int socket_send_buffer_size; | ||||||
|   | |||||||
| @@ -18,11 +18,19 @@ | |||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if !defined(WIN32) || defined(WATT32) | #if !defined(WIN32) || defined(WATT32) | ||||||
|  | #ifdef HAVE_SYS_SOCKET_H | ||||||
| #include <sys/socket.h> | #include <sys/socket.h> | ||||||
|  | #endif | ||||||
|  | #ifdef HAVE_NETINET_IN_H | ||||||
| #include <netinet/in.h> | #include <netinet/in.h> | ||||||
| #include <arpa/inet.h> | #endif | ||||||
|  | #ifdef HAVE_NETDB_H | ||||||
| #include <netdb.h> | #include <netdb.h> | ||||||
| #endif | #endif | ||||||
|  | #ifdef HAVE_ARPA_INET_H | ||||||
|  | #include <arpa/inet.h> | ||||||
|  | #endif | ||||||
|  | #endif | ||||||
|  |  | ||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| @@ -30,8 +38,8 @@ | |||||||
| #include <ctype.h> | #include <ctype.h> | ||||||
|  |  | ||||||
| #include "ares.h" | #include "ares.h" | ||||||
| #include "ares_private.h" |  | ||||||
| #include "inet_net_pton.h" | #include "inet_net_pton.h" | ||||||
|  | #include "ares_private.h" | ||||||
|  |  | ||||||
| int ares__get_hostent(FILE *fp, int family, struct hostent **host) | int ares__get_hostent(FILE *fp, int family, struct hostent **host) | ||||||
| { | { | ||||||
|   | |||||||
							
								
								
									
										112
									
								
								ares/ares__timeval.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										112
									
								
								ares/ares__timeval.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,112 @@ | |||||||
|  | /* $Id$ */ | ||||||
|  |  | ||||||
|  | /* Copyright (C) 2008 by Daniel Stenberg et al | ||||||
|  |  * | ||||||
|  |  * Permission to use, copy, modify, and distribute this software and its | ||||||
|  |  * documentation for any purpose and without fee is hereby granted, provided | ||||||
|  |  * that the above copyright notice appear in all copies and that both that | ||||||
|  |  * copyright notice and this permission notice appear in supporting | ||||||
|  |  * documentation, and that the name of M.I.T. not be used in advertising or | ||||||
|  |  * publicity pertaining to distribution of the software without specific, | ||||||
|  |  * written prior permission.  M.I.T. makes no representations about the | ||||||
|  |  * suitability of this software for any purpose.  It is provided "as is" | ||||||
|  |  * without express or implied warranty. | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | #include "setup.h" | ||||||
|  | #include "ares.h" | ||||||
|  | #include "ares_private.h" | ||||||
|  |  | ||||||
|  | #if defined(WIN32) && !defined(MSDOS) | ||||||
|  |  | ||||||
|  | struct timeval ares__tvnow(void) | ||||||
|  | { | ||||||
|  |   /* | ||||||
|  |   ** GetTickCount() is available on _all_ Windows versions from W95 up | ||||||
|  |   ** to nowadays. Returns milliseconds elapsed since last system boot, | ||||||
|  |   ** increases monotonically and wraps once 49.7 days have elapsed. | ||||||
|  |   */ | ||||||
|  |   struct timeval now; | ||||||
|  |   DWORD milliseconds = GetTickCount(); | ||||||
|  |   now.tv_sec = milliseconds / 1000; | ||||||
|  |   now.tv_usec = (milliseconds % 1000) * 1000; | ||||||
|  |   return now; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | #elif defined(HAVE_CLOCK_GETTIME_MONOTONIC) | ||||||
|  |  | ||||||
|  | struct timeval ares__tvnow(void) | ||||||
|  | { | ||||||
|  |   /* | ||||||
|  |   ** clock_gettime() is granted to be increased monotonically when the | ||||||
|  |   ** monotonic clock is queried. Time starting point is unspecified, it | ||||||
|  |   ** could be the system start-up time, the Epoch, or something else, | ||||||
|  |   ** in any case the time starting point does not change once that the | ||||||
|  |   ** system has started up. | ||||||
|  |   */ | ||||||
|  |   struct timeval now; | ||||||
|  |   struct timespec tsnow; | ||||||
|  |   if(0 == clock_gettime(CLOCK_MONOTONIC, &tsnow)) { | ||||||
|  |     now.tv_sec = tsnow.tv_sec; | ||||||
|  |     now.tv_usec = tsnow.tv_nsec / 1000; | ||||||
|  |   } | ||||||
|  |   /* | ||||||
|  |   ** Even when the configure process has truly detected monotonic clock | ||||||
|  |   ** availability, it might happen that it is not actually available at | ||||||
|  |   ** run-time. When this occurs simply fallback to other time source. | ||||||
|  |   */ | ||||||
|  | #ifdef HAVE_GETTIMEOFDAY | ||||||
|  |   else | ||||||
|  |     (void)gettimeofday(&now, NULL); | ||||||
|  | #else | ||||||
|  |   else { | ||||||
|  |     now.tv_sec = (long)time(NULL); | ||||||
|  |     now.tv_usec = 0; | ||||||
|  |   } | ||||||
|  | #endif | ||||||
|  |   return now; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | #elif defined(HAVE_GETTIMEOFDAY) | ||||||
|  |  | ||||||
|  | struct timeval ares__tvnow(void) | ||||||
|  | { | ||||||
|  |   /* | ||||||
|  |   ** gettimeofday() is not granted to be increased monotonically, due to | ||||||
|  |   ** clock drifting and external source time synchronization it can jump | ||||||
|  |   ** forward or backward in time. | ||||||
|  |   */ | ||||||
|  |   struct timeval now; | ||||||
|  |   (void)gettimeofday(&now, NULL); | ||||||
|  |   return now; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | #else | ||||||
|  |  | ||||||
|  | struct timeval ares__tvnow(void) | ||||||
|  | { | ||||||
|  |   /* | ||||||
|  |   ** time() returns the value of time in seconds since the Epoch. | ||||||
|  |   */ | ||||||
|  |   struct timeval now; | ||||||
|  |   now.tv_sec = (long)time(NULL); | ||||||
|  |   now.tv_usec = 0; | ||||||
|  |   return now; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | #endif | ||||||
|  |  | ||||||
|  | #if 0 /* Not used */ | ||||||
|  | /* | ||||||
|  |  * Make sure that the first argument is the more recent time, as otherwise | ||||||
|  |  * we'll get a weird negative time-diff back... | ||||||
|  |  * | ||||||
|  |  * Returns: the time difference in number of milliseconds. | ||||||
|  |  */ | ||||||
|  | long ares__tvdiff(struct timeval newer, struct timeval older) | ||||||
|  | { | ||||||
|  |   return (newer.tv_sec-older.tv_sec)*1000+ | ||||||
|  |     (newer.tv_usec-older.tv_usec)/1000; | ||||||
|  | } | ||||||
|  | #endif | ||||||
|  |  | ||||||
| @@ -17,14 +17,16 @@ | |||||||
|  |  | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) | #ifdef HAVE_NETINET_IN_H | ||||||
| #include "nameser.h" | #  include <netinet/in.h> | ||||||
| #else |  | ||||||
| #include <netinet/in.h> |  | ||||||
| #include <arpa/nameser.h> |  | ||||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H |  | ||||||
| #include <arpa/nameser_compat.h> |  | ||||||
| #endif | #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 <stdlib.h> | ||||||
|   | |||||||
| @@ -17,11 +17,13 @@ | |||||||
|  |  | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) | #ifdef HAVE_NETINET_IN_H | ||||||
| #include "nameser.h" | #  include <netinet/in.h> | ||||||
|  | #endif | ||||||
|  | #ifdef HAVE_ARPA_NAMESER_H | ||||||
|  | #  include <arpa/nameser.h> | ||||||
| #else | #else | ||||||
| #include <netinet/in.h> | #  include "nameser.h" | ||||||
| #include <arpa/nameser.h> |  | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #include <string.h> | #include <string.h> | ||||||
|   | |||||||
| @@ -16,16 +16,25 @@ | |||||||
|  */ |  */ | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) | #ifdef HAVE_SYS_SOCKET_H | ||||||
| #include "nameser.h" | #  include <sys/socket.h> | ||||||
| #else |  | ||||||
| #include <sys/socket.h> |  | ||||||
| #include <netinet/in.h> |  | ||||||
| #include <netdb.h> |  | ||||||
| #include <arpa/nameser.h> |  | ||||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H |  | ||||||
| #include <arpa/nameser_compat.h> |  | ||||||
| #endif | #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 <stdio.h> | ||||||
| @@ -33,8 +42,8 @@ | |||||||
| #include <string.h> | #include <string.h> | ||||||
|  |  | ||||||
| #include "ares.h" | #include "ares.h" | ||||||
| #include "ares_private.h" |  | ||||||
| #include "inet_net_pton.h" | #include "inet_net_pton.h" | ||||||
|  | #include "ares_private.h" | ||||||
|  |  | ||||||
| #ifdef WATT32 | #ifdef WATT32 | ||||||
| #undef WIN32 | #undef WIN32 | ||||||
|   | |||||||
| @@ -17,30 +17,39 @@ | |||||||
|  |  | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) | #ifdef HAVE_SYS_SOCKET_H | ||||||
| #include "nameser.h" | #  include <sys/socket.h> | ||||||
| #else | #endif | ||||||
| #include <sys/socket.h> | #ifdef HAVE_NETINET_IN_H | ||||||
| #include <netinet/in.h> | #  include <netinet/in.h> | ||||||
| #include <arpa/inet.h> | #endif | ||||||
| #include <netdb.h> | #ifdef HAVE_NETDB_H | ||||||
|  | #  include <netdb.h> | ||||||
|  | #endif | ||||||
|  | #ifdef HAVE_ARPA_INET_H | ||||||
|  | #  include <arpa/inet.h> | ||||||
|  | #endif | ||||||
| #ifdef HAVE_ARPA_NAMESER_H | #ifdef HAVE_ARPA_NAMESER_H | ||||||
| #include <arpa/nameser.h> | #  include <arpa/nameser.h> | ||||||
|  | #else | ||||||
|  | #  include "nameser.h" | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||||
| #include <arpa/nameser_compat.h> | #  include <arpa/nameser_compat.h> | ||||||
| #endif |  | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| #include <string.h> | #include <string.h> | ||||||
| #include <ctype.h> | #include <ctype.h> | ||||||
|  | #ifdef HAVE_STRINGS_H | ||||||
|  | #include <strings.h> | ||||||
|  | #endif | ||||||
|  |  | ||||||
| #include "ares.h" | #include "ares.h" | ||||||
| #include "ares_private.h" |  | ||||||
| #include "inet_net_pton.h" | #include "inet_net_pton.h" | ||||||
| #include "bitncmp.h" | #include "bitncmp.h" | ||||||
|  | #include "ares_private.h" | ||||||
|  |  | ||||||
| #ifdef WATT32 | #ifdef WATT32 | ||||||
| #undef WIN32 | #undef WIN32 | ||||||
| @@ -159,7 +168,7 @@ static void host_callback(void *arg, int status, int timeouts, | |||||||
| { | { | ||||||
|   struct host_query *hquery = (struct host_query *) arg; |   struct host_query *hquery = (struct host_query *) arg; | ||||||
|   ares_channel channel = hquery->channel; |   ares_channel channel = hquery->channel; | ||||||
|   struct hostent *host; |   struct hostent *host = NULL; | ||||||
|  |  | ||||||
|   hquery->timeouts += timeouts; |   hquery->timeouts += timeouts; | ||||||
|   if (status == ARES_SUCCESS) |   if (status == ARES_SUCCESS) | ||||||
| @@ -173,6 +182,15 @@ static void host_callback(void *arg, int status, int timeouts, | |||||||
|       else if (hquery->family == AF_INET6) |       else if (hquery->family == AF_INET6) | ||||||
|         { |         { | ||||||
|           status = ares_parse_aaaa_reply(abuf, alen, &host, NULL, NULL); |           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) |           if (host && channel->nsort) | ||||||
|             sort6_addresses(host, channel->sortlist, channel->nsort); |             sort6_addresses(host, channel->sortlist, channel->nsort); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -16,17 +16,32 @@ | |||||||
|  */ |  */ | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) | #ifdef HAVE_GETSERVBYPORT_R | ||||||
| #include "nameser.h" | #  if !defined(GETSERVBYPORT_R_ARGS) || \ | ||||||
| #else |      (GETSERVBYPORT_R_ARGS < 4) || (GETSERVBYPORT_R_ARGS > 6) | ||||||
| #include <sys/socket.h> | #    error "you MUST specifiy a valid number of arguments for getservbyport_r" | ||||||
| #include <netinet/in.h> | #  endif | ||||||
| #include <netdb.h> |  | ||||||
| #include <arpa/inet.h> |  | ||||||
| #include <arpa/nameser.h> |  | ||||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H |  | ||||||
| #include <arpa/nameser_compat.h> |  | ||||||
| #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 | #ifdef HAVE_NET_IF_H | ||||||
| @@ -42,9 +57,9 @@ | |||||||
| #include <string.h> | #include <string.h> | ||||||
|  |  | ||||||
| #include "ares.h" | #include "ares.h" | ||||||
| #include "ares_private.h" |  | ||||||
| #include "ares_ipv6.h" | #include "ares_ipv6.h" | ||||||
| #include "inet_ntop.h" | #include "inet_ntop.h" | ||||||
|  | #include "ares_private.h" | ||||||
|  |  | ||||||
| #ifdef WATT32 | #ifdef WATT32 | ||||||
| #undef WIN32 | #undef WIN32 | ||||||
|   | |||||||
| @@ -82,7 +82,7 @@ ares_getopt(int nargc, char * const nargv[], const char *ostr) | |||||||
|         } |         } | ||||||
|     }                                         /* option letter okay? */ |     }                                         /* option letter okay? */ | ||||||
|     if ((optopt = (int)*place++) == (int)':' || |     if ((optopt = (int)*place++) == (int)':' || | ||||||
|         !(oli = strchr(ostr, optopt))) { |         (oli = strchr(ostr, optopt)) == NULL) { | ||||||
|         /* |         /* | ||||||
|          * if the user didn't specify '-' as an option, |          * if the user didn't specify '-' as an option, | ||||||
|          * assume it means EOF. |          * assume it means EOF. | ||||||
|   | |||||||
| @@ -1,6 +1,7 @@ | |||||||
| .\" $Id$ | .\" $Id$ | ||||||
| .\" | .\" | ||||||
| .\" Copyright 1998 by the Massachusetts Institute of Technology. | .\" Copyright 1998 by the Massachusetts Institute of Technology. | ||||||
|  | .\" Copyright (C) 2007-2008 by Daniel Stenberg | ||||||
| .\" | .\" | ||||||
| .\" Permission to use, copy, modify, and distribute this | .\" Permission to use, copy, modify, and distribute this | ||||||
| .\" software and its documentation for any purpose and without | .\" software and its documentation for any purpose and without | ||||||
| @@ -14,7 +15,7 @@ | |||||||
| .\" this software for any purpose.  It is provided "as is" | .\" this software for any purpose.  It is provided "as is" | ||||||
| .\" without express or implied warranty. | .\" without express or implied warranty. | ||||||
| .\" | .\" | ||||||
| .TH ARES_INIT 3 "7 December 2004" | .TH ARES_INIT 3 "13 May 2008" | ||||||
| .SH NAME | .SH NAME | ||||||
| ares_init, ares_init_options \- Initialize a resolver channel | ares_init, ares_init_options \- Initialize a resolver channel | ||||||
| .SH SYNOPSIS | .SH SYNOPSIS | ||||||
| @@ -49,10 +50,22 @@ description of possible flag values. | |||||||
| .B ARES_OPT_TIMEOUT | .B ARES_OPT_TIMEOUT | ||||||
| .B int \fItimeout\fP; | .B int \fItimeout\fP; | ||||||
| .br | .br | ||||||
| The number of seconds each name server is given to respond to a query | The number of seconds each name server is given to respond to a query on the | ||||||
| on the first try.  (After the first try, the timeout algorithm becomes | first try.  (After the first try, the timeout algorithm becomes more | ||||||
| more complicated, but scales linearly with the value of | complicated, but scales linearly with the value of \fItimeout\fP.)  The | ||||||
| \fItimeout\fP.)  The default is five seconds. | default is five seconds. This option is being deprecated by | ||||||
|  | \fIARES_OPT_TIMEOUTMS\fP starting in c-ares 1.5.2. | ||||||
|  | .TP 18 | ||||||
|  | .B ARES_OPT_TIMEOUTMS | ||||||
|  | .B int \fItimeout\fP; | ||||||
|  | .br | ||||||
|  | The number of milliseconds each name server is given to respond to a query on | ||||||
|  | the first try.  (After the first try, the timeout algorithm becomes more | ||||||
|  | complicated, but scales linearly with the value of \fItimeout\fP.)  The | ||||||
|  | default is five seconds. Note that this option is specified with the same | ||||||
|  | struct field as the former \fIARES_OPT_TIMEOUT\fP, it is but the option bits | ||||||
|  | that tell c-ares how to interpret the number. This option was added in c-ares | ||||||
|  | 1.5.2. | ||||||
| .TP 18 | .TP 18 | ||||||
| .B ARES_OPT_TRIES | .B ARES_OPT_TRIES | ||||||
| .B int \fItries\fP; | .B int \fItries\fP; | ||||||
|   | |||||||
							
								
								
									
										265
									
								
								ares/ares_init.c
									
									
									
									
									
								
							
							
						
						
									
										265
									
								
								ares/ares_init.c
									
									
									
									
									
								
							| @@ -1,6 +1,7 @@ | |||||||
| /* $Id$ */ | /* $Id$ */ | ||||||
|  |  | ||||||
| /* Copyright 1998 by the Massachusetts Institute of Technology. | /* Copyright 1998 by the Massachusetts Institute of Technology. | ||||||
|  |  * Copyright (C) 2007-2008 by Daniel Stenberg | ||||||
|  * |  * | ||||||
|  * Permission to use, copy, modify, and distribute this |  * Permission to use, copy, modify, and distribute this | ||||||
|  * software and its documentation for any purpose and without |  * software and its documentation for any purpose and without | ||||||
| @@ -18,11 +19,10 @@ | |||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) | #if defined(WIN32) && !defined(WATT32) | ||||||
| #include "nameser.h" |  | ||||||
| #include <iphlpapi.h> | #include <iphlpapi.h> | ||||||
| #include <malloc.h> | #include <malloc.h> | ||||||
|  | #endif | ||||||
|  |  | ||||||
| #else |  | ||||||
| #ifdef HAVE_SYS_PARAM_H | #ifdef HAVE_SYS_PARAM_H | ||||||
| #include <sys/param.h> | #include <sys/param.h> | ||||||
| #endif | #endif | ||||||
| @@ -35,20 +35,30 @@ | |||||||
| #include <sys/socket.h> | #include <sys/socket.h> | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | #ifdef HAVE_NETINET_IN_H | ||||||
| #include <netinet/in.h> | #include <netinet/in.h> | ||||||
| #include <arpa/inet.h> |  | ||||||
| #include <netdb.h> |  | ||||||
| #include <arpa/nameser.h> |  | ||||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H |  | ||||||
| #include <arpa/nameser_compat.h> |  | ||||||
| #endif | #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 | #ifdef HAVE_UNISTD_H | ||||||
| #include <unistd.h> | #include <unistd.h> | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_PROCESS_H |  | ||||||
| #include <process.h>  /* Some have getpid() here */ |  | ||||||
| #endif |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| @@ -57,8 +67,8 @@ | |||||||
| #include <time.h> | #include <time.h> | ||||||
| #include <errno.h> | #include <errno.h> | ||||||
| #include "ares.h" | #include "ares.h" | ||||||
| #include "ares_private.h" |  | ||||||
| #include "inet_net_pton.h" | #include "inet_net_pton.h" | ||||||
|  | #include "ares_private.h" | ||||||
|  |  | ||||||
| #ifdef WATT32 | #ifdef WATT32 | ||||||
| #undef WIN32  /* Redefined in MingW/MSVC headers */ | #undef WIN32  /* Redefined in MingW/MSVC headers */ | ||||||
| @@ -107,6 +117,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options, | |||||||
|   int i; |   int i; | ||||||
|   int status = ARES_SUCCESS; |   int status = ARES_SUCCESS; | ||||||
|   struct server_state *server; |   struct server_state *server; | ||||||
|  |   struct timeval now; | ||||||
|  |  | ||||||
| #ifdef CURLDEBUG | #ifdef CURLDEBUG | ||||||
|   const char *env = getenv("CARES_MEMDEBUG"); |   const char *env = getenv("CARES_MEMDEBUG"); | ||||||
| @@ -124,6 +135,8 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options, | |||||||
|     return ARES_ENOMEM; |     return ARES_ENOMEM; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   now = ares__tvnow(); | ||||||
|  |  | ||||||
|   /* Set everything to distinguished values so we know they haven't |   /* Set everything to distinguished values so we know they haven't | ||||||
|    * been set yet. |    * been set yet. | ||||||
|    */ |    */ | ||||||
| @@ -131,6 +144,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options, | |||||||
|   channel->timeout = -1; |   channel->timeout = -1; | ||||||
|   channel->tries = -1; |   channel->tries = -1; | ||||||
|   channel->ndots = -1; |   channel->ndots = -1; | ||||||
|  |   channel->rotate = -1; | ||||||
|   channel->udp_port = -1; |   channel->udp_port = -1; | ||||||
|   channel->tcp_port = -1; |   channel->tcp_port = -1; | ||||||
|   channel->socket_send_buffer_size = -1; |   channel->socket_send_buffer_size = -1; | ||||||
| @@ -146,7 +160,8 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options, | |||||||
|   channel->sock_state_cb = NULL; |   channel->sock_state_cb = NULL; | ||||||
|   channel->sock_state_cb_data = NULL; |   channel->sock_state_cb_data = NULL; | ||||||
|  |  | ||||||
|   channel->last_timeout_processed = (long)time(NULL); |   channel->last_server = 0; | ||||||
|  |   channel->last_timeout_processed = (time_t)now.tv_sec; | ||||||
|  |  | ||||||
|   /* Initialize our lists of queries */ |   /* Initialize our lists of queries */ | ||||||
|   ares__init_list_head(&(channel->all_queries)); |   ares__init_list_head(&(channel->all_queries)); | ||||||
| @@ -254,13 +269,16 @@ int ares_save_options(ares_channel channel, struct ares_options *options, | |||||||
|   if (!ARES_CONFIG_CHECK(channel)) |   if (!ARES_CONFIG_CHECK(channel)) | ||||||
|     return ARES_ENODATA; |     return ARES_ENODATA; | ||||||
|  |  | ||||||
|   (*optmask) = (ARES_OPT_FLAGS|ARES_OPT_TIMEOUT|ARES_OPT_TRIES|ARES_OPT_NDOTS| |   (*optmask) = (ARES_OPT_FLAGS|ARES_OPT_TRIES|ARES_OPT_NDOTS| | ||||||
|                 ARES_OPT_UDP_PORT|ARES_OPT_TCP_PORT|ARES_OPT_SOCK_STATE_CB| |                 ARES_OPT_UDP_PORT|ARES_OPT_TCP_PORT|ARES_OPT_SOCK_STATE_CB| | ||||||
|                 ARES_OPT_SERVERS|ARES_OPT_DOMAINS|ARES_OPT_LOOKUPS| |                 ARES_OPT_SERVERS|ARES_OPT_DOMAINS|ARES_OPT_LOOKUPS| | ||||||
|                 ARES_OPT_SORTLIST); |                 ARES_OPT_SORTLIST|ARES_OPT_TIMEOUTMS); | ||||||
|  |  | ||||||
|   /* Copy easy stuff */ |   /* Copy easy stuff */ | ||||||
|   options->flags   = channel->flags; |   options->flags   = channel->flags; | ||||||
|  |  | ||||||
|  |   /* We return full millisecond resolution but that's only because we don't | ||||||
|  |      set the ARES_OPT_TIMEOUT anymore, only the new ARES_OPT_TIMEOUTMS */ | ||||||
|   options->timeout = channel->timeout; |   options->timeout = channel->timeout; | ||||||
|   options->tries   = channel->tries; |   options->tries   = channel->tries; | ||||||
|   options->ndots   = channel->ndots; |   options->ndots   = channel->ndots; | ||||||
| @@ -328,12 +346,16 @@ static int init_by_options(ares_channel channel, | |||||||
|   /* Easy stuff. */ |   /* Easy stuff. */ | ||||||
|   if ((optmask & ARES_OPT_FLAGS) && channel->flags == -1) |   if ((optmask & ARES_OPT_FLAGS) && channel->flags == -1) | ||||||
|     channel->flags = options->flags; |     channel->flags = options->flags; | ||||||
|   if ((optmask & ARES_OPT_TIMEOUT) && channel->timeout == -1) |   if ((optmask & ARES_OPT_TIMEOUTMS) && channel->timeout == -1) | ||||||
|     channel->timeout = options->timeout; |     channel->timeout = options->timeout; | ||||||
|  |   else if ((optmask & ARES_OPT_TIMEOUT) && channel->timeout == -1) | ||||||
|  |     channel->timeout = options->timeout * 1000; | ||||||
|   if ((optmask & ARES_OPT_TRIES) && channel->tries == -1) |   if ((optmask & ARES_OPT_TRIES) && channel->tries == -1) | ||||||
|     channel->tries = options->tries; |     channel->tries = options->tries; | ||||||
|   if ((optmask & ARES_OPT_NDOTS) && channel->ndots == -1) |   if ((optmask & ARES_OPT_NDOTS) && channel->ndots == -1) | ||||||
|     channel->ndots = options->ndots; |     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) |   if ((optmask & ARES_OPT_UDP_PORT) && channel->udp_port == -1) | ||||||
|     channel->udp_port = options->udp_port; |     channel->udp_port = options->udp_port; | ||||||
|   if ((optmask & ARES_OPT_TCP_PORT) && channel->tcp_port == -1) |   if ((optmask & ARES_OPT_TCP_PORT) && channel->tcp_port == -1) | ||||||
| @@ -666,7 +688,7 @@ DhcpNameServer | |||||||
|       { |       { | ||||||
|         if (bytes) |         if (bytes) | ||||||
|         { |         { | ||||||
|           line = (char *)malloc(bytes+1); |           line = malloc(bytes+1); | ||||||
|           if (RegQueryValueEx(mykey, NAMESERVER, NULL, &data_type, |           if (RegQueryValueEx(mykey, NAMESERVER, NULL, &data_type, | ||||||
|                               (unsigned char *)line, &bytes) == |                               (unsigned char *)line, &bytes) == | ||||||
|               ERROR_SUCCESS) |               ERROR_SUCCESS) | ||||||
| @@ -903,7 +925,8 @@ okay: | |||||||
|  |  | ||||||
| static int init_by_defaults(ares_channel channel) | static int init_by_defaults(ares_channel channel) | ||||||
| { | { | ||||||
|   char hostname[MAXHOSTNAMELEN + 1]; |   char *hostname = NULL; | ||||||
|  |   int rc = ARES_SUCCESS; | ||||||
|  |  | ||||||
|   if (channel->flags == -1) |   if (channel->flags == -1) | ||||||
|     channel->flags = 0; |     channel->flags = 0; | ||||||
| @@ -913,58 +936,110 @@ static int init_by_defaults(ares_channel channel) | |||||||
|     channel->tries = DEFAULT_TRIES; |     channel->tries = DEFAULT_TRIES; | ||||||
|   if (channel->ndots == -1) |   if (channel->ndots == -1) | ||||||
|     channel->ndots = 1; |     channel->ndots = 1; | ||||||
|  |   if (channel->rotate == -1) | ||||||
|  |     channel->rotate = 0; | ||||||
|   if (channel->udp_port == -1) |   if (channel->udp_port == -1) | ||||||
|     channel->udp_port = htons(NAMESERVER_PORT); |     channel->udp_port = htons(NAMESERVER_PORT); | ||||||
|   if (channel->tcp_port == -1) |   if (channel->tcp_port == -1) | ||||||
|     channel->tcp_port = htons(NAMESERVER_PORT); |     channel->tcp_port = htons(NAMESERVER_PORT); | ||||||
|  |  | ||||||
|   if (channel->nservers == -1) |   if (channel->nservers == -1) { | ||||||
|     { |     /* If nobody specified servers, try a local named. */ | ||||||
|       /* If nobody specified servers, try a local named. */ |     channel->servers = malloc(sizeof(struct server_state)); | ||||||
|       channel->servers = malloc(sizeof(struct server_state)); |     if (!channel->servers) { | ||||||
|       if (!channel->servers) |       rc = ARES_ENOMEM; | ||||||
|         return ARES_ENOMEM; |       goto error; | ||||||
|       channel->servers[0].addr.s_addr = htonl(INADDR_LOOPBACK); |     } | ||||||
|       channel->nservers = 1; |     channel->servers[0].addr.s_addr = htonl(INADDR_LOOPBACK); | ||||||
|  |     channel->nservers = 1; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  | #ifdef ENAMETOOLONG | ||||||
|  | #define toolong(x) (x == -1) && ((ENAMETOOLONG == errno) || (EINVAL == errno)) | ||||||
|  | #else | ||||||
|  | #define toolong(x) (x == -1) && (EINVAL == errno) | ||||||
|  | #endif | ||||||
|  |  | ||||||
|  |   if (channel->ndomains == -1) { | ||||||
|  |     /* Derive a default domain search list from the kernel hostname, | ||||||
|  |      * or set it to empty if the hostname isn't helpful. | ||||||
|  |      */ | ||||||
|  |     size_t len = 64; | ||||||
|  |     int res; | ||||||
|  |  | ||||||
|  |     hostname = malloc(len); | ||||||
|  |     if(!hostname) { | ||||||
|  |       rc = ARES_ENOMEM; | ||||||
|  |       goto error; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   if (channel->ndomains == -1) |     do { | ||||||
|     { |       res = gethostname(hostname, len); | ||||||
|       /* Derive a default domain search list from the kernel hostname, |  | ||||||
|        * or set it to empty if the hostname isn't helpful. |       if(toolong(res)) { | ||||||
|        */ |         char *p; | ||||||
|       if (gethostname(hostname, sizeof(hostname)) == -1 |         len *= 2; | ||||||
|           || !strchr(hostname, '.')) |         p = realloc(hostname, len); | ||||||
|         { |         if(!p) { | ||||||
|           channel->ndomains = 0; |           rc = ARES_ENOMEM; | ||||||
|  |           goto error; | ||||||
|         } |         } | ||||||
|       else |         hostname = p; | ||||||
|         { |         continue; | ||||||
|           channel->domains = malloc(sizeof(char *)); |       } | ||||||
|           if (!channel->domains) |       else if(res) { | ||||||
|             return ARES_ENOMEM; |         rc = ARES_EBADNAME; | ||||||
|           channel->ndomains = 0; |         goto error; | ||||||
|           channel->domains[0] = strdup(strchr(hostname, '.') + 1); |       } | ||||||
|           if (!channel->domains[0]) |  | ||||||
|             return ARES_ENOMEM; |  | ||||||
|           channel->ndomains = 1; |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|   if (channel->nsort == -1) |     } while(0); | ||||||
|     { |  | ||||||
|       channel->sortlist = NULL; |  | ||||||
|       channel->nsort = 0; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|   if (!channel->lookups) |     channel->ndomains = 0; /* default to none */ | ||||||
|     { |     if (strchr(hostname, '.'))  { | ||||||
|       channel->lookups = strdup("fb"); |       /* a dot was found */ | ||||||
|       if (!channel->lookups) |  | ||||||
|         return ARES_ENOMEM; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|   return ARES_SUCCESS; |       channel->domains = malloc(sizeof(char *)); | ||||||
|  |       if (!channel->domains) { | ||||||
|  |         rc = ARES_ENOMEM; | ||||||
|  |         goto error; | ||||||
|  |       } | ||||||
|  |       channel->domains[0] = strdup(strchr(hostname, '.') + 1); | ||||||
|  |       if (!channel->domains[0]) { | ||||||
|  |         rc = ARES_ENOMEM; | ||||||
|  |         goto error; | ||||||
|  |       } | ||||||
|  |       channel->ndomains = 1; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   if (channel->nsort == -1) { | ||||||
|  |     channel->sortlist = NULL; | ||||||
|  |     channel->nsort = 0; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   if (!channel->lookups) { | ||||||
|  |     channel->lookups = strdup("fb"); | ||||||
|  |     if (!channel->lookups) | ||||||
|  |       rc = ARES_ENOMEM; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   error: | ||||||
|  |   if(rc) { | ||||||
|  |     if(channel->servers) | ||||||
|  |       free(channel->servers); | ||||||
|  |  | ||||||
|  |     if(channel->domains && channel->domains[0]) | ||||||
|  |       free(channel->domains[0]); | ||||||
|  |     if(channel->domains) | ||||||
|  |       free(channel->domains); | ||||||
|  |     if(channel->lookups) | ||||||
|  |       free(channel->lookups); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   if(hostname) | ||||||
|  |     free(hostname); | ||||||
|  |  | ||||||
|  |   return rc; | ||||||
| } | } | ||||||
|  |  | ||||||
| #ifndef WIN32 | #ifndef WIN32 | ||||||
| @@ -1233,6 +1308,9 @@ static int set_options(ares_channel channel, const char *str) | |||||||
|       val = try_option(p, q, "retry:"); |       val = try_option(p, q, "retry:"); | ||||||
|       if (val && channel->tries == -1) |       if (val && channel->tries == -1) | ||||||
|         channel->tries = atoi(val); |         channel->tries = atoi(val); | ||||||
|  |       val = try_option(p, q, "rotate"); | ||||||
|  |       if (val && channel->rotate == -1) | ||||||
|  |         channel->rotate = 1; | ||||||
|       p = q; |       p = q; | ||||||
|       while (ISSPACE(*p)) |       while (ISSPACE(*p)) | ||||||
|         p++; |         p++; | ||||||
| @@ -1245,22 +1323,67 @@ static int set_options(ares_channel channel, const char *str) | |||||||
| static char *try_config(char *s, const char *opt) | static char *try_config(char *s, const char *opt) | ||||||
| { | { | ||||||
|   size_t len; |   size_t len; | ||||||
|  |   ssize_t i; | ||||||
|  |   ssize_t j; | ||||||
|  |   char *p; | ||||||
|  |  | ||||||
|   len = strlen(opt); |   if (!s || !opt) | ||||||
|   if (strncmp(s, opt, len) != 0 || !ISSPACE(s[len])) |     /* no line or no option */ | ||||||
|     return NULL; |     return NULL; | ||||||
|   s += len; |  | ||||||
|   while (ISSPACE(*s)) |  | ||||||
|     s++; |  | ||||||
|   return s; |  | ||||||
| } |  | ||||||
|  |  | ||||||
|  |   /* trim line comment */ | ||||||
|  |   for (i = 0; s[i] && s[i] != '#'; ++i); | ||||||
|  |   s[i] = '\0'; | ||||||
|  |  | ||||||
|  |   /* trim trailing whitespace */ | ||||||
|  |   for (j = i-1; j >= 0 && ISSPACE(s[j]); --j); | ||||||
|  |   s[++j] = '\0'; | ||||||
|  |  | ||||||
|  |   /* skip leading whitespace */ | ||||||
|  |   for (i = 0; s[i] && ISSPACE(s[i]); ++i); | ||||||
|  |   p = &s[i]; | ||||||
|  |  | ||||||
|  |   if (!*p) | ||||||
|  |     /* empty line */ | ||||||
|  |     return NULL; | ||||||
|  |  | ||||||
|  |   if ((len = strlen(opt)) == 0) | ||||||
|  |     /* empty option */ | ||||||
|  |     return NULL; | ||||||
|  |  | ||||||
|  |   if (strncmp(p, opt, len) != 0) | ||||||
|  |     /* line and option do not match */ | ||||||
|  |     return NULL; | ||||||
|  |  | ||||||
|  |   /* skip over given option name */ | ||||||
|  |   p += len; | ||||||
|  |  | ||||||
|  |   if (!*p) | ||||||
|  |     /* no option value */ | ||||||
|  |     return NULL; | ||||||
|  |  | ||||||
|  |   if ((opt[len-1] != ':') && (opt[len-1] != '=') && !ISSPACE(*p)) | ||||||
|  |     /* whitespace between option name and value is mandatory | ||||||
|  |        for given option names which do not end with ':' or '=' */ | ||||||
|  |     return NULL; | ||||||
|  |  | ||||||
|  |   /* skip over whitespace */ | ||||||
|  |   while (*p && ISSPACE(*p)) | ||||||
|  |     p++; | ||||||
|  |  | ||||||
|  |   if (!*p) | ||||||
|  |     /* no option value */ | ||||||
|  |     return NULL; | ||||||
|  |  | ||||||
|  |   /* return pointer to option value */ | ||||||
|  |   return p; | ||||||
|  | } | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| static const char *try_option(const char *p, const char *q, const char *opt) | static const char *try_option(const char *p, const char *q, const char *opt) | ||||||
| { | { | ||||||
|   size_t len = strlen(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 | #ifndef WIN32 | ||||||
| @@ -1333,13 +1456,9 @@ static void randomize_key(unsigned char* key,int key_data_len) | |||||||
|   } |   } | ||||||
| #else /* !WIN32 */ | #else /* !WIN32 */ | ||||||
| #ifdef RANDOM_FILE | #ifdef RANDOM_FILE | ||||||
|   char buffer[256]; |  | ||||||
|   FILE *f = fopen(RANDOM_FILE, "rb"); |   FILE *f = fopen(RANDOM_FILE, "rb"); | ||||||
|   if(f) { |   if(f) { | ||||||
|     size_t i; |     counter = fread(key, 1, key_data_len, f); | ||||||
|     size_t rc = fread(buffer, key_data_len, 1, f); |  | ||||||
|     for(i=0; i<rc && counter < key_data_len; i++) |  | ||||||
|       key[counter++]=buffer[i]; |  | ||||||
|     fclose(f); |     fclose(f); | ||||||
|   } |   } | ||||||
| #endif | #endif | ||||||
| @@ -1363,11 +1482,11 @@ static int init_id_key(rc4_key* key,int key_data_len) | |||||||
|   if (!key_data_ptr) |   if (!key_data_ptr) | ||||||
|     return ARES_ENOMEM; |     return ARES_ENOMEM; | ||||||
|  |  | ||||||
|   randomize_key(key->state,key_data_len); |  | ||||||
|   state = &key->state[0]; |   state = &key->state[0]; | ||||||
|   for(counter = 0; counter < 256; counter++) |   for(counter = 0; counter < 256; counter++) | ||||||
|     /* unnecessary AND but it keeps some compilers happier */ |     /* unnecessary AND but it keeps some compilers happier */ | ||||||
|     state[counter] = (unsigned char)(counter & 0xff); |     state[counter] = (unsigned char)(counter & 0xff); | ||||||
|  |   randomize_key(key->state,key_data_len); | ||||||
|   key->x = 0; |   key->x = 0; | ||||||
|   key->y = 0; |   key->y = 0; | ||||||
|   index1 = 0; |   index1 = 0; | ||||||
|   | |||||||
| @@ -17,14 +17,16 @@ | |||||||
|  |  | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) | #ifdef HAVE_NETINET_IN_H | ||||||
| #include "nameser.h" | #  include <netinet/in.h> | ||||||
| #else |  | ||||||
| #include <netinet/in.h> |  | ||||||
| #include <arpa/nameser.h> |  | ||||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H |  | ||||||
| #include <arpa/nameser_compat.h> |  | ||||||
| #endif | #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 <stdlib.h> | ||||||
|   | |||||||
| @@ -17,17 +17,29 @@ | |||||||
|  |  | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) | #ifdef HAVE_SYS_SOCKET_H | ||||||
| #include "nameser.h" | #  include <sys/socket.h> | ||||||
| #else |  | ||||||
| #include <sys/socket.h> |  | ||||||
| #include <netinet/in.h> |  | ||||||
| #include <arpa/inet.h> |  | ||||||
| #include <netdb.h> |  | ||||||
| #include <arpa/nameser.h> |  | ||||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H |  | ||||||
| #include <arpa/nameser_compat.h> |  | ||||||
| #endif | #endif | ||||||
|  | #ifdef HAVE_NETINET_IN_H | ||||||
|  | #  include <netinet/in.h> | ||||||
|  | #endif | ||||||
|  | #ifdef HAVE_NETDB_H | ||||||
|  | #  include <netdb.h> | ||||||
|  | #endif | ||||||
|  | #ifdef HAVE_ARPA_INET_H | ||||||
|  | #  include <arpa/inet.h> | ||||||
|  | #endif | ||||||
|  | #ifdef HAVE_ARPA_NAMESER_H | ||||||
|  | #  include <arpa/nameser.h> | ||||||
|  | #else | ||||||
|  | #  include "nameser.h" | ||||||
|  | #endif | ||||||
|  | #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||||
|  | #  include <arpa/nameser_compat.h> | ||||||
|  | #endif | ||||||
|  |  | ||||||
|  | #ifdef HAVE_STRINGS_H | ||||||
|  | #  include <strings.h> | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
|   | |||||||
| @@ -17,19 +17,29 @@ | |||||||
|  |  | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) | #ifdef HAVE_SYS_SOCKET_H | ||||||
| #include "nameser.h" | #  include <sys/socket.h> | ||||||
| #else | #endif | ||||||
| #include <sys/socket.h> | #ifdef HAVE_NETINET_IN_H | ||||||
| #include <netinet/in.h> | #  include <netinet/in.h> | ||||||
| #include <arpa/inet.h> | #endif | ||||||
| #include <netdb.h> | #ifdef HAVE_NETDB_H | ||||||
|  | #  include <netdb.h> | ||||||
|  | #endif | ||||||
|  | #ifdef HAVE_ARPA_INET_H | ||||||
|  | #  include <arpa/inet.h> | ||||||
|  | #endif | ||||||
| #ifdef HAVE_ARPA_NAMESER_H | #ifdef HAVE_ARPA_NAMESER_H | ||||||
| #include <arpa/nameser.h> | #  include <arpa/nameser.h> | ||||||
|  | #else | ||||||
|  | #  include "nameser.h" | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||||
| #include <arpa/nameser_compat.h> | #  include <arpa/nameser_compat.h> | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | #ifdef HAVE_STRINGS_H | ||||||
|  | #  include <strings.h> | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
|   | |||||||
| @@ -20,17 +20,25 @@ | |||||||
|  |  | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) | #ifdef HAVE_SYS_SOCKET_H | ||||||
| #include "nameser.h" | #  include <sys/socket.h> | ||||||
| #else |  | ||||||
| #include <sys/socket.h> |  | ||||||
| #include <netinet/in.h> |  | ||||||
| #include <arpa/inet.h> |  | ||||||
| #include <netdb.h> |  | ||||||
| #include <arpa/nameser.h> |  | ||||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H |  | ||||||
| #include <arpa/nameser_compat.h> |  | ||||||
| #endif | #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 <stdlib.h> | #include <stdlib.h> | ||||||
|   | |||||||
| @@ -17,16 +17,26 @@ | |||||||
|  |  | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) | #ifdef HAVE_SYS_SOCKET_H | ||||||
| #include "nameser.h" | #  include <sys/socket.h> | ||||||
| #else |  | ||||||
| #include <sys/socket.h> |  | ||||||
| #include <netinet/in.h> |  | ||||||
| #include <netdb.h> |  | ||||||
| #include <arpa/nameser.h> |  | ||||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H |  | ||||||
| #include <arpa/nameser_compat.h> |  | ||||||
| #endif | #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 | ||||||
|  |  | ||||||
|  | #ifdef HAVE_STRINGS_H | ||||||
|  | #  include <strings.h> | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| @@ -44,6 +54,8 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, | |||||||
|   const unsigned char *aptr; |   const unsigned char *aptr; | ||||||
|   char *ptrname, *hostname, *rr_name, *rr_data; |   char *ptrname, *hostname, *rr_name, *rr_data; | ||||||
|   struct hostent *hostent; |   struct hostent *hostent; | ||||||
|  |   int aliascnt = 0; | ||||||
|  |   char ** aliases; | ||||||
|  |  | ||||||
|   /* Set *host to NULL for all failure cases. */ |   /* Set *host to NULL for all failure cases. */ | ||||||
|   *host = NULL; |   *host = NULL; | ||||||
| @@ -72,6 +84,12 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, | |||||||
|  |  | ||||||
|   /* Examine each answer resource record (RR) in turn. */ |   /* Examine each answer resource record (RR) in turn. */ | ||||||
|   hostname = NULL; |   hostname = NULL; | ||||||
|  |   aliases = malloc(8 * sizeof(char *)); | ||||||
|  |   if (!aliases) | ||||||
|  |     { | ||||||
|  |       free(ptrname); | ||||||
|  |       return ARES_ENOMEM; | ||||||
|  |     } | ||||||
|   for (i = 0; i < (int)ancount; i++) |   for (i = 0; i < (int)ancount; i++) | ||||||
|     { |     { | ||||||
|       /* Decode the RR up to the data field. */ |       /* Decode the RR up to the data field. */ | ||||||
| @@ -99,6 +117,16 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, | |||||||
|           if (hostname) |           if (hostname) | ||||||
|             free(hostname); |             free(hostname); | ||||||
|           hostname = rr_data; |           hostname = rr_data; | ||||||
|  |           aliases[aliascnt] = malloc((strlen(rr_data)+1) * sizeof(char *)); | ||||||
|  |           if (!aliases[aliascnt]) | ||||||
|  |             { | ||||||
|  |               status = ARES_ENOMEM; | ||||||
|  |               break; | ||||||
|  |             } | ||||||
|  |           strncpy(aliases[aliascnt], rr_data, strlen(rr_data)+1); | ||||||
|  |           aliascnt++; | ||||||
|  |           if ((aliascnt%8)==0) | ||||||
|  |             aliases = realloc(aliases, (aliascnt/16+1) * sizeof(char *)); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|       if (rr_class == C_IN && rr_type == T_CNAME) |       if (rr_class == C_IN && rr_type == T_CNAME) | ||||||
| @@ -134,17 +162,20 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, | |||||||
|               hostent->h_addr_list[0] = malloc(addrlen); |               hostent->h_addr_list[0] = malloc(addrlen); | ||||||
|               if (hostent->h_addr_list[0]) |               if (hostent->h_addr_list[0]) | ||||||
|                 { |                 { | ||||||
|                   hostent->h_aliases = malloc(sizeof (char *)); |                   hostent->h_aliases = malloc((aliascnt+1) * sizeof (char *)); | ||||||
|                   if (hostent->h_aliases) |                   if (hostent->h_aliases) | ||||||
|                     { |                     { | ||||||
|                       /* Fill in the hostent and return successfully. */ |                       /* Fill in the hostent and return successfully. */ | ||||||
|                       hostent->h_name = hostname; |                       hostent->h_name = hostname; | ||||||
|                       hostent->h_aliases[0] = NULL; |                       for (i=0 ; i<aliascnt ; i++) | ||||||
|  |                         hostent->h_aliases[i] = aliases[i]; | ||||||
|  |                       hostent->h_aliases[aliascnt] = NULL; | ||||||
|                       hostent->h_addrtype = family; |                       hostent->h_addrtype = family; | ||||||
|                       hostent->h_length = addrlen; |                       hostent->h_length = addrlen; | ||||||
|                       memcpy(hostent->h_addr_list[0], addr, addrlen); |                       memcpy(hostent->h_addr_list[0], addr, addrlen); | ||||||
|                       hostent->h_addr_list[1] = NULL; |                       hostent->h_addr_list[1] = NULL; | ||||||
|                       *host = hostent; |                       *host = hostent; | ||||||
|  |                       free(aliases); | ||||||
|                       free(ptrname); |                       free(ptrname); | ||||||
|                       return ARES_SUCCESS; |                       return ARES_SUCCESS; | ||||||
|                     } |                     } | ||||||
| @@ -156,6 +187,10 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, | |||||||
|         } |         } | ||||||
|       status = ARES_ENOMEM; |       status = ARES_ENOMEM; | ||||||
|     } |     } | ||||||
|  |   for (i=0 ; i<aliascnt ; i++) | ||||||
|  |     if (aliases[i])  | ||||||
|  |       free(aliases[i]); | ||||||
|  |   free(aliases); | ||||||
|   if (hostname) |   if (hostname) | ||||||
|     free(hostname); |     free(hostname); | ||||||
|   free(ptrname); |   free(ptrname); | ||||||
|   | |||||||
| @@ -4,6 +4,7 @@ | |||||||
| /* $Id$ */ | /* $Id$ */ | ||||||
|  |  | ||||||
| /* Copyright 1998 by the Massachusetts Institute of Technology. | /* Copyright 1998 by the Massachusetts Institute of Technology. | ||||||
|  |  * Copyright (C) 2004-2008 by Daniel Stenberg | ||||||
|  * |  * | ||||||
|  * Permission to use, copy, modify, and distribute this |  * Permission to use, copy, modify, and distribute this | ||||||
|  * software and its documentation for any purpose and without |  * software and its documentation for any purpose and without | ||||||
| @@ -42,13 +43,14 @@ | |||||||
| #undef  closesocket | #undef  closesocket | ||||||
| #define closesocket(s)    close_s(s) | #define closesocket(s)    close_s(s) | ||||||
| #define writev(s,v,c)     writev_s(s,v,c) | #define writev(s,v,c)     writev_s(s,v,c) | ||||||
|  | #define HAVE_WRITEV 1 | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #ifdef NETWARE | #ifdef NETWARE | ||||||
| #include <time.h> | #include <time.h> | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #define DEFAULT_TIMEOUT         5 | #define DEFAULT_TIMEOUT         5000 /* milliseconds */ | ||||||
| #define DEFAULT_TRIES           4 | #define DEFAULT_TRIES           4 | ||||||
| #ifndef INADDR_NONE | #ifndef INADDR_NONE | ||||||
| #define INADDR_NONE 0xffffffff | #define INADDR_NONE 0xffffffff | ||||||
| @@ -93,6 +95,26 @@ | |||||||
| #include "ares_ipv6.h" | #include "ares_ipv6.h" | ||||||
| #include "ares_llist.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 query; | ||||||
|  |  | ||||||
| struct send_request { | struct send_request { | ||||||
| @@ -149,7 +171,7 @@ struct server_state { | |||||||
| struct query { | struct query { | ||||||
|   /* Query ID from qbuf, for faster lookup, and current timeout */ |   /* Query ID from qbuf, for faster lookup, and current timeout */ | ||||||
|   unsigned short qid; |   unsigned short qid; | ||||||
|   time_t timeout; |   struct timeval timeout; | ||||||
|  |  | ||||||
|   /* |   /* | ||||||
|    * Links for the doubly-linked lists in which we insert a query. |    * Links for the doubly-linked lists in which we insert a query. | ||||||
| @@ -173,8 +195,8 @@ struct query { | |||||||
|   void *arg; |   void *arg; | ||||||
|  |  | ||||||
|   /* Query status */ |   /* Query status */ | ||||||
|   int try; |   int try; /* Number of times we tried this query already. */ | ||||||
|   int server; |   int server; /* Server this query has last been sent to. */ | ||||||
|   struct query_server_info *server_info;   /* per-server state */ |   struct query_server_info *server_info;   /* per-server state */ | ||||||
|   int using_tcp; |   int using_tcp; | ||||||
|   int error_status; |   int error_status; | ||||||
| @@ -217,9 +239,10 @@ typedef struct rc4_key | |||||||
| struct ares_channeldata { | struct ares_channeldata { | ||||||
|   /* Configuration data */ |   /* Configuration data */ | ||||||
|   int flags; |   int flags; | ||||||
|   int timeout; |   int timeout; /* in milliseconds */ | ||||||
|   int tries; |   int tries; | ||||||
|   int ndots; |   int ndots; | ||||||
|  |   int rotate; /* if true, all servers specified are used */ | ||||||
|   int udp_port; |   int udp_port; | ||||||
|   int tcp_port; |   int tcp_port; | ||||||
|   int socket_send_buffer_size; |   int socket_send_buffer_size; | ||||||
| @@ -242,9 +265,13 @@ struct ares_channeldata { | |||||||
|   /* Generation number to use for the next TCP socket open/close */ |   /* Generation number to use for the next TCP socket open/close */ | ||||||
|   int tcp_connection_generation; |   int tcp_connection_generation; | ||||||
|  |  | ||||||
|   /* The time at which we last called process_timeouts() */ |   /* The time at which we last called process_timeouts(). Uses integer seconds | ||||||
|  |      just to draw the line somewhere. */ | ||||||
|   time_t last_timeout_processed; |   time_t last_timeout_processed; | ||||||
|  |  | ||||||
|  |   /* Last server we sent a query to. */ | ||||||
|  |   int last_server; | ||||||
|  |  | ||||||
|   /* Circular, doubly-linked list of queries, bucketed various ways.... */ |   /* Circular, doubly-linked list of queries, bucketed various ways.... */ | ||||||
|   /* All active queries in a single list: */ |   /* All active queries in a single list: */ | ||||||
|   struct list_node all_queries; |   struct list_node all_queries; | ||||||
| @@ -259,13 +286,27 @@ struct ares_channeldata { | |||||||
|   void *sock_state_cb_data; |   void *sock_state_cb_data; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | /* return true if now is exactly check time or later */ | ||||||
|  | int ares__timedout(struct timeval *now, | ||||||
|  |                    struct timeval *check); | ||||||
|  | /* add the specific number of milliseconds to the time in the first argument */ | ||||||
|  | int ares__timeadd(struct timeval *now, | ||||||
|  |                   int millisecs); | ||||||
|  | /* return time offset between now and (future) check, in milliseconds */ | ||||||
|  | long ares__timeoffset(struct timeval *now, | ||||||
|  |                       struct timeval *check); | ||||||
| void ares__rc4(rc4_key* key,unsigned char *buffer_ptr, int buffer_len); | void ares__rc4(rc4_key* key,unsigned char *buffer_ptr, int buffer_len); | ||||||
| void ares__send_query(ares_channel channel, struct query *query, time_t now); | void ares__send_query(ares_channel channel, struct query *query, | ||||||
|  |                       struct timeval *now); | ||||||
| void ares__close_sockets(ares_channel channel, struct server_state *server); | void ares__close_sockets(ares_channel channel, struct server_state *server); | ||||||
| int ares__get_hostent(FILE *fp, int family, struct hostent **host); | int ares__get_hostent(FILE *fp, int family, struct hostent **host); | ||||||
| int ares__read_line(FILE *fp, char **buf, int *bufsize); | int ares__read_line(FILE *fp, char **buf, int *bufsize); | ||||||
| void ares__free_query(struct query *query); | void ares__free_query(struct query *query); | ||||||
| short ares__generate_new_id(rc4_key* key); | short ares__generate_new_id(rc4_key* key); | ||||||
|  | struct timeval ares__tvnow(void); | ||||||
|  | #if 0 /* Not used */ | ||||||
|  | long ares__tvdiff(struct timeval t1, struct timeval t2); | ||||||
|  | #endif | ||||||
|  |  | ||||||
| #define ARES_SWAP_BYTE(a,b) \ | #define ARES_SWAP_BYTE(a,b) \ | ||||||
|   { unsigned char swapByte = *(a);  *(a) = *(b);  *(b) = swapByte; } |   { unsigned char swapByte = *(a);  *(a) = *(b);  *(b) = swapByte; } | ||||||
|   | |||||||
| @@ -1,6 +1,7 @@ | |||||||
| /* $Id$ */ | /* $Id$ */ | ||||||
|  |  | ||||||
| /* Copyright 1998 by the Massachusetts Institute of Technology. | /* Copyright 1998 by the Massachusetts Institute of Technology. | ||||||
|  |  * Copyright (C) 2004-2008 by Daniel Stenberg | ||||||
|  * |  * | ||||||
|  * Permission to use, copy, modify, and distribute this |  * Permission to use, copy, modify, and distribute this | ||||||
|  * software and its documentation for any purpose and without |  * software and its documentation for any purpose and without | ||||||
| @@ -17,41 +18,45 @@ | |||||||
|  |  | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) |  | ||||||
| #include "nameser.h" |  | ||||||
|  |  | ||||||
| #else |  | ||||||
| #ifdef HAVE_SYS_SOCKET_H | #ifdef HAVE_SYS_SOCKET_H | ||||||
| #include <sys/socket.h> | #  include <sys/socket.h> | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_SYS_UIO_H | #ifdef HAVE_SYS_UIO_H | ||||||
| #include <sys/uio.h> | #  include <sys/uio.h> | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_NETINET_IN_H | #ifdef HAVE_NETINET_IN_H | ||||||
| #include <netinet/in.h> /* <netinet/tcp.h> may need it */ | #  include <netinet/in.h> | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_NETINET_TCP_H | #ifdef HAVE_NETINET_TCP_H | ||||||
| #include <netinet/tcp.h> /* for TCP_NODELAY */ | #  include <netinet/tcp.h> | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_NETDB_H | #ifdef HAVE_NETDB_H | ||||||
| #include <netdb.h> | #  include <netdb.h> | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_ARPA_NAMESER_H | #ifdef HAVE_ARPA_NAMESER_H | ||||||
| #include <arpa/nameser.h> | #  include <arpa/nameser.h> | ||||||
|  | #else | ||||||
|  | #  include "nameser.h" | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H | #ifdef HAVE_ARPA_NAMESER_COMPAT_H | ||||||
| #include <arpa/nameser_compat.h> | #  include <arpa/nameser_compat.h> | ||||||
| #endif | #endif | ||||||
| #endif /* WIN32 && !WATT32 */ |  | ||||||
|  |  | ||||||
|  | #ifdef HAVE_SYS_TIME_H | ||||||
|  | #  include <sys/time.h> | ||||||
|  | #endif | ||||||
|  |  | ||||||
|  | #ifdef HAVE_STRINGS_H | ||||||
|  | #  include <strings.h> | ||||||
|  | #endif | ||||||
| #ifdef HAVE_UNISTD_H | #ifdef HAVE_UNISTD_H | ||||||
| #include <unistd.h> | #  include <unistd.h> | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_SYS_IOCTL_H | #ifdef HAVE_SYS_IOCTL_H | ||||||
| #include <sys/ioctl.h> | #  include <sys/ioctl.h> | ||||||
| #endif | #endif | ||||||
| #ifdef NETWARE | #ifdef NETWARE | ||||||
| #include <sys/filio.h> | #  include <sys/filio.h> | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #include <assert.h> | #include <assert.h> | ||||||
| @@ -68,21 +73,25 @@ | |||||||
|  |  | ||||||
| static int try_again(int errnum); | static int try_again(int errnum); | ||||||
| static void write_tcp_data(ares_channel channel, fd_set *write_fds, | static void write_tcp_data(ares_channel channel, fd_set *write_fds, | ||||||
|                            ares_socket_t write_fd, time_t now); |                            ares_socket_t write_fd, struct timeval *now); | ||||||
| static void read_tcp_data(ares_channel channel, fd_set *read_fds, | static void read_tcp_data(ares_channel channel, fd_set *read_fds, | ||||||
|                           ares_socket_t read_fd, time_t now); |                           ares_socket_t read_fd, struct timeval *now); | ||||||
| static void read_udp_packets(ares_channel channel, fd_set *read_fds, | static void read_udp_packets(ares_channel channel, fd_set *read_fds, | ||||||
|                              ares_socket_t read_fd, time_t now); |                              ares_socket_t read_fd, struct timeval *now); | ||||||
| static void advance_tcp_send_queue(ares_channel channel, int whichserver, | static void advance_tcp_send_queue(ares_channel channel, int whichserver, | ||||||
|                                    ssize_t num_bytes); |                                    ssize_t num_bytes); | ||||||
| static void process_timeouts(ares_channel channel, time_t now); | static void process_timeouts(ares_channel channel, struct timeval *now); | ||||||
| static void process_broken_connections(ares_channel channel, time_t now); | static void process_broken_connections(ares_channel channel, | ||||||
|  |                                        struct timeval *now); | ||||||
| static void process_answer(ares_channel channel, unsigned char *abuf, | static void process_answer(ares_channel channel, unsigned char *abuf, | ||||||
|                            int alen, int whichserver, int tcp, time_t now); |                            int alen, int whichserver, int tcp, | ||||||
| static void handle_error(ares_channel channel, int whichserver, time_t now); |                            struct timeval *now); | ||||||
|  | static void handle_error(ares_channel channel, int whichserver, | ||||||
|  |                          struct timeval *now); | ||||||
| static void skip_server(ares_channel channel, struct query *query, | static void skip_server(ares_channel channel, struct query *query, | ||||||
|                         int whichserver); |                         int whichserver); | ||||||
| static void next_server(ares_channel channel, struct query *query, time_t now); | static void next_server(ares_channel channel, struct query *query, | ||||||
|  |                         struct timeval *now); | ||||||
| static int configure_socket(int s, ares_channel channel); | static int configure_socket(int s, ares_channel channel); | ||||||
| static int open_tcp_socket(ares_channel channel, struct server_state *server); | static int open_tcp_socket(ares_channel channel, struct server_state *server); | ||||||
| static int open_udp_socket(ares_channel channel, struct server_state *server); | static int open_udp_socket(ares_channel channel, struct server_state *server); | ||||||
| @@ -91,19 +100,57 @@ static int same_questions(const unsigned char *qbuf, int qlen, | |||||||
| static void end_query(ares_channel channel, struct query *query, int status, | static void end_query(ares_channel channel, struct query *query, int status, | ||||||
|                       unsigned char *abuf, int alen); |                       unsigned char *abuf, int alen); | ||||||
|  |  | ||||||
|  | /* return true if now is exactly check time or later */ | ||||||
|  | int ares__timedout(struct timeval *now, | ||||||
|  |                    struct timeval *check) | ||||||
|  | { | ||||||
|  |   int secs = (now->tv_sec - check->tv_sec); | ||||||
|  |  | ||||||
|  |   if(secs > 0) | ||||||
|  |     return 1; /* yes, timed out */ | ||||||
|  |   if(secs < 0) | ||||||
|  |     return 0; /* nope, not timed out */ | ||||||
|  |  | ||||||
|  |   /* if the full seconds were identical, check the sub second parts */ | ||||||
|  |   return (now->tv_usec - check->tv_usec >= 0); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /* add the specific number of milliseconds to the time in the first argument */ | ||||||
|  | int ares__timeadd(struct timeval *now, | ||||||
|  |                   int millisecs) | ||||||
|  | { | ||||||
|  |   now->tv_sec += millisecs/1000; | ||||||
|  |   now->tv_usec += (millisecs%1000)*1000; | ||||||
|  |  | ||||||
|  |   if(now->tv_usec >= 1000000) { | ||||||
|  |     ++(now->tv_sec); | ||||||
|  |     now->tv_usec -= 1000000; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   return 0; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /* return time offset between now and (future) check, in milliseconds */ | ||||||
|  | long ares__timeoffset(struct timeval *now, | ||||||
|  |                       struct timeval *check) | ||||||
|  | { | ||||||
|  |   return (check->tv_sec - now->tv_sec)*1000 + | ||||||
|  |          (check->tv_usec - now->tv_usec)/1000; | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| /* Something interesting happened on the wire, or there was a timeout. | /* Something interesting happened on the wire, or there was a timeout. | ||||||
|  * See what's up and respond accordingly. |  * See what's up and respond accordingly. | ||||||
|  */ |  */ | ||||||
| void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds) | void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds) | ||||||
| { | { | ||||||
|   time_t now; |   struct timeval now = ares__tvnow(); | ||||||
|  |  | ||||||
|   time(&now); |   write_tcp_data(channel, write_fds, ARES_SOCKET_BAD, &now); | ||||||
|   write_tcp_data(channel, write_fds, ARES_SOCKET_BAD, now); |   read_tcp_data(channel, read_fds, ARES_SOCKET_BAD, &now); | ||||||
|   read_tcp_data(channel, read_fds, ARES_SOCKET_BAD, now); |   read_udp_packets(channel, read_fds, ARES_SOCKET_BAD, &now); | ||||||
|   read_udp_packets(channel, read_fds, ARES_SOCKET_BAD, now); |   process_timeouts(channel, &now); | ||||||
|   process_timeouts(channel, now); |   process_broken_connections(channel, &now); | ||||||
|   process_broken_connections(channel, now); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| /* Something interesting happened on the wire, or there was a timeout. | /* Something interesting happened on the wire, or there was a timeout. | ||||||
| @@ -114,13 +161,12 @@ void ares_process_fd(ares_channel channel, | |||||||
|                                                file descriptors */ |                                                file descriptors */ | ||||||
|                      ares_socket_t write_fd) |                      ares_socket_t write_fd) | ||||||
| { | { | ||||||
|   time_t now; |   struct timeval now = ares__tvnow(); | ||||||
|  |  | ||||||
|   time(&now); |   write_tcp_data(channel, NULL, write_fd, &now); | ||||||
|   write_tcp_data(channel, NULL, write_fd, now); |   read_tcp_data(channel, NULL, read_fd, &now); | ||||||
|   read_tcp_data(channel, NULL, read_fd, now); |   read_udp_packets(channel, NULL, read_fd, &now); | ||||||
|   read_udp_packets(channel, NULL, read_fd, now); |   process_timeouts(channel, &now); | ||||||
|   process_timeouts(channel, now); |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -155,7 +201,7 @@ static int try_again(int errnum) | |||||||
| static void write_tcp_data(ares_channel channel, | static void write_tcp_data(ares_channel channel, | ||||||
|                            fd_set *write_fds, |                            fd_set *write_fds, | ||||||
|                            ares_socket_t write_fd, |                            ares_socket_t write_fd, | ||||||
|                            time_t now) |                            struct timeval *now) | ||||||
| { | { | ||||||
|   struct server_state *server; |   struct server_state *server; | ||||||
|   struct send_request *sendreq; |   struct send_request *sendreq; | ||||||
| @@ -174,7 +220,8 @@ static void write_tcp_data(ares_channel channel, | |||||||
|       /* Make sure server has data to send and is selected in write_fds or |       /* Make sure server has data to send and is selected in write_fds or | ||||||
|          write_fd. */ |          write_fd. */ | ||||||
|       server = &channel->servers[i]; |       server = &channel->servers[i]; | ||||||
|       if (!server->qhead || server->tcp_socket == ARES_SOCKET_BAD || server->is_broken) |       if (!server->qhead || server->tcp_socket == ARES_SOCKET_BAD || | ||||||
|  |           server->is_broken) | ||||||
|         continue; |         continue; | ||||||
|  |  | ||||||
|       if(write_fds) { |       if(write_fds) { | ||||||
| @@ -278,7 +325,7 @@ static void advance_tcp_send_queue(ares_channel channel, int whichserver, | |||||||
|  * a packet if we finish reading one. |  * a packet if we finish reading one. | ||||||
|  */ |  */ | ||||||
| static void read_tcp_data(ares_channel channel, fd_set *read_fds, | static void read_tcp_data(ares_channel channel, fd_set *read_fds, | ||||||
|                           ares_socket_t read_fd, time_t now) |                           ares_socket_t read_fd, struct timeval *now) | ||||||
| { | { | ||||||
|   struct server_state *server; |   struct server_state *server; | ||||||
|   int i; |   int i; | ||||||
| @@ -374,12 +421,16 @@ static void read_tcp_data(ares_channel channel, fd_set *read_fds, | |||||||
|  |  | ||||||
| /* If any UDP sockets select true for reading, process them. */ | /* If any UDP sockets select true for reading, process them. */ | ||||||
| static void read_udp_packets(ares_channel channel, fd_set *read_fds, | static void read_udp_packets(ares_channel channel, fd_set *read_fds, | ||||||
|                              ares_socket_t read_fd, time_t now) |                              ares_socket_t read_fd, struct timeval *now) | ||||||
| { | { | ||||||
|   struct server_state *server; |   struct server_state *server; | ||||||
|   int i; |   int i; | ||||||
|   ssize_t count; |   ssize_t count; | ||||||
|   unsigned char buf[PACKETSZ + 1]; |   unsigned char buf[PACKETSZ + 1]; | ||||||
|  | #ifdef HAVE_RECVFROM | ||||||
|  |   struct sockaddr_in from; | ||||||
|  |   socklen_t fromlen; | ||||||
|  | #endif | ||||||
|  |  | ||||||
|   if(!read_fds && (read_fd == ARES_SOCKET_BAD)) |   if(!read_fds && (read_fd == ARES_SOCKET_BAD)) | ||||||
|     /* no possible action */ |     /* no possible action */ | ||||||
| @@ -413,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 |       /* To reduce event loop overhead, read and process as many | ||||||
|        * packets as we can. */ |        * packets as we can. */ | ||||||
|       do { |       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)); |         count = sread(server->udp_socket, buf, sizeof(buf)); | ||||||
|  | #endif | ||||||
|         if (count == -1 && try_again(SOCKERRNO)) |         if (count == -1 && try_again(SOCKERRNO)) | ||||||
|           continue; |           continue; | ||||||
|         else if (count <= 0) |         else if (count <= 0) | ||||||
|           handle_error(channel, i, now); |           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 |         else | ||||||
|           process_answer(channel, buf, (int)count, i, 0, now); |           process_answer(channel, buf, (int)count, i, 0, now); | ||||||
|        } while (count > 0); |        } while (count > 0); | ||||||
| @@ -425,7 +489,7 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds, | |||||||
| } | } | ||||||
|  |  | ||||||
| /* If any queries have timed out, note the timeout and move them on. */ | /* If any queries have timed out, note the timeout and move them on. */ | ||||||
| static void process_timeouts(ares_channel channel, time_t now) | static void process_timeouts(ares_channel channel, struct timeval *now) | ||||||
| { | { | ||||||
|   time_t t;  /* the time of the timeouts we're processing */ |   time_t t;  /* the time of the timeouts we're processing */ | ||||||
|   struct query *query; |   struct query *query; | ||||||
| @@ -438,14 +502,14 @@ static void process_timeouts(ares_channel channel, time_t now) | |||||||
|    * only a handful of requests that fall into the "now" bucket, so |    * only a handful of requests that fall into the "now" bucket, so | ||||||
|    * this should be quite quick. |    * this should be quite quick. | ||||||
|    */ |    */ | ||||||
|   for (t = channel->last_timeout_processed; t <= now; t++) |   for (t = channel->last_timeout_processed; t <= now->tv_sec; t++) | ||||||
|     { |     { | ||||||
|       list_head = &(channel->queries_by_timeout[t % ARES_TIMEOUT_TABLE_SIZE]); |       list_head = &(channel->queries_by_timeout[t % ARES_TIMEOUT_TABLE_SIZE]); | ||||||
|       for (list_node = list_head->next; list_node != list_head; ) |       for (list_node = list_head->next; list_node != list_head; ) | ||||||
|         { |         { | ||||||
|           query = list_node->data; |           query = list_node->data; | ||||||
|           list_node = list_node->next;  /* in case the query gets deleted */ |           list_node = list_node->next;  /* in case the query gets deleted */ | ||||||
|           if (query->timeout != 0 && now >= query->timeout) |           if (query->timeout.tv_sec && ares__timedout(now, &query->timeout)) | ||||||
|             { |             { | ||||||
|               query->error_status = ARES_ETIMEOUT; |               query->error_status = ARES_ETIMEOUT; | ||||||
|               ++query->timeouts; |               ++query->timeouts; | ||||||
| @@ -453,12 +517,13 @@ static void process_timeouts(ares_channel channel, time_t now) | |||||||
|             } |             } | ||||||
|         } |         } | ||||||
|      } |      } | ||||||
|   channel->last_timeout_processed = now; |   channel->last_timeout_processed = now->tv_sec; | ||||||
| } | } | ||||||
|  |  | ||||||
| /* Handle an answer from a server. */ | /* Handle an answer from a server. */ | ||||||
| static void process_answer(ares_channel channel, unsigned char *abuf, | static void process_answer(ares_channel channel, unsigned char *abuf, | ||||||
|                            int alen, int whichserver, int tcp, time_t now) |                            int alen, int whichserver, int tcp, | ||||||
|  |                            struct timeval *now) | ||||||
| { | { | ||||||
|   int tc, rcode; |   int tc, rcode; | ||||||
|   unsigned short id; |   unsigned short id; | ||||||
| @@ -536,7 +601,8 @@ static void process_answer(ares_channel channel, unsigned char *abuf, | |||||||
| } | } | ||||||
|  |  | ||||||
| /* Close all the connections that are no longer usable. */ | /* Close all the connections that are no longer usable. */ | ||||||
| static void process_broken_connections(ares_channel channel, time_t now) | static void process_broken_connections(ares_channel channel, | ||||||
|  |                                        struct timeval *now) | ||||||
| { | { | ||||||
|   int i; |   int i; | ||||||
|   for (i = 0; i < channel->nservers; i++) |   for (i = 0; i < channel->nservers; i++) | ||||||
| @@ -549,7 +615,8 @@ static void process_broken_connections(ares_channel channel, time_t now) | |||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| static void handle_error(ares_channel channel, int whichserver, time_t now) | static void handle_error(ares_channel channel, int whichserver, | ||||||
|  |                          struct timeval *now) | ||||||
| { | { | ||||||
|   struct server_state *server; |   struct server_state *server; | ||||||
|   struct query *query; |   struct query *query; | ||||||
| @@ -600,32 +667,36 @@ static void skip_server(ares_channel channel, struct query *query, | |||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| static void next_server(ares_channel channel, struct query *query, time_t now) | static void next_server(ares_channel channel, struct query *query, | ||||||
|  |                         struct timeval *now) | ||||||
| { | { | ||||||
|   /* Advance to the next server or try. */ |   /* We need to try each server channel->tries times. We have channel->nservers | ||||||
|   query->server++; |    * servers to try. In total, we need to do channel->nservers * channel->tries | ||||||
|   for (; query->try < channel->tries; query->try++) |    * 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; | ||||||
|  |  | ||||||
|  |       /* 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 | ||||||
|  |        * errors we encountered, or (3) we already sent this query | ||||||
|  |        * over this exact connection. | ||||||
|  |        */ | ||||||
|  |       if (!server->is_broken && | ||||||
|  |            !query->server_info[query->server].skip_server && | ||||||
|  |            !(query->using_tcp && | ||||||
|  |              (query->server_info[query->server].tcp_connection_generation == | ||||||
|  |               server->tcp_connection_generation))) | ||||||
|         { |         { | ||||||
|           struct server_state *server = &channel->servers[query->server]; |            ares__send_query(channel, query, now); | ||||||
|           /* We don't want to use this server if (1) we decided this |            return; | ||||||
|            * connection is broken, and thus about to be closed, (2) |  | ||||||
|            * we've decided to skip this server because of earlier |  | ||||||
|            * errors we encountered, or (3) we already sent this query |  | ||||||
|            * over this exact connection. |  | ||||||
|            */ |  | ||||||
|           if (!server->is_broken && |  | ||||||
|                !query->server_info[query->server].skip_server && |  | ||||||
|                !(query->using_tcp && |  | ||||||
|                  (query->server_info[query->server].tcp_connection_generation == |  | ||||||
|                   server->tcp_connection_generation))) |  | ||||||
|             { |  | ||||||
|                ares__send_query(channel, query, now); |  | ||||||
|                return; |  | ||||||
|             } |  | ||||||
|         } |         } | ||||||
|       query->server = 0; |  | ||||||
|  |  | ||||||
|       /* You might think that with TCP we only need one try. However, |       /* You might think that with TCP we only need one try. However, | ||||||
|        * even when using TCP, servers can time-out our connection just |        * even when using TCP, servers can time-out our connection just | ||||||
| @@ -634,10 +705,13 @@ static void next_server(ares_channel channel, struct query *query, time_t now) | |||||||
|        * tickle a bug that drops our request. |        * 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); |   end_query(channel, query, query->error_status, NULL, 0); | ||||||
| } | } | ||||||
|  |  | ||||||
| void ares__send_query(ares_channel channel, struct query *query, time_t now) | void ares__send_query(ares_channel channel, struct query *query, | ||||||
|  |                       struct timeval *now) | ||||||
| { | { | ||||||
|   struct send_request *sendreq; |   struct send_request *sendreq; | ||||||
|   struct server_state *server; |   struct server_state *server; | ||||||
| @@ -704,16 +778,16 @@ void ares__send_query(ares_channel channel, struct query *query, time_t now) | |||||||
|           return; |           return; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     query->timeout = now |     query->timeout = *now; | ||||||
|         + ((query->try == 0) ? channel->timeout |     ares__timeadd(&query->timeout, | ||||||
|            : channel->timeout << query->try / channel->nservers); |                   channel->timeout << (query->try / channel->nservers)); | ||||||
|     /* Keep track of queries bucketed by timeout, so we can process |     /* Keep track of queries bucketed by timeout, so we can process | ||||||
|      * timeout events quickly. |      * timeout events quickly. | ||||||
|      */ |      */ | ||||||
|     ares__remove_from_list(&(query->queries_by_timeout)); |     ares__remove_from_list(&(query->queries_by_timeout)); | ||||||
|     ares__insert_in_list( |     ares__insert_in_list( | ||||||
|         &(query->queries_by_timeout), |         &(query->queries_by_timeout), | ||||||
|         &(channel->queries_by_timeout[query->timeout % |         &(channel->queries_by_timeout[query->timeout.tv_sec % | ||||||
|                                       ARES_TIMEOUT_TABLE_SIZE])); |                                       ARES_TIMEOUT_TABLE_SIZE])); | ||||||
|  |  | ||||||
|     /* Keep track of queries bucketed by server, so we can process server |     /* Keep track of queries bucketed by server, so we can process server | ||||||
| @@ -836,7 +910,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server) | |||||||
|   /* Configure it. */ |   /* Configure it. */ | ||||||
|   if (configure_socket(s, channel) < 0) |   if (configure_socket(s, channel) < 0) | ||||||
|     { |     { | ||||||
|        close(s); |        closesocket(s); | ||||||
|        return -1; |        return -1; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -850,7 +924,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server) | |||||||
|   if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, |   if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, | ||||||
|                  (void *)&opt, sizeof(opt)) == -1) |                  (void *)&opt, sizeof(opt)) == -1) | ||||||
|     { |     { | ||||||
|        close(s); |        closesocket(s); | ||||||
|        return -1; |        return -1; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -859,14 +933,16 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server) | |||||||
|   sockin.sin_family = AF_INET; |   sockin.sin_family = AF_INET; | ||||||
|   sockin.sin_addr = server->addr; |   sockin.sin_addr = server->addr; | ||||||
|   sockin.sin_port = (unsigned short)(channel->tcp_port & 0xffff); |   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; |     { | ||||||
|  |       int err = SOCKERRNO; | ||||||
|  |  | ||||||
|     if (err != EINPROGRESS && err != EWOULDBLOCK) { |       if (err != EINPROGRESS && err != EWOULDBLOCK) | ||||||
|       closesocket(s); |         { | ||||||
|       return -1; |           closesocket(s); | ||||||
|  |           return -1; | ||||||
|  |         } | ||||||
|     } |     } | ||||||
|   } |  | ||||||
|  |  | ||||||
|   SOCK_STATE_CALLBACK(channel, s, 1, 0); |   SOCK_STATE_CALLBACK(channel, s, 1, 0); | ||||||
|   server->tcp_buffer_pos = 0; |   server->tcp_buffer_pos = 0; | ||||||
| @@ -888,7 +964,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server) | |||||||
|   /* Set the socket non-blocking. */ |   /* Set the socket non-blocking. */ | ||||||
|   if (configure_socket(s, channel) < 0) |   if (configure_socket(s, channel) < 0) | ||||||
|     { |     { | ||||||
|        close(s); |        closesocket(s); | ||||||
|        return -1; |        return -1; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -899,8 +975,13 @@ static int open_udp_socket(ares_channel channel, struct server_state *server) | |||||||
|   sockin.sin_port = (unsigned short)(channel->udp_port & 0xffff); |   sockin.sin_port = (unsigned short)(channel->udp_port & 0xffff); | ||||||
|   if (connect(s, (struct sockaddr *) &sockin, sizeof(sockin)) == -1) |   if (connect(s, (struct sockaddr *) &sockin, sizeof(sockin)) == -1) | ||||||
|     { |     { | ||||||
|       closesocket(s); |       int err = SOCKERRNO; | ||||||
|       return -1; |  | ||||||
|  |       if (err != EINPROGRESS && err != EWOULDBLOCK) | ||||||
|  |         { | ||||||
|  |           closesocket(s); | ||||||
|  |           return -1; | ||||||
|  |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   SOCK_STATE_CALLBACK(channel, s, 1, 0); |   SOCK_STATE_CALLBACK(channel, s, 1, 0); | ||||||
|   | |||||||
| @@ -17,14 +17,16 @@ | |||||||
|  |  | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) | #ifdef HAVE_NETINET_IN_H | ||||||
| #include "nameser.h" | #  include <netinet/in.h> | ||||||
| #else |  | ||||||
| #include <netinet/in.h> |  | ||||||
| #include <arpa/nameser.h> |  | ||||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H |  | ||||||
| #include <arpa/nameser_compat.h> |  | ||||||
| #endif | #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 <stdlib.h> | ||||||
|   | |||||||
| @@ -16,14 +16,15 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| #include <string.h> | #include <string.h> | ||||||
| #include <ctype.h> | #include <ctype.h> | ||||||
| #include <errno.h> | #include <errno.h> | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) | #ifdef HAVE_STRINGS_H | ||||||
| #include "nameser.h" | #  include <strings.h> | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #include "ares.h" | #include "ares.h" | ||||||
|   | |||||||
| @@ -17,14 +17,16 @@ | |||||||
|  |  | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) | #ifdef HAVE_NETINET_IN_H | ||||||
| #include "nameser.h" | #  include <netinet/in.h> | ||||||
| #else |  | ||||||
| #include <netinet/in.h> |  | ||||||
| #include <arpa/nameser.h> |  | ||||||
| #ifdef HAVE_ARPA_NAMESER_COMPAT_H |  | ||||||
| #include <arpa/nameser_compat.h> |  | ||||||
| #endif | #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 <stdlib.h> | ||||||
| @@ -39,7 +41,7 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, | |||||||
| { | { | ||||||
|   struct query *query; |   struct query *query; | ||||||
|   int i; |   int i; | ||||||
|   time_t now; |   struct timeval now; | ||||||
|  |  | ||||||
|   /* Verify that the query is at least long enough to hold the header. */ |   /* Verify that the query is at least long enough to hold the header. */ | ||||||
|   if (qlen < HFIXEDSZ || qlen >= (1 << 16)) |   if (qlen < HFIXEDSZ || qlen >= (1 << 16)) | ||||||
| @@ -74,7 +76,8 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, | |||||||
|  |  | ||||||
|   /* Compute the query ID.  Start with no timeout. */ |   /* Compute the query ID.  Start with no timeout. */ | ||||||
|   query->qid = (unsigned short)DNS_HEADER_QID(qbuf); |   query->qid = (unsigned short)DNS_HEADER_QID(qbuf); | ||||||
|   query->timeout = 0; |   query->timeout.tv_sec = 0; | ||||||
|  |   query->timeout.tv_usec = 0; | ||||||
|  |  | ||||||
|   /* Form the TCP query buffer by prepending qlen (as two |   /* Form the TCP query buffer by prepending qlen (as two | ||||||
|    * network-order bytes) to qbuf. |    * network-order bytes) to qbuf. | ||||||
| @@ -92,7 +95,13 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, | |||||||
|  |  | ||||||
|   /* Initialize query status. */ |   /* Initialize query status. */ | ||||||
|   query->try = 0; |   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++) |   for (i = 0; i < channel->nservers; i++) | ||||||
|     { |     { | ||||||
|       query->server_info[i].skip_server = 0; |       query->server_info[i].skip_server = 0; | ||||||
| @@ -107,17 +116,17 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, | |||||||
|   ares__init_list_node(&(query->queries_by_timeout), query); |   ares__init_list_node(&(query->queries_by_timeout), query); | ||||||
|   ares__init_list_node(&(query->queries_to_server),  query); |   ares__init_list_node(&(query->queries_to_server),  query); | ||||||
|   ares__init_list_node(&(query->all_queries),        query); |   ares__init_list_node(&(query->all_queries),        query); | ||||||
|         |  | ||||||
|   /* Chain the query into the list of all queries. */ |   /* Chain the query into the list of all queries. */ | ||||||
|   ares__insert_in_list(&(query->all_queries), &(channel->all_queries)); |   ares__insert_in_list(&(query->all_queries), &(channel->all_queries)); | ||||||
|   /* Keep track of queries bucketed by qid, so we can process DNS |   /* Keep track of queries bucketed by qid, so we can process DNS | ||||||
|    * responses quickly. |    * responses quickly. | ||||||
|    */ |    */ | ||||||
|   ares__insert_in_list( |   ares__insert_in_list( | ||||||
|       &(query->queries_by_qid), |     &(query->queries_by_qid), | ||||||
|       &(channel->queries_by_qid[query->qid % ARES_QID_TABLE_SIZE])); |     &(channel->queries_by_qid[query->qid % ARES_QID_TABLE_SIZE])); | ||||||
|  |  | ||||||
|   /* Perform the first query action. */ |   /* Perform the first query action. */ | ||||||
|   time(&now); |   now = ares__tvnow(); | ||||||
|   ares__send_query(channel, query, now); |   ares__send_query(channel, query, &now); | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										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 */ | ||||||
| @@ -37,16 +37,16 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv, | |||||||
|   struct query *query; |   struct query *query; | ||||||
|   struct list_node* list_head; |   struct list_node* list_head; | ||||||
|   struct list_node* list_node; |   struct list_node* list_node; | ||||||
|   time_t now; |   struct timeval now; | ||||||
|   time_t offset, min_offset; /* these use time_t since some 32 bit systems |   struct timeval nextstop; | ||||||
|                                 still use 64 bit time_t! (like VS2005) */ |   long offset, min_offset; | ||||||
|  |  | ||||||
|   /* No queries, no timeout (and no fetch of the current time). */ |   /* No queries, no timeout (and no fetch of the current time). */ | ||||||
|   if (ares__is_list_empty(&(channel->all_queries))) |   if (ares__is_list_empty(&(channel->all_queries))) | ||||||
|     return maxtv; |     return maxtv; | ||||||
|  |  | ||||||
|   /* Find the minimum timeout for the current set of queries. */ |   /* Find the minimum timeout for the current set of queries. */ | ||||||
|   time(&now); |   now = ares__tvnow(); | ||||||
|   min_offset = -1; |   min_offset = -1; | ||||||
|  |  | ||||||
|   list_head = &(channel->all_queries); |   list_head = &(channel->all_queries); | ||||||
| @@ -54,23 +54,26 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv, | |||||||
|        list_node = list_node->next) |        list_node = list_node->next) | ||||||
|     { |     { | ||||||
|       query = list_node->data; |       query = list_node->data; | ||||||
|       if (query->timeout == 0) |       if (query->timeout.tv_sec == 0) | ||||||
|         continue; |         continue; | ||||||
|       offset = query->timeout - now; |       offset = ares__timeoffset(&now, &query->timeout); | ||||||
|       if (offset < 0) |       if (offset < 0) | ||||||
|         offset = 0; |         offset = 0; | ||||||
|       if (min_offset == -1 || offset < min_offset) |       if (min_offset == -1 || offset < min_offset) | ||||||
|         min_offset = offset; |         min_offset = offset; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   /* If we found a minimum timeout and it's sooner than the one |   if(min_offset != -1) { | ||||||
|    * specified in maxtv (if any), return it.  Otherwise go with |     nextstop.tv_sec = min_offset/1000; | ||||||
|    * maxtv. |     nextstop.tv_usec = (min_offset%1000)*1000; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   /* If we found a minimum timeout and it's sooner than the one specified in | ||||||
|  |    * maxtv (if any), return it.  Otherwise go with maxtv. | ||||||
|    */ |    */ | ||||||
|   if (min_offset != -1 && (!maxtv || min_offset <= maxtv->tv_sec)) |   if (min_offset != -1 && (!maxtv || ares__timedout(maxtv, &nextstop))) | ||||||
|     { |     { | ||||||
|       tvbuf->tv_sec = (long)min_offset; |       *tvbuf = nextstop; | ||||||
|       tvbuf->tv_usec = 0; |  | ||||||
|       return tvbuf; |       return tvbuf; | ||||||
|     } |     } | ||||||
|   else |   else | ||||||
|   | |||||||
| @@ -5,11 +5,11 @@ | |||||||
|  |  | ||||||
| #define ARES_VERSION_MAJOR 1 | #define ARES_VERSION_MAJOR 1 | ||||||
| #define ARES_VERSION_MINOR 5 | #define ARES_VERSION_MINOR 5 | ||||||
| #define ARES_VERSION_PATCH 2 | #define ARES_VERSION_PATCH 4 | ||||||
| #define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\ | #define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\ | ||||||
|                        (ARES_VERSION_MINOR<<8)|\ |                        (ARES_VERSION_MINOR<<8)|\ | ||||||
|                        (ARES_VERSION_PATCH)) |                        (ARES_VERSION_PATCH)) | ||||||
| #define ARES_VERSION_STR "1.5.2-CVS" | #define ARES_VERSION_STR "1.5.4-CVS" | ||||||
|  |  | ||||||
| #ifdef  __cplusplus | #ifdef  __cplusplus | ||||||
| extern "C" { | 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 | #!/bin/sh | ||||||
|  |  | ||||||
| ${LIBTOOLIZE:-libtoolize} --copy --automake --force | ${LIBTOOLIZE:-libtoolize} --copy --automake --force | ||||||
| ${ACLOCAL:-aclocal} $ACLOCAL_FLAGS | ${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS | ||||||
| ${AUTOHEADER:-autoheader} | ${AUTOHEADER:-autoheader} | ||||||
| ${AUTOCONF:-autoconf} | ${AUTOCONF:-autoconf} | ||||||
| ${AUTOMAKE:-automake} --add-missing | ${AUTOMAKE:-automake} --add-missing | ||||||
|   | |||||||
| @@ -3,7 +3,7 @@ | |||||||
|  |  | ||||||
| /* $Id$ */ | /* $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 |  * Permission to use, copy, modify, and distribute this software and its | ||||||
|  * documentation for any purpose and without fee is hereby granted, provided |  * documentation for any purpose and without fee is hereby granted, provided | ||||||
| @@ -79,6 +79,21 @@ | |||||||
| /* Define if you have the ioctlsocket function.  */ | /* Define if you have the ioctlsocket function.  */ | ||||||
| #define HAVE_IOCTLSOCKET 1 | #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 if you have the recv function. */ | ||||||
| #define HAVE_RECV 1 | #define HAVE_RECV 1 | ||||||
|  |  | ||||||
| @@ -97,6 +112,30 @@ | |||||||
| /* Define to the function return type for recv. */ | /* Define to the function return type for recv. */ | ||||||
| #define RECV_TYPE_RETV int | #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 if you have the send function. */ | ||||||
| #define HAVE_SEND 1 | #define HAVE_SEND 1 | ||||||
|  |  | ||||||
| @@ -183,6 +222,20 @@ | |||||||
| #  endif | #  endif | ||||||
| #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                       */ | /*                         IPV6 COMPATIBILITY                       */ | ||||||
| /* ---------------------------------------------------------------- */ | /* ---------------------------------------------------------------- */ | ||||||
|   | |||||||
| @@ -1,11 +1,64 @@ | |||||||
|  |  | ||||||
| dnl Process this file with autoconf to produce a configure script. |  | ||||||
| AC_PREREQ(2.57) | AC_PREREQ(2.57) | ||||||
| AC_INIT(ares_init.c) |  | ||||||
|  | dnl Version not hardcoded here. Fetched later from ares_version.h | ||||||
|  | AC_INIT([c-ares], [-], | ||||||
|  |   [c-ares mailing list => http://cool.haxx.se/mailman/listinfo/c-ares]) | ||||||
|  |  | ||||||
| AC_CONFIG_SRCDIR([ares_ipv6.h]) | AC_CONFIG_SRCDIR([ares_ipv6.h]) | ||||||
| AM_CONFIG_HEADER(config.h) | AM_CONFIG_HEADER([config.h]) | ||||||
| AM_MAINTAINER_MODE | AM_MAINTAINER_MODE | ||||||
| AM_INIT_AUTOMAKE(c-ares, CVS) |  | ||||||
|  | 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 | ||||||
| dnl Detect the canonical host and target build environment | dnl Detect the canonical host and target build environment | ||||||
| @@ -15,81 +68,53 @@ AC_CANONICAL_HOST | |||||||
| dnl Get system canonical name | dnl Get system canonical name | ||||||
| AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS]) | AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS]) | ||||||
|  |  | ||||||
| AC_AIX | CARES_CHECK_PROG_CC | ||||||
| AC_PROG_CC | AM_PROG_CC_C_O | ||||||
| AC_PROG_INSTALL | 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 | case $host_os in | ||||||
| solaris*) |   solaris*) | ||||||
| 	AC_DEFINE(ETC_INET, 1, [if a /etc/inet dir is being used]) |     AC_DEFINE(ETC_INET, 1, [if a /etc/inet dir is being used]) | ||||||
| 	;; |     ;; | ||||||
| esac | esac | ||||||
|  |  | ||||||
| dnl support building of Windows DLLs | dnl support building of Windows DLLs | ||||||
| AC_LIBTOOL_WIN32_DLL | AC_LIBTOOL_WIN32_DLL | ||||||
|  |  | ||||||
| dnl ************************************************************ | CARES_PROCESS_DEBUG_BUILD_OPTS | ||||||
| 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) |  | ||||||
|  |  | ||||||
|     dnl when doing the debug stuff, use static library only | AM_CONDITIONAL(DEBUGBUILD, test x$want_debug = xyes) | ||||||
|     AC_DISABLE_SHARED | AM_CONDITIONAL(CURLDEBUG, test x$want_debug = xyes) | ||||||
|  |  | ||||||
|     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) |  | ||||||
|  |  | ||||||
| dnl skip libtool C++ and Fortran compiler checks | dnl skip libtool C++ and Fortran compiler checks | ||||||
| m4_ifdef([AC_PROG_CXX], [m4_undefine([AC_PROG_CXX])]) | m4_ifdef([AC_PROG_CXX], [m4_undefine([AC_PROG_CXX])]) | ||||||
| m4_defun([AC_PROG_CXX],[]) | m4_defun([AC_PROG_CXX],[]) | ||||||
|  | m4_ifdef([AC_PROG_CXXCPP], [m4_undefine([AC_PROG_CXXCPP])]) | ||||||
|  | m4_defun([AC_PROG_CXXCPP],[true]) | ||||||
| m4_ifdef([AC_PROG_F77], [m4_undefine([AC_PROG_F77])]) | m4_ifdef([AC_PROG_F77], [m4_undefine([AC_PROG_F77])]) | ||||||
| m4_defun([AC_PROG_F77],[]) | m4_defun([AC_PROG_F77],[]) | ||||||
|  |  | ||||||
| dnl skip libtool C++ and Fortran linker checks | dnl skip libtool C++ and Fortran linker checks | ||||||
| m4_ifdef([AC_LIBTOOL_CXX], [m4_undefine([AC_LIBTOOL_CXX])]) | m4_ifdef([AC_LIBTOOL_CXX], [m4_undefine([AC_LIBTOOL_CXX])]) | ||||||
| m4_defun([AC_LIBTOOL_CXX],[]) | m4_defun([AC_LIBTOOL_CXX],[]) | ||||||
|  | m4_ifdef([AC_LIBTOOL_CXXCPP], [m4_undefine([AC_LIBTOOL_CXXCPP])]) | ||||||
|  | m4_defun([AC_LIBTOOL_CXXCPP],[true]) | ||||||
| m4_ifdef([AC_LIBTOOL_F77], [m4_undefine([AC_LIBTOOL_F77])]) | m4_ifdef([AC_LIBTOOL_F77], [m4_undefine([AC_LIBTOOL_F77])]) | ||||||
| m4_defun([AC_LIBTOOL_F77],[]) | m4_defun([AC_LIBTOOL_F77],[]) | ||||||
|  |  | ||||||
| dnl force libtool to build static libraries with PIC on AMD64-linux | dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD | ||||||
| AC_MSG_CHECKING([if arch-OS host is AMD64-linux (to build static libraries with PIC)]) | AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)]) | ||||||
| case $host in | case $host in | ||||||
|   x86_64*linux*) |   x86_64*linux*|amd64*freebsd*|ia64*freebsd*) | ||||||
|     AC_MSG_RESULT([yes]) |     AC_MSG_RESULT([yes]) | ||||||
|     with_pic=yes |     with_pic=yes | ||||||
|     ;; |     ;; | ||||||
| @@ -103,7 +128,7 @@ AC_PROG_LIBTOOL | |||||||
|  |  | ||||||
| AC_MSG_CHECKING([if we need -no-undefined]) | AC_MSG_CHECKING([if we need -no-undefined]) | ||||||
| case $host in | case $host in | ||||||
|   *-*-cygwin | *-*-mingw* | *-*-pw32*) |   *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) | ||||||
|     need_no_undefined=yes |     need_no_undefined=yes | ||||||
|     ;; |     ;; | ||||||
|   *) |   *) | ||||||
| @@ -113,41 +138,29 @@ esac | |||||||
| AC_MSG_RESULT($need_no_undefined) | AC_MSG_RESULT($need_no_undefined) | ||||||
| AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes) | 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 ********************************************************************** |  | ||||||
| CURL_DETECT_ICC([CFLAGS="$CFLAGS -we 147"]) |  | ||||||
|  |  | ||||||
| dnl ********************************************************************** | dnl ********************************************************************** | ||||||
| dnl platform/compiler/architecture specific checks/flags | dnl platform/compiler/architecture specific checks/flags | ||||||
| dnl ********************************************************************** | 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 | case $host in | ||||||
|   # |   # | ||||||
|   x86_64*linux*) |   x86_64*linux*|amd64*freebsd*|ia64*freebsd*) | ||||||
|     # |     # | ||||||
|     dnl find out if icc is being used |     if test "$compiler_id" = "INTEL_UNIX_C"; then | ||||||
|     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 |       if test "$compiler_num" -ge "900" && | ||||||
|  |         test "$compiler_num" -lt "1000"; then | ||||||
|         dnl icc 9.X specific |         dnl icc 9.X specific | ||||||
|         CFLAGS="$CFLAGS -i-dynamic" |         CFLAGS="$CFLAGS -i-dynamic" | ||||||
|       fi |       fi | ||||||
|       # |       # | ||||||
|       if test "$iccnum" -ge "1000"; then |       if test "$compiler_num" -ge "1000"; then | ||||||
|         dnl icc 10.X or later |         dnl icc 10.X or later | ||||||
|         CFLAGS="$CFLAGS -shared-intel" |         CFLAGS="$CFLAGS -shared-intel" | ||||||
|       fi |       fi | ||||||
| @@ -157,6 +170,35 @@ case $host in | |||||||
|   # |   # | ||||||
| esac | 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  | ||||||
|  | dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for | ||||||
|  | dnl this specific header files. And do them before its results are used. | ||||||
|  | dnl ********************************************************************** | ||||||
|  |  | ||||||
|  | CURL_CHECK_HEADER_WINDOWS | ||||||
|  | CURL_CHECK_NATIVE_WINDOWS | ||||||
|  | case X-"$ac_cv_native_windows" in | ||||||
|  |   X-yes) | ||||||
|  |     CURL_CHECK_HEADER_WINSOCK | ||||||
|  |     CURL_CHECK_HEADER_WINSOCK2 | ||||||
|  |     CURL_CHECK_HEADER_WS2TCPIP | ||||||
|  |     ;; | ||||||
|  |   *) | ||||||
|  |     ac_cv_header_winsock_h="no" | ||||||
|  |     ac_cv_header_winsock2_h="no" | ||||||
|  |     ac_cv_header_ws2tcpip_h="no" | ||||||
|  |     ;; | ||||||
|  | esac | ||||||
|  |  | ||||||
| dnl ********************************************************************** | dnl ********************************************************************** | ||||||
| dnl Checks for libraries. | dnl Checks for libraries. | ||||||
| dnl ********************************************************************** | dnl ********************************************************************** | ||||||
| @@ -187,49 +229,107 @@ then | |||||||
|   AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs]) |   AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs]) | ||||||
|   my_ac_save_LIBS=$LIBS |   my_ac_save_LIBS=$LIBS | ||||||
|   LIBS="-lnsl -lsocket $LIBS" |   LIBS="-lnsl -lsocket $LIBS" | ||||||
|   AC_TRY_LINK( , |   AC_LINK_IFELSE([ | ||||||
|              [gethostbyname();], |     AC_LANG_PROGRAM([[ | ||||||
|              [ dnl found it! |     ]],[[ | ||||||
|              HAVE_GETHOSTBYNAME="1" |       gethostbyname(); | ||||||
|              AC_MSG_RESULT([yes])], |     ]]) | ||||||
|              [ dnl failed! |   ],[ | ||||||
|              AC_MSG_RESULT([no]) |     AC_MSG_RESULT([yes]) | ||||||
|              dnl restore LIBS |     HAVE_GETHOSTBYNAME="1" | ||||||
|              LIBS=$my_ac_save_LIBS] |   ],[ | ||||||
|              ) |     AC_MSG_RESULT([no]) | ||||||
|  |     LIBS=$my_ac_save_LIBS | ||||||
|  |   ]) | ||||||
| fi | fi | ||||||
|  |  | ||||||
| if test "$HAVE_GETHOSTBYNAME" != "1" | if test "$HAVE_GETHOSTBYNAME" != "1" | ||||||
| then | then | ||||||
|   dnl This is for Msys/Mingw |   dnl This is for winsock systems | ||||||
|   AC_MSG_CHECKING([for gethostbyname in ws2_32]) |   if test "$ac_cv_header_windows_h" = "yes"; then | ||||||
|   my_ac_save_LIBS=$LIBS |     if test "$ac_cv_header_winsock_h" = "yes"; then | ||||||
|   LIBS="-lws2_32 $LIBS" |       case $host in | ||||||
|   AC_TRY_LINK([#include <winsock2.h>], |         *-*-mingw32ce*) | ||||||
|                [gethostbyname("www.dummysite.com");], |           winsock_LIB="-lwinsock" | ||||||
|                [ dnl worked! |           ;; | ||||||
|                ws2="yes" |         *) | ||||||
|                AC_MSG_RESULT([yes]) |           winsock_LIB="-lwsock32" | ||||||
|                HAVE_GETHOSTBYNAME="1"], |           ;; | ||||||
|                [ dnl failed, restore LIBS |       esac | ||||||
|                LIBS=$my_ac_save_LIBS |     fi | ||||||
|                AC_MSG_RESULT(no)] |     if test "$ac_cv_header_winsock2_h" = "yes"; then | ||||||
|              ) |       winsock_LIB="-lws2_32" | ||||||
|  |     fi | ||||||
|  |     if test ! -z "$winsock_LIB"; then | ||||||
|  |       my_ac_save_LIBS=$LIBS | ||||||
|  |       LIBS="$winsock_LIB $LIBS" | ||||||
|  |       AC_MSG_CHECKING([for gethostbyname in $winsock_LIB]) | ||||||
|  |       AC_LINK_IFELSE([ | ||||||
|  |         AC_LANG_PROGRAM([[ | ||||||
|  | #ifdef HAVE_WINDOWS_H | ||||||
|  | #ifndef WIN32_LEAN_AND_MEAN | ||||||
|  | #define WIN32_LEAN_AND_MEAN | ||||||
|  | #endif | ||||||
|  | #include <windows.h> | ||||||
|  | #ifdef HAVE_WINSOCK2_H | ||||||
|  | #include <winsock2.h> | ||||||
|  | #else | ||||||
|  | #ifdef HAVE_WINSOCK_H | ||||||
|  | #include <winsock.h> | ||||||
|  | #endif | ||||||
|  | #endif | ||||||
|  | #endif | ||||||
|  |         ]],[[ | ||||||
|  |           gethostbyname("www.dummysite.com"); | ||||||
|  |         ]]) | ||||||
|  |       ],[ | ||||||
|  |         AC_MSG_RESULT([yes]) | ||||||
|  |         HAVE_GETHOSTBYNAME="1" | ||||||
|  |       ],[ | ||||||
|  |         AC_MSG_RESULT([no]) | ||||||
|  |         winsock_LIB="" | ||||||
|  |         LIBS=$my_ac_save_LIBS | ||||||
|  |       ]) | ||||||
|  |     fi | ||||||
|  |   fi | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | if test "$HAVE_GETHOSTBYNAME" != "1" | ||||||
|  | then | ||||||
|  |   dnl This is for Minix 3.1 | ||||||
|  |   AC_MSG_CHECKING([for gethostbyname for Minix 3]) | ||||||
|  |   AC_LINK_IFELSE([ | ||||||
|  |     AC_LANG_PROGRAM([[ | ||||||
|  | /* Older Minix versions may need <net/gen/netdb.h> here instead */ | ||||||
|  | #include <netdb.h> | ||||||
|  |     ]],[[ | ||||||
|  |       gethostbyname("www.dummysite.com"); | ||||||
|  |     ]]) | ||||||
|  |   ],[ | ||||||
|  |     AC_MSG_RESULT([yes]) | ||||||
|  |     HAVE_GETHOSTBYNAME="1" | ||||||
|  |   ],[ | ||||||
|  |     AC_MSG_RESULT([no]) | ||||||
|  |   ]) | ||||||
| fi | fi | ||||||
|  |  | ||||||
| if test "$HAVE_GETHOSTBYNAME" != "1" | if test "$HAVE_GETHOSTBYNAME" != "1" | ||||||
| then | then | ||||||
|   dnl This is for eCos with a stubbed DNS implementation |   dnl This is for eCos with a stubbed DNS implementation | ||||||
|   AC_MSG_CHECKING([for gethostbyname for eCos]) |   AC_MSG_CHECKING([for gethostbyname for eCos]) | ||||||
|   AC_TRY_LINK([ |   AC_LINK_IFELSE([ | ||||||
|  |     AC_LANG_PROGRAM([[ | ||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
| #include <netdb.h>], | #include <netdb.h> | ||||||
|                [gethostbyname("www.dummysite.com");], |     ]],[[ | ||||||
|                [ dnl worked! |       gethostbyname("www.dummysite.com"); | ||||||
|                AC_MSG_RESULT([yes]) |     ]]) | ||||||
|                HAVE_GETHOSTBYNAME="1"], |   ],[ | ||||||
|                AC_MSG_RESULT(no) |     AC_MSG_RESULT([yes]) | ||||||
|              ) |     HAVE_GETHOSTBYNAME="1" | ||||||
|  |   ],[ | ||||||
|  |     AC_MSG_RESULT([no]) | ||||||
|  |   ]) | ||||||
| fi | fi | ||||||
|  |  | ||||||
| if test "$HAVE_GETHOSTBYNAME" != "1" | if test "$HAVE_GETHOSTBYNAME" != "1" | ||||||
| @@ -257,10 +357,17 @@ if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then | |||||||
|                , |                , | ||||||
|                -lnsl) |                -lnsl) | ||||||
| fi | fi | ||||||
|  | ac_cv_func_strcasecmp="no" | ||||||
|  |  | ||||||
| dnl socket lib? | dnl socket lib? | ||||||
| AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ]) | AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ]) | ||||||
|  |  | ||||||
|  | dnl ********************************************************************** | ||||||
|  | dnl In case that function clock_gettime with monotonic timer is available, | ||||||
|  | dnl check for additional required libraries. | ||||||
|  | dnl ********************************************************************** | ||||||
|  | CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC | ||||||
|  |  | ||||||
| AC_MSG_CHECKING([whether to use libgcc]) | AC_MSG_CHECKING([whether to use libgcc]) | ||||||
| AC_ARG_ENABLE(libgcc, | AC_ARG_ENABLE(libgcc, | ||||||
| AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]), | AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]), | ||||||
| @@ -326,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]) |   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 | fi | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -356,18 +443,6 @@ dnl ********************************************************************** | |||||||
| dnl Checks for header files. | dnl Checks for header files. | ||||||
| AC_HEADER_STDC | AC_HEADER_STDC | ||||||
|  |  | ||||||
| dnl ********************************************************************** |  | ||||||
| dnl Make sure that our checks for headers windows.h winsock.h winsock2.h  |  | ||||||
| dnl and ws2tcpip.h take precedence over any other further checks which  |  | ||||||
| dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for |  | ||||||
| dnl this specific header files. And do them before its results are used. |  | ||||||
| dnl ********************************************************************** |  | ||||||
|  |  | ||||||
| CURL_CHECK_HEADER_WINDOWS |  | ||||||
| CURL_CHECK_HEADER_WINSOCK |  | ||||||
| CURL_CHECK_HEADER_WINSOCK2 |  | ||||||
| CURL_CHECK_HEADER_WS2TCPIP |  | ||||||
|  |  | ||||||
| CURL_CHECK_HEADER_MALLOC | CURL_CHECK_HEADER_MALLOC | ||||||
|  |  | ||||||
| dnl check for a few basic system headers we need | dnl check for a few basic system headers we need | ||||||
| @@ -378,12 +453,15 @@ AC_CHECK_HEADERS( | |||||||
|        sys/socket.h \ |        sys/socket.h \ | ||||||
|        sys/ioctl.h \ |        sys/ioctl.h \ | ||||||
|        sys/param.h \ |        sys/param.h \ | ||||||
|  |        sys/uio.h \ | ||||||
|        netdb.h \ |        netdb.h \ | ||||||
|        netinet/in.h \ |        netinet/in.h \ | ||||||
|        netinet/tcp.h \ |        netinet/tcp.h \ | ||||||
|        net/if.h \ |        net/if.h \ | ||||||
|        errno.h \ |        errno.h \ | ||||||
|  |        strings.h \ | ||||||
|        stdbool.h \ |        stdbool.h \ | ||||||
|  |        time.h \ | ||||||
|        arpa/nameser.h \ |        arpa/nameser.h \ | ||||||
|        arpa/nameser_compat.h \ |        arpa/nameser_compat.h \ | ||||||
|        arpa/inet.h, |        arpa/inet.h, | ||||||
| @@ -427,7 +505,8 @@ AC_CHECK_SIZEOF(long) | |||||||
| AC_CHECK_SIZEOF(time_t) | AC_CHECK_SIZEOF(time_t) | ||||||
|  |  | ||||||
| AC_CHECK_TYPE(long long, | 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"   |    longlong="yes"   | ||||||
| ) | ) | ||||||
|  |  | ||||||
| @@ -470,11 +549,26 @@ TYPE_SIG_ATOMIC_T | |||||||
| AC_TYPE_SIGNAL | AC_TYPE_SIGNAL | ||||||
|  |  | ||||||
| CURL_CHECK_FUNC_RECV | CURL_CHECK_FUNC_RECV | ||||||
|  | CURL_CHECK_FUNC_RECVFROM | ||||||
| CURL_CHECK_FUNC_SEND | CURL_CHECK_FUNC_SEND | ||||||
|  |  | ||||||
| CURL_CHECK_MSG_NOSIGNAL | 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 | dnl check for AF_INET6 | ||||||
| CARES_CHECK_CONSTANT( | CARES_CHECK_CONSTANT( | ||||||
|   [ |   [ | ||||||
| @@ -641,54 +735,29 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags, | |||||||
| ) | ) | ||||||
|  |  | ||||||
|  |  | ||||||
| AC_CHECK_FUNCS( bitncmp \ | AC_CHECK_FUNCS([bitncmp \ | ||||||
|                 gettimeofday \ |   gettimeofday \ | ||||||
|                 if_indextoname, |   if_indextoname | ||||||
| dnl if found | ],[ | ||||||
| [], | ],[ | ||||||
| dnl if not found, $ac_func is the name we check for |   func="$ac_func" | ||||||
| func="$ac_func" |   AC_MSG_CHECKING([deeper for $func]) | ||||||
| AC_MSG_CHECKING([deeper for $func]) |   AC_LINK_IFELSE([ | ||||||
| AC_TRY_LINK( [], |     AC_LANG_PROGRAM([[ | ||||||
|              [ $func ();], |     ]],[[ | ||||||
|              AC_MSG_RESULT(yes!) |       $func (); | ||||||
|              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([yes]) | ||||||
|              AC_MSG_RESULT(but still no) |     eval "ac_cv_func_$func=yes" | ||||||
|              ) |     AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$func])], [1], | ||||||
| ) |       [Define to 1 if you have the $func function.]) | ||||||
|  |   ],[ | ||||||
|  |     AC_MSG_RESULT([but still no]) | ||||||
|  |   ]) | ||||||
|  | ]) | ||||||
|  |  | ||||||
|  |  | ||||||
| dnl check for inet_pton |  | ||||||
| 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_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 |  | ||||||
| dnl Check for inet_net_pton | dnl Check for inet_net_pton | ||||||
| AC_CHECK_FUNCS(inet_net_pton) | AC_CHECK_FUNCS(inet_net_pton) | ||||||
| dnl Again, some systems have it, but not IPv6 | dnl Again, some systems have it, but not IPv6 | ||||||
| @@ -720,39 +789,6 @@ int main() | |||||||
| fi | 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, , | AC_CHECK_SIZEOF(struct in6_addr, , | ||||||
| [ | [ | ||||||
| #undef inline | #undef inline | ||||||
| @@ -815,10 +851,6 @@ dnl and get the types of five of its arguments. | |||||||
| CURL_CHECK_FUNC_GETNAMEINFO | 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 | CURL_CHECK_NONBLOCKING_SOCKET | ||||||
|  |  | ||||||
| AC_C_BIGENDIAN( | AC_C_BIGENDIAN( | ||||||
| @@ -851,4 +883,18 @@ if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then | |||||||
|         [a suitable file/device to read random data from]) |         [a suitable file/device to read random data from]) | ||||||
| fi | fi | ||||||
|  |  | ||||||
| AC_OUTPUT(Makefile libcares.pc) | 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" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) |  | ||||||
| #include "nameser.h" |  | ||||||
| #else |  | ||||||
|  |  | ||||||
| #ifdef HAVE_SYS_SOCKET_H | #ifdef HAVE_SYS_SOCKET_H | ||||||
| #include <sys/socket.h> | #  include <sys/socket.h> | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_NETINET_IN_H | #ifdef HAVE_NETINET_IN_H | ||||||
| #include <netinet/in.h> | #  include <netinet/in.h> | ||||||
| #endif |  | ||||||
| #ifdef HAVE_ARPA_NAMESER_H |  | ||||||
| #include <arpa/nameser.h> |  | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_ARPA_INET_H | #ifdef HAVE_ARPA_INET_H | ||||||
| #include <arpa/inet.h> | #  include <arpa/inet.h> | ||||||
| #endif | #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 <ctype.h> | #include <ctype.h> | ||||||
| @@ -47,8 +46,7 @@ | |||||||
| #include "ares_ipv6.h" | #include "ares_ipv6.h" | ||||||
| #include "inet_net_pton.h" | #include "inet_net_pton.h" | ||||||
|  |  | ||||||
| #if !defined(HAVE_INET_NET_PTON) || !defined(HAVE_INET_NET_PTON_IPV6) || \ | #if !defined(HAVE_INET_NET_PTON) || !defined(HAVE_INET_NET_PTON_IPV6) | ||||||
|     !defined(HAVE_INET_PTON) || !defined(HAVE_INET_PTON_IPV6) |  | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * static int |  * static int | ||||||
| @@ -425,7 +423,7 @@ ares_inet_net_pton(int af, const char *src, void *dst, size_t size) | |||||||
|  |  | ||||||
| #endif | #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 ares_inet_pton(int af, const char *src, void *dst) | ||||||
| { | { | ||||||
|   int size, result; |   int size, result; | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ | |||||||
|  * without express or implied warranty. |  * 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) | #define ares_inet_pton(x,y,z) inet_pton(x,y,z) | ||||||
| #else | #else | ||||||
| int ares_inet_pton(int af, const char *src, void *dst); | int ares_inet_pton(int af, const char *src, void *dst); | ||||||
|   | |||||||
| @@ -18,21 +18,22 @@ | |||||||
|  |  | ||||||
| #include "setup.h" | #include "setup.h" | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(WATT32) |  | ||||||
| #include "nameser.h" |  | ||||||
| #else |  | ||||||
| #ifdef HAVE_SYS_SOCKET_H | #ifdef HAVE_SYS_SOCKET_H | ||||||
| #include <sys/socket.h> | #  include <sys/socket.h> | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_NETINET_IN_H | #ifdef HAVE_NETINET_IN_H | ||||||
| #include <netinet/in.h> | #  include <netinet/in.h> | ||||||
| #endif |  | ||||||
| #ifdef HAVE_ARPA_NAMESER_H |  | ||||||
| #include <arpa/nameser.h> |  | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_ARPA_INET_H | #ifdef HAVE_ARPA_INET_H | ||||||
| #include <arpa/inet.h> | #  include <arpa/inet.h> | ||||||
| #endif | #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 <ctype.h> | #include <ctype.h> | ||||||
| @@ -45,7 +46,7 @@ | |||||||
| #include "inet_ntop.h" | #include "inet_ntop.h" | ||||||
|  |  | ||||||
|  |  | ||||||
| #if !defined(HAVE_INET_NTOP) || !defined(HAVE_INET_NTOP_IPV6) | #ifndef HAVE_INET_NTOP | ||||||
|  |  | ||||||
| #ifdef SPRINTF_CHAR | #ifdef SPRINTF_CHAR | ||||||
| # define SPRINTF(x) strlen(sprintf/**/x) | # define SPRINTF(x) strlen(sprintf/**/x) | ||||||
|   | |||||||
| @@ -18,7 +18,7 @@ | |||||||
|  * without express or implied warranty. |  * 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) | #define ares_inet_ntop(w,x,y,z) inet_ntop(w,x,y,z) | ||||||
| #else | #else | ||||||
| const char *ares_inet_ntop(int af, const void *src, char *dst, size_t size); | const char *ares_inet_ntop(int af, const void *src, char *dst, size_t size); | ||||||
|   | |||||||
| @@ -3,7 +3,7 @@ | |||||||
| #               / __|____ / _` | '__/ _ \/ __| | #               / __|____ / _` | '__/ _ \/ __| | ||||||
| #              | (_|_____| (_| | | |  __/\__ \ | #              | (_|_____| (_| | | |  __/\__ \ | ||||||
| #               \___|     \__,_|_|  \___||___/ | #               \___|     \__,_|_|  \___||___/ | ||||||
| # $id: $ | # $Id$ | ||||||
| # | # | ||||||
| prefix=@prefix@ | prefix=@prefix@ | ||||||
| exec_prefix=@exec_prefix@ | exec_prefix=@exec_prefix@ | ||||||
| @@ -18,3 +18,4 @@ Requires: | |||||||
| Requires.private:  | Requires.private:  | ||||||
| Cflags: -I${includedir} | Cflags: -I${includedir} | ||||||
| Libs: -L${libdir} -lcares | 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 | ||||||
|  |   # | ||||||
|  | ]) | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								ares/maketgz
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								ares/maketgz
									
									
									
									
									
								
							| @@ -38,11 +38,11 @@ if(!-f "configure") { | |||||||
|     `./buildconf`; |     `./buildconf`; | ||||||
| } | } | ||||||
| print "adding $version in the configure.ac file\n"; | print "adding $version in the configure.ac file\n"; | ||||||
| `sed -e 's/AM_INIT_AUTOMAKE(c-ares, CVS)/AM_INIT_AUTOMAKE(c-ares, $version)/' < configure.ac > configure.ac-rel`; | `sed -e 's/AC_INIT.*/AC_INIT([c-ares], [$version],/' < configure.ac > configure.ac.dist`; | ||||||
|  |  | ||||||
| # now make a new configure script with this | # now make a new configure script with this | ||||||
| print "makes a new configure script\n"; | print "makes a new configure script\n"; | ||||||
| `autoconf configure.ac-rel >configure`; | `autoconf configure.ac.dist >configure`; | ||||||
|  |  | ||||||
| # now run this new configure to get a fine makefile | # now run this new configure to get a fine makefile | ||||||
| print "running configure\n"; | print "running configure\n"; | ||||||
| @@ -50,9 +50,11 @@ print "running configure\n"; | |||||||
|  |  | ||||||
| # now make the actual tarball | # now make the actual tarball | ||||||
| print "running make dist\n"; | print "running make dist\n"; | ||||||
| `make dist`; | `make dist VERSION=$version`; | ||||||
|  |  | ||||||
| print "removing temporary configure.ac file\n"; | print "removing temporary configure.ac file\n"; | ||||||
| `rm configure.ac-rel`; | `rm configure.ac.dist`; | ||||||
|  | print "removing temporary ares_version.h file\n"; | ||||||
|  | `rm ares_version.h.dist`; | ||||||
|  |  | ||||||
| print "NOTE: now cvs tag this release!\n"; | print "NOTE: now cvs tag this release!\n"; | ||||||
|   | |||||||
							
								
								
									
										109
									
								
								ares/nameser.h
									
									
									
									
									
								
							
							
						
						
									
										109
									
								
								ares/nameser.h
									
									
									
									
									
								
							| @@ -3,48 +3,22 @@ | |||||||
| #ifndef ARES_NAMESER_H | #ifndef ARES_NAMESER_H | ||||||
| #define ARES_NAMESER_H | #define ARES_NAMESER_H | ||||||
|  |  | ||||||
| /* Windows-only header file provided by liren@vivisimo.com to make his Windows | /* header file provided by liren@vivisimo.com */ | ||||||
|    port build */ |  | ||||||
|  |  | ||||||
| #ifndef NETWARE | #ifndef HAVE_ARPA_NAMESER_H | ||||||
| #include <process.h> /* for the _getpid() proto */ |  | ||||||
| #endif  /* !NETWARE */ |  | ||||||
| #include <sys/types.h> |  | ||||||
|  |  | ||||||
| #ifndef NETWARE | #define NS_PACKETSZ     512   /* maximum packet size */ | ||||||
|  | #define NS_MAXDNAME     256   /* maximum domain name */ | ||||||
| #define MAXHOSTNAMELEN 256 | #define NS_MAXCDNAME    255   /* maximum compressed domain name */ | ||||||
|  | #define NS_MAXLABEL     63 | ||||||
| /* Structure for scatter/gather I/O.  */ | #define NS_HFIXEDSZ     12    /* #/bytes of fixed data in header */ | ||||||
| struct iovec | #define NS_QFIXEDSZ     4     /* #/bytes of fixed data in query */ | ||||||
| { | #define NS_RRFIXEDSZ    10    /* #/bytes of fixed data in r record */ | ||||||
|     void *iov_base;     /* Pointer to data.  */ | #define NS_INT16SZ      2 | ||||||
|     size_t iov_len;     /* Length of data.  */ | #define NS_INADDRSZ     4 | ||||||
| }; | #define NS_IN6ADDRSZ    16 | ||||||
|  | #define NS_CMPRSFLGS    0xc0  /* Flag bits indicating name compression. */ | ||||||
| #ifndef __WATCOMC__ | #define NS_DEFAULTPORT  53    /* For both TCP and UDP. */ | ||||||
| #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) |  | ||||||
|  |  | ||||||
| #ifndef HAVE_GETTIMEOFDAY |  | ||||||
| struct timezone { int dummy; }; |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| int ares_gettimeofday(struct timeval *tv, struct timezone *tz); |  | ||||||
| #define gettimeofday(tv,tz) ares_gettimeofday(tv,tz) |  | ||||||
|  |  | ||||||
| #endif  /* !NETWARE */ |  | ||||||
|  |  | ||||||
| #define NS_CMPRSFLGS  0xc0 |  | ||||||
| #define NS_IN6ADDRSZ  16 |  | ||||||
| #define NS_INT16SZ    2 |  | ||||||
| #define NS_INADDRSZ   4 |  | ||||||
|  |  | ||||||
|   /* Flag bits indicating name compression. */ |  | ||||||
| #define INDIR_MASK    NS_CMPRSFLGS |  | ||||||
|  |  | ||||||
| typedef enum __ns_class { | typedef enum __ns_class { | ||||||
|     ns_c_invalid = 0,       /* Cookie. */ |     ns_c_invalid = 0,       /* Cookie. */ | ||||||
| @@ -58,8 +32,6 @@ typedef enum __ns_class { | |||||||
|     ns_c_max = 65536 |     ns_c_max = 65536 | ||||||
| } ns_class; | } ns_class; | ||||||
|  |  | ||||||
| #define C_IN           ns_c_in |  | ||||||
|  |  | ||||||
| typedef enum __ns_type { | typedef enum __ns_type { | ||||||
|     ns_t_invalid = 0,       /* Cookie. */ |     ns_t_invalid = 0,       /* Cookie. */ | ||||||
|     ns_t_a = 1,             /* Host address. */ |     ns_t_a = 1,             /* Host address. */ | ||||||
| @@ -103,6 +75,8 @@ typedef enum __ns_type { | |||||||
|     ns_t_dname = 39,        /* Non-terminal DNAME (for IPv6) */ |     ns_t_dname = 39,        /* Non-terminal DNAME (for IPv6) */ | ||||||
|     ns_t_sink = 40,         /* Kitchen sink (experimentatl) */ |     ns_t_sink = 40,         /* Kitchen sink (experimentatl) */ | ||||||
|     ns_t_opt = 41,          /* EDNS0 option (meta-RR) */ |     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_tsig = 250,        /* Transaction signature. */ | ||||||
|     ns_t_ixfr = 251,        /* Incremental zone transfer. */ |     ns_t_ixfr = 251,        /* Incremental zone transfer. */ | ||||||
|     ns_t_axfr = 252,        /* Transfer zone of authority. */ |     ns_t_axfr = 252,        /* Transfer zone of authority. */ | ||||||
| @@ -113,19 +87,6 @@ typedef enum __ns_type { | |||||||
|     ns_t_max = 65536 |     ns_t_max = 65536 | ||||||
| } ns_type; | } 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 { | typedef enum __ns_opcode { | ||||||
|     ns_o_query = 0,         /* Standard query. */ |     ns_o_query = 0,         /* Standard query. */ | ||||||
|     ns_o_iquery = 1,        /* Inverse query (deprecated/unsupported). */ |     ns_o_iquery = 1,        /* Inverse query (deprecated/unsupported). */ | ||||||
| @@ -136,25 +97,6 @@ typedef enum __ns_opcode { | |||||||
|     ns_o_max = 6 |     ns_o_max = 6 | ||||||
| } ns_opcode; | } 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 { | typedef enum __ns_rcode { | ||||||
|     ns_r_noerror = 0,       /* No error occurred. */ |     ns_r_noerror = 0,       /* No error occurred. */ | ||||||
|     ns_r_formerr = 1,       /* Format error. */ |     ns_r_formerr = 1,       /* Format error. */ | ||||||
| @@ -175,6 +117,22 @@ typedef enum __ns_rcode { | |||||||
|     ns_r_badtime = 18 |     ns_r_badtime = 18 | ||||||
| } ns_rcode; | } 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 SERVFAIL        ns_r_servfail | ||||||
| #define NOTIMP          ns_r_notimpl | #define NOTIMP          ns_r_notimpl | ||||||
| #define REFUSED         ns_r_refused | #define REFUSED         ns_r_refused | ||||||
| @@ -183,6 +141,7 @@ typedef enum __ns_rcode { | |||||||
| #define FORMERR         ns_r_formerr | #define FORMERR         ns_r_formerr | ||||||
| #define NXDOMAIN        ns_r_nxdomain | #define NXDOMAIN        ns_r_nxdomain | ||||||
|  |  | ||||||
|  | #define C_IN            ns_c_in | ||||||
| #define C_CHAOS         ns_c_chaos | #define C_CHAOS         ns_c_chaos | ||||||
| #define C_HS            ns_c_hs | #define C_HS            ns_c_hs | ||||||
| #define C_NONE          ns_c_none | #define C_NONE          ns_c_none | ||||||
| @@ -230,4 +189,6 @@ typedef enum __ns_rcode { | |||||||
| #define T_MAILA         ns_t_maila | #define T_MAILA         ns_t_maila | ||||||
| #define T_ANY           ns_t_any | #define T_ANY           ns_t_any | ||||||
|  |  | ||||||
|  | #endif /* HAVE_ARPA_NAMESER_COMPAT_H */ | ||||||
|  |  | ||||||
| #endif /* ARES_NAMESER_H */ | #endif /* ARES_NAMESER_H */ | ||||||
|   | |||||||
							
								
								
									
										32
									
								
								ares/setup.h
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								ares/setup.h
									
									
									
									
									
								
							| @@ -3,7 +3,7 @@ | |||||||
|  |  | ||||||
| /* $Id$ */ | /* $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 |  * Permission to use, copy, modify, and distribute this software and its | ||||||
|  * documentation for any purpose and without fee is hereby granted, provided |  * documentation for any purpose and without fee is hereby granted, provided | ||||||
| @@ -39,6 +39,18 @@ | |||||||
|  |  | ||||||
| #endif /* HAVE_CONFIG_H */ | #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. |  * Include header files for windows builds before redefining anything. | ||||||
|  * Use this preproessor block only to include or exclude windows.h, |  * Use this preproessor block only to include or exclude windows.h, | ||||||
| @@ -127,24 +139,6 @@ | |||||||
| #define HAVE_SYS_UIO_H | #define HAVE_SYS_UIO_H | ||||||
| #endif | #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 */ | /* IPv6 compatibility */ | ||||||
| #if !defined(HAVE_AF_INET6) | #if !defined(HAVE_AF_INET6) | ||||||
| #if defined(HAVE_PF_INET6) | #if defined(HAVE_PF_INET6) | ||||||
|   | |||||||
| @@ -3,7 +3,7 @@ | |||||||
|  |  | ||||||
| /* $Id$ */ | /* $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 |  * Permission to use, copy, modify, and distribute this software and its | ||||||
|  * documentation for any purpose and without fee is hereby granted, provided |  * documentation for any purpose and without fee is hereby granted, provided | ||||||
| @@ -100,11 +100,10 @@ struct timeval { | |||||||
|  * definition is present the other one also is available. |  * definition is present the other one also is available. | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| #if defined(WIN32) && !defined(HAVE_SOCKLEN_T) | #if defined(WIN32) && !defined(HAVE_CONFIG_H) | ||||||
| #  if ( defined(_MSC_VER) && !defined(INET_ADDRSTRLEN) ) || \ | #  if ( defined(_MSC_VER) && !defined(INET_ADDRSTRLEN) ) || \ | ||||||
|       (!defined(_MSC_VER) && !defined(HAVE_WS2TCPIP_H) ) |       (!defined(_MSC_VER) && !defined(HAVE_WS2TCPIP_H) ) | ||||||
| #    define socklen_t int | #    define socklen_t int | ||||||
| #    define HAVE_SOCKLEN_T |  | ||||||
| #  endif | #  endif | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| @@ -192,6 +191,46 @@ struct timeval { | |||||||
| #endif /* HAVE_SEND */ | #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 |  * Uppercase macro versions of ANSI/ISO is*() functions/macros which | ||||||
|  * avoid negative number inputs with argument byte codes > 127. |  * avoid negative number inputs with argument byte codes > 127. | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								ares/vc/.cvsignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								ares/vc/.cvsignore
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | |||||||
|  | vc.ncb | ||||||
|  | vc.opt | ||||||
							
								
								
									
										3
									
								
								ares/vc/acountry/.cvsignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								ares/vc/acountry/.cvsignore
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | acountry.dep | ||||||
|  | acountry.mak | ||||||
|  | acountry.plg | ||||||
							
								
								
									
										110
									
								
								ares/vc/acountry/acountry.dsp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										110
									
								
								ares/vc/acountry/acountry.dsp
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,110 @@ | |||||||
|  | # Microsoft Developer Studio Project File - Name="acountry" - Package Owner=<4> | ||||||
|  | # Microsoft Developer Studio Generated Build File, Format Version 6.00 | ||||||
|  | # ** DO NOT EDIT ** | ||||||
|  |  | ||||||
|  | # TARGTYPE "Win32 (x86) Console Application" 0x0103 | ||||||
|  |  | ||||||
|  | CFG=acountry - Win32 Debug | ||||||
|  | !MESSAGE This is not a valid makefile. To build this project using NMAKE, | ||||||
|  | !MESSAGE use the Export Makefile command and run | ||||||
|  | !MESSAGE  | ||||||
|  | !MESSAGE NMAKE /f "acountry.mak". | ||||||
|  | !MESSAGE  | ||||||
|  | !MESSAGE You can specify a configuration when running NMAKE | ||||||
|  | !MESSAGE by defining the macro CFG on the command line. For example: | ||||||
|  | !MESSAGE  | ||||||
|  | !MESSAGE NMAKE /f "acountry.mak" CFG="acountry - Win32 Debug" | ||||||
|  | !MESSAGE  | ||||||
|  | !MESSAGE Possible choices for configuration are: | ||||||
|  | !MESSAGE  | ||||||
|  | !MESSAGE "acountry - Win32 Release" (based on "Win32 (x86) Console Application") | ||||||
|  | !MESSAGE "acountry - Win32 Debug" (based on "Win32 (x86) Console Application") | ||||||
|  | !MESSAGE  | ||||||
|  |  | ||||||
|  | # Begin Project | ||||||
|  | # PROP AllowPerConfigDependencies 0 | ||||||
|  | # PROP Scc_ProjName "" | ||||||
|  | # PROP Scc_LocalPath "" | ||||||
|  | CPP=cl.exe | ||||||
|  | RSC=rc.exe | ||||||
|  |  | ||||||
|  | !IF  "$(CFG)" == "acountry - Win32 Release" | ||||||
|  |  | ||||||
|  | # PROP BASE Use_MFC 0 | ||||||
|  | # PROP BASE Use_Debug_Libraries 0 | ||||||
|  | # PROP BASE Output_Dir "Release" | ||||||
|  | # PROP BASE Intermediate_Dir "Release" | ||||||
|  | # PROP BASE Target_Dir "" | ||||||
|  | # PROP Use_MFC 0 | ||||||
|  | # PROP Use_Debug_Libraries 0 | ||||||
|  | # PROP Output_Dir "Release" | ||||||
|  | # PROP Intermediate_Dir "Release" | ||||||
|  | # PROP Ignore_Export_Lib 0 | ||||||
|  | # PROP Target_Dir "" | ||||||
|  | # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c | ||||||
|  | # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c | ||||||
|  | # ADD BASE RSC /l 0x409 /d "NDEBUG" | ||||||
|  | # ADD RSC /l 0x409 /d "NDEBUG" | ||||||
|  | BSC32=bscmake.exe | ||||||
|  | # ADD BASE BSC32 /nologo | ||||||
|  | # ADD BSC32 /nologo | ||||||
|  | LINK32=link.exe | ||||||
|  | # ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release" | ||||||
|  | # ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release" | ||||||
|  |  | ||||||
|  | !ELSEIF  "$(CFG)" == "acountry - Win32 Debug" | ||||||
|  |  | ||||||
|  | # PROP BASE Use_MFC 0 | ||||||
|  | # PROP BASE Use_Debug_Libraries 1 | ||||||
|  | # PROP BASE Output_Dir "Debug" | ||||||
|  | # PROP BASE Intermediate_Dir "Debug" | ||||||
|  | # PROP BASE Target_Dir "" | ||||||
|  | # PROP Use_MFC 0 | ||||||
|  | # PROP Use_Debug_Libraries 1 | ||||||
|  | # PROP Output_Dir "Debug" | ||||||
|  | # PROP Intermediate_Dir "Debug" | ||||||
|  | # PROP Ignore_Export_Lib 0 | ||||||
|  | # PROP Target_Dir "" | ||||||
|  | # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c | ||||||
|  | # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c | ||||||
|  | # ADD BASE RSC /l 0x409 /d "_DEBUG" | ||||||
|  | # ADD RSC /l 0x409 /d "_DEBUG" | ||||||
|  | BSC32=bscmake.exe | ||||||
|  | # ADD BASE BSC32 /nologo | ||||||
|  | # ADD BSC32 /nologo | ||||||
|  | LINK32=link.exe | ||||||
|  | # ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug" | ||||||
|  | # ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug" | ||||||
|  |  | ||||||
|  | !ENDIF  | ||||||
|  |  | ||||||
|  | # Begin Target | ||||||
|  |  | ||||||
|  | # Name "acountry - Win32 Release" | ||||||
|  | # Name "acountry - Win32 Debug" | ||||||
|  | # Begin Group "Source Files" | ||||||
|  |  | ||||||
|  | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | ||||||
|  | # Begin Source File | ||||||
|  |  | ||||||
|  | SOURCE=..\..\acountry.c | ||||||
|  | # End Source File | ||||||
|  | # Begin Source File | ||||||
|  |  | ||||||
|  | SOURCE=..\..\ares_getopt.c | ||||||
|  | # End Source File | ||||||
|  | # End Group | ||||||
|  | # Begin Group "Header Files" | ||||||
|  |  | ||||||
|  | # PROP Default_Filter "h;hpp;hxx;hm;inl" | ||||||
|  | # Begin Source File | ||||||
|  |  | ||||||
|  | SOURCE=..\..\ares_getopt.h | ||||||
|  | # End Source File | ||||||
|  | # End Group | ||||||
|  | # Begin Group "Resource Files" | ||||||
|  |  | ||||||
|  | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" | ||||||
|  | # End Group | ||||||
|  | # End Target | ||||||
|  | # End Project | ||||||
							
								
								
									
										3
									
								
								ares/vc/adig/.cvsignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								ares/vc/adig/.cvsignore
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | adig.dep | ||||||
|  | adig.mak | ||||||
|  | adig.plg | ||||||
| @@ -1,2 +0,0 @@ | |||||||
| # Microsoft Developer Studio Generated Dependency File, included by adig.mak |  | ||||||
|  |  | ||||||
| @@ -41,15 +41,15 @@ RSC=rc.exe | |||||||
| # PROP Intermediate_Dir "Release" | # PROP Intermediate_Dir "Release" | ||||||
| # PROP Ignore_Export_Lib 0 | # PROP Ignore_Export_Lib 0 | ||||||
| # PROP Target_Dir "" | # PROP Target_Dir "" | ||||||
| # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c | ||||||
| # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c | ||||||
| # ADD BASE RSC /l 0x409 /d "NDEBUG" | # ADD BASE RSC /l 0x409 /d "NDEBUG" | ||||||
| # ADD RSC /l 0x409 /d "NDEBUG" | # ADD RSC /l 0x409 /d "NDEBUG" | ||||||
| BSC32=bscmake.exe | BSC32=bscmake.exe | ||||||
| # ADD BASE BSC32 /nologo | # ADD BASE BSC32 /nologo | ||||||
| # ADD BSC32 /nologo | # ADD BSC32 /nologo | ||||||
| LINK32=link.exe | LINK32=link.exe | ||||||
| # ADD BASE LINK32 ws2_32.lib advapi32.lib /nologo /subsystem:console /machine:I386 | # ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release" | ||||||
| # ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release" | # ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release" | ||||||
|  |  | ||||||
| !ELSEIF  "$(CFG)" == "adig - Win32 Debug" | !ELSEIF  "$(CFG)" == "adig - Win32 Debug" | ||||||
| @@ -65,15 +65,15 @@ LINK32=link.exe | |||||||
| # PROP Intermediate_Dir "Debug" | # PROP Intermediate_Dir "Debug" | ||||||
| # PROP Ignore_Export_Lib 0 | # PROP Ignore_Export_Lib 0 | ||||||
| # PROP Target_Dir "" | # PROP Target_Dir "" | ||||||
| # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c | ||||||
| # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c | ||||||
| # ADD BASE RSC /l 0x409 /d "_DEBUG" | # ADD BASE RSC /l 0x409 /d "_DEBUG" | ||||||
| # ADD RSC /l 0x409 /d "_DEBUG" | # ADD RSC /l 0x409 /d "_DEBUG" | ||||||
| BSC32=bscmake.exe | BSC32=bscmake.exe | ||||||
| # ADD BASE BSC32 /nologo | # ADD BASE BSC32 /nologo | ||||||
| # ADD BSC32 /nologo | # ADD BSC32 /nologo | ||||||
| LINK32=link.exe | LINK32=link.exe | ||||||
| # ADD BASE LINK32 ws2_32.lib advapi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | # ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug" | ||||||
| # ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug" | # ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug" | ||||||
|  |  | ||||||
| !ENDIF  | !ENDIF  | ||||||
|   | |||||||
							
								
								
									
										3
									
								
								ares/vc/ahost/.cvsignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								ares/vc/ahost/.cvsignore
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | ahost.dep | ||||||
|  | ahost.mak | ||||||
|  | ahost.plg | ||||||
| @@ -1,2 +0,0 @@ | |||||||
| # Microsoft Developer Studio Generated Dependency File, included by ahost.mak |  | ||||||
|  |  | ||||||
| @@ -41,15 +41,15 @@ RSC=rc.exe | |||||||
| # PROP Intermediate_Dir "Release" | # PROP Intermediate_Dir "Release" | ||||||
| # PROP Ignore_Export_Lib 0 | # PROP Ignore_Export_Lib 0 | ||||||
| # PROP Target_Dir "" | # PROP Target_Dir "" | ||||||
| # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c | ||||||
| # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c | # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c | ||||||
| # ADD BASE RSC /l 0x409 /d "NDEBUG" | # ADD BASE RSC /l 0x409 /d "NDEBUG" | ||||||
| # ADD RSC /l 0x409 /d "NDEBUG" | # ADD RSC /l 0x409 /d "NDEBUG" | ||||||
| BSC32=bscmake.exe | BSC32=bscmake.exe | ||||||
| # ADD BASE BSC32 /nologo | # ADD BASE BSC32 /nologo | ||||||
| # ADD BSC32 /nologo | # ADD BSC32 /nologo | ||||||
| LINK32=link.exe | LINK32=link.exe | ||||||
| # ADD BASE LINK32 ws2_32.lib advapi32.lib /nologo /subsystem:console /machine:I386 | # ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release" | ||||||
| # ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release" | # ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /machine:I386 /libpath:"..\areslib\Release" | ||||||
|  |  | ||||||
| !ELSEIF  "$(CFG)" == "ahost - Win32 Debug" | !ELSEIF  "$(CFG)" == "ahost - Win32 Debug" | ||||||
| @@ -65,15 +65,15 @@ LINK32=link.exe | |||||||
| # PROP Intermediate_Dir "Debug" | # PROP Intermediate_Dir "Debug" | ||||||
| # PROP Ignore_Export_Lib 0 | # PROP Ignore_Export_Lib 0 | ||||||
| # PROP Target_Dir "" | # PROP Target_Dir "" | ||||||
| # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c | # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c | ||||||
| # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c | # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c | ||||||
| # ADD BASE RSC /l 0x409 /d "_DEBUG" | # ADD BASE RSC /l 0x409 /d "_DEBUG" | ||||||
| # ADD RSC /l 0x409 /d "_DEBUG" | # ADD RSC /l 0x409 /d "_DEBUG" | ||||||
| BSC32=bscmake.exe | BSC32=bscmake.exe | ||||||
| # ADD BASE BSC32 /nologo | # ADD BASE BSC32 /nologo | ||||||
| # ADD BSC32 /nologo | # ADD BSC32 /nologo | ||||||
| LINK32=link.exe | LINK32=link.exe | ||||||
| # ADD BASE LINK32 ws2_32.lib advapi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | # ADD BASE LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug" | ||||||
| # ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug" | # ADD LINK32 ws2_32.lib advapi32.lib areslib.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\areslib\Debug" | ||||||
|  |  | ||||||
| !ENDIF  | !ENDIF  | ||||||
|   | |||||||
							
								
								
									
										3
									
								
								ares/vc/areslib/.cvsignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								ares/vc/areslib/.cvsignore
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | areslib.dep | ||||||
|  | areslib.mak | ||||||
|  | areslib.plg | ||||||
| @@ -1,2 +0,0 @@ | |||||||
| # Microsoft Developer Studio Generated Dependency File, included by areslib.mak |  | ||||||
|  |  | ||||||
| @@ -40,8 +40,8 @@ RSC=rc.exe | |||||||
| # PROP Output_Dir "Release" | # PROP Output_Dir "Release" | ||||||
| # PROP Intermediate_Dir "Release" | # PROP Intermediate_Dir "Release" | ||||||
| # PROP Target_Dir "" | # PROP Target_Dir "" | ||||||
| # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c | # ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c | ||||||
| # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c | # ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c | ||||||
| # ADD BASE RSC /l 0x409 /d "NDEBUG" | # ADD BASE RSC /l 0x409 /d "NDEBUG" | ||||||
| # ADD RSC /l 0x409 /d "NDEBUG" | # ADD RSC /l 0x409 /d "NDEBUG" | ||||||
| BSC32=bscmake.exe | BSC32=bscmake.exe | ||||||
| @@ -63,8 +63,8 @@ LIB32=link.exe -lib | |||||||
| # PROP Output_Dir "Debug" | # PROP Output_Dir "Debug" | ||||||
| # PROP Intermediate_Dir "Debug" | # PROP Intermediate_Dir "Debug" | ||||||
| # PROP Target_Dir "" | # PROP Target_Dir "" | ||||||
| # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c | # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c | ||||||
| # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c | # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c | ||||||
| # ADD BASE RSC /l 0x409 /d "_DEBUG" | # ADD BASE RSC /l 0x409 /d "_DEBUG" | ||||||
| # ADD RSC /l 0x409 /d "_DEBUG" | # ADD RSC /l 0x409 /d "_DEBUG" | ||||||
| BSC32=bscmake.exe | BSC32=bscmake.exe | ||||||
| @@ -97,6 +97,10 @@ SOURCE=..\..\ares__read_line.c | |||||||
| # End Source File | # End Source File | ||||||
| # Begin Source File | # Begin Source File | ||||||
|  |  | ||||||
|  | SOURCE=..\..\ares__timeval.c | ||||||
|  | # End Source File | ||||||
|  | # Begin Source File | ||||||
|  |  | ||||||
| SOURCE=..\..\ares_cancel.c | SOURCE=..\..\ares_cancel.c | ||||||
| # End Source File | # End Source File | ||||||
| # Begin Source File | # Begin Source File | ||||||
| @@ -109,6 +113,10 @@ SOURCE=..\..\ares_expand_name.c | |||||||
| # End Source File | # End Source File | ||||||
| # Begin Source File | # Begin Source File | ||||||
|  |  | ||||||
|  | SOURCE=..\..\ares_expand_string.c | ||||||
|  | # End Source File | ||||||
|  | # Begin Source File | ||||||
|  |  | ||||||
| SOURCE=..\..\ares_fds.c | SOURCE=..\..\ares_fds.c | ||||||
| # End Source File | # End Source File | ||||||
| # Begin Source File | # Begin Source File | ||||||
| @@ -173,6 +181,10 @@ SOURCE=..\..\ares_send.c | |||||||
| # End Source File | # End Source File | ||||||
| # Begin Source File | # Begin Source File | ||||||
|  |  | ||||||
|  | SOURCE=..\..\ares_strcasecmp.c | ||||||
|  | # End Source File | ||||||
|  | # Begin Source File | ||||||
|  |  | ||||||
| SOURCE=..\..\ares_strerror.c | SOURCE=..\..\ares_strerror.c | ||||||
| # End Source File | # End Source File | ||||||
| # Begin Source File | # Begin Source File | ||||||
| @@ -185,6 +197,10 @@ SOURCE=..\..\ares_version.c | |||||||
| # End Source File | # End Source File | ||||||
| # Begin Source File | # Begin Source File | ||||||
|  |  | ||||||
|  | SOURCE=..\..\ares_writev.c | ||||||
|  | # End Source File | ||||||
|  | # Begin Source File | ||||||
|  |  | ||||||
| SOURCE=..\..\bitncmp.c | SOURCE=..\..\bitncmp.c | ||||||
| # End Source File | # End Source File | ||||||
| # Begin Source File | # Begin Source File | ||||||
| @@ -225,10 +241,18 @@ SOURCE=..\..\ares_private.h | |||||||
| # End Source File | # End Source File | ||||||
| # Begin Source File | # Begin Source File | ||||||
|  |  | ||||||
|  | SOURCE=..\..\ares_strcasecmp.h | ||||||
|  | # End Source File | ||||||
|  | # Begin Source File | ||||||
|  |  | ||||||
| SOURCE=..\..\ares_version.h | SOURCE=..\..\ares_version.h | ||||||
| # End Source File | # End Source File | ||||||
| # Begin Source File | # Begin Source File | ||||||
|  |  | ||||||
|  | SOURCE=..\..\ares_writev.h | ||||||
|  | # End Source File | ||||||
|  | # Begin Source File | ||||||
|  |  | ||||||
| SOURCE=..\..\bitncmp.h | SOURCE=..\..\bitncmp.h | ||||||
| # End Source File | # End Source File | ||||||
| # Begin Source File | # Begin Source File | ||||||
|   | |||||||
| @@ -3,6 +3,21 @@ Microsoft Developer Studio Workspace File, Format Version 6.00 | |||||||
|  |  | ||||||
| ############################################################################### | ############################################################################### | ||||||
|  |  | ||||||
|  | Project: "acountry"=".\acountry\acountry.dsp" - Package Owner=<4> | ||||||
|  |  | ||||||
|  | Package=<5> | ||||||
|  | {{{ | ||||||
|  | }}} | ||||||
|  |  | ||||||
|  | Package=<4> | ||||||
|  | {{{ | ||||||
|  |     Begin Project Dependency | ||||||
|  |     Project_Dep_Name areslib | ||||||
|  |     End Project Dependency | ||||||
|  | }}} | ||||||
|  |  | ||||||
|  | ############################################################################### | ||||||
|  |  | ||||||
| Project: "adig"=".\adig\adig.dsp" - Package Owner=<4> | Project: "adig"=".\adig\adig.dsp" - Package Owner=<4> | ||||||
|  |  | ||||||
| Package=<5> | Package=<5> | ||||||
|   | |||||||
| @@ -5,20 +5,6 @@ | |||||||
| /* only do the following on windows | /* only do the following on windows | ||||||
|  */ |  */ | ||||||
| #if (defined(WIN32) || defined(WATT32)) && !defined(MSDOS) | #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__ | #ifdef __WATCOMC__ | ||||||
| /* | /* | ||||||
| @@ -34,88 +20,4 @@ WINAPI DllMain (HINSTANCE hnd, DWORD reason, LPVOID reserved) | |||||||
| } | } | ||||||
| #endif | #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 |  | ||||||
|  |  | ||||||
| /* |  | ||||||
|  * Number of micro-seconds between the beginning of the Windows epoch |  | ||||||
|  * (Jan. 1, 1601) and the Unix epoch (Jan. 1, 1970). |  | ||||||
|  */ |  | ||||||
| #if defined(_MSC_VER) || defined(__WATCOMC__) |  | ||||||
| #define EPOCH_FILETIME 11644473600000000Ui64 |  | ||||||
| #else |  | ||||||
| #define EPOCH_FILETIME 11644473600000000ULL |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| int |  | ||||||
| ares_gettimeofday(struct timeval *tv, struct timezone *tz) |  | ||||||
| { |  | ||||||
|     FILETIME        ft; |  | ||||||
|     LARGE_INTEGER   li; |  | ||||||
|     __int64         t; |  | ||||||
|  |  | ||||||
|     if (tv) |  | ||||||
|     { |  | ||||||
|         GetSystemTimeAsFileTime(&ft); |  | ||||||
|         li.LowPart  = ft.dwLowDateTime; |  | ||||||
|         li.HighPart = ft.dwHighDateTime; |  | ||||||
|         t  = li.QuadPart / 10;   /* In micro-second intervals */ |  | ||||||
|         t -= EPOCH_FILETIME;     /* Offset to the Epoch time */ |  | ||||||
|         tv->tv_sec  = (long)(t / 1000000); |  | ||||||
|         tv->tv_usec = (long)(t % 1000000); |  | ||||||
|     } |  | ||||||
|     (void) tz; |  | ||||||
|     return 0; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| int |  | ||||||
| ares_writev (ares_socket_t s, const struct iovec *vector, size_t count) |  | ||||||
| { |  | ||||||
|   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 */ | #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 | # This software is licensed as described in the file COPYING, which | ||||||
| # you should have received as part of this distribution. The terms | # you should have received as part of this distribution. The terms | ||||||
| @@ -27,22 +27,57 @@ die(){ | |||||||
| 	exit | 	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(){ | findtool(){ | ||||||
|   file="$1" |   file="$1" | ||||||
|  |  | ||||||
|   IFS=":" |   old_IFS=$IFS; IFS=':' | ||||||
|   for path in $PATH |   for path in $PATH | ||||||
|   do |   do | ||||||
|  |     IFS=$old_IFS | ||||||
|     # echo "checks for $file in $path" >&2 |     # echo "checks for $file in $path" >&2 | ||||||
|     if test -f "$path/$file"; then |     if test -f "$path/$file"; then | ||||||
|       echo "$path/$file" |       echo "$path/$file" | ||||||
|       return |       return | ||||||
|     fi |     fi | ||||||
|   done |   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 | # autoconf 2.57 or newer | ||||||
| # | # | ||||||
| @@ -65,6 +100,18 @@ fi | |||||||
|  |  | ||||||
| echo "buildconf: autoconf version $ac_version (ok)" | 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 | # autoheader 2.50 or newer | ||||||
| # | # | ||||||
| @@ -108,12 +155,16 @@ fi | |||||||
|  |  | ||||||
| echo "buildconf: automake version $am_version (ok)" | echo "buildconf: automake version $am_version (ok)" | ||||||
|  |  | ||||||
| ac=`findtool ${ACLOCAL:-aclocal}` | 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 "$ac"; then | if test -z "$acloc_version"; then | ||||||
|   echo "buildconf: aclocal not found. Weird automake installation!" |   echo "buildconf: aclocal not found. Weird automake installation!" | ||||||
|   exit 1 |   exit 1 | ||||||
|  | fi | ||||||
|  | if test "$acloc_version" = "$am_version"; then | ||||||
|  |   echo "buildconf: aclocal version $acloc_version (ok)" | ||||||
| else | else | ||||||
|   echo "buildconf: aclocal found" |   echo "buildconf: aclocal version $acloc_version (ERROR: does not match automake version)" | ||||||
|  |   exit 1 | ||||||
| fi | fi | ||||||
|  |  | ||||||
| #-------------------------------------------------------------------------- | #-------------------------------------------------------------------------- | ||||||
| @@ -202,14 +253,46 @@ fi | |||||||
| # | # | ||||||
| PERL=`findtool ${PERL:-perl}` | 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 | # run the correct scripts now | ||||||
|  | # | ||||||
|  |  | ||||||
| echo "buildconf: running libtoolize" | echo "buildconf: running libtoolize" | ||||||
| $libtoolize --copy --automake --force || die "The libtoolize command failed" | $libtoolize --copy --automake --force || die "The libtoolize command failed" | ||||||
|  |  | ||||||
| echo "buildconf: running aclocal" | 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 | if test -n "$PERL"; then | ||||||
|   echo "buildconf: running aclocal hack to convert all mv to mv -f" |   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 |   $PERL -i.bak -pe 's/\bmv +([^-\s])/mv -f $1/g' aclocal.m4 | ||||||
| @@ -217,10 +300,13 @@ else | |||||||
|   echo "buildconf: perl not found" |   echo "buildconf: perl not found" | ||||||
|   exit 1 |   exit 1 | ||||||
| fi | fi | ||||||
|  |  | ||||||
| echo "buildconf: running autoheader" | echo "buildconf: running autoheader" | ||||||
| ${AUTOHEADER:-autoheader} || die "The autoheader command failed" | ${AUTOHEADER:-autoheader} || die "The autoheader command failed" | ||||||
|  |  | ||||||
| echo "buildconf: cp lib/config.h.in src/config.h.in" | echo "buildconf: cp lib/config.h.in src/config.h.in" | ||||||
| cp lib/config.h.in src/config.h.in | cp lib/config.h.in src/config.h.in | ||||||
|  |  | ||||||
| echo "buildconf: running autoconf" | echo "buildconf: running autoconf" | ||||||
| ${AUTOCONF:-autoconf}     || die "The autoconf command failed" | ${AUTOCONF:-autoconf}     || die "The autoconf command failed" | ||||||
|  |  | ||||||
|   | |||||||
| @@ -3,11 +3,11 @@ REM set up a CVS tree to build when there's no autotools | |||||||
| REM $Revision$ | REM $Revision$ | ||||||
| REM $Date$ | REM $Date$ | ||||||
|  |  | ||||||
| REM create ca-bundle.h |  | ||||||
| echo /* This file is generated automatically */ >lib\ca-bundle.h |  | ||||||
|  |  | ||||||
| REM create hugehelp.c | REM create hugehelp.c | ||||||
| copy src\hugehelp.c.cvs src\hugehelp.c | copy src\hugehelp.c.cvs src\hugehelp.c | ||||||
|  |  | ||||||
| REM create Makefile | REM create Makefile | ||||||
| copy Makefile.dist Makefile | copy Makefile.dist Makefile | ||||||
|  |  | ||||||
|  | REM create curlbuild.h | ||||||
|  | copy include\curl\curlbuild.h.dist include\curl\curlbuild.h | ||||||
|   | |||||||
							
								
								
									
										907
									
								
								configure.ac
									
									
									
									
									
								
							
							
						
						
									
										907
									
								
								configure.ac
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -80,71 +80,15 @@ while test $# -gt 0; do | |||||||
| 	;; | 	;; | ||||||
|  |  | ||||||
|     --feature|--features) |     --feature|--features) | ||||||
| 	if test "@USE_SSLEAY@" = "1"; then |         for feature in @SUPPORT_FEATURES@ ""; do | ||||||
|           echo "SSL" |             test -n "$feature" && echo "$feature" | ||||||
|           NTLM=1 # OpenSSL implies NTLM |         done | ||||||
|         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 |  | ||||||
| 	;; | 	;; | ||||||
|  |  | ||||||
|     --protocols) |     --protocols) | ||||||
| 	if test "@CURL_DISABLE_HTTP@" != "1"; then |         for protocol in @SUPPORT_PROTOCOLS@; do | ||||||
|           echo "HTTP" |             echo "$protocol" | ||||||
| 	  if test "@SSL_ENABLED@" = "1"; then |         done | ||||||
|             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 |  | ||||||
| 	;; | 	;; | ||||||
|     --version) |     --version) | ||||||
| 	echo libcurl @VERSION@ | 	echo libcurl @VERSION@ | ||||||
|   | |||||||
| @@ -60,16 +60,24 @@ Euphoria | |||||||
|   http://rays-web.com/eulibcurl.htm |   http://rays-web.com/eulibcurl.htm | ||||||
|  |  | ||||||
| Ferite | Ferite | ||||||
|  |  | ||||||
|   Written by Paul Querna |   Written by Paul Querna | ||||||
|   http://www.ferite.org/ |   http://www.ferite.org/ | ||||||
|  |  | ||||||
| Gambas | Gambas | ||||||
|  |  | ||||||
|   http://gambas.sourceforge.net |   http://gambas.sourceforge.net | ||||||
|  |  | ||||||
| glib/GTK+ | glib/GTK+ | ||||||
|  |  | ||||||
|   Written by Richard Atterer |   Written by Richard Atterer | ||||||
|   http://atterer.net/glibcurl/ |   http://atterer.net/glibcurl/ | ||||||
|  |  | ||||||
|  | Haskell | ||||||
|  |  | ||||||
|  |   Written by Galois, Inc | ||||||
|  |   http://hackage.haskell.org/cgi-bin/hackage-scripts/package/curl | ||||||
|  |  | ||||||
| Java | Java | ||||||
|  |  | ||||||
|   Maintained by [blank] |   Maintained by [blank] | ||||||
| @@ -173,6 +181,7 @@ Smalltalk | |||||||
|   http://www.squeaksource.com/CurlPlugin/ |   http://www.squeaksource.com/CurlPlugin/ | ||||||
|  |  | ||||||
| SP-Forth | SP-Forth | ||||||
|  |  | ||||||
|   SP-Forth binding by ygrek |   SP-Forth binding by ygrek | ||||||
|   http://www.forth.org.ru/~ac/lib/lin/curl/ |   http://www.forth.org.ru/~ac/lib/lin/curl/ | ||||||
|  |  | ||||||
| @@ -191,6 +200,11 @@ Visual Basic | |||||||
|   libcurl-vb by Jeffrey Phillips |   libcurl-vb by Jeffrey Phillips | ||||||
|   http://sourceforge.net/projects/libcurl-vb/ |   http://sourceforge.net/projects/libcurl-vb/ | ||||||
|  |  | ||||||
|  | Visual Foxpro | ||||||
|  |  | ||||||
|  |   by Carlos Alloatti | ||||||
|  |   http://www.ctl32.com.ar/libcurl.asp | ||||||
|  |  | ||||||
| Q | Q | ||||||
|   The libcurl module is part of the default install |   The libcurl module is part of the default install | ||||||
|   http://q-lang.sourceforge.net/ |   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.13 Why is curl -R on Windows one hour off? | ||||||
|   4.14 Redirects work in browser but not with curl! |   4.14 Redirects work in browser but not with curl! | ||||||
|   4.15 FTPS doesn't work |   4.15 FTPS doesn't work | ||||||
|  |   4.16 My HTTP POST or PUT requests are slow! | ||||||
|  |  | ||||||
|  5. libcurl Issues |  5. libcurl Issues | ||||||
|   5.1 Is libcurl thread-safe? |   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.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.12 Can I make libcurl fake or hide my real IP address? | ||||||
|   5.13 How do I stop an ongoing transfer? |   5.13 How do I stop an ongoing transfer? | ||||||
|  |   5.14 Using C++ non-static functions for callbacks? | ||||||
|  |  | ||||||
|  6. License Issues |  6. License Issues | ||||||
|   6.1 I have a GPL program, can I use the libcurl library? |   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 |   mandated by RFC4217. This kind of connection then of course uses the | ||||||
|   standard FTP port 21 by default. |   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 | 5. libcurl Issues | ||||||
|  |  | ||||||
| @@ -1070,6 +1086,24 @@ FAQ | |||||||
|   If you're using the multi interface, you also stop a transfer by removing |   If you're using the multi interface, you also stop a transfer by removing | ||||||
|   the particular easy handle from the multi stack. |   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 | 6. License Issues | ||||||
|  |  | ||||||
|   Curl and libcurl are released under a MIT/X derivate license. The license is |   Curl and libcurl are released under a MIT/X derivate license. The license is | ||||||
|   | |||||||
							
								
								
									
										148
									
								
								docs/INSTALL
									
									
									
									
									
								
							
							
						
						
									
										148
									
								
								docs/INSTALL
									
									
									
									
									
								
							| @@ -53,8 +53,12 @@ UNIX | |||||||
|  |  | ||||||
|         ./configure --with-ssl |         ./configure --with-ssl | ||||||
|  |  | ||||||
|    If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL,) |    If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL) | ||||||
|    you can run configure like this: |    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 |         ./configure --with-ssl=/opt/OpenSSL | ||||||
|  |  | ||||||
| @@ -70,22 +74,23 @@ UNIX | |||||||
|  |  | ||||||
|      (with the Bourne shell and its clones): |      (with the Bourne shell and its clones): | ||||||
|  |  | ||||||
|        CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \ |         CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \ | ||||||
|            ./configure |            ./configure | ||||||
|  |  | ||||||
|      (with csh, tcsh and their clones): |      (with csh, tcsh and their clones): | ||||||
|  |  | ||||||
|        env CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \ |         env CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \ | ||||||
|        ./configure |            ./configure | ||||||
|  |  | ||||||
|    If you have shared SSL libs installed in a directory where your run-time |    If you have shared SSL libs installed in a directory where your run-time | ||||||
|    linker doesn't find them (which usually causes configure failures), you can |    linker doesn't find them (which usually causes configure failures), you can | ||||||
|    provide the -R option to ld on some operating systems to set a hard-coded |    provide the -R option to ld on some operating systems to set a hard-coded | ||||||
|    path to the run-time linker: |    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 |    MORE OPTIONS | ||||||
|  |    ------------ | ||||||
|  |  | ||||||
|      To force configure to use the standard cc compiler if both cc and gcc are |      To force configure to use the standard cc compiler if both cc and gcc are | ||||||
|      present, run configure like |      present, run configure like | ||||||
| @@ -127,7 +132,7 @@ UNIX | |||||||
|      To build with GnuTLS support instead of OpenSSL for SSL/TLS, note that |      To build with GnuTLS support instead of OpenSSL for SSL/TLS, note that | ||||||
|      you need to use both --without-ssl and --with-gnutls. |      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 |      yassl with its OpenSSL emulation enabled and point to that directory root | ||||||
|      with configure --with-ssl. |      with configure --with-ssl. | ||||||
|  |  | ||||||
| @@ -140,6 +145,16 @@ UNIX | |||||||
|      To get support for SCP and SFTP, build with --with-libssh2 and have |      To get support for SCP and SFTP, build with --with-libssh2 and have | ||||||
|      libssh2 0.16 or later installed. |      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 | Win32 | ||||||
| ===== | ===== | ||||||
| @@ -272,6 +287,37 @@ Win32 | |||||||
|    at runtime. |    at runtime. | ||||||
|    Run 'nmake vc-ssl-zlib' to build with both ssl and zlib support. |    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 |    Borland C++ compiler | ||||||
|    --------------------- |    --------------------- | ||||||
|  |  | ||||||
| @@ -300,9 +346,8 @@ Win32 | |||||||
|                                  -L c:\openssl\out32\ssleay32.lib |                                  -L c:\openssl\out32\ssleay32.lib | ||||||
|                                  simplessl.c |                                  simplessl.c | ||||||
|  |  | ||||||
|  |    OTHER MSVC IDEs | ||||||
|    MSVC IDE |    --------------- | ||||||
|    -------- |  | ||||||
|  |  | ||||||
|    If you use VC++, Borland or similar compilers. Include all lib source |    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). |    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" |    Make the sources in the src/ drawer be a "win32 console application" | ||||||
|    project. Name it curl. |    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 |    Disabling Specific Protocols in Win32 builds | ||||||
|    -------------------------------------------- |    -------------------------------------------- | ||||||
| @@ -332,10 +374,12 @@ Win32 | |||||||
|    CURL_DISABLE_DICT     disables DICT |    CURL_DISABLE_DICT     disables DICT | ||||||
|    CURL_DISABLE_FILE     disables FILE |    CURL_DISABLE_FILE     disables FILE | ||||||
|    CURL_DISABLE_TFTP     disables TFTP |    CURL_DISABLE_TFTP     disables TFTP | ||||||
|  |    CURL_DISABLE_HTTP     disables HTTP | ||||||
|  |  | ||||||
|    If you want to set any of these defines you have the following |    If you want to set any of these defines you have the following | ||||||
|    possibilities: |    possibilities: | ||||||
|  |  | ||||||
|  |    - Modify lib/config-win32.h | ||||||
|    - Modify lib/setup.h |    - Modify lib/setup.h | ||||||
|    - Modify lib/Makefile.vc6 |    - Modify lib/Makefile.vc6 | ||||||
|    - Add defines to Project/Settings/C/C++/General/Preprocessor Definitions |    - Add defines to Project/Settings/C/C++/General/Preprocessor Definitions | ||||||
| @@ -618,49 +662,51 @@ eCos | |||||||
| Minix | Minix | ||||||
| ===== | ===== | ||||||
|    curl can be compiled on Minix 3 using gcc or ACK (starting with |    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 |    ver. 3.1.3). | ||||||
|    programs is inadequate for configuring and compiling curl and will |  | ||||||
|    result in strange errors unless fixed (which only needs to be done |  | ||||||
|    once). |  | ||||||
|     |     | ||||||
|    ACK |    ACK | ||||||
|    --- |    --- | ||||||
|    Increase heap sizes with the commands: |    Increase the heap sizes of the compiler with the command: | ||||||
|  |  | ||||||
|      chmem =1024000 /usr/lib/em_cemcom.ansi |      binsizes xxl | ||||||
|      chmem =512000 /usr/lib/i386/as |  | ||||||
|  |  | ||||||
|    If you have bash installed: |  | ||||||
|  |  | ||||||
|      chmem =2048000 /usr/local/bin/bash |  | ||||||
|  |  | ||||||
|    Configure and compile with: |    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 |      make | ||||||
|  |  | ||||||
|    GCC |    GCC | ||||||
|    --- |    --- | ||||||
|    If you have bash installed: |  | ||||||
|  |  | ||||||
|      chmem =2048000 /usr/local/bin/bash |  | ||||||
|  |  | ||||||
|    Make sure gcc is in your PATH with the command: |    Make sure gcc is in your PATH with the command: | ||||||
|     |     | ||||||
|      export PATH=/usr/gnu/bin:$PATH |      export PATH=/usr/gnu/bin:$PATH | ||||||
|     |     | ||||||
|    then configure and compile curl with: |    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 |      make | ||||||
|  |  | ||||||
|  |  | ||||||
|  | Symbian OS | ||||||
|  | ========== | ||||||
|  |    The Symbian OS port uses the Symbian build system to compile.  From the | ||||||
|  |    packages/Symbian/group/ directory, run: | ||||||
|  |  | ||||||
|  |       bldmake bldfiles | ||||||
|  |       abld build | ||||||
|  |  | ||||||
|  |    to compile and install curl and libcurl. If your Symbian SDK doesn't | ||||||
|  |    include support for P.I.P.S., you will need to contact your SDK vendor | ||||||
|  |    to obtain that first. | ||||||
|  |  | ||||||
|  |  | ||||||
| CROSS COMPILE | CROSS COMPILE | ||||||
| ============= | ============= | ||||||
|    (This section was graciously brought to us by Jim Duey, with additions by |    (This section was graciously brought to us by Jim Duey, with additions by | ||||||
|    Dan Fandrich) |    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) |    'cd' to the new directory. (e.g. cd curl-7.12.3) | ||||||
|  |  | ||||||
| @@ -709,13 +755,13 @@ REDUCING SIZE | |||||||
|    size of libcurl for embedded applications where binary size is an |    size of libcurl for embedded applications where binary size is an | ||||||
|    important factor.  First, be sure to set the CFLAGS variable when |    important factor.  First, be sure to set the CFLAGS variable when | ||||||
|    configuring with any relevant compiler optimization flags to reduce the |    configuring with any relevant compiler optimization flags to reduce the | ||||||
|    size of the binary.  For gcc, this would mean at minimum the -Os option |    size of the binary.  For gcc, this would mean at minimum the -Os option, | ||||||
|    and probably the -march=X option as well, e.g.: |    and potentially the -march=X and -mdynamic-no-pic options as well, e.g. | ||||||
|  |  | ||||||
|       ./configure CFLAGS='-Os' ... |       ./configure CFLAGS='-Os' ... | ||||||
|  |  | ||||||
|    Note that newer compilers often produce smaller code than older versions |    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 |    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 |    command-line as you can to disable all the libcurl features that you | ||||||
| @@ -724,10 +770,12 @@ REDUCING SIZE | |||||||
|    will not use, here are some other flags that can reduce the size of the |    will not use, here are some other flags that can reduce the size of the | ||||||
|    library: |    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-cookies (disables support for HTTP cookies) | ||||||
|      --disable-crypto-auth (disables HTTP cryptographic authentication) |      --disable-crypto-auth (disables HTTP cryptographic authentication) | ||||||
|      --disable-ipv6 (disables support for IPv6) |      --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) |      --disable-verbose (eliminates debugging strings and error code strings) | ||||||
|      --enable-hidden-symbols (eliminates unneeded symbols in the shared library) |      --enable-hidden-symbols (eliminates unneeded symbols in the shared library) | ||||||
|      --without-libidn (disables support for the libidn DNS library) |      --without-libidn (disables support for the libidn DNS library) | ||||||
| @@ -743,12 +791,24 @@ REDUCING SIZE | |||||||
|    sections of the shared library using the -R option to objcopy (e.g. the |    sections of the shared library using the -R option to objcopy (e.g. the | ||||||
|    .comment section). |    .comment section). | ||||||
|  |  | ||||||
|    Using these techniques it is possible to create an HTTP-only shared libcurl |    Using these techniques it is possible to create a basic HTTP-only shared | ||||||
|    library for i386 Linux platforms that is only 96 KiB in size (as of libcurl |    libcurl library for i386 Linux platforms that is only 94 KiB in size, and | ||||||
|    version 7.17.1, using gcc 4.2.2). |    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 |    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 | PORTS | ||||||
| @@ -765,6 +825,7 @@ PORTS | |||||||
|         - Alpha OpenBSD 3.0 |         - Alpha OpenBSD 3.0 | ||||||
|         - Alpha OpenVMS V7.1-1H2 |         - Alpha OpenVMS V7.1-1H2 | ||||||
|         - Alpha Tru64 v5.0 5.1 |         - Alpha Tru64 v5.0 5.1 | ||||||
|  |         - AVR32 Linux | ||||||
|         - HP-PA HP-UX 9.X 10.X 11.X |         - HP-PA HP-UX 9.X 10.X 11.X | ||||||
|         - HP-PA Linux |         - HP-PA Linux | ||||||
|         - HP3000 MPE/iX |         - HP3000 MPE/iX | ||||||
| @@ -774,10 +835,12 @@ PORTS | |||||||
|         - Pocket PC/Win CE 3.0 |         - Pocket PC/Win CE 3.0 | ||||||
|         - Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2 |         - Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1, 5.2 | ||||||
|         - PowerPC Darwin 1.0 |         - PowerPC Darwin 1.0 | ||||||
|  |         - PowerPC INTEGRITY | ||||||
|         - PowerPC Linux |         - PowerPC Linux | ||||||
|         - PowerPC Mac OS 9 |         - PowerPC Mac OS 9 | ||||||
|         - PowerPC Mac OS X |         - PowerPC Mac OS X | ||||||
|         - SuperH4 Linux 2.6.X |         - SH4 Linux 2.6.X | ||||||
|  |         - SH4 OS21 | ||||||
|         - SINIX-Z v5 |         - SINIX-Z v5 | ||||||
|         - Sparc Linux |         - Sparc Linux | ||||||
|         - Sparc Solaris 2.4, 2.5, 2.5.1, 2.6, 7, 8, 9, 10 |         - Sparc Solaris 2.4, 2.5, 2.5.1, 2.6, 7, 8, 9, 10 | ||||||
| @@ -785,6 +848,8 @@ PORTS | |||||||
|         - StrongARM (and other ARM) RISC OS 3.1, 4.02 |         - StrongARM (and other ARM) RISC OS 3.1, 4.02 | ||||||
|         - StrongARM/ARM7/ARM9 Linux 2.4, 2.6 |         - StrongARM/ARM7/ARM9 Linux 2.4, 2.6 | ||||||
|         - StrongARM NetBSD 1.4.1 |         - StrongARM NetBSD 1.4.1 | ||||||
|  |         - ARM INTEGRITY | ||||||
|  |         - Symbian OS (P.I.P.S.) 9.x | ||||||
|         - TPF |         - TPF | ||||||
|         - Ultrix 4.3a |         - Ultrix 4.3a | ||||||
|         - UNICOS 9.0 |         - UNICOS 9.0 | ||||||
| @@ -794,16 +859,17 @@ PORTS | |||||||
|         - i386 Esix 4.1 |         - i386 Esix 4.1 | ||||||
|         - i386 FreeBSD |         - i386 FreeBSD | ||||||
|         - i386 HURD |         - i386 HURD | ||||||
|  |         - i386 Haiku OS | ||||||
|         - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6 |         - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6 | ||||||
|         - i386 MINIX 3.1 |         - i386 MINIX 3.1 | ||||||
|         - i386 NetBSD |         - i386 NetBSD | ||||||
|         - i386 Novell NetWare |         - i386 Novell NetWare | ||||||
|         - i386 OS/2 |         - i386 OS/2 | ||||||
|         - i386 OpenBSD |         - i386 OpenBSD | ||||||
|  |         - i386 QNX 6 | ||||||
|         - i386 SCO unix |         - i386 SCO unix | ||||||
|         - i386 Solaris 2.7 |         - i386 Solaris 2.7 | ||||||
|         - i386 Windows 95, 98, ME, NT, 2000, XP, 2003 |         - i386 Windows 95, 98, ME, NT, 2000, XP, 2003 | ||||||
|         - i386 QNX 6 |  | ||||||
|         - i486 ncr-sysv4.3.03 (NCR MP-RAS) |         - i486 ncr-sysv4.3.03 (NCR MP-RAS) | ||||||
|         - ia64 Linux 2.3.99 |         - ia64 Linux 2.3.99 | ||||||
|         - m68k AmigaOS 3 |         - m68k AmigaOS 3 | ||||||
|   | |||||||
| @@ -239,7 +239,7 @@ Linker Links | |||||||
| checked. | checked. | ||||||
|  |  | ||||||
| 3- Include in the white space immediately below the box referred in 2 -lcurl | 3- Include in the white space immediately below the box referred in 2 -lcurl | ||||||
| -lws2_32 -lwinmm. | -lws2_32. | ||||||
|  |  | ||||||
| SSL Files | SSL Files | ||||||
| --------- | --------- | ||||||
|   | |||||||
| @@ -22,6 +22,56 @@ CVS | |||||||
|  Tagging shall be used extensively, and by the time we release new archives we |  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. |  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 | Windows vs Unix | ||||||
| =============== | =============== | ||||||
|  |  | ||||||
|   | |||||||
| @@ -3,6 +3,33 @@ join in and help us correct one or more of these! Also be sure to check the | |||||||
| changelog of the current development status, as one or more of these problems | changelog of the current development status, as one or more of these problems | ||||||
| may have been fixed since this was written! | may have been fixed since this was written! | ||||||
|  |  | ||||||
|  | 58.  It seems sensible to be able to use CURLOPT_NOBODY and | ||||||
|  |   CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is | ||||||
|  |   not working: http://curl.haxx.se/mail/lib-2008-07/0295.html | ||||||
|  |  | ||||||
|  | 57. On VMS-Alpha: When using an http-file-upload the file is not sent to the | ||||||
|  |   Server with the correct content-length.  Sending a file with 511 or less | ||||||
|  |   bytes, content-length 512 is used.  Sending a file with 513 - 1023 bytes, | ||||||
|  |   content-length 1024 is used.  Files with a length of a multiple of 512 Bytes | ||||||
|  |   show the correct content-length. Only these files work for upload. | ||||||
|  |   http://curl.haxx.se/bug/view.cgi?id=2057858 | ||||||
|  |  | ||||||
|  | 56. When libcurl sends CURLOPT_POSTQUOTE commands when connected to a SFTP | ||||||
|  |   server using the multi interface, the commands are not being sent correctly | ||||||
|  |   and instead the connection is "cancelled" (the operation is considered done) | ||||||
|  |   prematurely. There is a half-baked (busy-looping) patch provided in the bug | ||||||
|  |   report but it cannot be accepted as-is. See | ||||||
|  |   http://curl.haxx.se/bug/view.cgi?id=2006544 | ||||||
|  |  | ||||||
|  | 55. libcurl fails to build with MIT Kerberos for Windows (KfW) due to KfW's | ||||||
|  |   library header files exporting symbols/macros that should be kept private | ||||||
|  |   to the KfW library. See ticket #5601 at http://krbdev.mit.edu/rt/ | ||||||
|  |  | ||||||
|  | 53. SFTP busy-loop problem. When doing SFTP uploads, we can see that libcurl | ||||||
|  |   occasionally will busy-loop while waiting for certain network conditions. | ||||||
|  |   Reported by Pavel Shalagin, explained somewhat by Daniel Stenberg here: | ||||||
|  |   http://curl.haxx.se/mail/lib-2008-04/0439.html | ||||||
|  |  | ||||||
| 52. Gautam Kachroo's issue that identifies a problem with the multi interface | 52. Gautam Kachroo's issue that identifies a problem with the multi interface | ||||||
|   where a connection can be re-used without actually being properly |   where a connection can be re-used without actually being properly | ||||||
|   SSL-negoatiated: |   SSL-negoatiated: | ||||||
| @@ -12,7 +39,8 @@ may have been fixed since this was written! | |||||||
|   -y/-Y) the next attempt doesn't resume the transfer properly from what was |   -y/-Y) the next attempt doesn't resume the transfer properly from what was | ||||||
|   downloaded in the previous attempt but will truncate and restart at the |   downloaded in the previous attempt but will truncate and restart at the | ||||||
|   original position where it was at before the previous failed attempt. See |   original position where it was at before the previous failed attempt. See | ||||||
|   http://curl.haxx.se/mail/lib-2008-01/0080.html |   http://curl.haxx.se/mail/lib-2008-01/0080.html and Mandriva bug report | ||||||
|  |   https://qa.mandriva.com/show_bug.cgi?id=22565 | ||||||
|  |  | ||||||
| 48. If a CONNECT response-headers are larger than BUFSIZE (16KB) when the | 48. If a CONNECT response-headers are larger than BUFSIZE (16KB) when the | ||||||
|   connection is meant to be kept alive (like for NTLM proxy auth), the |   connection is meant to be kept alive (like for NTLM proxy auth), the | ||||||
| @@ -132,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 |   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]'. |   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 | 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). |   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 |   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 \ |         curl -u username: --key ~/.ssh/id_dsa --pubkey ~/.ssh/id_dsa.pub \ | ||||||
|         	scp://shell.example.com/~/personal.txt |         	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 | DOWNLOAD TO A FILE | ||||||
|  |  | ||||||
| @@ -86,6 +89,13 @@ USING PASSWORDS | |||||||
|    standards while the recommended "explicit" way is done by using FTP:// and |    standards while the recommended "explicit" way is done by using FTP:// and | ||||||
|    the --ftp-ssl option. |    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 |  HTTP | ||||||
|  |  | ||||||
|    Curl also supports user and password in HTTP URLs, thus you can pick a file |    Curl also supports user and password in HTTP URLs, thus you can pick a file | ||||||
| @@ -154,9 +164,9 @@ RANGES | |||||||
|  |  | ||||||
| UPLOADING | 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 |         curl -T - ftp://ftp.upload.com/myfile | ||||||
|  |  | ||||||
| @@ -169,7 +179,7 @@ UPLOADING | |||||||
|   |   | ||||||
|         curl -T uploadfile -u user:passwd ftp://ftp.upload.com/ |         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 |         curl -T localfile -a ftp://ftp.upload.com/remotefile | ||||||
|  |  | ||||||
| @@ -331,7 +341,7 @@ REFERRER | |||||||
|  |  | ||||||
|         curl -e www.coolsite.com http://www.showme.com/ |         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 | USER AGENT | ||||||
|  |  | ||||||
| @@ -496,7 +506,7 @@ CONFIG FILE | |||||||
|   with = or :. Comments can be used within the file. If the first letter on a |   with = or :. Comments can be used within the file. If the first letter on a | ||||||
|   line is a '#'-letter the rest of the line is treated as a comment. |   line is a '#'-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 |   parameter within double quotes ("). Within those quotes, you specify a | ||||||
|   quote as \". |   quote as \". | ||||||
|  |  | ||||||
| @@ -564,10 +574,18 @@ FTP and PATH NAMES | |||||||
|  |  | ||||||
|   (I.e with an extra slash in front of the file name.) |   (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 | FTP and firewalls | ||||||
|  |  | ||||||
|   The FTP protocol requires one of the involved parties to open a second |   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. |   do this. | ||||||
|  |  | ||||||
|   The default way for curl is to issue the PASV command which causes the |   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 |   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 |   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 |   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 |   For example: get two files and use -O for the first and a custom file | ||||||
|   name for the second: |   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 |     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 | MAILING LISTS | ||||||
|  |  | ||||||
|   For your convenience, we have several open mailing lists to discuss curl, |   For your convenience, we have several open mailing lists to discuss curl, | ||||||
|   | |||||||
							
								
								
									
										55
									
								
								docs/THANKS
									
									
									
									
									
								
							
							
						
						
									
										55
									
								
								docs/THANKS
									
									
									
									
									
								
							| @@ -26,13 +26,16 @@ Alexey Simak | |||||||
| Alexis Carvalho | Alexis Carvalho | ||||||
| Allen Pulsifer | Allen Pulsifer | ||||||
| Amol Pattekar | Amol Pattekar | ||||||
|  | Anatoli Tubman | ||||||
| Anders Gustafsson | Anders Gustafsson | ||||||
| Andi Jahja | Andi Jahja | ||||||
| Andre Guibert de Bruet | Andre Guibert de Bruet | ||||||
| Andreas Damm | Andreas Damm | ||||||
|  | Andreas Faerber | ||||||
| Andreas Ntaflos | Andreas Ntaflos | ||||||
| Andreas Olsson | Andreas Olsson | ||||||
| Andreas Rieke | Andreas Rieke | ||||||
|  | Andreas Schuldei | ||||||
| Andres Garcia | Andres Garcia | ||||||
| Andrew Benham | Andrew Benham | ||||||
| Andrew Biggs | Andrew Biggs | ||||||
| @@ -44,17 +47,22 @@ Andrew Wansink | |||||||
| Andr<EFBFBD>s Garc<72>a | Andr<EFBFBD>s Garc<72>a | ||||||
| Andy Cedilnik | Andy Cedilnik | ||||||
| Andy Serpa | Andy Serpa | ||||||
|  | Andy Tsouladze | ||||||
| Angus Mackay | Angus Mackay | ||||||
| Antoine Calando | Antoine Calando | ||||||
| Anton Kalmykov | Anton Kalmykov | ||||||
| Arkadiusz Miskiewicz | Arkadiusz Miskiewicz | ||||||
| Armel Asselin | Armel Asselin | ||||||
|  | Arnaud Ebalard | ||||||
| Arve Knudsen | Arve Knudsen | ||||||
| Ates Goral | Ates Goral | ||||||
| Augustus Saunders | Augustus Saunders | ||||||
| Avery Fay | Avery Fay | ||||||
|  | Axel Tillequin | ||||||
|  | Bart Whiteley | ||||||
| Ben Greear | Ben Greear | ||||||
| Ben Madsen | Ben Madsen | ||||||
|  | Ben Van Hof | ||||||
| Benjamin Gerard | Benjamin Gerard | ||||||
| Bernard Leak | Bernard Leak | ||||||
| Bertrand Demiddelaer | Bertrand Demiddelaer | ||||||
| @@ -69,6 +77,8 @@ Brent Beardsley | |||||||
| Brian Akins | Brian Akins | ||||||
| Brian Dessent | Brian Dessent | ||||||
| Brian R Duffy | Brian R Duffy | ||||||
|  | Brian Ulm | ||||||
|  | Brock Noland | ||||||
| Bruce Mitchener | Bruce Mitchener | ||||||
| Bryan Henderson | Bryan Henderson | ||||||
| Bryan Kemp | Bryan Kemp | ||||||
| @@ -85,6 +95,7 @@ Christian Robottom Reis | |||||||
| Christian Vogt | Christian Vogt | ||||||
| Christophe Demory | Christophe Demory | ||||||
| Christophe Legry | Christophe Legry | ||||||
|  | Christopher Palow | ||||||
| Christopher R. Palmer | Christopher R. Palmer | ||||||
| Ciprian Badescu | Ciprian Badescu | ||||||
| Clarence Gardner | Clarence Gardner | ||||||
| @@ -93,6 +104,7 @@ Cody Jones | |||||||
| Colin Hogben | Colin Hogben | ||||||
| Colin Watson | Colin Watson | ||||||
| Colm Buckley | Colm Buckley | ||||||
|  | Constantine Sapuntzakis | ||||||
| Cory Nelson | Cory Nelson | ||||||
| Craig Davison | Craig Davison | ||||||
| Craig Markwardt | Craig Markwardt | ||||||
| @@ -103,11 +115,13 @@ Dan Becker | |||||||
| Dan C | Dan C | ||||||
| Dan Fandrich | Dan Fandrich | ||||||
| Dan Nelson | Dan Nelson | ||||||
|  | Dan Petitt | ||||||
| Dan Torop | Dan Torop | ||||||
| Dan Zitter | Dan Zitter | ||||||
| Daniel Black | Daniel Black | ||||||
| Daniel Cater | Daniel Cater | ||||||
| Daniel Egger | Daniel Egger | ||||||
|  | Daniel Fandrich | ||||||
| Daniel Johnson | Daniel Johnson | ||||||
| Daniel Stenberg | Daniel Stenberg | ||||||
| Daniel at touchtunes | Daniel at touchtunes | ||||||
| @@ -117,6 +131,7 @@ Dave Halbakken | |||||||
| Dave Hamilton | Dave Hamilton | ||||||
| Dave May | Dave May | ||||||
| Dave Vasilevsky | Dave Vasilevsky | ||||||
|  | David Bau | ||||||
| David Byron | David Byron | ||||||
| David Cohen | David Cohen | ||||||
| David Eriksson | David Eriksson | ||||||
| @@ -130,11 +145,13 @@ David LeBlanc | |||||||
| David McCreedy | David McCreedy | ||||||
| David Odin | David Odin | ||||||
| David Phillips | David Phillips | ||||||
|  | David Rosenstrauch | ||||||
| David Shaw | David Shaw | ||||||
| David Tarendash | David Tarendash | ||||||
| David Thiel | David Thiel | ||||||
| David Wright | David Wright | ||||||
| David Yan | David Yan | ||||||
|  | Dengminwen | ||||||
| Detlef Schmier | Detlef Schmier | ||||||
| Diego Casorran | Diego Casorran | ||||||
| Dima Barsky | Dima Barsky | ||||||
| @@ -145,6 +162,7 @@ Dirk Manske | |||||||
| Dmitriy Sergeyev | Dmitriy Sergeyev | ||||||
| Dmitry Bartsevich | Dmitry Bartsevich | ||||||
| Dmitry Kurochkin | Dmitry Kurochkin | ||||||
|  | Dmitry Popov | ||||||
| Dmitry Rechkin | Dmitry Rechkin | ||||||
| Dolbneff A.V | Dolbneff A.V | ||||||
| Domenico Andreoli | Domenico Andreoli | ||||||
| @@ -161,6 +179,8 @@ Dylan Ellicott | |||||||
| Dylan Salisbury | Dylan Salisbury | ||||||
| Early Ehlinger | Early Ehlinger | ||||||
| Edin Kadribasic | Edin Kadribasic | ||||||
|  | Eduard Bloch | ||||||
|  | Eetu Ojanen | ||||||
| Ellis Pritchard | Ellis Pritchard | ||||||
| Emil Romanus | Emil Romanus | ||||||
| Emiliano Ida | Emiliano Ida | ||||||
| @@ -193,6 +213,7 @@ Fred New | |||||||
| Fred Noz | Fred Noz | ||||||
| Frederic Lepied | Frederic Lepied | ||||||
| Gary Maxwell | Gary Maxwell | ||||||
|  | Gautam Kachroo | ||||||
| Gautam Mani | Gautam Mani | ||||||
| Gavrie Philipson | Gavrie Philipson | ||||||
| Gaz Iqbal | Gaz Iqbal | ||||||
| @@ -228,6 +249,7 @@ Hamish Mackenzie | |||||||
| Hang Kin Lau | Hang Kin Lau | ||||||
| Hanno Kranzhoff | Hanno Kranzhoff | ||||||
| Hans Steegers | Hans Steegers | ||||||
|  | Hans-Jurgen May | ||||||
| Hardeep Singh | Hardeep Singh | ||||||
| Harshal Pradhan | Harshal Pradhan | ||||||
| Heikki Korpela | Heikki Korpela | ||||||
| @@ -267,6 +289,7 @@ Jayesh A Shah | |||||||
| Jaz Fresh | Jaz Fresh | ||||||
| Jean Jacques Drouin | Jean Jacques Drouin | ||||||
| Jean-Claude Chauve | Jean-Claude Chauve | ||||||
|  | Jean-Francois Bertrand | ||||||
| Jean-Louis Lemaire | Jean-Louis Lemaire | ||||||
| Jean-Marc Ranger | Jean-Marc Ranger | ||||||
| Jean-Philippe Barrette-LaPierre | Jean-Philippe Barrette-LaPierre | ||||||
| @@ -274,8 +297,11 @@ Jeff Johnson | |||||||
| Jeff Lawson | Jeff Lawson | ||||||
| Jeff Phillips | Jeff Phillips | ||||||
| Jeff Pohlmeyer | Jeff Pohlmeyer | ||||||
|  | Jeff Weber | ||||||
| Jeffrey Pohlmeyer | Jeffrey Pohlmeyer | ||||||
| Jeremy Friesner | Jeremy Friesner | ||||||
|  | Jerome Muffat-Meridol | ||||||
|  | Jes Badwal | ||||||
| Jesper Jensen | Jesper Jensen | ||||||
| Jesse Noller | Jesse Noller | ||||||
| Jim Drash | Jim Drash | ||||||
| @@ -289,6 +315,7 @@ John Crow | |||||||
| John Janssen | John Janssen | ||||||
| John Kelly | John Kelly | ||||||
| John Lask | John Lask | ||||||
|  | John Lightsey | ||||||
| John McGowan | John McGowan | ||||||
| Johnny Luong | Johnny Luong | ||||||
| Jon Grubbs | Jon Grubbs | ||||||
| @@ -316,6 +343,7 @@ Kai-Uwe Rommel | |||||||
| Kang-Jin Lee | Kang-Jin Lee | ||||||
| Karl Moerder | Karl Moerder | ||||||
| Karol Pietrzak | Karol Pietrzak | ||||||
|  | Kaspar Brand | ||||||
| Katie Wang | Katie Wang | ||||||
| Kees Cook | Kees Cook | ||||||
| Keith MacDonald | Keith MacDonald | ||||||
| @@ -348,6 +376,8 @@ Lau Hang Kin | |||||||
| Legoff Vincent | Legoff Vincent | ||||||
| Lehel Bernadt | Lehel Bernadt | ||||||
| Len Krause | Len Krause | ||||||
|  | Lenny Rachitsky | ||||||
|  | Liam Healy | ||||||
| Linas Vepstas | Linas Vepstas | ||||||
| Ling Thio | Ling Thio | ||||||
| Linus Nielsen Feltzing | Linus Nielsen Feltzing | ||||||
| @@ -363,7 +393,7 @@ Maciej Karpiuk | |||||||
| Maciej W. Rozycki | Maciej W. Rozycki | ||||||
| Manfred Schwarb | Manfred Schwarb | ||||||
| Marc Boucher | Marc Boucher | ||||||
| Marcelo Juchem  | Marcelo Juchem | ||||||
| Marcin Konicki | Marcin Konicki | ||||||
| Marco G. Salvagno | Marco G. Salvagno | ||||||
| Marcus Webster | Marcus Webster | ||||||
| @@ -396,6 +426,7 @@ Maxim Perenesenko | |||||||
| Mekonikum | Mekonikum | ||||||
| Mettgut Jamalla | Mettgut Jamalla | ||||||
| Michael Benedict | Michael Benedict | ||||||
|  | Michael Calmer | ||||||
| Michael Curtis | Michael Curtis | ||||||
| Michael Jahn | Michael Jahn | ||||||
| Michael Jerris | Michael Jerris | ||||||
| @@ -408,6 +439,7 @@ Mihai Ionescu | |||||||
| Mikael Sennerholm | Mikael Sennerholm | ||||||
| Mike Bytnar | Mike Bytnar | ||||||
| Mike Dobbs | Mike Dobbs | ||||||
|  | Mike Hommey | ||||||
| Mike Protts | Mike Protts | ||||||
| Miklos Nemeth | Miklos Nemeth | ||||||
| Mitz Wark | Mitz Wark | ||||||
| @@ -431,9 +463,12 @@ Nicolas Fran | |||||||
| Niels van Tongeren | Niels van Tongeren | ||||||
| Nikita Schmidt | Nikita Schmidt | ||||||
| Nikitinskit Dmitriy | Nikitinskit Dmitriy | ||||||
|  | Niklas Angebrand | ||||||
|  | Nikolai Kondrashov | ||||||
| Nir Soffer | Nir Soffer | ||||||
| Nis Jorgensen | Nis Jorgensen | ||||||
| Nodak Sodak | Nodak Sodak | ||||||
|  | Norbert Frese | ||||||
| Norbert Novotny | Norbert Novotny | ||||||
| Ofer | Ofer | ||||||
| Olaf Stueben | Olaf Stueben | ||||||
| @@ -456,6 +491,7 @@ Pete Su | |||||||
| Peter Bray | Peter Bray | ||||||
| Peter Forret | Peter Forret | ||||||
| Peter Heuchert | Peter Heuchert | ||||||
|  | Peter Lamberg | ||||||
| Peter O'Gorman | Peter O'Gorman | ||||||
| Peter Pentchev | Peter Pentchev | ||||||
| Peter Silva | Peter Silva | ||||||
| @@ -465,15 +501,20 @@ Peter Todd | |||||||
| Peter Verhas | Peter Verhas | ||||||
| Peter Wullinger | Peter Wullinger | ||||||
| Peteris Krumins | Peteris Krumins | ||||||
|  | Phil Blundell | ||||||
| Phil Karn | Phil Karn | ||||||
|  | Phil Pellouchoud | ||||||
| Philip Gladstone | Philip Gladstone | ||||||
| Philip Langdale | Philip Langdale | ||||||
| Philippe Hameau | Philippe Hameau | ||||||
| Philippe Raoult | Philippe Raoult | ||||||
| Philippe Vaucher | Philippe Vaucher | ||||||
| Pierre | Pierre | ||||||
|  | Pooyan McSporran | ||||||
|  | Pramod Sharma | ||||||
| Puneet Pawaia | Puneet Pawaia | ||||||
| Quagmire | Quagmire | ||||||
|  | Rafa Muyo | ||||||
| Rafael Sagula | Rafael Sagula | ||||||
| Ralf S. Engelschall | Ralf S. Engelschall | ||||||
| Ralph Beckmann | Ralph Beckmann | ||||||
| @@ -515,6 +556,7 @@ Rodney Simmons | |||||||
| Roland Blom | Roland Blom | ||||||
| Roland Krikava | Roland Krikava | ||||||
| Roland Zimmermann | Roland Zimmermann | ||||||
|  | Rolland Dudemaine | ||||||
| Roman Koifman | Roman Koifman | ||||||
| Ron Zapp | Ron Zapp | ||||||
| Rosimildo da Silva | Rosimildo da Silva | ||||||
| @@ -524,13 +566,17 @@ Ryan Nelson | |||||||
| S. Moonesamy | S. Moonesamy | ||||||
| Salvador D<>vila | Salvador D<>vila | ||||||
| Salvatore Sorrentino | Salvatore Sorrentino | ||||||
|  | Sam Listopad | ||||||
| Sampo Kellomaki | Sampo Kellomaki | ||||||
| Samuel D<>az Garc<72>a | Samuel D<>az Garc<72>a | ||||||
| Samuel Listopad | Samuel Listopad | ||||||
| Sander Gates | Sander Gates | ||||||
|  | Sandor Feldi | ||||||
| Saul good | Saul good | ||||||
|  | Scott Barrett | ||||||
| Scott Cantor | Scott Cantor | ||||||
| Scott Davis | Scott Davis | ||||||
|  | Scott McCreary | ||||||
| Sebastien Willemijns | Sebastien Willemijns | ||||||
| Sergio Ballestrero | Sergio Ballestrero | ||||||
| Seshubabu Pasam | Seshubabu Pasam | ||||||
| @@ -551,6 +597,7 @@ Stefan Esser | |||||||
| Stefan Krause | Stefan Krause | ||||||
| Stefan Ulrich | Stefan Ulrich | ||||||
| Stephan Bergmann | Stephan Bergmann | ||||||
|  | Stephen Collyer | ||||||
| Stephen Kick | Stephen Kick | ||||||
| Stephen More | Stephen More | ||||||
| Sterling Hughes | Sterling Hughes | ||||||
| @@ -605,6 +652,7 @@ Victor Snezhko | |||||||
| Vikram Saxena | Vikram Saxena | ||||||
| Vilmos Nebehaj | Vilmos Nebehaj | ||||||
| Vincent Bronner | Vincent Bronner | ||||||
|  | Vincent Le Normand | ||||||
| Vincent Penquerc'h | Vincent Penquerc'h | ||||||
| Vincent Sanders | Vincent Sanders | ||||||
| Vladimir Lazarenko | Vladimir Lazarenko | ||||||
| @@ -620,8 +668,11 @@ Wojciech Zwiefka | |||||||
| Xavier Bouchoux | Xavier Bouchoux | ||||||
| Yang Tse | Yang Tse | ||||||
| Yarram Sunil | Yarram Sunil | ||||||
|  | Yehoshua Hershberg | ||||||
|  | Yuriy Sosov | ||||||
| Yves Lejeune | Yves Lejeune | ||||||
| Zvi Har'El  | Zmey Petroff | ||||||
|  | Zvi Har'El | ||||||
| nk | nk | ||||||
| swalkaus at yahoo.com | swalkaus at yahoo.com | ||||||
| tommink[at]post.pl | tommink[at]post.pl | ||||||
|   | |||||||
							
								
								
									
										68
									
								
								docs/TODO
									
									
									
									
									
								
							
							
						
						
									
										68
									
								
								docs/TODO
									
									
									
									
									
								
							| @@ -18,6 +18,7 @@ | |||||||
|  1.4 Get IP address |  1.4 Get IP address | ||||||
|  1.5 c-ares ipv6 |  1.5 c-ares ipv6 | ||||||
|  1.6 configure-based info in public headers |  1.6 configure-based info in public headers | ||||||
|  |  1.7 signal-based resolver timeouts | ||||||
|  |  | ||||||
|  2. libcurl - multi interface |  2. libcurl - multi interface | ||||||
|  2.1 More non-blocking |  2.1 More non-blocking | ||||||
| @@ -39,33 +40,35 @@ | |||||||
|  |  | ||||||
|  5. HTTP |  5. HTTP | ||||||
|  5.1 Other HTTP versions with CONNECT |  5.1 Other HTTP versions with CONNECT | ||||||
|  5.2 Better persistancy for HTTP 1.0 |  5.2 Better persistency for HTTP 1.0 | ||||||
|  5.3 support FF3 sqlite cookie files |  5.3 support FF3 sqlite cookie files | ||||||
|  |  | ||||||
|  6. TELNET |  6. TELNET | ||||||
|  6.1 ditch stdin |  6.1 ditch stdin | ||||||
|  6.2 ditch telnet-specific select |  6.2 ditch telnet-specific select | ||||||
|  |  6.3 feature negotiation debug data | ||||||
|  |  6.4 send data in chunks | ||||||
|  |  | ||||||
|  7. SSL |  7. SSL | ||||||
|  7.1 Disable specific versions |  7.1 Disable specific versions | ||||||
|  7.2 Provide mytex locking API |  7.2 Provide mutex locking API | ||||||
|  7.3 dumpcert |  7.3 dumpcert | ||||||
|  7.4 Evaluate SSL patches |  7.4 Evaluate SSL patches | ||||||
|  7.5 Cache OpenSSL contexts |  7.5 Cache OpenSSL contexts | ||||||
|  7.6 Export session ids |  7.6 Export session ids | ||||||
|  7.7 Provide callback for cert verfication |  7.7 Provide callback for cert verification | ||||||
|  7.8 Support other SSL libraries |  7.8 Support other SSL libraries | ||||||
|  7.9  Support SRP on the TLS layer |  7.9  Support SRP on the TLS layer | ||||||
|  7.10 improve configure --with-ssl |  7.10 improve configure --with-ssl | ||||||
|  |  | ||||||
|  8. GnuTLS |  8. GnuTLS | ||||||
|  8.1 Make NTLM work without OpenSSL functions |  8.1 Make NTLM work without OpenSSL functions | ||||||
|  8.2 SSl engine stuff |  8.2 SSL engine stuff | ||||||
|  8.3 SRP |  8.3 SRP | ||||||
|  8.4 non-blocking |  8.4 non-blocking | ||||||
|  8.5 check connection |  8.5 check connection | ||||||
|  |  | ||||||
|  9. LDAP |  9. Other protocols | ||||||
|  9.1 ditch ldap-specific select |  9.1 ditch ldap-specific select | ||||||
|  |  | ||||||
|  10. New protocols |  10. New protocols | ||||||
| @@ -82,6 +85,8 @@ | |||||||
|  11.6 simultaneous parallel transfers |  11.6 simultaneous parallel transfers | ||||||
|  11.7 provide formpost headers |  11.7 provide formpost headers | ||||||
|  11.8 url-specific options |  11.8 url-specific options | ||||||
|  |  11.9 metalink support | ||||||
|  |  11.10 warning when setting an option | ||||||
|  |  | ||||||
|  12. Build |  12. Build | ||||||
|  12.1 roffit |  12.1 roffit | ||||||
| @@ -111,7 +116,7 @@ | |||||||
|  |  | ||||||
| 1.1 Zero-copy interface | 1.1 Zero-copy interface | ||||||
|  |  | ||||||
|  Introdue another callback interface for upload/download that makes one less |  Introduce another callback interface for upload/download that makes one less | ||||||
|  copy of data and thus a faster operation. |  copy of data and thus a faster operation. | ||||||
|  [http://curl.haxx.se/dev/no_copy_callbacks.txt] |  [http://curl.haxx.se/dev/no_copy_callbacks.txt] | ||||||
|  |  | ||||||
| @@ -148,7 +153,7 @@ | |||||||
|  know MUST have it. This is error-prone. We therefore want the header files to |  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 |  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 |  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). |  a collision 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 |  Work on this has been started but hasn't been finished, and the initial patch | ||||||
|  and some details are found here: |  and some details are found here: | ||||||
| @@ -157,11 +162,23 @@ | |||||||
|  The remaining problems to solve involve the platforms that can't run |  The remaining problems to solve involve the platforms that can't run | ||||||
|  configure. |  configure. | ||||||
|  |  | ||||||
|  | 1.7 signal-based resolver timeouts | ||||||
|  |  | ||||||
|  |  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 | ||||||
|  |  | ||||||
|  |  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. libcurl - multi interface | ||||||
|  |  | ||||||
| 2.1 More non-blocking | 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. |  EWOULDBLOCK or similar. The GnuTLS connection etc. | ||||||
|  |  | ||||||
| 2.2 Pause transfers | 2.2 Pause transfers | ||||||
| @@ -258,7 +275,7 @@ | |||||||
|  never been reported as causing trouble to anyone, but should be considered to |  never been reported as causing trouble to anyone, but should be considered to | ||||||
|  use the HTTP version the user has chosen. |  use the HTTP version the user has chosen. | ||||||
|  |  | ||||||
| 5.2 Better persistancy for HTTP 1.0 | 5.2 Better persistency for HTTP 1.0 | ||||||
|  |  | ||||||
|  "Better" support for persistent connections over HTTP 1.0 |  "Better" support for persistent connections over HTTP 1.0 | ||||||
|  http://curl.haxx.se/bug/feature.cgi?id=1089001 |  http://curl.haxx.se/bug/feature.cgi?id=1089001 | ||||||
| @@ -283,6 +300,16 @@ to provide the data to send. | |||||||
|  into the main transfer loop. Until this is done, the multi interface won't |  into the main transfer loop. Until this is done, the multi interface won't | ||||||
|  work for telnet. |  work for telnet. | ||||||
|  |  | ||||||
|  | 6.3 feature negotiation debug data | ||||||
|  |  | ||||||
|  |   Add telnet feature negotiation data to the debug callback as header data. | ||||||
|  |  | ||||||
|  | 6.4 send data in chunks | ||||||
|  |  | ||||||
|  |   Currently, telnet sends data one byte at a time.  This is fine for interactive | ||||||
|  |   use, but inefficient for any other.  Sent data should be sent in larger | ||||||
|  |   chunks. | ||||||
|  |  | ||||||
| 7. SSL | 7. SSL | ||||||
|  |  | ||||||
| 7.1 Disable specific versions | 7.1 Disable specific versions | ||||||
| @@ -290,7 +317,7 @@ to provide the data to send. | |||||||
|  Provide an option that allows for disabling specific SSL versions, such as |  Provide an option that allows for disabling specific SSL versions, such as | ||||||
|  SSLv2 http://curl.haxx.se/bug/feature.cgi?id=1767276 |  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 |  Provide a libcurl API for setting mutex callbacks in the underlying SSL | ||||||
|  library, so that the same application code can use mutex-locking |  library, so that the same application code can use mutex-locking | ||||||
| @@ -324,7 +351,7 @@ to provide the data to send. | |||||||
|  the state from such a buffer at a later date - this is used by mod_ssl for |  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". |  apache to implement and SSL session ID cache". | ||||||
|  |  | ||||||
| 7.7 Provide callback for cert verfication | 7.7 Provide callback for cert verification | ||||||
|  |  | ||||||
|  OpenSSL supports a callback for customised verification of the peer |  OpenSSL supports a callback for customised verification of the peer | ||||||
|  certificate, but this doesn't seem to be exposed in the libcurl APIs. Could |  certificate, but this doesn't seem to be exposed in the libcurl APIs. Could | ||||||
| @@ -355,7 +382,7 @@ to provide the data to send. | |||||||
|  hey... Another option is to get available DES and MD4 source code from the |  hey... Another option is to get available DES and MD4 source code from the | ||||||
|  cryptopp library. They are fine license-wise, but are C++. |  cryptopp library. They are fine license-wise, but are C++. | ||||||
|  |  | ||||||
| 8.2 SSl engine stuff | 8.2 SSL engine stuff | ||||||
|  |  | ||||||
|  Is this even possible? |  Is this even possible? | ||||||
|  |  | ||||||
| @@ -373,7 +400,7 @@ to provide the data to send. | |||||||
|  Add a way to check if the connection seems to be alive, to correspond to the |  Add a way to check if the connection seems to be alive, to correspond to the | ||||||
|  SSL_peak() way we use with OpenSSL. |  SSL_peak() way we use with OpenSSL. | ||||||
|  |  | ||||||
| 9. LDAP | 9. Other protocols | ||||||
|  |  | ||||||
| 9.1 ditch ldap-specific select | 9.1 ditch ldap-specific select | ||||||
|  |  | ||||||
| @@ -381,6 +408,10 @@ to provide the data to send. | |||||||
|    lib/ldap.c source file and get moved to the main network code so that the |    lib/ldap.c source file and get moved to the main network code so that the | ||||||
|    multi interface and friends will work for LDAP as well. |    multi interface and friends will work for LDAP as well. | ||||||
|  |  | ||||||
|  | 9.2 stop TFTP blocking | ||||||
|  |  | ||||||
|  |   Stop TFTP from being blocking and doing its own read loop in tftp_do. | ||||||
|  |  | ||||||
| 10. New protocols | 10. New protocols | ||||||
|  |  | ||||||
| 10.1 RTSP | 10.1 RTSP | ||||||
| @@ -468,6 +499,17 @@ to provide the data to send. | |||||||
|  |  | ||||||
|  The example would do a POST-GET-POST combination on a single command line. |  The example would do a POST-GET-POST combination on a single command line. | ||||||
|  |  | ||||||
|  | 11.9 metalink support | ||||||
|  |  | ||||||
|  |  Add metalink support to curl (http://www.metalinker.org/). This is most useful | ||||||
|  |  with simultaneous parallel transfers (11.6) but not necessary. | ||||||
|  |  | ||||||
|  | 11.10 warning when setting an option | ||||||
|  |  | ||||||
|  |   Display a warning when libcurl returns an error when setting an option. | ||||||
|  |   This can be useful to tell when support for a particular feature hasn't been | ||||||
|  |   compiled into the library. | ||||||
|  |  | ||||||
| 12. Build | 12. Build | ||||||
|  |  | ||||||
| 12.1 roffit | 12.1 roffit | ||||||
|   | |||||||
| @@ -1,5 +1,5 @@ | |||||||
| Online:  http://curl.haxx.se/docs/httpscripting.html | Online:  http://curl.haxx.se/docs/httpscripting.html | ||||||
| Date:    December 9, 2004 | Date:    May 28, 2008 | ||||||
|  |  | ||||||
|                 The Art Of Scripting HTTP Requests Using Curl |                 The Art Of Scripting HTTP Requests Using Curl | ||||||
|                 ============================================= |                 ============================================= | ||||||
| @@ -137,6 +137,10 @@ Date:    December 9, 2004 | |||||||
|   you need to replace that space with %20 etc. Failing to comply with this |   you need to replace that space with %20 etc. Failing to comply with this | ||||||
|   will most likely cause your data to be received wrongly and messed up. |   will most likely cause your data to be received wrongly and messed up. | ||||||
|  |  | ||||||
|  |   Recent curl versions can in fact url-encode POST data for you, like this: | ||||||
|  |  | ||||||
|  |         curl --data-urlencode "name=I am Daniel" www.example.com | ||||||
|  |  | ||||||
|  4.3 File Upload POST |  4.3 File Upload POST | ||||||
|  |  | ||||||
|   Back in late 1995 they defined an additional way to post data over HTTP. It |   Back in late 1995 they defined an additional way to post data over HTTP. It | ||||||
| @@ -202,14 +206,14 @@ Date:    December 9, 2004 | |||||||
|  |  | ||||||
|         curl -T uploadfile www.uploadhttp.com/receive.cgi |         curl -T uploadfile www.uploadhttp.com/receive.cgi | ||||||
|  |  | ||||||
| 6. Authentication | 6. HTTP Authentication | ||||||
|  |  | ||||||
|  Authentication is the ability to tell the server your username and password |  HTTP Authentication is the ability to tell the server your username and | ||||||
|  so that it can verify that you're allowed to do the request you're doing. The |  password so that it can verify that you're allowed to do the request you're | ||||||
|  Basic authentication used in HTTP (which is the type curl uses by default) is |  doing. The Basic authentication used in HTTP (which is the type curl uses by | ||||||
|  *plain* *text* based, which means it sends username and password only |  default) is *plain* *text* based, which means it sends username and password | ||||||
|  slightly obfuscated, but still fully readable by anyone that sniffs on the |  only slightly obfuscated, but still fully readable by anyone that sniffs on | ||||||
|  network between you and the remote server. |  the network between you and the remote server. | ||||||
|  |  | ||||||
|  To tell curl to use a user and password for authentication: |  To tell curl to use a user and password for authentication: | ||||||
|  |  | ||||||
| @@ -237,6 +241,10 @@ Date:    December 9, 2004 | |||||||
|  able to watch your passwords if you pass them as plain command line |  able to watch your passwords if you pass them as plain command line | ||||||
|  options. There are ways to circumvent this. |  options. There are ways to circumvent this. | ||||||
|  |  | ||||||
|  |  It is worth noting that while this is how HTTP Authentication works, very | ||||||
|  |  many web sites will not use this concept when they provide logins etc. See | ||||||
|  |  the Web Login chapter further below for more details on that. | ||||||
|  |  | ||||||
| 7. Referer | 7. Referer | ||||||
|  |  | ||||||
|  A HTTP request may include a 'referer' field (yes it is misspelled), which |  A HTTP request may include a 'referer' field (yes it is misspelled), which | ||||||
| @@ -367,12 +375,11 @@ Date:    December 9, 2004 | |||||||
|  11.1 Certificates |  11.1 Certificates | ||||||
|  |  | ||||||
|   In the HTTPS world, you use certificates to validate that you are the one |   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 |   you claim to be, as an addition to normal passwords. Curl supports client- | ||||||
|   client-side certificates. All certificates are locked with a pass phrase, |   side certificates. All certificates are locked with a pass phrase, which you | ||||||
|   which you need to enter before the certificate can be used by curl. The pass |   need to enter before the certificate can be used by curl. The pass phrase | ||||||
|   phrase can be specified on the command line or if not, entered interactively |   can be specified on the command line or if not, entered interactively when | ||||||
|   when curl queries for it. Use a certificate with curl on a HTTPS server |   curl queries for it. Use a certificate with curl on a HTTPS server like: | ||||||
|   like: |  | ||||||
|  |  | ||||||
|         curl -E mycert.pem https://that.secure.server.com |         curl -E mycert.pem https://that.secure.server.com | ||||||
|  |  | ||||||
| @@ -407,7 +414,37 @@ Date:    December 9, 2004 | |||||||
|  |  | ||||||
|         curl -H "Destination: http://moo.com/nowhere" http://url.com |         curl -H "Destination: http://moo.com/nowhere" http://url.com | ||||||
|  |  | ||||||
| 13. Debug | 13. Web Login | ||||||
|  |  | ||||||
|  |  While not strictly just HTTP related, it still cause a lot of people problems | ||||||
|  |  so here's the executive run-down of how the vast majority of all login forms | ||||||
|  |  work and how to login to them using curl. | ||||||
|  |  | ||||||
|  |  It can also be noted that to do this properly in an automated fashion, you | ||||||
|  |  will most certainly need to script things and do multiple curl invokes etc. | ||||||
|  |  | ||||||
|  |  First, servers mostly use cookies to track the logged-in status of the | ||||||
|  |  client, so you will need to capture the cookies you receive in the | ||||||
|  |  responses. Then, many sites also set a special cookie on the login page (to | ||||||
|  |  make sure you got there through their login page) so you should make a habit | ||||||
|  |  of first getting the login-form page to capture the cookies set there. | ||||||
|  |  | ||||||
|  |  Some web-based login systems features various amounts of javascript, and | ||||||
|  |  sometimes they use such code to set or modify cookie contents. Possibly they | ||||||
|  |  do that to prevent programmed logins, like this manual describes how to... | ||||||
|  |  Anyway, if reading the code isn't enough to let you repeat the behavior | ||||||
|  |  manually, capturing the HTTP requests done by your browers and analyzing the | ||||||
|  |  sent cookies is usually a working method to work out how to shortcut the | ||||||
|  |  javascript need. | ||||||
|  |  | ||||||
|  |  In the actual <form> tag for the login, lots of sites fill-in random/session | ||||||
|  |  or otherwise secretly generated hidden tags and you may need to first capture | ||||||
|  |  the HTML code for the login form and extract all the hidden fields to be able | ||||||
|  |  to do a proper login POST. Remember that the contents need to be URL encoded | ||||||
|  |  when sent in a normal POST. | ||||||
|  |  | ||||||
|  |  | ||||||
|  | 14. Debug | ||||||
|  |  | ||||||
|  Many times when you run curl on a site, you'll notice that the site doesn't |  Many times when you run curl on a site, you'll notice that the site doesn't | ||||||
|  seem to respond the same way to your curl requests as it does to your |  seem to respond the same way to your curl requests as it does to your | ||||||
| @@ -437,7 +474,7 @@ Date:    December 9, 2004 | |||||||
|  such as ethereal or tcpdump and check what headers that were sent and |  such as ethereal or tcpdump and check what headers that were sent and | ||||||
|  received by the browser. (HTTPS makes this technique inefficient.) |  received by the browser. (HTTPS makes this technique inefficient.) | ||||||
|  |  | ||||||
| 14. References | 15. References | ||||||
|  |  | ||||||
|  RFC 2616 is a must to read if you want in-depth understanding of the HTTP |  RFC 2616 is a must to read if you want in-depth understanding of the HTTP | ||||||
|  protocol. |  protocol. | ||||||
|   | |||||||
							
								
								
									
										437
									
								
								docs/curl.1
									
									
									
									
									
								
							
							
						
						
									
										437
									
								
								docs/curl.1
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -16,11 +16,10 @@ | |||||||
| #include <errno.h> | #include <errno.h> | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| #include <string.h> | #include <string.h> | ||||||
| #include <unistd.h> | #ifndef WIN32 | ||||||
| #include <curl/multi.h> | #  include <unistd.h> | ||||||
| #ifdef WIN32 |  | ||||||
| #include <windows.h> |  | ||||||
| #endif | #endif | ||||||
|  | #include <curl/multi.h> | ||||||
|  |  | ||||||
| static const char *urls[] = { | static const char *urls[] = { | ||||||
|   "http://www.microsoft.com", |   "http://www.microsoft.com", | ||||||
| @@ -90,10 +89,10 @@ static void init(CURLM *cm, int i) | |||||||
|   CURL *eh = curl_easy_init(); |   CURL *eh = curl_easy_init(); | ||||||
|  |  | ||||||
|   curl_easy_setopt(eh, CURLOPT_WRITEFUNCTION, cb); |   curl_easy_setopt(eh, CURLOPT_WRITEFUNCTION, cb); | ||||||
|   curl_easy_setopt(eh, CURLOPT_HEADER, 0); |   curl_easy_setopt(eh, CURLOPT_HEADER, 0L); | ||||||
|   curl_easy_setopt(eh, CURLOPT_URL, urls[i]); |   curl_easy_setopt(eh, CURLOPT_URL, urls[i]); | ||||||
|   curl_easy_setopt(eh, CURLOPT_PRIVATE, urls[i]); |   curl_easy_setopt(eh, CURLOPT_PRIVATE, urls[i]); | ||||||
|   curl_easy_setopt(eh, CURLOPT_VERBOSE, 0); |   curl_easy_setopt(eh, CURLOPT_VERBOSE, 0L); | ||||||
|  |  | ||||||
|   curl_multi_add_handle(cm, eh); |   curl_multi_add_handle(cm, eh); | ||||||
| } | } | ||||||
| @@ -114,7 +113,7 @@ int main(void) | |||||||
|  |  | ||||||
|   /* we can optionally limit the total amount of connections this multi handle |   /* we can optionally limit the total amount of connections this multi handle | ||||||
|      uses */ |      uses */ | ||||||
|   curl_multi_setopt(cm, CURLMOPT_MAXCONNECTS, MAX); |   curl_multi_setopt(cm, CURLMOPT_MAXCONNECTS, (long)MAX); | ||||||
|  |  | ||||||
|   for (C = 0; C < MAX; ++C) { |   for (C = 0; C < MAX; ++C) { | ||||||
|     init(cm, C); |     init(cm, C); | ||||||
|   | |||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user