Compare commits

...

294 Commits

Author SHA1 Message Date
Daniel Stenberg
1b6c683ca6 7.19.5 coming up 2009-05-18 07:07:05 +00:00
Yang Tse
501e72c3de Remove temporary debug tracing, and add nasty error explanation 2009-05-18 02:19:21 +00:00
Yang Tse
a450efb483 Intentionally avoid checking if the address of SystemFunction036, a.k.a.
RtlGenRandom, has been located or not. This function is only available on
WinXP and later. When unavailable c-ares uses portable rand() function.
2009-05-18 01:25:20 +00:00
Yang Tse
0cf8d4f8e8 Simplify c-ares function capability check 2009-05-18 00:25:48 +00:00
Yang Tse
084447e414 - Provide in external interface preprocessor symbol definitions for
CARES_HAVE_ARES_LIBRARY_INIT and CARES_HAVE_ARES_LIBRARY_CLEANUP
  to ease the use of new capabilities.

- Move ares_version() prototype to ares.h
2009-05-18 00:21:02 +00:00
Gunter Knauf
4c9c9f0b89 fixed case. 2009-05-17 18:22:39 +00:00
Yang Tse
13db2916de Take in account c-ares 1.6.1 introduces ares_library_init() and ares_library_cleanup() 2009-05-17 17:40:30 +00:00
Yang Tse
2d64cd55a1 Introduction of ares_library_init() and ares_library_cleanup() 2009-05-17 17:11:28 +00:00
Yang Tse
60a6af7498 Introduction of ares_library_init() and ares_library_cleanup() 2009-05-17 17:10:41 +00:00
Daniel Stenberg
3cb06eb2b2 - James Bursa posted a patch to the mailing list that fixed a problem with
no_proxy which made it not skip the proxy if the URL entered contained a
  user name. I added test case 1101 to verify.
2009-05-17 14:47:50 +00:00
Yang Tse
b8e73495a5 Extend displaying of logfiles upon first server start-up failure for http, https, ftp, ftps and tftp test harness servers. 2009-05-15 11:59:24 +00:00
Yang Tse
187cfc1594 Displaying of logfiles on ftp server satrtup failure for test case #100 becomes standard. 2009-05-15 11:14:03 +00:00
Yang Tse
90cd2a4753 fix compiler warning: unused variable 2009-05-15 10:16:33 +00:00
Yang Tse
f3e6a582d4 remove outdated comment 2009-05-15 09:35:46 +00:00
Yang Tse
3ae470eedf Fix preprocessor conditional expression 2009-05-15 01:08:17 +00:00
Yang Tse
6595592a71 Add some debug tracing 2009-05-14 19:52:19 +00:00
Yang Tse
199389c94a Fix detection of automatically choosen listener port number on IPv6 enabled builds. 2009-05-14 13:00:54 +00:00
Yang Tse
c31438b2f2 log each setsockopt/SO_REUSEADDR failure 2009-05-13 19:20:45 +00:00
Yang Tse
843f73ecaa fix print formatting-string directives 2009-05-13 04:16:00 +00:00
Yang Tse
86f043a66c temporary debug trace for ftp server satrtup failure on testcase #100 2009-05-12 19:18:54 +00:00
Daniel Stenberg
80d2df7789 Reverted my change to use Curl_connected_proxy() here. Clearly I wasn't
thinking straight.
2009-05-12 18:56:33 +00:00
Yang Tse
f882a63cba fix LC_ALL and LC_CTYPE when set with conflicting values 2009-05-12 11:24:29 +00:00
Daniel Stenberg
611b3584d6 make no proxy set return OK from Curl_connected_proxy() since it will be called
unconditionally
2009-05-12 07:38:31 +00:00
Yang Tse
a1f13dd31b fiX *__SOCKLEN_T definitions for remaining targets 2009-05-12 01:57:53 +00:00
Yang Tse
966e7d0e36 *__SOCKLEN_T definitions for OS400 already fixed 2009-05-12 00:54:21 +00:00
Daniel Stenberg
44103abdb7 curl_multi_socket and curl_multi_socket_all to be removed at next major
release, or bump or whatevere
2009-05-11 20:35:26 +00:00
Daniel Stenberg
8f9d4b2b50 split off curl_multi_socket_action() into its own separate man page as this is
the function we should use, while both curl_multi_socket() and
curl_multi_socket_all() should be killed!
2009-05-11 20:32:50 +00:00
Daniel Stenberg
78c674a685 curl_multi_socket_action() is the one we favor! 2009-05-11 20:31:17 +00:00
Daniel Stenberg
197830a57d TELNET transfers and SOCKS handshakes are blocking too 2009-05-11 20:24:14 +00:00
Yang Tse
3d024d5fce fIX *__SOCKLEN_T definitions for SYMBIAN32 and VMS targets 2009-05-11 18:20:13 +00:00
Daniel Stenberg
5763743614 "228 - rpath problems in linking with custom openssl" removed
I just posted about this decision on the curl-library list.
2009-05-11 17:55:34 +00:00
Yang Tse
54da964a99 #234 Done! 2009-05-11 17:24:37 +00:00
Yang Tse
e25cff9328 Adjust test definition for TPF. 2009-05-11 17:21:26 +00:00
Yang Tse
36b397be9f Fetch curl's 'CharConv' feature information, used by TPF. 2009-05-11 17:20:41 +00:00
Daniel Stenberg
468019e947 - Gregor Jasny made c-ares link with libtool 's -export-symbols-regex option to
only expose functions starting with ares_.
2009-05-11 13:53:26 +00:00
Daniel Stenberg
7e941baa26 timeout in milliseconds works for me! 2009-05-11 13:01:41 +00:00
Daniel Stenberg
63270b0665 Added KNOWN_BUGS #65, and marked it for TODO in the _next_ release as I'm
not in the mood enough to fight this now.

65. When doing FTP over a socks proxy or CONNECT through HTTP proxy and the
  multi interface is used, libcurl will fail if the (passive) TCP connection
  for the data transfer isn't more or less instant as the code does not
  properly wait for the connect to be confirmed. See test case 564 for a first
  shot at a test case.
2009-05-11 12:40:48 +00:00
Daniel Stenberg
bcdbba05d3 moved variables more locally to get rid of one set of #ifdefs 2009-05-11 12:13:41 +00:00
Daniel Stenberg
51d1f309cd Use Curl_connected_proxy() here instead of duplicating code. Spell out the
badness in the code flow even for the socks case.
2009-05-11 11:49:39 +00:00
Daniel Stenberg
f04720afb8 fix the Curl_connected_proxy function for when libcurl actually connects fine
to it in the actual connect call and not asynchronously.
2009-05-11 11:45:56 +00:00
Daniel Stenberg
e6e6c6e635 Added test 564 as DISABLED. It is for testing FTP over a SOCK4 proxy using
the multi interface, which currently doesn't work because of how the data
connection is not waiting for connect before it tries to do proxy magic.
2009-05-11 11:43:55 +00:00
Daniel Stenberg
1f340a262f support --help to do the same as -h 2009-05-11 11:39:42 +00:00
Daniel Stenberg
242a17b9e0 - Balint Szilakszi reported a memory leak when libcurl did gzip decompression
of streams that had some parts (legitimately) missing. We now provide and use
  a proper cleanup function for the content encoding submodule.
  http://curl.haxx.se/mail/lib-2009-05/0092.html
2009-05-11 09:55:28 +00:00
Daniel Stenberg
6e1632c606 - Kamil Dudka provided a fix for libcurl-NSS reported by Michael Cronenworth
at https://bugzilla.redhat.com/show_bug.cgi?id=453612#c12

  If an incorrect password is given while loading a private key, libcurl ends
  up in an infinite loop consuming memory. The bug is critical.
2009-05-11 09:13:49 +00:00
Daniel Stenberg
56dab605f1 - I fixed the problem with doing NTLM, POST and then following a 302 redirect,
as reported by Ebenezer Ikonne (on curl-users) and Laurent Rabret (on
  curl-library). The transfer was mistakenly marked to get more data to send
  but since it didn't actually have that, it just hung there...
2009-05-11 08:55:58 +00:00
Daniel Stenberg
3aa3d7e629 Internal cleanup: KEEP_WRITE and KEEP_READ are now called KEEP_SEND and
KEEP_RECV to better match the general terminology: receive and send is what we
do from the (remote) servers. We read and write from and to the local fs.
2009-05-11 07:53:38 +00:00
Yang Tse
75585f771a Fix name of tool shown upon error. 2009-05-11 01:16:28 +00:00
Yang Tse
9a9f35039e Remove experimental check. Currently there's no need for it. 2009-05-11 00:28:18 +00:00
Daniel Stenberg
e6f84b8cc8 Added test 1100 - "HTTP POST with NTLM authorization and following a 302
redirect" doesn't work, seems to repeat what Ebenezer Ikonne (on curl-users)
and Laurent Rabret (on curl-library) have reported. Disabled for now.
2009-05-10 22:10:13 +00:00
Daniel Stenberg
72f15da2ed the Curl_getoff_all_pipelines SIGSEGV fix is committed 2009-05-10 21:45:39 +00:00
Daniel Stenberg
effbd99384 - Andre Guibert de Bruet correctly pointed out an over-alloc with one wasted
byte in the digest code.
2009-05-10 21:33:55 +00:00
Daniel Stenberg
d1ba4324de introduce VCURL for verify calls, so that it can be changed to use a different
binary than the one that gets tested, if need be
2009-05-10 21:20:15 +00:00
Daniel Stenberg
c0b5d378dc made the cookie tests 61 and 62 test httponly cookies, both receiving in
headers and reading from cookie-jar
2009-05-10 18:02:37 +00:00
Yang Tse
b8c438f22d Fix function call pointed data size argument mismatch on 64Bit systems 2009-05-10 10:25:23 +00:00
Yang Tse
a85271ce0a Fix type cast 2009-05-10 10:24:53 +00:00
Daniel Stenberg
fd5e69f769 ConnectPlease() fixed for the new proxy connect functionality to make sure
'connected' truly is false when the socks connect fails.

Curl_done() fixed for the check-conn->bits.done-before-Curl_getoff_all_pipelines case
2009-05-09 21:34:48 +00:00
Yang Tse
ddb0b8d8b8 Fix libssh2 preprocessor symbol definition check 2009-05-09 15:32:59 +00:00
Yang Tse
1345226bc9 Mention last changes 2009-05-09 12:56:36 +00:00
Yang Tse
fb202e9de7 Makefile.am was lost 2009-05-09 12:11:32 +00:00
Yang Tse
5dcb5fa862 Remove DOS and TPF package's Makefile.am
Not actually needed to simply include some files in the distribution tarball.
2009-05-09 12:08:24 +00:00
Yang Tse
f77f2709a9 Ignore more files for cvs 2009-05-09 10:09:33 +00:00
Yang Tse
bc852bca48 Mention last changes 2009-05-08 19:19:46 +00:00
Yang Tse
9314e9e853 Fix CR 2009-05-08 19:09:36 +00:00
Yang Tse
838ddf8f55 Renamed vc6 workspace and project files to avoid filename clash when used for conversion to later VS versions. 2009-05-08 18:55:42 +00:00
Yang Tse
619869c639 Renamed vc6 workspace and project files to avoid filename clash when used for conversion to later VS versions. 2009-05-08 17:51:44 +00:00
Yang Tse
31baaf72b4 Changed host name to be under the haxx.se domain 2009-05-08 15:49:19 +00:00
Daniel Stenberg
c92b996942 Ah, this was committed by mistake as part of my previous commit but it seems
to work so I'll let it remain and here's the comment about it! From Lenaic's
mail posted to curl-library Date: Fri, 1 May 2009 22:46:14 +0200.
2009-05-08 11:05:52 +00:00
Daniel Stenberg
e84c7db049 - Constantine Sapuntzakis fixed bug report #2784055
(http://curl.haxx.se/bug/view.cgi?id=2784055) identifying a problem to
  connect to SOCKS proxies when using the multi interface. It turned out to
  almost not work at all previously. We need to wait for the TCP connect to
  be properly verified before doing the SOCKS magic.

  There's still a flaw in the FTP code for this.
2009-05-08 10:59:40 +00:00
Yang Tse
9ef7b6afe2 Remove temporary and HP-UX autobuild specific change to debug SSH server start-up failures 2009-05-08 02:18:49 +00:00
Yang Tse
c5c03ac556 Fixes for non-ASCII platforms by David McCreedy 2009-05-08 02:14:50 +00:00
Daniel Stenberg
6ca321ca75 Curl_sndbufset is (at times) defined in the header, no need to do it again here 2009-05-07 20:02:51 +00:00
Daniel Stenberg
9c788a529b - Made the SO_SNDBUF setting for the data connection socket for ftp uploads as
well. See change 28 Apr 2009.
2009-05-07 20:00:44 +00:00
Yang Tse
6159c356c9 232 - [PATCH] transfer.c fixes for CURL_DO_LINEEND_CONV and non-ASCII
platform HTTP requests
Done!
2009-05-07 18:15:21 +00:00
Yang Tse
ac9d92587e Fix an issue, affecting FTP transfers, introduced with the transfer.c patch committed May 4.
Additionally some identation fixes.
2009-05-07 18:03:49 +00:00
Yang Tse
f32dc6b828 Fix an m4 overquoting triggering a spurious 'AS_TR_CPP' symbol definition
attempt in generated config.h
2009-05-07 14:03:04 +00:00
Yang Tse
7a928b40f3 Proper naming for the experimental compiler test and moved to *-compilers.m4 2009-05-07 13:58:15 +00:00
Daniel Stenberg
172501e10c added Curl_getoff_all_pipelines SIGSEGV 2009-05-07 11:41:06 +00:00
Daniel Stenberg
317e030de0 added mention of two more current bugs/issues 2009-05-07 11:20:44 +00:00
Yang Tse
cfda3e6a48 Moved *_CHECK_COMPILER_HALT_ON_ERROR and *_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE to *-compilers.m4 along with other *_CHECK_COMPILER_* 2009-05-07 11:06:48 +00:00
Daniel Stenberg
4d522b8f31 man page warnings fixed 2009-05-07 09:33:13 +00:00
Daniel Stenberg
e93c81196f - Man page *roff problems fixed thanks to input from Colin Watson. Problems
reported in the Debian package.
2009-05-07 09:31:24 +00:00
Daniel Stenberg
7bdd14a994 - Vijay G filed bug report #2723236
(http://curl.haxx.se/bug/view.cgi?id=2723236) identifying a problem with
  libcurl's TFTP code and its lack of dealing with the OACK packet.
2009-05-07 08:30:43 +00:00
Yang Tse
afe06b48d6 Use autobuilds to verify if a couple of experimental compiler tests pass on all of them.
This will be removed in 24 or 48 hours.
2009-05-06 18:37:24 +00:00
Yang Tse
63c5ed3798 curl_sockaddr struct member addrlen is an 'unsigned int' since 7.18.0 2009-05-06 14:04:05 +00:00
Yang Tse
77bb536542 fIX *__SOCKLEN_T definitions for OS400 and generic GCC targets 2009-05-06 13:58:41 +00:00
Yang Tse
7c6e0d5981 Temporary and HP-UX autobuild specific change to debug SSH server start-up failures 2009-05-06 10:32:06 +00:00
Yang Tse
a1708730c3 fix compiler warning 2009-05-05 13:04:33 +00:00
Yang Tse
d33ca87e4c reintroduce #232 2009-05-05 13:03:22 +00:00
Yang Tse
3c509c5f68 Mention last changes 2009-05-05 08:52:08 +00:00
Yang Tse
a840cc700a Revert change committed on Mon May 4 09:30:23 2009 UTC.
The origin of the problem with test case #251 was the --ftp-port not being the CLIENTIP address.
2009-05-05 08:46:31 +00:00
Daniel Stenberg
b40b989523 I simplified the SSL session id re-use code now to *always* ditch the previous
one and store the current one, as it makes the code less complex and I'm not
even sure I can check for the same session id using memcmp() like that.
2009-05-05 08:33:29 +00:00
Yang Tse
5eba93c4e7 Fixed the --ftp-port address to the CLIENTIP address. 2009-05-05 08:19:55 +00:00
Daniel Stenberg
915dfb494e - Inspired by Michael Smith's session id fix for OpenSSL, I did the
corresponding fix in the GnuTLS code: make sure to store the new session id
  in case the re-used one is rejected.
2009-05-04 22:20:09 +00:00
Daniel Stenberg
a16cca7680 - Michael Smith posted bug report #2786255
(http://curl.haxx.se/bug/view.cgi?id=2786255) with a patch, identifying how
  libcurl did not deal with SSL session ids properly if the server rejected a
  re-use of one. Starting now, it will forget the rejected one and remember
  the new. This change was for OpenSSL only, it is likely that other SSL lib
  code needs similar fixes.
2009-05-04 21:57:14 +00:00
Daniel Stenberg
644482fc99 more return codes added 2009-05-04 21:36:53 +00:00
Yang Tse
8c08ecfcbf fIX *__SOCKLEN_T definitions for MVS and 370 targets 2009-05-04 17:05:25 +00:00
Yang Tse
b9920bdd0e fIX *__SOCKLEN_T definitions for several Windows target tool-chains 2009-05-04 15:25:57 +00:00
Daniel Stenberg
bdf71e2685 a busload symbols added 2009-05-04 14:50:29 +00:00
Daniel Stenberg
bd4fd9c28c Philippe Vaucher reported this typo 2009-05-04 13:01:27 +00:00
Yang Tse
ff3e574187 David McCreedy's patch to fix test suite harness to allow test FTP server and client on different machines, providing FTP client address when running the FTP test server. 2009-05-04 10:30:23 +00:00
Yang Tse
4422f80ae7 David McCreedy's "transfer.c fixes for CURL_DO_LINEEND_CONV and non-ASCII platform HTTP requests" patch 2009-05-04 09:47:02 +00:00
Yang Tse
cc8c2efff2 fix makefile reference to packages/TPF 2009-05-04 00:33:31 +00:00
Yang Tse
cdaca293d9 ignore this 2009-05-04 00:31:27 +00:00
Yang Tse
4dbc7850bd HP-UX's X/Open network library requirement check follow-up 2009-05-03 19:41:12 +00:00
Dan Fandrich
8119379d4f Added and disabled test case 563 which shows KNOWN_BUGS #59. The bug
report failed to mention that a proxy must be used to reproduce it.
2009-05-03 19:25:17 +00:00
Yang Tse
9b4253fe67 HP-UX's X/Open network library requirement check follow-up 2009-05-03 17:35:44 +00:00
Yang Tse
b5c599c80c This wasn't intended to be committed.
So, until fixed this will remain FIXME.
2009-05-02 03:16:04 +00:00
Yang Tse
9137e717b0 Use build-time configured curl_socklen_t instead of socklen_t 2009-05-02 02:37:32 +00:00
Yang Tse
80186aa7f4 Use build-time configured ares_socklen_t instead of socklen_t 2009-05-02 02:36:47 +00:00
Yang Tse
6ac739630f Remove temporary debug tracing for X/Open HP-UX 2009-05-01 22:59:16 +00:00
Yang Tse
80a61616b1 Mention David McCreedy's patches applied today 2009-05-01 22:55:08 +00:00
Yang Tse
589d2ee7b5 David McCreedy's "TPF-platform specific changes to various files" patch follow-up 2009-05-01 22:41:23 +00:00
Daniel Stenberg
0a294db912 fixed: 229 - [PATCH] to correct spelling in ABI 2009-05-01 20:36:39 +00:00
Daniel Stenberg
2788aa366c Jose Goncalves fixed my crappy spelling! 2009-05-01 20:20:54 +00:00
Daniel Stenberg
0f29fdaf17 #2784055, connect race with multi and socks proxy
bad enough to almost make socks proxies with multi interface unusable
2009-05-01 20:16:24 +00:00
Daniel Stenberg
2912d993c2 s/libcurl/c-ares 2009-05-01 18:26:03 +00:00
Daniel Stenberg
62ceb118ee version number typo fix 2009-05-01 18:24:34 +00:00
Yang Tse
0569c9c1be David McCreedy's "http.c fix to Curl_proxyCONNECT for non-ASCII platforms" patch 2009-05-01 13:00:38 +00:00
Yang Tse
5a91746b80 David McCreedy's "TPF-platform specific changes to various files" patch 2009-05-01 12:39:40 +00:00
Daniel Stenberg
fdc091a857 mention a bunch of pending patches to deal with 2009-05-01 09:23:14 +00:00
Yang Tse
8469db016d Check definition of _XOPEN_SOURCE_EXTENDED with the compiler 2009-05-01 02:03:42 +00:00
Yang Tse
f6312b16f1 Add temporary debug tracing for X/Open HP-UX 2009-04-30 20:33:37 +00:00
Yang Tse
c76e538231 Check if X/Open network library is required 2009-04-30 18:35:36 +00:00
Yang Tse
96ea49870c When generated, display libcurl.pc and libcares.pc 2009-04-30 17:06:58 +00:00
Yang Tse
6e8c73fd38 cope with ares_build.h and ares_rules.h follow-up 2009-04-30 13:50:44 +00:00
Yang Tse
56981a2aaf Added some notes regarding ares_build.h 2009-04-30 12:44:17 +00:00
Yang Tse
ec16121fb3 fix EOL 2009-04-30 12:12:31 +00:00
Yang Tse
7bd9988c8e fix EOL 2009-04-30 12:05:53 +00:00
Yang Tse
068312ecb8 cope with ares_build.h and ares_rules.h 2009-04-30 11:48:43 +00:00
Yang Tse
d36a86a12c buildconf.bat for CVS-tree c-ares 2009-04-30 10:43:27 +00:00
Yang Tse
c174b13f8b fix compiler warning: unused parameter 2009-04-30 09:32:02 +00:00
Daniel Stenberg
6b95c4e358 - I was going to fix issue #59 in KNOWN_BUGS
If the CURLOPT_PORT option is used on an FTP URL like
  "ftp://example.com/file;type=A" the ";type=A" is stripped off.

  I added test case 562 to verify, only to find out that I couldn't repeat
  this bug so I hereby consider it not a bug anymore!
2009-04-30 09:02:39 +00:00
Daniel Stenberg
22e2ecb003 provide some track record of the SONAME bumps 2009-04-30 08:30:52 +00:00
Daniel Stenberg
e08296f70c mention that cvs is needed for releases 2009-04-30 08:08:33 +00:00
Yang Tse
dd50e5bdf2 Use 'unsigned int' instead of size_t attempting to avoid header inclusion 2009-04-30 01:34:04 +00:00
Yang Tse
504ecd5f7a NetWare LibC's getpeername() third argument data type is size_t 2009-04-30 00:11:20 +00:00
Yang Tse
7d1bb21c19 Display only CURL_* and CARES_* symbol/macro definitions from curlbuild.h and ares_build.h 2009-04-29 19:02:22 +00:00
Yang Tse
63dc2a843f Remove temporary debug tracing for ares_socklen_t Windows targets 2009-04-29 18:08:23 +00:00
Yang Tse
296baeb096 Trigger c-ares prebuild stage for fake-config setup's 2009-04-29 17:57:49 +00:00
Yang Tse
01dabb774a curl_socklen_t NetWare follow-up 2009-04-29 17:07:19 +00:00
Yang Tse
d0fe4071a9 curl_socklen_t follow-up 2009-04-29 15:15:38 +00:00
Yang Tse
3d491c470b ares_socklen_t follow-up 2009-04-29 15:15:14 +00:00
Yang Tse
06462e8a92 ares_build.h Windows follow-up 2009-04-29 14:05:21 +00:00
Daniel Stenberg
dbf371344b mention the new CURL_SEEKFUNC_ symbols 2009-04-29 11:41:29 +00:00
Daniel Stenberg
e2c6e00570 - Based on bug report #2723219 (http://curl.haxx.se/bug/view.cgi?id=2723219)
I've now made TFTP "connections" not being kept for re-use within libcurl.
  TFTP is UDP-based so the benefit was really low (if even existing) to begin
  with so instead of tracking down to fix this problem we instead removed the
  re-use. I also enabled test case 1099 that I wrote a few days ago to verify
  that this change fixes the reported problem.
2009-04-29 11:30:03 +00:00
Yang Tse
e4a0001fc6 Add temporary debug tracing for ares_socklen_t Windows targets 2009-04-29 11:11:59 +00:00
Yang Tse
49400b0c7f ares_build.h NetWare follow-up 2009-04-29 09:39:15 +00:00
Yang Tse
5957498c6f When running testcurl.pl display definitions from ares_build.h 2009-04-29 01:31:37 +00:00
Yang Tse
b6282b99cb allow usage of in-tree c-ares when building from outside of the cvs tree 2009-04-29 00:38:08 +00:00
Yang Tse
a8483841b5 ares_build.h NetWare attempt 2009-04-29 00:17:40 +00:00
Daniel Stenberg
d068001102 - Constantine Sapuntzakis filed bug report #2783090
(http://curl.haxx.se/bug/view.cgi?id=2783090) pointing out that on windows
  we need to grow the SO_SNDBUF buffer somewhat to get really good upload
  speeds. http://support.microsoft.com/kb/823764 has the details. Friends
  confirmed that simply adding 32 to CURL_MAX_WRITE_SIZE is enough.
2009-04-28 20:27:06 +00:00
Yang Tse
d576be58dc allow usage of in-tree c-ares when building from outside of the cvs tree 2009-04-28 19:29:50 +00:00
Yang Tse
1a2b88964f Initial step towards a configure time ares_socklen_t definition 2009-04-28 16:47:33 +00:00
Yang Tse
f7a188a642 ignore stamp-h* 2009-04-28 14:23:28 +00:00
Daniel Stenberg
befbf2a206 Fixed: 225 - resume when upload from stream, #2709004 2009-04-28 11:19:50 +00:00
Daniel Stenberg
e01b7c1ede - Bug report #2709004 (http://curl.haxx.se/bug/view.cgi?id=2709004) by Tim
Chen pointed out how curl couldn't upload with resume when reading from a
  pipe.

  This ended up with the introduction of a new return code for the
  CURLOPT_SEEKFUNCTION callback that basically says that the seek failed but
  that libcurl may try to resolve the situation anyway. In our case this means
  libcurl will attempt to instead read that much data from the stream instead
  of seeking and that way curl can now upload with resume when data is read
  from a stream!
2009-04-28 11:19:10 +00:00
Yang Tse
dd8d472318 Added CARES_INCLUDES_SYS_TYPES 2009-04-28 10:40:02 +00:00
Yang Tse
256489639c Rearrange placement inside file of CURL_DEFINE_UNQUOTED, CURL_CONFIGURE_LONG
and CURL_CONFIGURE_CURL_SOCKLEN_T to ease future maintainance.
2009-04-28 10:37:06 +00:00
Yang Tse
e323abe5d9 Moved CURL_INCLUDES_INTTYPES to curl-functions.m4 along with other CURL_INCLUDES_* 2009-04-28 10:27:04 +00:00
Yang Tse
afc00b08d7 Remove temporary debug tracing for curl_socklen_t detection failures 2009-04-28 09:40:12 +00:00
Yang Tse
af41fb79b5 Include <arpa/inet.h> if HAVE_ARPA_INET_H is defined 2009-04-27 23:59:41 +00:00
Yang Tse
535b7c5e0f Log MAKEFLAGS environment variable along with the others. 2009-04-27 19:21:45 +00:00
Yang Tse
217f7a7ea7 Take 2 at handling getpeername() prototypes with a void pointer for third argument 2009-04-27 14:08:24 +00:00
Yang Tse
317d351423 Attempt to handle getpeername() prototypes with a void pointer for third argument 2009-04-27 12:41:05 +00:00
Daniel Stenberg
d27519c0ca Add missing cmake files to the tarball (thanks to Richard Atterer's report) 2009-04-27 12:26:41 +00:00
Daniel Stenberg
255dc45dc9 the windows threaded resolver isn't foolproof enough 2009-04-27 12:23:53 +00:00
Yang Tse
f4d8728df9 Add temporary debug tracing for curl_socklen_t detection failures 2009-04-27 10:13:23 +00:00
Yang Tse
8611631f5e Reorder curl_socklen_t and socklen_t equivalent check while both coexist 2009-04-27 02:47:34 +00:00
Yang Tse
1e5ed4fa33 Rearrange curl_socklen_t tests to improve speed of usual results 2009-04-27 00:17:11 +00:00
Yang Tse
0daeab3b8d Initial step towards a configure time curl_socklen_t definition 2009-04-26 18:51:03 +00:00
Daniel Stenberg
bd27401311 Fixed: 227 - CURLINFO_APPCONNECT_TIME doesn't work with multi interface, #2779733 2009-04-26 11:57:45 +00:00
Daniel Stenberg
14df44dd3f - Bug report #2779733 (http://curl.haxx.se/bug/view.cgi?id=2779733) by Sven
Wegener pointed out that CURLINFO_APPCONNECT_TIME didn't work with the multi
  interface and provided a patch that fixed the problem!
2009-04-26 11:56:22 +00:00
Daniel Stenberg
1272621ebc removed pointless file 2009-04-25 21:01:28 +00:00
Daniel Stenberg
0e83482e47 synced with current reality 2009-04-25 20:56:09 +00:00
Yang Tse
c0d929bed9 Further narrow the use of the icc 9.1 optimizer workaround.
Previous workaround proved useful, and finally did not trigger any warning!
2009-04-25 10:24:11 +00:00
Daniel Stenberg
828a26286d - Kamil Dudka fixed another NSS-related leak when client certs were used. 2009-04-24 21:55:18 +00:00
Daniel Stenberg
082b0d822c test 1099: "TFTP get first a non-existing file then an existing" added disabled
as things don't work right here!
2009-04-24 21:46:42 +00:00
Yang Tse
651b4b9efa Try a simpler variation of the 'volatile' variables icc 9.1 on unix IA32 workaround.
Previous workaround proved useful, but triggered the following warning:

warning #556: a value of type "volatile Curl_addrinfo *" cannot be assigned to an entity of type "Curl_addrinfo *"
2009-04-24 10:38:12 +00:00
Daniel Stenberg
ab1e54375f for is docs remarks 2009-04-23 22:08:36 +00:00
Daniel Stenberg
70e2db51e1 - bug report #2779245 (http://curl.haxx.se/bug/view.cgi?id=2779245) by Rainer
Koenig pointed out that the man page didn't tell that the *_proxy
  environment variables can be specified lower case or UPPER CASE and the
  lower case takes precedence,
2009-04-23 22:01:33 +00:00
Daniel Stenberg
0145919a9e CURLOPT_POSTQUOTE commands only run when no error 2009-04-23 21:43:01 +00:00
Yang Tse
2236a247d9 Try another variation of the 'volatile' variables icc 9.1 on unix IA32 workaround.
The #pragma optimize("", off) attempt did not fix the problem and SIGSEGV's in Curl_freeaddrinfo() were back.
2009-04-23 11:09:20 +00:00
Dan Fandrich
7291f50e8d Added new libcurl source files to Amiga, RiscOS and VC6 build files. 2009-04-23 04:12:04 +00:00
Yang Tse
bc5677a47b Disable optimizations when compiling function Curl_freeaddrinfo() with icc 9.1 on unix IA32.
Previous 'volatile' variables workaround proved useful, but it triggered the following warning:

warning #167: argument of type "volatile Curl_addrinfo *" is incompatible with parameter of type "void *"
2009-04-22 15:03:05 +00:00
Yang Tse
137ef36757 avoid use of alloca() 2009-04-22 10:25:28 +00:00
Yang Tse
33a3753c3f libcurl's memory.h renamed to curl_memory.h 2009-04-21 11:46:16 +00:00
Yang Tse
9770899a4b Moved potential inclusion of system's malloc.h and memory.h header files to
setup_once.h.  Inclusion of each header file is based on the definition of
NEED_MALLOC_H and NEED_MEMORY_H respectively.
2009-04-21 10:26:58 +00:00
Yang Tse
fe8eeb5641 remove unnecessary typecast 2009-04-21 09:03:15 +00:00
Yang Tse
8cd1f1f7f9 ignore 2009-04-21 06:10:23 +00:00
Daniel Stenberg
b84876ba69 - Leanic Lefever reported a crash and did some detailed research on why and
how it occurs (http://curl.haxx.se/mail/lib-2009-04/0289.html). The
  conclusion was that if an error is detected and Curl_done() is called for
  the connection, ftp_done() could at times return another error code that
  then would take precedence and that new code confused existing logic that
  works for the first error code (CURLE_SEND_ERROR) only.
2009-04-20 21:41:17 +00:00
Daniel Stenberg
0f1ca2939a - Gisle Vanem noticed that --libtool would produce bogus strings at times for
OBJECTPOINT options. Now we've introduced a new function - my_setopt_str -
  within the app for setting plain string options to avoid the risk of this
  mistake happening.
2009-04-20 17:53:06 +00:00
Yang Tse
4882078469 attempt to workaround icc 9.1 optimizer induced problem 2009-04-19 05:20:04 +00:00
Daniel Stenberg
991b120eee escape the ' properly 2009-04-18 22:48:28 +00:00
Daniel Stenberg
f278d177f9 63. When CURLOPT_CONNECT_ONLY is used, the handle cannot reliably be re-used
for any further requests or transfers. The work-around is then to close that
  handle with curl_easy_cleanup() and create a new. Some more details:
  http://curl.haxx.se/mail/lib-2009-04/0300.html
2009-04-18 22:18:35 +00:00
Gisle Vanem
53b2ff4b04 Added 'slist.obj'. 2009-04-18 16:54:15 +00:00
Gisle Vanem
0c89d71aee Added HAVE_LIMITS_H. 2009-04-18 16:50:09 +00:00
Gisle Vanem
b746bf7814 Added '-DHAVE_LIMITS_H'. 2009-04-18 16:49:29 +00:00
Gisle Vanem
f11969015a Avoid compiler warning about unused argument. 2009-04-18 09:59:42 +00:00
Daniel Stenberg
f1b820e5fc mention Pramod Sharma and "persistent connections when doing FTP over a HTTP proxy" 2009-04-17 22:36:13 +00:00
Daniel Stenberg
7356ff0b18 As Jeff Pohlmeyer suggested: "pointer to 'char *'" is now instead put:
"pointer to a char pointer".
2009-04-17 12:55:09 +00:00
Daniel Stenberg
30f7a2ff20 - Pramod Sharma reported and tracked down a bug when doing FTP over a HTTP
proxy. libcurl would then wrongly close the connection after each
  request. In his case it had the weird side-effect that it killed NTLM auth
  for the proxy causing an inifinite loop!

  I added test case 1098 to verify this fix. The test case does however not
  properly verify that the transfers are done persistently - as I couldn't
  think of a clever way to achieve it right now - but you need to read the
  stderr output after a test run to see that it truly did the right thing.
2009-04-17 12:48:24 +00:00
Yang Tse
f6b55fae79 remove compiler options used while debugging the icc 9.1 optimizer issue 2009-04-17 07:48:37 +00:00
Yang Tse
8aa88f4d36 re-enable all tests for all icc autobuilds 2009-04-17 07:30:56 +00:00
Yang Tse
ce7b565595 further narrow the use of the icc 9.1 optimizer workaround 2009-04-17 07:30:25 +00:00
Yang Tse
41fd08bb0d attempt to workaround icc 9.1 optimizer induced problem 2009-04-16 08:31:09 +00:00
Yang Tse
d0a930cd44 moved HAVE_LIMITS_H to common defines 2009-04-15 22:58:30 +00:00
Yang Tse
9bb1854398 Set HP-UX compiler warning level back to the one that exposes
the socklen_t issue on this platform.
2009-04-15 22:54:25 +00:00
Gunter Knauf
f7400212fc moved HAVE_LIMITS_H to common defines (no idea why I didnt this initially already) 2009-04-15 04:11:33 +00:00
Yang Tse
6434b42481 HAVE_LIMITS_H definition for NetWare CLIB 2009-04-14 23:51:12 +00:00
Daniel Stenberg
dd0b38b32f first take at bundling cmake-related files in the tarball 2009-04-14 22:00:37 +00:00
Daniel Stenberg
7816db8e8a things in the pipe right now 2009-04-14 22:00:18 +00:00
Yang Tse
9cc6ab3922 use HAVE_LIMITS_H symbol to protect limits.h inclusion 2009-04-14 13:50:32 +00:00
Yang Tse
2c27e24bb4 include <limits.h> for INT_MAX definition 2009-04-14 13:26:06 +00:00
Yang Tse
c382c550e7 fix compiler warning: implicit conversion shortens 64-bit value into a 32-bit value 2009-04-14 12:53:53 +00:00
Benoit Neil
c663494c69 (Minor change - From Piotr Dobrogost) Moved a line. 2009-04-14 09:44:09 +00:00
Daniel Stenberg
97f27ea585 Kamil Dudka's follow-up fix 2009-04-14 09:40:53 +00:00
Daniel Stenberg
379bfa5a36 - bug report #2727981 (http://curl.haxx.se/bug/view.cgi?id=2727981) by Martin
Storsjo pointed out how setting CURLOPT_NOBODY to 0 could be downright
  confusing as it set the method to either GET or HEAD. The example he showed
  looked like:

   curl_easy_setopt(curl, CURLOPT_PUT, 1);
   curl_easy_setopt(curl, CURLOPT_NOBODY, 0);

  The new way doesn't alter the method until the request is about to start. If
  CURLOPT_NOBODY is then 1 the HTTP request will be HEAD. If CURLOPT_NOBODY is
  0 and the request happens to have been set to HEAD, it will then instead be
  set to GET. I believe this will be less surprising to users, and hopefully
  not hit any existing users badly.
2009-04-13 18:01:02 +00:00
Daniel Stenberg
235c0077b8 - Toshio Kuratomi reported a memory leak problem with libcurl+NSS that turned
out to be leaking cacerts. Kamil Dudka helped me complete the fix. The issue
  is found in Redhat's bug tracker:
  https://bugzilla.redhat.com/show_bug.cgi?id=453612

  There are still memory leaks present, but they seem to have other reasons.
2009-04-13 17:42:10 +00:00
Yang Tse
c621546bd6 fix compiler warning: implicit conversion shortens 64-bit value into a 32-bit value 2009-04-13 07:18:39 +00:00
Yang Tse
aa330b8240 improve stunnel version detection 2009-04-13 03:47:16 +00:00
Dan Fandrich
e43606eb4d Added new libcurl source files to Symbian OS build files.
Improved Symbian support for SSL.
2009-04-11 07:06:34 +00:00
Yang Tse
6a378a28b4 Use 'curl_socket_t' instead of 'int' for socket.
Avoid unnecessary'if-else' nesting.
2009-04-11 06:36:47 +00:00
Yang Tse
95368d9cb4 fix compiler warning: enumerated type mixed with another type 2009-04-11 02:11:02 +00:00
Yang Tse
74f9c570ea Adjust comment 2009-04-10 02:58:01 +00:00
Yang Tse
eed4a13b3b Daniel Johnson improved the MacOSX-Framework shell script to now perform all
the steps required to build a Mac OS X four way fat ppc/i386/ppc64/x86_64
libcurl.framework.  Four way fat framework requires OS X 10.5 SDK or later.
2009-04-10 02:50:21 +00:00
Benoit Neil
7e9f7659b3 (Minor update) Moved some utilities to a separate file. 2009-04-09 21:16:28 +00:00
Benoit Neil
4d396169c8 Cleaned up the custom definition I added (replaced by CURL_STATICLIB) 2009-04-09 19:59:38 +00:00
Gunter Knauf
4cd950900b some minor Makefile tweaks for latest libssh2. 2009-04-09 02:50:09 +00:00
Gunter Knauf
2b96c3f5ce add back most likely acciedently removed function name justtimeout to fix autobuild breaks. 2009-04-09 02:46:56 +00:00
Yang Tse
63fad159e8 Skip test #558 and #559 also when using a Win32 DLL 2009-04-09 01:24:41 +00:00
Benoit Neil
e5f1480a38 (Minor update) Added labal prefixes to tests targets 2009-04-08 23:48:07 +00:00
Benoit Neil
020955ebc2 Added special define for tests that directly include libcurl sources. 2009-04-08 23:35:09 +00:00
Benoit Neil
3733fa02ee Made the windows .lib addition cleaner. 2009-04-08 23:20:04 +00:00
Benoit Neil
7037e4a4b1 Renamed a variable 2009-04-08 22:21:25 +00:00
Benoit Neil
0e98f938c4 Fixed missing HAVE_PROCESS_H (caused a warning) 2009-04-08 20:54:36 +00:00
Benoit Neil
55d0c29f4a Added newline ad the end of generated hugehelp.c (the "default" one, when it hasn't been generated before). 2009-04-08 20:29:50 +00:00
Gisle Vanem
59997ecad5 Avoid warnings when HAVE_ALRM and SIGALRM are not defined. 2009-04-08 18:37:11 +00:00
Gisle Vanem
6e2f0833ad #ifdef around variables to squelsh warnings. 2009-04-08 18:31:54 +00:00
Benoit Neil
25f626cc52 Fixed compile defines in CMake scripts 2009-04-08 11:42:45 +00:00
Yang Tse
ece891d6db Sun compilers specific preprocessor block removed from curlbuild.h.dist 2009-04-08 01:25:34 +00:00
Benoit Neil
702355da47 (Minor update) Modified a comment, before going to sleep :) 2009-04-07 22:49:02 +00:00
Daniel Stenberg
c4fba310d2 and include the .inc files in the release tarballs... 2009-04-07 22:07:07 +00:00
Benoit Neil
e9dd099870 Added missing tests in CMake, added Makefile.inc for tests (+ use in CMake scripts), and fixed a missing define under windows in a test source file. 2009-04-07 21:59:15 +00:00
Benoit Neil
070d89a561 Added CURL_HIDDEN_SYMBOLS option, and fixed missing SIZEOF_INT causing warnings. 2009-04-07 21:00:50 +00:00
Daniel Stenberg
28cc9dd331 clarified after chat in #curl 2009-04-07 20:51:01 +00:00
Benoit Neil
7c1fecc94a (From Bill Hoffman & Sukender) Added Dashboard reports. 2009-04-07 11:23:23 +00:00
Benoit Neil
7a9fab52be Fixed tests/server build (removed unnecessary link to libcurl). 2009-04-07 11:05:26 +00:00
Benoit Neil
8cb8371011 Made the CMake scripts read Makefile.inc. Needs testing I guess. 2009-04-06 22:45:17 +00:00
Daniel Stenberg
875c55d86b - I clarified in the docs that CURLOPT_SEEKFUNCTION should return 0 on success
and 1 on fatal errors. Previously it only mentioned non-zero on fatal
  errors. This is a slight change in meaning, but it follows what we've done
  elsewhere before and it opens up for LOTS of more useful return codes
  whenever we can think of them...
2009-04-06 21:44:53 +00:00
Benoit Neil
b85154f13f Added tests (exes) targets, refactor a few things.
PS: Once again, sorry if the added files have executable perms on Linux.
2009-04-06 21:05:44 +00:00
Benoit Neil
06047d9103 Added curl (exe) target, fixed static/dynamic linking errors.
PS: Sorry if the added file has executable perms on Linux, I didn't found anything related to it...
2009-04-06 20:44:01 +00:00
Benoit Neil
2362637e90 Removed the "lib" prefix under linux ("was "liblibcurl") and fixed import library name under Win32 (Added "_imp" for dynamically linked). 2009-04-06 19:43:52 +00:00
Benoit Neil
edd02607e2 Fixed Win32 link error and disabled MSVC specific (=annoying) warnings (Reported by Bill Hoffman) 2009-04-06 19:22:31 +00:00
Yang Tse
0211e420ed fix compiler warning: passing arg 1 of `sk_num' from incompatible pointer type 2009-04-03 12:08:32 +00:00
Benoit Neil
9a184e0bb1 Added basic OpenSSL support in CMake scripts (Thanks to Bill Hoffman) 2009-04-02 23:12:22 +00:00
Yang Tse
168fb3a8d8 Fix curl_off_t definition for builds done using Sun compilers and a
non-configured libcurl. In this case curl_off_t data type was gated
to the off_t data type which depends on the _FILE_OFFSET_BITS. This
configuration is exactly the unwanted configuration for our curl_off_t
data type which must not depend on such setting. This breaks ABI for
libcurl libraries built with Sun compilers which were built without
having run the configure script with _FILE_OFFSET_BITS different than
64 and using the ILP32 data model.
2009-04-02 18:50:39 +00:00
Benoit Neil
4c5307b456 Initial CMake scripts (libcurl only), based on the merge of tetest scripts and mine. These are far to be functionnal yet.
PS: Hello world :)
2009-04-02 13:14:53 +00:00
Dan Fandrich
626f9bd8c2 Added the curl_easy_recv return code fix 2009-04-02 04:41:03 +00:00
Daniel Stenberg
a06b36dee0 - Andre Guibert de Bruet fixed a NULL pointer use in an infof() call if a
strdup() call failed.
2009-04-01 12:15:37 +00:00
Dan Fandrich
18e1bee8d5 Properly return an error code in curl_easy_recv (reported by Jim Freeman). 2009-03-31 14:49:25 +00:00
Gunter Knauf
41f76801eb some minor Makefile tweaks. 2009-03-29 19:40:00 +00:00
Daniel Stenberg
31a7bfc47f Gary Maxwell helped us clarify that CURLOPT_SHARE specificly needs the locking
functions if the easy handles are used in multiple threads
2009-03-20 23:28:20 +00:00
Daniel Stenberg
1b6d18fcb0 removed useless comment 2009-03-20 12:42:29 +00:00
Yang Tse
57c32b709d Add a link to "Potential Errors Passing CRT Objects Across DLL Boundaries" 2009-03-18 13:58:29 +00:00
Daniel Stenberg
5f19822e37 - Kamil Dudka brought a patch that enables 6 additional crypto algorithms when
NSS is used. These ciphers were added in NSS 3.4 and require to be enabled
  explicitly.
2009-03-18 12:48:51 +00:00
Daniel Stenberg
9a0c9cd6e1 minor fix 2009-03-18 09:14:28 +00:00
Gisle Vanem
0ac8e1d80b If CURL_DISABLE_PROXY is defined, we must allow socks_sspi.c to call
Curl_blockread_all(). It is needed in code inside USE_WINDOWS_SSPI.
2009-03-15 13:43:47 +00:00
Daniel Stenberg
744e55ec74 we use libssh2_version() now if available 2009-03-13 10:02:26 +00:00
Daniel Stenberg
74ba4d7950 - Use libssh2_version() to present the libssh2 version in case the libssh2
library is found to support it.
2009-03-13 09:58:15 +00:00
Yang Tse
fa96436661 Fix TELNET transfers not being aborted upon write callback failures 2009-03-12 13:18:25 +00:00
Yang Tse
d15b8273d6 Add Curl_read() return code checking 2009-03-12 02:12:05 +00:00
Daniel Stenberg
0a5cf3a928 Oops, make the memory magic debug stuff done before global init too just to
catch them all. The memory debug stuff is not in the public API anyway.
2009-03-11 23:00:31 +00:00
Daniel Stenberg
6173e38fdc - Kamil Dudka made the curl tool properly call curl_global_init() before any
other libcurl function.
2009-03-11 22:56:03 +00:00
Daniel Stenberg
34cd99d1d9 update the embedded copyright year 2009-03-11 09:00:34 +00:00
Yang Tse
0922a0fc3f s/u_long/unsigned long/ 2009-03-11 05:09:03 +00:00
Yang Tse
dd53b356ff fix previous commit misplaced break statement 2009-03-11 04:45:18 +00:00
Yang Tse
f1db505778 Added TELNET timeout support for Windows builds 2009-03-11 04:15:33 +00:00
Daniel Stenberg
662727ca3e Moved 7.19.2 and older entries from CHANGES to CHANGES.0 (the latter is not
shipped in release archives but is only in CVS)
2009-03-10 10:00:06 +00:00
Daniel Stenberg
bdec6f2b20 - Frank Hempel found out a bug and provided the fix:
curl_easy_duphandle did not necessarily duplicate the CURLOPT_COOKIEFILE
  option. It only enabled the cookie engine in the destination handle if
  data->cookies is not NULL (where data is the source handle). In case of a
  newly initialized handle which just had the cookie support enabled by a
  curl_easy_setopt(handle, CURL_COOKIEFILE, "")-call, handle->cookies was
  still NULL because the setopt-call only appends the value to
  data->change.cookielist, hence duplicating this handle would not have the
  cookie engine switched on.

  We also concluded that the slist-functionality would be suitable for being
  put in its own module rather than simply hanging out in lib/sendf.c so I
  created lib/slist.[ch] for them.
2009-03-09 12:21:46 +00:00
Daniel Stenberg
c86c294f55 - Andreas Farber made the 'buildconf' script check for the presence of m4
scripts to make it detect a bad checkout earlier. People with older
  checkouts who don't do cvs update with the -d option won't get the new dirs
  and then will get funny outputs that can be a bit hard to understand and
  fix.
2009-03-09 09:24:31 +00:00
Dan Fandrich
a9a03b9708 Avoid a compile warning in --disable-proxy case 2009-03-09 04:32:51 +00:00
Daniel Stenberg
f4e8c406bb - Andre Guibert de Bruet found and fixed a code segment in ssluse.c where the
allocation of the memory BIO was not being properly checked.
2009-03-08 22:56:55 +00:00
Daniel Stenberg
12bfcb501c - Andre Guibert de Bruet fixed the gnutls-using code: There are a few places
in the gnutls code where we were checking for negative values for errors,
  when the man pages state that GNUTLS_E_SUCCESS is returned on success and
  other values indicate error conditions.
2009-03-08 22:52:05 +00:00
Daniel Stenberg
0fc1782dd4 Andre Guibert de Bruet fixed a typo in the error message 2009-03-08 22:45:59 +00:00
Daniel Stenberg
9274d31690 - Bill Egert pointed out (http://curl.haxx.se/bug/view.cgi?id=2671602) that
curl didn't use sprintf() in a way that is documented to work in POSIX but
  since we use our own printf() code (from libcurl) that shouldn't be a
  problem. Nonetheless I modified the code to not rely on such particular
  features and to not cause further raised eyebrowse with no good reason.
2009-03-08 22:42:50 +00:00
Dan Fandrich
983a539503 Expanded the security section of the libcurl-tutorial man page to cover
more issues for authors to consider when writing robust libcurl-using
applications.
2009-03-05 06:44:18 +00:00
Yang Tse
94bb7fe5cb Fix NTLM authentication memory leak on SSPI enabled Windows builds 2009-03-05 01:23:14 +00:00
Dan Fandrich
b98e0aa09b Fixed a problem with m4 quoting in the OpenSSL configure check reported
by Daniel Johnson.
2009-03-04 08:09:39 +00:00
Daniel Stenberg
49c6d7e32d Added test 1097 to verify the bug Axel Kuhn epidox posted on March 3 2009
on curl-users, it is also added to DISABLED since I don't have time to work
on it further right now.
2009-03-03 13:25:19 +00:00
Daniel Stenberg
ee73fc361b - David James brought a patch that make libcurl close (all) dead connections
whenever you attempt to open a new connection.
2009-03-03 11:01:24 +00:00
Daniel Stenberg
e84dbd28db 15 additional contributor from the 7.19.4 RELEASE-NOTES 2009-03-03 10:41:11 +00:00
Daniel Stenberg
02449d9aa5 Gah! We can't have 'curl' added here since even though it removes the curl
binary it also removes the include/curl subdir!
2009-03-03 10:02:26 +00:00
Patrick Monnerat
2876329f16 Options CURLOPT_REDIR_PROTOCOLS and CURLOPT_PROTOCOLS, and associated definitions added to RPG binding 2009-03-03 09:57:21 +00:00
Daniel Stenberg
a1f455551f start over on the journey towards 7.19.5 2009-03-02 23:44:42 +00:00
267 changed files with 11816 additions and 4292 deletions

View File

@@ -1,17 +1,22 @@
compile
config.log
Makefile
libtool
Makefile.in
aclocal.m4
aclocal.m4.bak
configure
config.h
config.status
curl-config
autom4te.cache
depcomp
compile
config.guess
config.h
config.log
config.lt
config.status
config.sub
ltmain.sh
configure
curl-config
depcomp
libcurl.pc
libtool
ltmain.sh
vc6curl.ncb
vc6curl.opt
vc6curl.sln
vc6curl.suo

2046
CHANGES

File diff suppressed because it is too large Load Diff

1713
CHANGES.0

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
@CMAKE_CONFIGURABLE_FILE_CONTENT@

34
CMake/CheckTypeSize.c.in Normal file
View File

@@ -0,0 +1,34 @@
#cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@
#ifdef CHECK_TYPE_SIZE_TYPE
@CHECK_TYPE_SIZE_PREINCLUDE@
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif /* HAVE_STDINT_H */
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif /* HAVE_STDDEF_H */
@CHECK_TYPE_SIZE_PREMAIN@
#ifdef __CLASSIC_C__
int main(){
int ac;
char*av[];
#else
int main(int ac, char*av[]){
#endif
if(ac > 1000){return *av[0];}
return sizeof(CHECK_TYPE_SIZE_TYPE);
}
#else /* CHECK_TYPE_SIZE_TYPE */
# error "CHECK_TYPE_SIZE_TYPE has to specify the type"
#endif /* CHECK_TYPE_SIZE_TYPE */

56
CMake/CheckTypeSize.cmake Normal file
View File

@@ -0,0 +1,56 @@
# - Check sizeof a type
# CHECK_TYPE_SIZE(TYPE VARIABLE)
# Check if the type exists and determine size of type. if the type
# exists, the size will be stored to the variable.
#
# VARIABLE - variable to store size if the type exists.
# HAVE_${VARIABLE} - does the variable exists or not
MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
IF(NOT DEFINED ${VARIABLE})
IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
SET(CHECK_TYPE_SIZE_TYPE "${TYPE}")
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
"${CMAKE_REQUIRED_FLAGS}")
FOREACH(def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H)
IF("${def}")
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
ENDIF("${def}")
ENDFOREACH(def)
SET(CHECK_TYPE_SIZE_PREMAIN)
FOREACH(def ${CMAKE_EXTRA_INCLUDE_FILES})
SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
ENDFOREACH(def)
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
IMMEDIATE @ONLY)
FILE(READ
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
CHECK_TYPE_SIZE_FILE_CONTENT)
MESSAGE(STATUS "Check size of ${TYPE}")
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_TYPE_SIZE_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
ENDIF(CMAKE_REQUIRED_LIBRARIES)
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
${CMAKE_BINARY_DIR}
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSize.c"
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
"${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT)
IF(HAVE_${VARIABLE})
MESSAGE(STATUS "Check size of ${TYPE} - done")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n")
ELSE(HAVE_${VARIABLE})
MESSAGE(STATUS "Check size of ${TYPE} - failed")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSize.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n")
ENDIF(HAVE_${VARIABLE})
ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
ENDIF(NOT DEFINED ${VARIABLE})
SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS )
ENDMACRO(CHECK_TYPE_SIZE)

View File

@@ -0,0 +1,75 @@
# - Check if the source code provided in the SOURCE argument compiles.
# CURL_CHECK_C_SOURCE_COMPILES(SOURCE VAR)
# - macro which checks if the source code compiles
# SOURCE - source code to try to compile
# VAR - variable to store whether the source code compiled
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
MACRO(CURL_CHECK_C_SOURCE_COMPILES SOURCE VAR)
IF("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
SET(message "${VAR}")
# If the number of arguments is greater than 2 (SOURCE VAR)
IF(${ARGC} GREATER 2)
# then add the third argument as a message
SET(message "${ARGV2} (${VAR})")
ENDIF(${ARGC} GREATER 2)
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
ELSE(CMAKE_REQUIRED_LIBRARIES)
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
ENDIF(CMAKE_REQUIRED_LIBRARIES)
IF(CMAKE_REQUIRED_INCLUDES)
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
ELSE(CMAKE_REQUIRED_INCLUDES)
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
ENDIF(CMAKE_REQUIRED_INCLUDES)
SET(src "")
FOREACH(def ${EXTRA_DEFINES})
SET(src "${src}#define ${def} 1\n")
ENDFOREACH(def)
FOREACH(inc ${HEADER_INCLUDES})
SET(src "${src}#include <${inc}>\n")
ENDFOREACH(inc)
SET(src "${src}\nint main() { ${SOURCE} ; return 0; }")
SET(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}")
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
IMMEDIATE)
MESSAGE(STATUS "Performing Test ${message}")
TRY_COMPILE(${VAR}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
IF(${VAR})
SET(${VAR} 1 CACHE INTERNAL "Test ${message}")
MESSAGE(STATUS "Performing Test ${message} - Success")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C SOURCE FILE Test ${message} succeded with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${src}\n")
ELSE(${VAR})
MESSAGE(STATUS "Performing Test ${message} - Failed")
SET(${VAR} "" CACHE INTERNAL "Test ${message}")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing C SOURCE FILE Test ${message} failed with the following output:\n"
"${OUTPUT}\n"
"Source file was:\n${src}\n")
ENDIF(${VAR})
ENDIF("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
ENDMACRO(CURL_CHECK_C_SOURCE_COMPILES)

View File

@@ -0,0 +1,83 @@
# - Check if the source code provided in the SOURCE argument compiles and runs.
# CURL_CHECK_C_SOURCE_RUNS(SOURCE VAR)
# - macro which checks if the source code runs
# SOURCE - source code to try to compile
# VAR - variable to store size if the type exists.
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
MACRO(CURL_CHECK_C_SOURCE_RUNS SOURCE VAR)
IF("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
SET(message "${VAR}")
# If the number of arguments is greater than 2 (SOURCE VAR)
IF(${ARGC} GREATER 2)
# then add the third argument as a message
SET(message "${ARGV2} (${VAR})")
ENDIF(${ARGC} GREATER 2)
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${VAR} ${CMAKE_REQUIRED_FLAGS}")
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
ELSE(CMAKE_REQUIRED_LIBRARIES)
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
ENDIF(CMAKE_REQUIRED_LIBRARIES)
IF(CMAKE_REQUIRED_INCLUDES)
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
ELSE(CMAKE_REQUIRED_INCLUDES)
SET(CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
ENDIF(CMAKE_REQUIRED_INCLUDES)
SET(src "")
FOREACH(def ${EXTRA_DEFINES})
SET(src "${src}#define ${def} 1\n")
ENDFOREACH(def)
FOREACH(inc ${HEADER_INCLUDES})
SET(src "${src}#include <${inc}>\n")
ENDFOREACH(inc)
SET(src "${src}\nint main() { ${SOURCE} ; return 0; }")
SET(CMAKE_CONFIGURABLE_FILE_CONTENT "${src}")
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CMake/CMakeConfigurableFile.in
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c"
IMMEDIATE)
MESSAGE(STATUS "Performing Test ${message}")
TRY_RUN(${VAR} ${VAR}_COMPILED
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
"${CURL_CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
# if it did not compile make the return value fail code of 1
IF(NOT ${VAR}_COMPILED)
SET(${VAR} 1)
ENDIF(NOT ${VAR}_COMPILED)
# if the return value was 0 then it worked
SET(result_var ${${VAR}})
IF("${result_var}" EQUAL 0)
SET(${VAR} 1 CACHE INTERNAL "Test ${message}")
MESSAGE(STATUS "Performing Test ${message} - Success")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C SOURCE FILE Test ${message} succeded with the following output:\n"
"${OUTPUT}\n"
"Return value: ${${VAR}}\n"
"Source file was:\n${src}\n")
ELSE("${result_var}" EQUAL 0)
MESSAGE(STATUS "Performing Test ${message} - Failed")
SET(${VAR} "" CACHE INTERNAL "Test ${message}")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing C SOURCE FILE Test ${message} failed with the following output:\n"
"${OUTPUT}\n"
"Return value: ${result_var}\n"
"Source file was:\n${src}\n")
ENDIF("${result_var}" EQUAL 0)
ENDIF("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
ENDMACRO(CURL_CHECK_C_SOURCE_RUNS)

690
CMake/CurlTests.c Normal file
View File

@@ -0,0 +1,690 @@
#ifdef TIME_WITH_SYS_TIME
/* Time with sys/time test */
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int
main ()
{
if ((struct tm *) 0)
return 0;
;
return 0;
}
#endif
#ifdef HAVE_FCNTL_O_NONBLOCK
/* headers for FCNTL_O_NONBLOCK test */
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
/* */
#if defined(sun) || defined(__sun__) || \
defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# if defined(__SVR4) || defined(__srv4__)
# define PLATFORM_SOLARIS
# else
# define PLATFORM_SUNOS4
# endif
#endif
#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX41)
# define PLATFORM_AIX_V3
#endif
/* */
#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__)
#error "O_NONBLOCK does not work on this platform"
#endif
int
main ()
{
/* O_NONBLOCK source test */
int flags = 0;
if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK))
return 1;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYADDR_R_5
#include <sys/types.h>
#include <netdb.h>
int
main ()
{
char * address;
int length;
int type;
struct hostent h;
struct hostent_data hdata;
int rc;
#ifndef gethostbyaddr_r
(void)gethostbyaddr_r;
#endif
rc = gethostbyaddr_r(address, length, type, &h, &hdata);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYADDR_R_5_REENTRANT
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
int
main ()
{
char * address;
int length;q
int type;
struct hostent h;
struct hostent_data hdata;
int rc;
#ifndef gethostbyaddr_r
(void)gethostbyaddr_r;
#endif
rc = gethostbyaddr_r(address, length, type, &h, &hdata);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYADDR_R_7
#include <sys/types.h>
#include <netdb.h>
int
main ()
{
char * address;
int length;
int type;
struct hostent h;
char buffer[8192];
int h_errnop;
struct hostent * hp;
#ifndef gethostbyaddr_r
(void)gethostbyaddr_r;
#endif
hp = gethostbyaddr_r(address, length, type, &h,
buffer, 8192, &h_errnop);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYADDR_R_7_REENTRANT
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
int
main ()
{
char * address;
int length;
int type;
struct hostent h;
char buffer[8192];
int h_errnop;
struct hostent * hp;
#ifndef gethostbyaddr_r
(void)gethostbyaddr_r;
#endif
hp = gethostbyaddr_r(address, length, type, &h,
buffer, 8192, &h_errnop);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYADDR_R_8
#include <sys/types.h>
#include <netdb.h>
int
main ()
{
char * address;
int length;
int type;
struct hostent h;
char buffer[8192];
int h_errnop;
struct hostent * hp;
int rc;
#ifndef gethostbyaddr_r
(void)gethostbyaddr_r;
#endif
rc = gethostbyaddr_r(address, length, type, &h,
buffer, 8192, &hp, &h_errnop);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYADDR_R_8_REENTRANT
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
int
main ()
{
char * address;
int length;
int type;
struct hostent h;
char buffer[8192];
int h_errnop;
struct hostent * hp;
int rc;
#ifndef gethostbyaddr_r
(void)gethostbyaddr_r;
#endif
rc = gethostbyaddr_r(address, length, type, &h,
buffer, 8192, &hp, &h_errnop);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYNAME_R_3
#include <string.h>
#include <sys/types.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
int
main ()
{
struct hostent_data data;
#ifndef gethostbyname_r
(void)gethostbyname_r;
#endif
gethostbyname_r(NULL, NULL, NULL);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYNAME_R_3_REENTRANT
#define _REENTRANT
#include <string.h>
#include <sys/types.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
int
main ()
{
struct hostent_data data;
#ifndef gethostbyname_r
(void)gethostbyname_r;
#endif
gethostbyname_r(NULL, NULL, NULL);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYNAME_R_5
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
int
main ()
{
#ifndef gethostbyname_r
(void)gethostbyname_r;
#endif
gethostbyname_r(NULL, NULL, NULL, 0, NULL);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYNAME_R_5_REENTRANT
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
int
main ()
{
#ifndef gethostbyname_r
(void)gethostbyname_r;
#endif
gethostbyname_r(NULL, NULL, NULL, 0, NULL);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYNAME_R_6
#include <sys/types.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
int
main ()
{
#ifndef gethostbyname_r
(void)gethostbyname_r;
#endif
gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL);
;
return 0;
}
#endif
#ifdef HAVE_GETHOSTBYNAME_R_6_REENTRANT
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
#undef NULL
#define NULL (void *)0
int
main ()
{
#ifndef gethostbyname_r
(void)gethostbyname_r;
#endif
gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL);
;
return 0;
}
#endif
#ifdef HAVE_SOCKLEN_T
#ifdef _WIN32
#include <ws2tcpip.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#endif
int
main ()
{
if ((socklen_t *) 0)
return 0;
if (sizeof (socklen_t))
return 0;
;
return 0;
}
#endif
#ifdef HAVE_IN_ADDR_T
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
int
main ()
{
if ((in_addr_t *) 0)
return 0;
if (sizeof (in_addr_t))
return 0;
;
return 0;
}
#endif
#ifdef HAVE_BOOL_T
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
#endif
int
main ()
{
if (sizeof (bool *) )
return 0;
;
return 0;
}
#endif
#ifdef STDC_HEADERS
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
int main() { return 0; }
#endif
#ifdef RETSIGTYPE_TEST
#include <sys/types.h>
#include <signal.h>
#ifdef signal
# undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif
int
main ()
{
return 0;
}
#endif
#ifdef HAVE_INET_NTOA_R_DECL
#include <arpa/inet.h>
typedef void (*func_type)();
int main()
{
#ifndef inet_ntoa_r
func_type func;
func = (func_type)inet_ntoa_r;
#endif
return 0;
}
#endif
#ifdef HAVE_INET_NTOA_R_DECL_REENTRANT
#define _REENTRANT
#include <arpa/inet.h>
typedef void (*func_type)();
int main()
{
#ifndef inet_ntoa_r
func_type func;
func = (func_type)&inet_ntoa_r;
#endif
return 0;
}
#endif
#ifdef HAVE_GETADDRINFO
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
int main(void) {
struct addrinfo hints, *ai;
int error;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
#ifndef getaddrinfo
(void)getaddrinfo;
#endif
error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
if (error) {
return 1;
}
return 0;
}
#endif
#ifdef HAVE_FILE_OFFSET_BITS
#ifdef _FILE_OFFSET_BITS
#undef _FILE_OFFSET_BITS
#endif
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int main () { ; return 0; }
#endif
#ifdef HAVE_IOCTLSOCKET
/* includes start */
#ifdef HAVE_WINDOWS_H
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
# ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
# else
# ifdef HAVE_WINSOCK_H
# include <winsock.h>
# endif
# endif
#endif
int
main ()
{
/* ioctlsocket source code */
int socket;
unsigned long flags = ioctlsocket(socket, FIONBIO, &flags);
;
return 0;
}
#endif
#ifdef HAVE_IOCTLSOCKET_CAMEL
/* includes start */
#ifdef HAVE_WINDOWS_H
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
# ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
# else
# ifdef HAVE_WINSOCK_H
# include <winsock.h>
# endif
# endif
#endif
int
main ()
{
/* IoctlSocket source code */
if(0 != IoctlSocket(0, 0, 0))
return 1;
;
return 0;
}
#endif
#ifdef HAVE_IOCTLSOCKET_CAMEL_FIONBIO
/* includes start */
#ifdef HAVE_WINDOWS_H
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
# ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
# else
# ifdef HAVE_WINSOCK_H
# include <winsock.h>
# endif
# endif
#endif
int
main ()
{
/* IoctlSocket source code */
long flags = 0;
if(0 != ioctlsocket(0, FIONBIO, &flags))
return 1;
;
return 0;
}
#endif
#ifdef HAVE_IOCTLSOCKET_FIONBIO
/* includes start */
#ifdef HAVE_WINDOWS_H
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
# ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
# else
# ifdef HAVE_WINSOCK_H
# include <winsock.h>
# endif
# endif
#endif
int
main ()
{
int flags = 0;
if(0 != ioctlsocket(0, FIONBIO, &flags))
return 1;
;
return 0;
}
#endif
#ifdef HAVE_IOCTL_FIONBIO
/* headers for FIONBIO test */
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
#ifdef HAVE_STROPTS_H
# include <stropts.h>
#endif
int
main ()
{
int flags = 0;
if(0 != ioctl(0, FIONBIO, &flags))
return 1;
;
return 0;
}
#endif
#ifdef HAVE_IOCTL_SIOCGIFADDR
/* headers for FIONBIO test */
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
#ifdef HAVE_STROPTS_H
# include <stropts.h>
#endif
#include <net/if.h>
int
main ()
{
struct ifreq ifr;
if(0 != ioctl(0, SIOCGIFADDR, &ifr))
return 1;
;
return 0;
}
#endif
#ifdef HAVE_SETSOCKOPT_SO_NONBLOCK
/* includes start */
#ifdef HAVE_WINDOWS_H
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
# ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
# else
# ifdef HAVE_WINSOCK_H
# include <winsock.h>
# endif
# endif
#endif
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
/* includes end */
int
main ()
{
if(0 != setsockopt(0, SOL_SOCKET, SO_NONBLOCK, 0, 0))
return 1;
;
return 0;
}
#endif
#ifdef HAVE_GLIBC_STRERROR_R
#include <string.h>
#include <errno.h>
int
main () {
char buffer[1024]; /* big enough to play with */
char *string =
strerror_r(EACCES, buffer, sizeof(buffer));
/* this should've returned a string */
if(!string || !string[0])
return 99;
return 0;
}
#endif
#ifdef HAVE_POSIX_STRERROR_R
#include <string.h>
#include <errno.h>
int
main () {
char buffer[1024]; /* big enough to play with */
int error =
strerror_r(EACCES, buffer, sizeof(buffer));
/* This should've returned zero, and written an error string in the
buffer.*/
if(!buffer[0] || error)
return 99;
return 0;
}
#endif

19
CMake/FindOpenSSL.cmake Normal file
View File

@@ -0,0 +1,19 @@
# Extension of the standard FindOpenSSL.cmake
# Adds OPENSSL_INCLUDE_DIRS and libeay32
INCLUDE("${CMAKE_ROOT}/Modules/FindOpenSSL.cmake")
# Bill Hoffman told that libeay32 is necessary for him:
FIND_LIBRARY(SSL_LIBEAY NAMES libeay32)
IF(OPENSSL_FOUND)
IF(SSL_LIBEAY)
LIST(APPEND OPENSSL_LIBRARIES ${SSL_LIBEAY})
ELSE()
SET(OPENSSL_FOUND FALSE)
ENDIF()
ENDIF()
IF(OPENSSL_FOUND)
SET(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
ENDIF()

8
CMake/FindZLIB.cmake Normal file
View File

@@ -0,0 +1,8 @@
# Locate zlib
INCLUDE("${CMAKE_ROOT}/Modules/FindZLIB.cmake")
FIND_LIBRARY(ZLIB_LIBRARY_DEBUG NAMES zd zlibd zdlld zlib1d )
IF(ZLIB_FOUND AND ZLIB_LIBRARY_DEBUG)
SET( ZLIB_LIBRARIES optimized "${ZLIB_LIBRARY}" debug ${ZLIB_LIBRARY_DEBUG})
ENDIF()

250
CMake/OtherTests.cmake Normal file
View File

@@ -0,0 +1,250 @@
INCLUDE(CurlCheckCSourceCompiles)
SET(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
SET(HEADER_INCLUDES)
SET(headers_hack)
MACRO(add_header_include check header)
IF(${check})
SET(headers_hack
"${headers_hack}\n#include <${header}>")
#SET(HEADER_INCLUDES
# ${HEADER_INCLUDES}
# "${header}")
ENDIF(${check})
ENDMACRO(add_header_include)
SET(signature_call_conv)
IF(HAVE_WINDOWS_H)
add_header_include(HAVE_WINDOWS_H "windows.h")
add_header_include(HAVE_WINSOCK2_H "winsock2.h")
add_header_include(HAVE_WINSOCK_H "winsock.h")
SET(EXTRA_DEFINES ${EXTRA_DEFINES}
"__unused7\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#define __unused3")
SET(signature_call_conv "PASCAL")
ELSE(HAVE_WINDOWS_H)
add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
add_header_include(HAVE_SYS_SOCKET_H "sys/socket.h")
ENDIF(HAVE_WINDOWS_H)
SET(EXTRA_DEFINES_BACKUP "${EXTRA_DEFINES}")
SET(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
CURL_CHECK_C_SOURCE_COMPILES("recv(0, 0, 0, 0)" curl_cv_recv)
IF(curl_cv_recv)
# AC_CACHE_CHECK([types of arguments and return type for recv],
#[curl_cv_func_recv_args], [
#SET(curl_cv_func_recv_args "unknown")
#for recv_retv in 'int' 'ssize_t'; do
IF(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
FOREACH(recv_retv "int" "ssize_t" )
FOREACH(recv_arg1 "int" "ssize_t" "SOCKET")
FOREACH(recv_arg2 "void *" "char *")
FOREACH(recv_arg3 "size_t" "int" "socklen_t" "unsigned int")
FOREACH(recv_arg4 "int" "unsigned int")
IF(NOT curl_cv_func_recv_done)
SET(curl_cv_func_recv_test "UNKNOWN")
SET(extern_line "extern ${recv_retv} ${signature_call_conv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})\;")
SET(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
CURL_CHECK_C_SOURCE_COMPILES("
${recv_arg1} s=0;
${recv_arg2} buf=0;
${recv_arg3} len=0;
${recv_arg4} flags=0;
${recv_retv} res = recv(s, buf, len, flags)"
curl_cv_func_recv_test
"${recv_retv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})")
IF(curl_cv_func_recv_test)
SET(curl_cv_func_recv_args
"${recv_arg1},${recv_arg2},${recv_arg3},${recv_arg4},${recv_retv}")
SET(RECV_TYPE_ARG1 "${recv_arg1}")
SET(RECV_TYPE_ARG2 "${recv_arg2}")
SET(RECV_TYPE_ARG3 "${recv_arg3}")
SET(RECV_TYPE_ARG4 "${recv_arg4}")
SET(RECV_TYPE_RETV "${recv_retv}")
SET(HAVE_RECV 1)
SET(curl_cv_func_recv_done 1)
ENDIF(curl_cv_func_recv_test)
ENDIF(NOT curl_cv_func_recv_done)
ENDFOREACH(recv_arg4)
ENDFOREACH(recv_arg3)
ENDFOREACH(recv_arg2)
ENDFOREACH(recv_arg1)
ENDFOREACH(recv_retv)
ELSE(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
STRING(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG1 "${curl_cv_func_recv_args}")
STRING(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG2 "${curl_cv_func_recv_args}")
STRING(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" RECV_TYPE_ARG3 "${curl_cv_func_recv_args}")
STRING(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" RECV_TYPE_ARG4 "${curl_cv_func_recv_args}")
STRING(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" RECV_TYPE_RETV "${curl_cv_func_recv_args}")
#MESSAGE("RECV_TYPE_ARG1 ${RECV_TYPE_ARG1}")
#MESSAGE("RECV_TYPE_ARG2 ${RECV_TYPE_ARG2}")
#MESSAGE("RECV_TYPE_ARG3 ${RECV_TYPE_ARG3}")
#MESSAGE("RECV_TYPE_ARG4 ${RECV_TYPE_ARG4}")
#MESSAGE("RECV_TYPE_RETV ${RECV_TYPE_RETV}")
ENDIF(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown")
IF("${curl_cv_func_recv_args}" STREQUAL "unknown")
MESSAGE(FATAL_ERROR "Cannot find proper types to use for recv args")
ENDIF("${curl_cv_func_recv_args}" STREQUAL "unknown")
ELSE(curl_cv_recv)
MESSAGE(FATAL_ERROR "Unable to link function recv")
ENDIF(curl_cv_recv)
SET(curl_cv_func_recv_args "${curl_cv_func_recv_args}" CACHE INTERNAL "Arguments for recv")
SET(HAVE_RECV 1)
CURL_CHECK_C_SOURCE_COMPILES("send(0, 0, 0, 0)" curl_cv_send)
IF(curl_cv_send)
# AC_CACHE_CHECK([types of arguments and return type for send],
#[curl_cv_func_send_args], [
#SET(curl_cv_func_send_args "unknown")
#for send_retv in 'int' 'ssize_t'; do
IF(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
FOREACH(send_retv "int" "ssize_t" )
FOREACH(send_arg1 "int" "ssize_t" "SOCKET")
FOREACH(send_arg2 "const void *" "void *" "char *" "const char *")
FOREACH(send_arg3 "size_t" "int" "socklen_t" "unsigned int")
FOREACH(send_arg4 "int" "unsigned int")
IF(NOT curl_cv_func_send_done)
SET(curl_cv_func_send_test "UNKNOWN")
SET(extern_line "extern ${send_retv} ${signature_call_conv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})\;")
SET(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5")
CURL_CHECK_C_SOURCE_COMPILES("
${send_arg1} s=0;
${send_arg2} buf=0;
${send_arg3} len=0;
${send_arg4} flags=0;
${send_retv} res = send(s, buf, len, flags)"
curl_cv_func_send_test
"${send_retv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})")
IF(curl_cv_func_send_test)
#MESSAGE("Found arguments: ${curl_cv_func_send_test}")
STRING(REGEX REPLACE "(const) .*" "\\1" send_qual_arg2 "${send_arg2}")
STRING(REGEX REPLACE "const (.*)" "\\1" send_arg2 "${send_arg2}")
SET(curl_cv_func_send_args
"${send_arg1},${send_arg2},${send_arg3},${send_arg4},${send_retv},${send_qual_arg2}")
SET(SEND_TYPE_ARG1 "${send_arg1}")
SET(SEND_TYPE_ARG2 "${send_arg2}")
SET(SEND_TYPE_ARG3 "${send_arg3}")
SET(SEND_TYPE_ARG4 "${send_arg4}")
SET(SEND_TYPE_RETV "${send_retv}")
SET(HAVE_SEND 1)
SET(curl_cv_func_send_done 1)
ENDIF(curl_cv_func_send_test)
ENDIF(NOT curl_cv_func_send_done)
ENDFOREACH(send_arg4)
ENDFOREACH(send_arg3)
ENDFOREACH(send_arg2)
ENDFOREACH(send_arg1)
ENDFOREACH(send_retv)
ELSE(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
STRING(REGEX REPLACE "^([^,]*),[^,]*,[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG1 "${curl_cv_func_send_args}")
STRING(REGEX REPLACE "^[^,]*,([^,]*),[^,]*,[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG2 "${curl_cv_func_send_args}")
STRING(REGEX REPLACE "^[^,]*,[^,]*,([^,]*),[^,]*,[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG3 "${curl_cv_func_send_args}")
STRING(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,([^,]*),[^,]*,[^,]*$" "\\1" SEND_TYPE_ARG4 "${curl_cv_func_send_args}")
STRING(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*),[^,]*$" "\\1" SEND_TYPE_RETV "${curl_cv_func_send_args}")
STRING(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" SEND_QUAL_ARG2 "${curl_cv_func_send_args}")
#MESSAGE("SEND_TYPE_ARG1 ${SEND_TYPE_ARG1}")
#MESSAGE("SEND_TYPE_ARG2 ${SEND_TYPE_ARG2}")
#MESSAGE("SEND_TYPE_ARG3 ${SEND_TYPE_ARG3}")
#MESSAGE("SEND_TYPE_ARG4 ${SEND_TYPE_ARG4}")
#MESSAGE("SEND_TYPE_RETV ${SEND_TYPE_RETV}")
#MESSAGE("SEND_QUAL_ARG2 ${SEND_QUAL_ARG2}")
ENDIF(NOT DEFINED curl_cv_func_send_args OR "${curl_cv_func_send_args}" STREQUAL "unknown")
IF("${curl_cv_func_send_args}" STREQUAL "unknown")
MESSAGE(FATAL_ERROR "Cannot find proper types to use for send args")
ENDIF("${curl_cv_func_send_args}" STREQUAL "unknown")
SET(SEND_QUAL_ARG2 "const")
ELSE(curl_cv_send)
MESSAGE(FATAL_ERROR "Unable to link function send")
ENDIF(curl_cv_send)
SET(curl_cv_func_send_args "${curl_cv_func_send_args}" CACHE INTERNAL "Arguments for send")
SET(HAVE_SEND 1)
SET(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5")
CURL_CHECK_C_SOURCE_COMPILES("int flag = MSG_NOSIGNAL" HAVE_MSG_NOSIGNAL)
SET(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
SET(HEADER_INCLUDES)
SET(headers_hack)
MACRO(add_header_include check header)
IF(${check})
SET(headers_hack
"${headers_hack}\n#include <${header}>")
#SET(HEADER_INCLUDES
# ${HEADER_INCLUDES}
# "${header}")
ENDIF(${check})
ENDMACRO(add_header_include header)
IF(HAVE_WINDOWS_H)
SET(EXTRA_DEFINES ${EXTRA_DEFINES}
"__unused7\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif\n#define __unused3")
add_header_include(HAVE_WINDOWS_H "windows.h")
add_header_include(HAVE_WINSOCK2_H "winsock2.h")
add_header_include(HAVE_WINSOCK_H "winsock.h")
ELSE(HAVE_WINDOWS_H)
add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
add_header_include(HAVE_SYS_TIME_H "sys/time.h")
add_header_include(TIME_WITH_SYS_TIME "time.h")
add_header_include(HAVE_TIME_H "time.h")
ENDIF(HAVE_WINDOWS_H)
SET(EXTRA_DEFINES "${EXTRA_DEFINES}\n${headers_hack}\n#define __unused5")
CURL_CHECK_C_SOURCE_COMPILES("struct timeval ts;\nts.tv_sec = 0;\nts.tv_usec = 0" HAVE_STRUCT_TIMEVAL)
INCLUDE(CurlCheckCSourceRuns)
SET(EXTRA_DEFINES)
SET(HEADER_INCLUDES)
IF(HAVE_SYS_POLL_H)
SET(HEADER_INCLUDES "sys/poll.h")
ENDIF(HAVE_SYS_POLL_H)
CURL_CHECK_C_SOURCE_RUNS("return poll((void *)0, 0, 10 /*ms*/)" HAVE_POLL_FINE)
SET(HAVE_SIG_ATOMIC_T 1)
SET(EXTRA_DEFINES)
SET(HEADER_INCLUDES)
IF(HAVE_SIGNAL_H)
SET(HEADER_INCLUDES "signal.h")
SET(CMAKE_EXTRA_INCLUDE_FILES "signal.h")
ENDIF(HAVE_SIGNAL_H)
CHECK_TYPE_SIZE("sig_atomic_t" SIZEOF_SIG_ATOMIC_T)
IF(HAVE_SIZEOF_SIG_ATOMIC_T)
CURL_CHECK_C_SOURCE_COMPILES("static volatile sig_atomic_t dummy = 0" HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
IF(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
SET(HAVE_SIG_ATOMIC_T_VOLATILE 1)
ENDIF(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
ENDIF(HAVE_SIZEOF_SIG_ATOMIC_T)
SET(CHECK_TYPE_SIZE_PREINCLUDE
"#undef inline")
IF(HAVE_WINDOWS_H)
SET(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>")
IF(HAVE_WINSOCK2_H)
SET(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}\n#include <winsock2.h>")
ENDIF(HAVE_WINSOCK2_H)
ELSE(HAVE_WINDOWS_H)
IF(HAVE_SYS_SOCKET_H)
SET(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
"sys/socket.h")
ENDIF(HAVE_SYS_SOCKET_H)
IF(HAVE_NETINET_IN_H)
SET(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
"netinet/in.h")
ENDIF(HAVE_NETINET_IN_H)
IF(HAVE_ARPA_INET_H)
SET(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES}
"arpa/inet.h")
ENDIF(HAVE_ARPA_INET_H)
ENDIF(HAVE_WINDOWS_H)
CHECK_TYPE_SIZE("struct sockaddr_storage" SIZEOF_STRUCT_SOCKADDR_STORAGE)
IF(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
SET(HAVE_STRUCT_SOCKADDR_STORAGE 1)
ENDIF(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)

View File

@@ -0,0 +1,121 @@
IF(NOT UNIX)
IF(WIN32)
SET(HAVE_LIBDL 0)
SET(HAVE_LIBUCB 0)
SET(HAVE_LIBSOCKET 0)
SET(NOT_NEED_LIBNSL 0)
SET(HAVE_LIBNSL 0)
SET(HAVE_LIBZ 0)
SET(HAVE_LIBCRYPTO 0)
SET(HAVE_DLOPEN 0)
SET(HAVE_ALLOCA_H 0)
SET(HAVE_ARPA_INET_H 0)
SET(HAVE_DLFCN_H 0)
SET(HAVE_FCNTL_H 1)
SET(HAVE_FEATURES_H 0)
SET(HAVE_INTTYPES_H 0)
SET(HAVE_IO_H 1)
SET(HAVE_MALLOC_H 1)
SET(HAVE_MEMORY_H 1)
SET(HAVE_NETDB_H 0)
SET(HAVE_NETINET_IF_ETHER_H 0)
SET(HAVE_NETINET_IN_H 0)
SET(HAVE_NET_IF_H 0)
SET(HAVE_PROCESS_H 1)
SET(HAVE_PWD_H 0)
SET(HAVE_SETJMP_H 1)
SET(HAVE_SGTTY_H 0)
SET(HAVE_SIGNAL_H 1)
SET(HAVE_SOCKIO_H 0)
SET(HAVE_STDINT_H 0)
SET(HAVE_STDLIB_H 1)
SET(HAVE_STRINGS_H 0)
SET(HAVE_STRING_H 1)
SET(HAVE_SYS_PARAM_H 0)
SET(HAVE_SYS_POLL_H 0)
SET(HAVE_SYS_SELECT_H 0)
SET(HAVE_SYS_SOCKET_H 0)
SET(HAVE_SYS_SOCKIO_H 0)
SET(HAVE_SYS_STAT_H 1)
SET(HAVE_SYS_TIME_H 0)
SET(HAVE_SYS_TYPES_H 1)
SET(HAVE_SYS_UTIME_H 1)
SET(HAVE_TERMIOS_H 0)
SET(HAVE_TERMIO_H 0)
SET(HAVE_TIME_H 1)
SET(HAVE_UNISTD_H 0)
SET(HAVE_UTIME_H 0)
SET(HAVE_X509_H 0)
SET(HAVE_ZLIB_H 0)
SET(HAVE_SIZEOF_LONG_DOUBLE 1)
SET(SIZEOF_LONG_DOUBLE 8)
SET(HAVE_SOCKET 1)
SET(HAVE_POLL 0)
SET(HAVE_SELECT 1)
SET(HAVE_STRDUP 1)
SET(HAVE_STRSTR 1)
SET(HAVE_STRTOK_R 0)
SET(HAVE_STRFTIME 1)
SET(HAVE_UNAME 0)
SET(HAVE_STRCASECMP 0)
SET(HAVE_STRICMP 1)
SET(HAVE_STRCMPI 1)
SET(HAVE_GETHOSTBYADDR 1)
SET(HAVE_GETTIMEOFDAY 0)
SET(HAVE_INET_ADDR 1)
SET(HAVE_INET_NTOA 1)
SET(HAVE_INET_NTOA_R 0)
SET(HAVE_TCGETATTR 0)
SET(HAVE_TCSETATTR 0)
SET(HAVE_PERROR 1)
SET(HAVE_CLOSESOCKET 1)
SET(HAVE_SETVBUF 0)
SET(HAVE_SIGSETJMP 0)
SET(HAVE_GETPASS_R 0)
SET(HAVE_STRLCAT 0)
SET(HAVE_GETPWUID 0)
SET(HAVE_GETEUID 0)
SET(HAVE_UTIME 1)
SET(HAVE_RAND_EGD 0)
SET(HAVE_RAND_SCREEN 0)
SET(HAVE_RAND_STATUS 0)
SET(HAVE_GMTIME_R 0)
SET(HAVE_LOCALTIME_R 0)
SET(HAVE_GETHOSTBYADDR_R 0)
SET(HAVE_GETHOSTBYNAME_R 0)
SET(HAVE_SIGNAL_FUNC 1)
SET(HAVE_SIGNAL_MACRO 0)
SET(HAVE_GETHOSTBYADDR_R_5 0)
SET(HAVE_GETHOSTBYADDR_R_5_REENTRANT 0)
SET(HAVE_GETHOSTBYADDR_R_7 0)
SET(HAVE_GETHOSTBYADDR_R_7_REENTRANT 0)
SET(HAVE_GETHOSTBYADDR_R_8 0)
SET(HAVE_GETHOSTBYADDR_R_8_REENTRANT 0)
SET(HAVE_GETHOSTBYNAME_R_3 0)
SET(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)
SET(HAVE_GETHOSTBYNAME_R_5 0)
SET(HAVE_GETHOSTBYNAME_R_5_REENTRANT 0)
SET(HAVE_GETHOSTBYNAME_R_6 0)
SET(HAVE_GETHOSTBYNAME_R_6_REENTRANT 0)
SET(TIME_WITH_SYS_TIME 0)
SET(HAVE_O_NONBLOCK 0)
SET(HAVE_IN_ADDR_T 0)
SET(HAVE_INET_NTOA_R_DECL 0)
SET(HAVE_INET_NTOA_R_DECL_REENTRANT 0)
SET(HAVE_GETADDRINFO 0)
SET(STDC_HEADERS 1)
SET(RETSIGTYPE_TEST 1)
SET(HAVE_SIGACTION 0)
SET(HAVE_MACRO_SIGSETJMP 0)
ELSE(WIN32)
MESSAGE("This file should be included on Windows platform only")
ENDIF(WIN32)
ENDIF(NOT UNIX)

31
CMake/Utilities.cmake Normal file
View File

@@ -0,0 +1,31 @@
# File containing various utilities
# Converts a CMake list to a string containing elements separated by spaces
FUNCTION(TO_LIST_SPACES _LIST_NAME OUTPUT_VAR)
SET(NEW_LIST_SPACE)
FOREACH(ITEM ${${_LIST_NAME}})
SET(NEW_LIST_SPACE "${NEW_LIST_SPACE} ${ITEM}")
ENDFOREACH()
STRING(STRIP ${NEW_LIST_SPACE} NEW_LIST_SPACE)
SET(${OUTPUT_VAR} "${NEW_LIST_SPACE}" PARENT_SCOPE)
ENDFUNCTION()
# Appends a lis of item to a string which is a space-separated list, if they don't already exist.
FUNCTION(LIST_SPACES_APPEND_ONCE LIST_NAME)
STRING(REPLACE " " ";" _LIST ${${LIST_NAME}})
LIST(APPEND _LIST ${ARGN})
LIST(REMOVE_DUPLICATES _LIST)
TO_LIST_SPACES(_LIST NEW_LIST_SPACE)
SET(${LIST_NAME} "${NEW_LIST_SPACE}" PARENT_SCOPE)
ENDFUNCTION()
# Convinience function that does the same as LIST(FIND ...) but with a TRUE/FALSE return value.
# Ex: IN_STR_LIST(MY_LIST "Searched item" WAS_FOUND)
FUNCTION(IN_STR_LIST LIST_NAME ITEM_SEARCHED RETVAL)
LIST(FIND ${LIST_NAME} ${ITEM_SEARCHED} FIND_POS)
IF(${FIND_POS} EQUAL -1)
SET(${RETVAL} FALSE PARENT_SCOPE)
ELSE()
SET(${RETVAL} TRUE PARENT_SCOPE)
ENDIF()
ENDFUNCTION()

843
CMakeLists.txt Normal file
View File

@@ -0,0 +1,843 @@
# cURL/libcurl CMake script
# by Tetetest and Sukender (Benoit Neil)
# TODO:
# The output .so file lacks the soname number which we currently have within the lib/Makefile.am file
# Add full (4 or 5 libs) SSL support
# Add INSTALL target (EXTRA_DIST variables in Makefile.am may be moved to Makefile.inc so that CMake/CPack is aware of what's to include).
# Add CTests(?)
# Check on all possible platforms
# Test with as many configurations possible (With or without any option)
# Create scripts that help keeping the CMake build system up to date (to reduce maintenance). According to Tetetest:
# - lists of headers that 'configure' checks for;
# - curl-specific tests (the ones that are in m4/curl-*.m4 files);
# - (most obvious thing:) curl version numbers.
# Add documentation subproject
#
# To check:
# (From Daniel Stenberg) The cmake build selected to run gcc with -fPIC on my box while the plain configure script did not.
# (From Daniel Stenberg) The gcc command line use neither -g nor any -O options. As a developer, I also treasure our configure scripts's --enable-debug option that sets a long range of "picky" compiler options.
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2 FATAL_ERROR)
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
INCLUDE(Utilities)
project( CURL C )
SET(CURL_MAJOR_VERSION 7)
SET(CURL_MINOR_VERSION 19)
SET(CURL_PATCH_VERSION 4)
INCLUDE_REGULAR_EXPRESSION("^.*$") # Sukender: Is it necessary?
# Setup package meta-data
# SET(PACKAGE "curl")
SET(CURL_VERSION ${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION})
# SET(PACKAGE_TARNAME "curl")
# SET(PACKAGE_NAME "curl")
# SET(PACKAGE_VERSION "-")
# SET(PACKAGE_STRING "curl-")
# SET(PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/")
SET(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}")
SET(OS "\"${CMAKE_SYSTEM_NAME}\"")
# Make the base headers visible to everything
# IF(NOT ${PROJECT_BINARY_DIR} EQUAL ${PROJECT_SOURCE_DIR})
# INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include)
# ENDIF()
INCLUDE_DIRECTORIES( ${CURL_SOURCE_DIR}/include )
IF(WIN32)
SET(NATIVE_WINDOWS ON)
ENDIF()
OPTION(BUILD_CURL_EXE "Set to ON to build cURL executable." ON)
OPTION(BUILD_CURL_TESTS "Set to ON to build cURL tests." ON)
OPTION(CURL_STATICLIB "Set to ON to build libcurl with static linking." OFF)
OPTION(BUILD_DASHBOARD_REPORTS "Set to ON to activate reporting of cURL builds here http://www.cdash.org/CDashPublic/index.php?project=CURL" OFF)
IF(BUILD_DASHBOARD_REPORTS)
#INCLUDE(Dart)
INCLUDE(CTest)
ENDIF(BUILD_DASHBOARD_REPORTS)
IF(MSVC)
OPTION(BUILD_RELEASE_DEBUG_DIRS "Set OFF to build each configuration to a separate directory" OFF)
MARK_AS_ADVANCED(BUILD_RELEASE_DEBUG_DIRS)
ENDIF()
OPTION(CURL_HIDDEN_SYMBOLS "Set to ON to hide libcurl internal symbols (=hide all symbols that aren't officially external)." ON)
MARK_AS_ADVANCED(CURL_HIDDEN_SYMBOLS)
# IF(WIN32)
# OPTION(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without openssl" ON)
# MARK_AS_ADVANCED(CURL_WINDOWS_SSPI)
# ENDIF()
OPTION(HTTP_ONLY "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)" OFF)
MARK_AS_ADVANCED(HTTP_ONLY)
OPTION(CURL_DISABLE_FTP "disables FTP" OFF)
MARK_AS_ADVANCED(CURL_DISABLE_FTP)
OPTION(CURL_DISABLE_LDAP "disables LDAP" OFF)
MARK_AS_ADVANCED(CURL_DISABLE_LDAP)
OPTION(CURL_DISABLE_TELNET "disables Telnet" OFF)
MARK_AS_ADVANCED(CURL_DISABLE_TELNET)
OPTION(CURL_DISABLE_DICT "disables DICT" OFF)
MARK_AS_ADVANCED(CURL_DISABLE_DICT)
OPTION(CURL_DISABLE_FILE "disables FILE" OFF)
MARK_AS_ADVANCED(CURL_DISABLE_FILE)
OPTION(CURL_DISABLE_TFTP "disables TFTP" OFF)
MARK_AS_ADVANCED(CURL_DISABLE_TFTP)
OPTION(CURL_DISABLE_HTTP "disables HTTP" OFF)
MARK_AS_ADVANCED(CURL_DISABLE_HTTP)
OPTION(CURL_DISABLE_LDAPS "to disable LDAPS" OFF)
MARK_AS_ADVANCED(CURL_DISABLE_LDAPS)
IF(WIN32)
OPTION(CURL_LDAP_WIN "Use W$ LDAP implementation" ON)
MARK_AS_ADVANCED(CURL_LDAP_WIN)
SET(CURL_LDAP_HYBRID OFF)
ELSE()
OPTION(CURL_LDAP_HYBRID "W$ LDAP with non-W$ compiler" OFF)
MARK_AS_ADVANCED(CURL_LDAP_HYBRID)
SET(CURL_LDAP_WIN OFF)
ENDIF()
IF(HTTP_ONLY)
SET(CURL_DISABLE_FTP ON)
SET(CURL_DISABLE_LDAP ON)
SET(CURL_DISABLE_TELNET ON)
SET(CURL_DISABLE_DICT ON)
SET(CURL_DISABLE_FILE ON)
SET(CURL_DISABLE_TFTP ON)
ENDIF()
OPTION(CURL_DISABLE_COOKIES "to disable cookies support" OFF)
MARK_AS_ADVANCED(CURL_DISABLE_COOKIES)
OPTION(CURL_DISABLE_CRYPTO_AUTH "to disable cryptographic authentication" OFF)
MARK_AS_ADVANCED(CURL_DISABLE_CRYPTO_AUTH)
OPTION(CURL_DISABLE_VERBOSE_STRINGS "to disable verbose strings" OFF)
MARK_AS_ADVANCED(CURL_DISABLE_VERBOSE_STRINGS)
OPTION(DISABLED_THREADSAFE "Set to explicitly specify we don't want to use thread-safe functions" OFF)
MARK_AS_ADVANCED(DISABLED_THREADSAFE)
OPTION(ENABLE_IPV6 "Define if you want to enable IPv6 support" OFF)
MARK_AS_ADVANCED(ENABLE_IPV6)
IF(WIN32)
LIST_SPACES_APPEND_ONCE(CMAKE_C_STANDARD_LIBRARIES wsock32.lib ws2_32.lib) # bufferoverflowu.lib
IF(CURL_DISABLE_LDAP)
# Remove wldap32.lib from space-separated list
STRING(REPLACE " " ";" _LIST ${CMAKE_C_STANDARD_LIBRARIES})
LIST(REMOVE_ITEM _LIST "wldap32.lib")
TO_LIST_SPACES(_LIST CMAKE_C_STANDARD_LIBRARIES)
ELSE()
# Append wldap32.lib
LIST_SPACES_APPEND_ONCE(CMAKE_C_STANDARD_LIBRARIES wldap32.lib)
ENDIF()
SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES}" CACHE STRING "" FORCE)
ENDIF()
# We need ansi c-flags, especially on HP
SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
SET(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS})
# Disable warnings on Borland to avoid changing 3rd party code.
IF(BORLAND)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
ENDIF(BORLAND)
# If we are on AIX, do the _ALL_SOURCE magic
IF(${CMAKE_SYSTEM_NAME} MATCHES AIX)
SET(_ALL_SOURCE 1)
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES AIX)
# Include all the necessary files for macros
INCLUDE (CheckFunctionExists)
INCLUDE (CheckIncludeFile)
INCLUDE (CheckIncludeFiles)
INCLUDE (CheckLibraryExists)
INCLUDE (CheckSymbolExists)
# if crosscompiling is on, the CHECK_TYPE_SIZE macro coming with cmake uses
# TRY_COMPILE instead of TRY_RUN which makes crosscompiling easier, Alex
IF(CMAKE_CROSSCOMPILING)
INCLUDE ("${CMAKE_MODULE_PATH}/CheckTypeSize.cmake")
ELSE(CMAKE_CROSSCOMPILING)
INCLUDE (CheckTypeSize)
ENDIF(CMAKE_CROSSCOMPILING)
# On windows preload settings
IF(WIN32)
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Platforms/WindowsCache.cmake)
ENDIF(WIN32)
# This macro checks if the symbol exists in the library and if it
# does, it appends library to the list.
SET(CURL_LIBS "")
MACRO(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
CHECK_LIBRARY_EXISTS("${LIBRARY};${CURL_LIBS}" ${SYMBOL} ""
${VARIABLE})
IF(${VARIABLE})
SET(CURL_LIBS ${CURL_LIBS} ${LIBRARY})
ENDIF(${VARIABLE})
ENDMACRO(CHECK_LIBRARY_EXISTS_CONCAT)
# Check for all needed libraries
CHECK_LIBRARY_EXISTS_CONCAT("dl" dlopen HAVE_LIBDL)
#CHECK_LIBRARY_EXISTS_CONCAT("ucb" gethostname HAVE_LIBUCB)
CHECK_LIBRARY_EXISTS_CONCAT("socket" connect HAVE_LIBSOCKET)
CHECK_LIBRARY_EXISTS("c" gethostbyname "" NOT_NEED_LIBNSL)
# Yellowtab Zeta needs different libraries than BeOS 5.
IF(BEOS)
SET(NOT_NEED_LIBNSL 1)
CHECK_LIBRARY_EXISTS_CONCAT("bind" gethostbyname HAVE_LIBBIND)
CHECK_LIBRARY_EXISTS_CONCAT("bnetapi" closesocket HAVE_LIBBNETAPI)
ENDIF(BEOS)
IF(NOT NOT_NEED_LIBNSL)
CHECK_LIBRARY_EXISTS_CONCAT("nsl" gethostbyname HAVE_LIBNSL)
ENDIF(NOT NOT_NEED_LIBNSL)
CHECK_LIBRARY_EXISTS_CONCAT("ws2_32" getch HAVE_LIBWS2_32)
CHECK_LIBRARY_EXISTS_CONCAT("winmm" getch HAVE_LIBWINMM)
# IF(NOT CURL_SPECIAL_LIBZ)
# CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ)
# ENDIF(NOT CURL_SPECIAL_LIBZ)
OPTION(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON)
MARK_AS_ADVANCED(CMAKE_USE_OPENSSL)
IF(CMAKE_USE_OPENSSL)
IF(WIN32)
FIND_PACKAGE(OpenSSL)
IF(OPENSSL_FOUND)
SET(USE_SSLEAY TRUE)
SET(USE_OPENSSL TRUE)
LIST(APPEND CURL_LIBS ${OPENSSL_LIBRARIES} )
ENDIF()
#FIND_LIBRARY(LIBEAY NAMES libeay32)
#LIST(APPEND CURL_LIBS ${LIBEAY} )
ELSE(WIN32)
CHECK_LIBRARY_EXISTS_CONCAT("crypto" CRYPTO_lock HAVE_LIBCRYPTO)
CHECK_LIBRARY_EXISTS_CONCAT("ssl" SSL_connect HAVE_LIBSSL)
ENDIF(WIN32)
ENDIF(CMAKE_USE_OPENSSL)
# Check for idn
CHECK_LIBRARY_EXISTS_CONCAT("idn" idna_to_ascii_lz HAVE_LIBIDN)
# Check for LDAP
CHECK_LIBRARY_EXISTS_CONCAT("ldap" ldap_init HAVE_LIBLDAP)
# if(NOT HAVE_LIBLDAP)
# SET(CURL_DISABLE_LDAP ON)
# endif(NOT HAVE_LIBLDAP)
# Check for symbol dlopen (same as HAVE_LIBDL)
CHECK_LIBRARY_EXISTS("${CURL_LIBS}" dlopen "" HAVE_DLOPEN)
# For other tests to use the same libraries
SET(CMAKE_REQUIRED_LIBRARIES ${CURL_LIBS})
OPTION(CURL_ZLIB "Set to ON to enable building cURL with zlib support." ON)
SET(HAVE_LIBZ OFF)
SET(HAVE_ZLIB_H OFF)
SET(HAVE_ZLIB OFF)
IF(CURL_ZLIB) # AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE
FIND_PACKAGE(ZLIB)
IF(ZLIB_FOUND)
SET(HAVE_ZLIB_H ON)
SET(HAVE_ZLIB ON)
SET(HAVE_LIBZ ON)
ENDIF()
ENDIF()
# If we have features.h, then do the _BSD_SOURCE magic
CHECK_INCLUDE_FILE("features.h" HAVE_FEATURES_H)
# Check if header file exists and add it to the list.
MACRO(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
CHECK_INCLUDE_FILES("${CURL_INCLUDES};${FILE}" ${VARIABLE})
IF(${VARIABLE})
SET(CURL_INCLUDES ${CURL_INCLUDES} ${FILE})
SET(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -D${VARIABLE}")
ENDIF(${VARIABLE})
ENDMACRO(CHECK_INCLUDE_FILE_CONCAT)
# Check for header files
IF(NOT UNIX)
CHECK_INCLUDE_FILE_CONCAT("ws2tcpip.h" HAVE_WS2TCPIP_H)
CHECK_INCLUDE_FILE_CONCAT("winsock2.h" HAVE_WINSOCK2_H)
ENDIF(NOT UNIX)
CHECK_INCLUDE_FILE_CONCAT("stdio.h" HAVE_STDIO_H)
IF(NOT UNIX)
CHECK_INCLUDE_FILE_CONCAT("windows.h" HAVE_WINDOWS_H)
CHECK_INCLUDE_FILE_CONCAT("winsock.h" HAVE_WINSOCK_H)
ENDIF(NOT UNIX)
CHECK_INCLUDE_FILE_CONCAT("inttypes.h" HAVE_INTTYPES_H)
CHECK_INCLUDE_FILE_CONCAT("sys/filio.h" HAVE_SYS_FILIO_H)
CHECK_INCLUDE_FILE_CONCAT("sys/ioctl.h" HAVE_SYS_IOCTL_H)
CHECK_INCLUDE_FILE_CONCAT("sys/param.h" HAVE_SYS_PARAM_H)
CHECK_INCLUDE_FILE_CONCAT("sys/poll.h" HAVE_SYS_POLL_H)
CHECK_INCLUDE_FILE_CONCAT("sys/resource.h" HAVE_SYS_RESOURCE_H)
CHECK_INCLUDE_FILE_CONCAT("sys/select.h" HAVE_SYS_SELECT_H)
CHECK_INCLUDE_FILE_CONCAT("sys/socket.h" HAVE_SYS_SOCKET_H)
CHECK_INCLUDE_FILE_CONCAT("sys/sockio.h" HAVE_SYS_SOCKIO_H)
CHECK_INCLUDE_FILE_CONCAT("sys/stat.h" HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILE_CONCAT("sys/time.h" HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILE_CONCAT("sys/types.h" HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILE_CONCAT("sys/uio.h" HAVE_SYS_UIO_H)
CHECK_INCLUDE_FILE_CONCAT("sys/un.h" HAVE_SYS_UN_H)
CHECK_INCLUDE_FILE_CONCAT("sys/utime.h" HAVE_SYS_UTIME_H)
CHECK_INCLUDE_FILE_CONCAT("alloca.h" HAVE_ALLOCA_H)
CHECK_INCLUDE_FILE_CONCAT("arpa/inet.h" HAVE_ARPA_INET_H)
CHECK_INCLUDE_FILE_CONCAT("arpa/tftp.h" HAVE_ARPA_TFTP_H)
CHECK_INCLUDE_FILE_CONCAT("assert.h" HAVE_ASSERT_H)
CHECK_INCLUDE_FILE_CONCAT("crypto.h" HAVE_CRYPTO_H)
CHECK_INCLUDE_FILE_CONCAT("des.h" HAVE_DES_H)
CHECK_INCLUDE_FILE_CONCAT("err.h" HAVE_ERR_H)
CHECK_INCLUDE_FILE_CONCAT("errno.h" HAVE_ERRNO_H)
CHECK_INCLUDE_FILE_CONCAT("fcntl.h" HAVE_FCNTL_H)
CHECK_INCLUDE_FILE_CONCAT("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H)
CHECK_INCLUDE_FILE_CONCAT("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H)
CHECK_INCLUDE_FILE_CONCAT("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H)
CHECK_INCLUDE_FILE_CONCAT("idn-free.h" HAVE_IDN_FREE_H)
CHECK_INCLUDE_FILE_CONCAT("ifaddrs.h" HAVE_IFADDRS_H)
CHECK_INCLUDE_FILE_CONCAT("io.h" HAVE_IO_H)
CHECK_INCLUDE_FILE_CONCAT("krb.h" HAVE_KRB_H)
CHECK_INCLUDE_FILE_CONCAT("libgen.h" HAVE_LIBGEN_H)
CHECK_INCLUDE_FILE_CONCAT("libssh2.h" HAVE_LIBSSH2_H)
CHECK_INCLUDE_FILE_CONCAT("limits.h" HAVE_LIMITS_H)
CHECK_INCLUDE_FILE_CONCAT("locale.h" HAVE_LOCALE_H)
CHECK_INCLUDE_FILE_CONCAT("net/if.h" HAVE_NET_IF_H)
CHECK_INCLUDE_FILE_CONCAT("netdb.h" HAVE_NETDB_H)
CHECK_INCLUDE_FILE_CONCAT("netinet/in.h" HAVE_NETINET_IN_H)
CHECK_INCLUDE_FILE_CONCAT("netinet/tcp.h" HAVE_NETINET_TCP_H)
CHECK_INCLUDE_FILE_CONCAT("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H)
CHECK_INCLUDE_FILE_CONCAT("openssl/engine.h" HAVE_OPENSSL_ENGINE_H)
CHECK_INCLUDE_FILE_CONCAT("openssl/err.h" HAVE_OPENSSL_ERR_H)
CHECK_INCLUDE_FILE_CONCAT("openssl/pem.h" HAVE_OPENSSL_PEM_H)
CHECK_INCLUDE_FILE_CONCAT("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H)
CHECK_INCLUDE_FILE_CONCAT("openssl/rsa.h" HAVE_OPENSSL_RSA_H)
CHECK_INCLUDE_FILE_CONCAT("openssl/ssl.h" HAVE_OPENSSL_SSL_H)
CHECK_INCLUDE_FILE_CONCAT("openssl/x509.h" HAVE_OPENSSL_X509_H)
CHECK_INCLUDE_FILE_CONCAT("pem.h" HAVE_PEM_H)
CHECK_INCLUDE_FILE_CONCAT("poll.h" HAVE_POLL_H)
CHECK_INCLUDE_FILE_CONCAT("pwd.h" HAVE_PWD_H)
CHECK_INCLUDE_FILE_CONCAT("rsa.h" HAVE_RSA_H)
CHECK_INCLUDE_FILE_CONCAT("setjmp.h" HAVE_SETJMP_H)
CHECK_INCLUDE_FILE_CONCAT("sgtty.h" HAVE_SGTTY_H)
CHECK_INCLUDE_FILE_CONCAT("signal.h" HAVE_SIGNAL_H)
CHECK_INCLUDE_FILE_CONCAT("ssl.h" HAVE_SSL_H)
CHECK_INCLUDE_FILE_CONCAT("stdbool.h" HAVE_STDBOOL_H)
CHECK_INCLUDE_FILE_CONCAT("stdint.h" HAVE_STDINT_H)
CHECK_INCLUDE_FILE_CONCAT("stdio.h" HAVE_STDIO_H)
CHECK_INCLUDE_FILE_CONCAT("stdlib.h" HAVE_STDLIB_H)
CHECK_INCLUDE_FILE_CONCAT("string.h" HAVE_STRING_H)
CHECK_INCLUDE_FILE_CONCAT("strings.h" HAVE_STRINGS_H)
CHECK_INCLUDE_FILE_CONCAT("stropts.h" HAVE_STROPTS_H)
CHECK_INCLUDE_FILE_CONCAT("termio.h" HAVE_TERMIO_H)
CHECK_INCLUDE_FILE_CONCAT("termios.h" HAVE_TERMIOS_H)
CHECK_INCLUDE_FILE_CONCAT("time.h" HAVE_TIME_H)
CHECK_INCLUDE_FILE_CONCAT("tld.h" HAVE_TLD_H)
CHECK_INCLUDE_FILE_CONCAT("unistd.h" HAVE_UNISTD_H)
CHECK_INCLUDE_FILE_CONCAT("utime.h" HAVE_UTIME_H)
CHECK_INCLUDE_FILE_CONCAT("x509.h" HAVE_X509_H)
CHECK_INCLUDE_FILE_CONCAT("process.h" HAVE_PROCESS_H)
CHECK_INCLUDE_FILE_CONCAT("stddef.h" HAVE_STDDEF_H)
CHECK_INCLUDE_FILE_CONCAT("dlfcn.h" HAVE_DLFCN_H)
CHECK_INCLUDE_FILE_CONCAT("malloc.h" HAVE_MALLOC_H)
CHECK_INCLUDE_FILE_CONCAT("memory.h" HAVE_MEMORY_H)
CHECK_INCLUDE_FILE_CONCAT("ldap.h" HAVE_LDAP_H)
CHECK_INCLUDE_FILE_CONCAT("netinet/if_ether.h" HAVE_NETINET_IF_ETHER_H)
CHECK_INCLUDE_FILE_CONCAT("stdint.h" HAVE_STDINT_H)
CHECK_INCLUDE_FILE_CONCAT("sockio.h" HAVE_SOCKIO_H)
CHECK_INCLUDE_FILE_CONCAT("sys/utsname.h" HAVE_SYS_UTSNAME_H)
CHECK_INCLUDE_FILE_CONCAT("idna.h" HAVE_IDNA_H)
IF(CMAKE_USE_OPENSSL)
CHECK_INCLUDE_FILE_CONCAT("openssl/rand.h" HAVE_OPENSSL_RAND_H)
ENDIF(CMAKE_USE_OPENSSL)
CHECK_TYPE_SIZE(size_t SIZEOF_SIZE_T)
CHECK_TYPE_SIZE(ssize_t SIZEOF_SSIZE_T)
CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
CHECK_TYPE_SIZE("long" SIZEOF_LONG)
CHECK_TYPE_SIZE("int" SIZEOF_INT)
CHECK_TYPE_SIZE("__int64" SIZEOF___INT64)
CHECK_TYPE_SIZE("long double" SIZEOF_LONG_DOUBLE)
CHECK_TYPE_SIZE("time_t" SIZEOF_TIME_T)
IF(NOT HAVE_SIZEOF_SSIZE_T)
IF(SIZEOF_LONG EQUAL SIZEOF_SIZE_T)
SET(ssize_t long)
ENDIF(SIZEOF_LONG EQUAL SIZEOF_SIZE_T)
IF(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T)
SET(ssize_t __int64)
ENDIF(NOT ssize_t AND SIZEOF___INT64 EQUAL SIZEOF_SIZE_T)
ENDIF(NOT HAVE_SIZEOF_SSIZE_T)
# Different sizeofs, etc.
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
set(CURL_SIZEOF_LONG ${SIZEOF_LONG})
if(SIZEOF_LONG EQUAL 8)
set(CURL_TYPEOF_CURL_OFF_T long)
set(CURL_SIZEOF_CURL_OFF_T 8)
set(CURL_FORMAT_CURL_OFF_T "ld")
set(CURL_FORMAT_CURL_OFF_TU "lu")
set(CURL_FORMAT_OFF_T "%ld")
set(CURL_SUFFIX_CURL_OFF_T L)
set(CURL_SUFFIX_CURL_OFF_TU LU)
endif(SIZEOF_LONG EQUAL 8)
if(SIZEOF_LONG_LONG EQUAL 8)
set(CURL_TYPEOF_CURL_OFF_T "long long")
set(CURL_SIZEOF_CURL_OFF_T 8)
set(CURL_FORMAT_CURL_OFF_T "lld")
set(CURL_FORMAT_CURL_OFF_TU "llu")
set(CURL_FORMAT_OFF_T "%lld")
set(CURL_SUFFIX_CURL_OFF_T LL)
set(CURL_SUFFIX_CURL_OFF_TU LLU)
endif(SIZEOF_LONG_LONG EQUAL 8)
if(NOT CURL_TYPEOF_CURL_OFF_T)
set(CURL_TYPEOF_CURL_OFF_T ${ssize_t})
set(CURL_SIZEOF_CURL_OFF_T ${SIZEOF_SSIZE_T})
# TODO: need adjustment here.
set(CURL_FORMAT_CURL_OFF_T "ld")
set(CURL_FORMAT_CURL_OFF_TU "lu")
set(CURL_FORMAT_OFF_T "%ld")
set(CURL_SUFFIX_CURL_OFF_T L)
set(CURL_SUFFIX_CURL_OFF_TU LU)
endif(NOT CURL_TYPEOF_CURL_OFF_T)
IF(HAVE_SIZEOF_LONG_LONG)
SET(HAVE_LONGLONG 1)
SET(HAVE_LL 1)
ENDIF(HAVE_SIZEOF_LONG_LONG)
FIND_FILE(RANDOM_FILE urandom /dev)
MARK_AS_ADVANCED(RANDOM_FILE)
# Check for some functions that are used
CHECK_SYMBOL_EXISTS(basename "${CURL_INCLUDES}" HAVE_BASENAME)
CHECK_SYMBOL_EXISTS(socket "${CURL_INCLUDES}" HAVE_SOCKET)
CHECK_SYMBOL_EXISTS(poll "${CURL_INCLUDES}" HAVE_POLL)
CHECK_SYMBOL_EXISTS(select "${CURL_INCLUDES}" HAVE_SELECT)
CHECK_SYMBOL_EXISTS(strdup "${CURL_INCLUDES}" HAVE_STRDUP)
CHECK_SYMBOL_EXISTS(strstr "${CURL_INCLUDES}" HAVE_STRSTR)
CHECK_SYMBOL_EXISTS(strtok_r "${CURL_INCLUDES}" HAVE_STRTOK_R)
CHECK_SYMBOL_EXISTS(strftime "${CURL_INCLUDES}" HAVE_STRFTIME)
CHECK_SYMBOL_EXISTS(uname "${CURL_INCLUDES}" HAVE_UNAME)
CHECK_SYMBOL_EXISTS(strcasecmp "${CURL_INCLUDES}" HAVE_STRCASECMP)
CHECK_SYMBOL_EXISTS(stricmp "${CURL_INCLUDES}" HAVE_STRICMP)
CHECK_SYMBOL_EXISTS(strcmpi "${CURL_INCLUDES}" HAVE_STRCMPI)
CHECK_SYMBOL_EXISTS(strncmpi "${CURL_INCLUDES}" HAVE_STRNCMPI)
CHECK_SYMBOL_EXISTS(alarm "${CURL_INCLUDES}" HAVE_ALARM)
IF(NOT HAVE_STRNCMPI)
SET(HAVE_STRCMPI)
ENDIF(NOT HAVE_STRNCMPI)
CHECK_SYMBOL_EXISTS(gethostbyaddr "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR)
CHECK_SYMBOL_EXISTS(gethostbyaddr_r "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR_R)
CHECK_SYMBOL_EXISTS(gettimeofday "${CURL_INCLUDES}" HAVE_GETTIMEOFDAY)
CHECK_SYMBOL_EXISTS(inet_addr "${CURL_INCLUDES}" HAVE_INET_ADDR)
CHECK_SYMBOL_EXISTS(inet_ntoa "${CURL_INCLUDES}" HAVE_INET_NTOA)
CHECK_SYMBOL_EXISTS(inet_ntoa_r "${CURL_INCLUDES}" HAVE_INET_NTOA_R)
CHECK_SYMBOL_EXISTS(tcsetattr "${CURL_INCLUDES}" HAVE_TCSETATTR)
CHECK_SYMBOL_EXISTS(tcgetattr "${CURL_INCLUDES}" HAVE_TCGETATTR)
CHECK_SYMBOL_EXISTS(perror "${CURL_INCLUDES}" HAVE_PERROR)
CHECK_SYMBOL_EXISTS(closesocket "${CURL_INCLUDES}" HAVE_CLOSESOCKET)
CHECK_SYMBOL_EXISTS(setvbuf "${CURL_INCLUDES}" HAVE_SETVBUF)
CHECK_SYMBOL_EXISTS(sigsetjmp "${CURL_INCLUDES}" HAVE_SIGSETJMP)
CHECK_SYMBOL_EXISTS(getpass_r "${CURL_INCLUDES}" HAVE_GETPASS_R)
CHECK_SYMBOL_EXISTS(strlcat "${CURL_INCLUDES}" HAVE_STRLCAT)
CHECK_SYMBOL_EXISTS(getpwuid "${CURL_INCLUDES}" HAVE_GETPWUID)
CHECK_SYMBOL_EXISTS(geteuid "${CURL_INCLUDES}" HAVE_GETEUID)
CHECK_SYMBOL_EXISTS(utime "${CURL_INCLUDES}" HAVE_UTIME)
IF(CMAKE_USE_OPENSSL)
CHECK_SYMBOL_EXISTS(RAND_status "${CURL_INCLUDES}" HAVE_RAND_STATUS)
CHECK_SYMBOL_EXISTS(RAND_screen "${CURL_INCLUDES}" HAVE_RAND_SCREEN)
CHECK_SYMBOL_EXISTS(RAND_egd "${CURL_INCLUDES}" HAVE_RAND_EGD)
CHECK_SYMBOL_EXISTS(CRYPTO_cleanup_all_ex_data "${CURL_INCLUDES}"
HAVE_CRYPTO_CLEANUP_ALL_EX_DATA)
IF(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
SET(USE_OPENSSL 1)
SET(USE_SSLEAY 1)
ENDIF(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
ENDIF(CMAKE_USE_OPENSSL)
CHECK_SYMBOL_EXISTS(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R)
CHECK_SYMBOL_EXISTS(localtime_r "${CURL_INCLUDES}" HAVE_LOCALTIME_R)
CHECK_SYMBOL_EXISTS(gethostbyname "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME)
CHECK_SYMBOL_EXISTS(gethostbyname_r "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME_R)
CHECK_SYMBOL_EXISTS(signal "${CURL_INCLUDES}" HAVE_SIGNAL_FUNC)
CHECK_SYMBOL_EXISTS(SIGALRM "${CURL_INCLUDES}" HAVE_SIGNAL_MACRO)
IF(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO)
SET(HAVE_SIGNAL 1)
ENDIF(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO)
CHECK_SYMBOL_EXISTS(uname "${CURL_INCLUDES}" HAVE_UNAME)
CHECK_SYMBOL_EXISTS(strtoll "${CURL_INCLUDES}" HAVE_STRTOLL)
CHECK_SYMBOL_EXISTS(_strtoi64 "${CURL_INCLUDES}" HAVE__STRTOI64)
CHECK_SYMBOL_EXISTS(strerror_r "${CURL_INCLUDES}" HAVE_STRERROR_R)
CHECK_SYMBOL_EXISTS(siginterrupt "${CURL_INCLUDES}" HAVE_SIGINTERRUPT)
CHECK_SYMBOL_EXISTS(perror "${CURL_INCLUDES}" HAVE_PERROR)
CHECK_SYMBOL_EXISTS(fork "${CURL_INCLUDES}" HAVE_FORK)
CHECK_SYMBOL_EXISTS(freeaddrinfo "${CURL_INCLUDES}" HAVE_FREEADDRINFO)
CHECK_SYMBOL_EXISTS(freeifaddrs "${CURL_INCLUDES}" HAVE_FREEIFADDRS)
CHECK_SYMBOL_EXISTS(pipe "${CURL_INCLUDES}" HAVE_PIPE)
CHECK_SYMBOL_EXISTS(ftruncate "${CURL_INCLUDES}" HAVE_FTRUNCATE)
CHECK_SYMBOL_EXISTS(getprotobyname "${CURL_INCLUDES}" HAVE_GETPROTOBYNAME)
CHECK_SYMBOL_EXISTS(getrlimit "${CURL_INCLUDES}" HAVE_GETRLIMIT)
CHECK_SYMBOL_EXISTS(idn_free "${CURL_INCLUDES}" HAVE_IDN_FREE)
CHECK_SYMBOL_EXISTS(idna_strerror "${CURL_INCLUDES}" HAVE_IDNA_STRERROR)
CHECK_SYMBOL_EXISTS(tld_strerror "${CURL_INCLUDES}" HAVE_TLD_STRERROR)
CHECK_SYMBOL_EXISTS(setlocale "${CURL_INCLUDES}" HAVE_SETLOCALE)
CHECK_SYMBOL_EXISTS(setrlimit "${CURL_INCLUDES}" HAVE_SETRLIMIT)
CHECK_SYMBOL_EXISTS(fcntl "${CURL_INCLUDES}" HAVE_FCNTL)
CHECK_SYMBOL_EXISTS(ioctl "${CURL_INCLUDES}" HAVE_IOCTL)
CHECK_SYMBOL_EXISTS(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT)
# symbol exists in win32, but function does not.
CHECK_FUNCTION_EXISTS(inet_pton HAVE_INET_PTON)
# sigaction and sigsetjmp are special. Use special mechanism for
# detecting those, but only if previous attempt failed.
IF(HAVE_SIGNAL_H)
CHECK_SYMBOL_EXISTS(sigaction "signal.h" HAVE_SIGACTION)
ENDIF(HAVE_SIGNAL_H)
IF(NOT HAVE_SIGSETJMP)
IF(HAVE_SETJMP_H)
CHECK_SYMBOL_EXISTS(sigsetjmp "setjmp.h" HAVE_MACRO_SIGSETJMP)
IF(HAVE_MACRO_SIGSETJMP)
SET(HAVE_SIGSETJMP 1)
ENDIF(HAVE_MACRO_SIGSETJMP)
ENDIF(HAVE_SETJMP_H)
ENDIF(NOT HAVE_SIGSETJMP)
# If there is no stricmp(), do not allow LDAP to parse URLs
if(NOT HAVE_STRICMP)
SET(HAVE_LDAP_URL_PARSE 1)
endif(NOT HAVE_STRICMP)
# For other curl specific tests, use this macro.
MACRO(CURL_INTERNAL_TEST CURL_TEST)
IF("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${CURL_TEST} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS}")
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CURL_TEST_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
ENDIF(CMAKE_REQUIRED_LIBRARIES)
MESSAGE(STATUS "Performing Curl Test ${CURL_TEST}")
TRY_COMPILE(${CURL_TEST}
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
"${CURL_TEST_ADD_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT)
IF(${CURL_TEST})
SET(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Success")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing Curl Test ${CURL_TEST} passed with the following output:\n"
"${OUTPUT}\n")
ELSE(${CURL_TEST})
MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
SET(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
"${OUTPUT}\n")
ENDIF(${CURL_TEST})
ENDIF("${CURL_TEST}" MATCHES "^${CURL_TEST}$")
ENDMACRO(CURL_INTERNAL_TEST)
MACRO(CURL_INTERNAL_TEST_RUN CURL_TEST)
IF("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
SET(MACRO_CHECK_FUNCTION_DEFINITIONS
"-D${CURL_TEST} ${CMAKE_REQUIRED_FLAGS}")
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CURL_TEST_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
ENDIF(CMAKE_REQUIRED_LIBRARIES)
MESSAGE(STATUS "Performing Curl Test ${CURL_TEST}")
TRY_RUN(${CURL_TEST} ${CURL_TEST}_COMPILE
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
"${CURL_TEST_ADD_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT)
IF(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
SET(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Success")
ELSE(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
MESSAGE(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
SET(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
"${OUTPUT}")
IF(${CURL_TEST}_COMPILE)
FILE(APPEND
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"There was a problem running this test\n")
ENDIF(${CURL_TEST}_COMPILE)
FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"\n\n")
ENDIF(${CURL_TEST}_COMPILE AND NOT ${CURL_TEST})
ENDIF("${CURL_TEST}_COMPILE" MATCHES "^${CURL_TEST}_COMPILE$")
ENDMACRO(CURL_INTERNAL_TEST_RUN)
# Do curl specific tests
FOREACH(CURL_TEST
HAVE_FCNTL_O_NONBLOCK
HAVE_IOCTLSOCKET
HAVE_IOCTLSOCKET_CAMEL
HAVE_IOCTLSOCKET_CAMEL_FIONBIO
HAVE_IOCTLSOCKET_FIONBIO
HAVE_IOCTL_FIONBIO
HAVE_IOCTL_SIOCGIFADDR
HAVE_SETSOCKOPT_SO_NONBLOCK
HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
TIME_WITH_SYS_TIME
HAVE_O_NONBLOCK
HAVE_GETHOSTBYADDR_R_5
HAVE_GETHOSTBYADDR_R_7
HAVE_GETHOSTBYADDR_R_8
HAVE_GETHOSTBYADDR_R_5_REENTRANT
HAVE_GETHOSTBYADDR_R_7_REENTRANT
HAVE_GETHOSTBYADDR_R_8_REENTRANT
HAVE_GETHOSTBYNAME_R_3
HAVE_GETHOSTBYNAME_R_5
HAVE_GETHOSTBYNAME_R_6
HAVE_GETHOSTBYNAME_R_3_REENTRANT
HAVE_GETHOSTBYNAME_R_5_REENTRANT
HAVE_GETHOSTBYNAME_R_6_REENTRANT
HAVE_SOCKLEN_T
HAVE_IN_ADDR_T
HAVE_BOOL_T
STDC_HEADERS
RETSIGTYPE_TEST
HAVE_INET_NTOA_R_DECL
HAVE_INET_NTOA_R_DECL_REENTRANT
HAVE_GETADDRINFO
HAVE_FILE_OFFSET_BITS
)
CURL_INTERNAL_TEST(${CURL_TEST})
ENDFOREACH(CURL_TEST)
IF(HAVE_FILE_OFFSET_BITS)
SET(_FILE_OFFSET_BITS 64)
ENDIF(HAVE_FILE_OFFSET_BITS)
FOREACH(CURL_TEST
HAVE_GLIBC_STRERROR_R
HAVE_POSIX_STRERROR_R
)
CURL_INTERNAL_TEST_RUN(${CURL_TEST})
ENDFOREACH(CURL_TEST)
# Check for reentrant
FOREACH(CURL_TEST
HAVE_GETHOSTBYADDR_R_5
HAVE_GETHOSTBYADDR_R_7
HAVE_GETHOSTBYADDR_R_8
HAVE_GETHOSTBYNAME_R_3
HAVE_GETHOSTBYNAME_R_5
HAVE_GETHOSTBYNAME_R_6
HAVE_INET_NTOA_R_DECL_REENTRANT)
IF(NOT ${CURL_TEST})
IF(${CURL_TEST}_REENTRANT)
SET(NEED_REENTRANT 1)
ENDIF(${CURL_TEST}_REENTRANT)
ENDIF(NOT ${CURL_TEST})
ENDFOREACH(CURL_TEST)
IF(NEED_REENTRANT)
FOREACH(CURL_TEST
HAVE_GETHOSTBYADDR_R_5
HAVE_GETHOSTBYADDR_R_7
HAVE_GETHOSTBYADDR_R_8
HAVE_GETHOSTBYNAME_R_3
HAVE_GETHOSTBYNAME_R_5
HAVE_GETHOSTBYNAME_R_6)
SET(${CURL_TEST} 0)
IF(${CURL_TEST}_REENTRANT)
SET(${CURL_TEST} 1)
ENDIF(${CURL_TEST}_REENTRANT)
ENDFOREACH(CURL_TEST)
ENDIF(NEED_REENTRANT)
IF(HAVE_INET_NTOA_R_DECL_REENTRANT)
SET(HAVE_INET_NTOA_R_DECL 1)
SET(NEED_REENTRANT 1)
ENDIF(HAVE_INET_NTOA_R_DECL_REENTRANT)
# Some other minor tests
IF(NOT HAVE_IN_ADDR_T)
SET(in_addr_t "unsigned long")
ENDIF(NOT HAVE_IN_ADDR_T)
# Fix libz / zlib.h
IF(NOT CURL_SPECIAL_LIBZ)
IF(NOT HAVE_LIBZ)
SET(HAVE_ZLIB_H 0)
ENDIF(NOT HAVE_LIBZ)
IF(NOT HAVE_ZLIB_H)
SET(HAVE_LIBZ 0)
ENDIF(NOT HAVE_ZLIB_H)
ENDIF(NOT CURL_SPECIAL_LIBZ)
IF(_FILE_OFFSET_BITS)
SET(_FILE_OFFSET_BITS 64)
ENDIF(_FILE_OFFSET_BITS)
SET(CMAKE_REQUIRED_FLAGS "-D_FILE_OFFSET_BITS=64")
SET(CMAKE_EXTRA_INCLUDE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/curl/curl.h")
CHECK_TYPE_SIZE("curl_off_t" SIZEOF_CURL_OFF_T)
SET(CMAKE_EXTRA_INCLUDE_FILES)
SET(CMAKE_REQUIRED_FLAGS)
# Check for nonblocking
SET(HAVE_DISABLED_NONBLOCKING 1)
IF(HAVE_FIONBIO OR
HAVE_IOCTLSOCKET OR
HAVE_IOCTLSOCKET_CASE OR
HAVE_O_NONBLOCK)
SET(HAVE_DISABLED_NONBLOCKING)
ENDIF(HAVE_FIONBIO OR
HAVE_IOCTLSOCKET OR
HAVE_IOCTLSOCKET_CASE OR
HAVE_O_NONBLOCK)
IF(RETSIGTYPE_TEST)
SET(RETSIGTYPE void)
ELSE(RETSIGTYPE_TEST)
SET(RETSIGTYPE int)
ENDIF(RETSIGTYPE_TEST)
IF(CMAKE_COMPILER_IS_GNUCC AND APPLE)
INCLUDE(CheckCCompilerFlag)
CHECK_C_COMPILER_FLAG(-Wno-long-double HAVE_C_FLAG_Wno_long_double)
IF(HAVE_C_FLAG_Wno_long_double)
# The Mac version of GCC warns about use of long double. Disable it.
GET_SOURCE_FILE_PROPERTY(MPRINTF_COMPILE_FLAGS mprintf.c COMPILE_FLAGS)
IF(MPRINTF_COMPILE_FLAGS)
SET(MPRINTF_COMPILE_FLAGS "${MPRINTF_COMPILE_FLAGS} -Wno-long-double")
ELSE(MPRINTF_COMPILE_FLAGS)
SET(MPRINTF_COMPILE_FLAGS "-Wno-long-double")
ENDIF(MPRINTF_COMPILE_FLAGS)
SET_SOURCE_FILES_PROPERTIES(mprintf.c PROPERTIES
COMPILE_FLAGS ${MPRINTF_COMPILE_FLAGS})
ENDIF(HAVE_C_FLAG_Wno_long_double)
ENDIF(CMAKE_COMPILER_IS_GNUCC AND APPLE)
INCLUDE(CMake/OtherTests.cmake)
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
# For windows, do not allow the compiler to use default target (Vista).
IF(WIN32)
ADD_DEFINITIONS(-D_WIN32_WINNT=0x0501)
ENDIF(WIN32)
IF(MSVC)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
ENDIF(MSVC)
# Sets up the dependencies (zlib, OpenSSL, etc.) of a cURL subproject according to options.
# TODO This is far to be complete!
FUNCTION(SETUP_CURL_DEPENDENCIES TARGET_NAME)
IF(CURL_ZLIB AND ZLIB_FOUND)
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
ENDIF()
IF(CURL_ZLIB AND ZLIB_FOUND)
TARGET_LINK_LIBRARIES(${TARGET_NAME} ${ZLIB_LIBRARIES})
#ADD_DEFINITIONS( -DHAVE_ZLIB_H -DHAVE_ZLIB -DHAVE_LIBZ )
ENDIF()
IF(CMAKE_USE_OPENSSL AND OPENSSL_FOUND)
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
ENDIF()
IF(CURL_SSL AND CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
TARGET_LINK_LIBRARIES(${TARGET_NAME} ${OPENSSL_LIBRARIES})
#ADD_DEFINITIONS( -DUSE_SSLEAY )
ENDIF()
ENDFUNCTION()
# Ugly (but functional) way to include "Makefile.inc" by transforming it (= regenerate it).
FUNCTION(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE)
FILE(READ ${INPUT_FILE} MAKEFILE_INC_TEXT)
STRING(REPLACE "$(top_srcdir)" "\${CURL_SOURCE_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
STRING(REPLACE "$(top_builddir)" "\${CURL_BINARY_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
STRING(REGEX REPLACE "\\\\\n" "<22>!<21>" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
STRING(REGEX REPLACE "([a-zA-Z_][a-zA-Z0-9_]*)[\t ]*=[\t ]*([^\n]*\n)" "SET(\\1 \\2)\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
STRING(REPLACE "<22>!<21>" "\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
STRING(REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace $() with ${}
STRING(REGEX REPLACE "@([a-zA-Z_][a-zA-Z0-9_]*)@" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace @@ with ${}, even if that may not be read by CMake scripts.
FILE(WRITE ${OUTPUT_FILE} ${MAKEFILE_INC_TEXT})
### BUGGY METHOD 1
# FILE(STRINGS Makefile.inc MAKEFILE_INC_TEXT)
# STRING(REPLACE "# ./lib/Makefile.inc" "" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
# STRING(REPLACE " " " " MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace tabs with spaces
# #STRING(REGEX MATCH "CSOURCES *=" AAA ${MAKEFILE_INC_TEXT})
# #MESSAGE(STATUS ${AAA})
# STRING(REPLACE "CSOURCES =" "" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
# STRING(REPLACE "HHEADERS =" "" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
# STRING(REGEX REPLACE "[^ ]+\\.c" "" ${HEADERS_VAR} ${MAKEFILE_INC_TEXT}) # Remove source files and store into headers var
# STRING(REGEX REPLACE " +" " " ${HEADERS_VAR} ${${HEADERS_VAR}})
# STRING(REGEX REPLACE " " ";" ${HEADERS_VAR} ${${HEADERS_VAR}})
# STRING(REGEX REPLACE "[^ ]+\\.h" "" ${SOURCES_VAR} ${MAKEFILE_INC_TEXT}) # Remove headers and store into source files var
# STRING(REGEX REPLACE " +" " " ${SOURCES_VAR} ${${SOURCES_VAR}})
# STRING(REGEX REPLACE " " ";" ${SOURCES_VAR} ${${SOURCES_VAR}})
# SET(${HEADERS_VAR} ${${HEADERS_VAR}} PARENT_SCOPE)
# SET(${SOURCES_VAR} ${${SOURCES_VAR}} PARENT_SCOPE)
### BUGGY METHOD 2
# FILE(READ Makefile.inc MAKEFILE_INC_TEXT)
# #STRING(REPLACE "\t" " " MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace tabs with spaces
# #STRING(REGEX REPLACE "\n+" "\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Remove empty lines (allow a simplification in the script)
# STRING(REGEX REPLACE "([A-Z]+)[\t ]*=[\t ]*" "SET(\\1 " MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
# #STRING(REGEX REPLACE "^(.*)[\t ]*[^\\]$" ")" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
# STRING(REGEX REPLACE "([^\\])\n" "\\1)\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
# # STRING(REGEX REPLACE "CSOURCES *=" "SET(libCurl_SRCS " MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
# # STRING(REGEX REPLACE "HHEADERS *=" "SET(libCurl_HEADERS " MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT})
# FILE(WRITE Makefile.inc.cmake ${MAKEFILE_INC_TEXT})
ENDFUNCTION()
ADD_SUBDIRECTORY(lib)
IF(BUILD_CURL_EXE)
ADD_SUBDIRECTORY(src)
ENDIF()
IF(BUILD_CURL_TESTS)
ADD_SUBDIRECTORY(tests)
ENDIF()
# This needs to be run very last so other parts of the scripts can take advantage of this.
IF(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE)
SET(CURL_CONFIG_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before")
ENDIF()

13
CTestConfig.cmake Normal file
View File

@@ -0,0 +1,13 @@
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
## ENABLE_TESTING()
## INCLUDE(Dart)
set(CTEST_PROJECT_NAME "CURL")
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "www.cdash.org")
set(CTEST_DROP_LOCATION "/CDashPublic/submit.php?project=CURL")
set(CTEST_DROP_SITE_CDASH TRUE)

View File

@@ -1,49 +1,78 @@
#!/bin/bash
# This script performs all of the steps needed to build a 32 bit
# This script performs all of the steps needed to build a
# universal binary libcurl.framework for Mac OS X 10.4 or greater.
VERSION=`/usr/bin/sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' include/curl/curlver.h`
SDK='/Developer/SDKs/MacOSX10.4u.sdk'
SDK32='/Developer/SDKs/MacOSX10.4u.sdk'
MINVER='-mmacosx-version-min=10.4'
MINVER32='-mmacosx-version-min=10.4'
ARCHES='-arch ppc -arch i386'
ARCHES32='-arch ppc -arch i386'
# Use these values instead to produce a 64 bit framework that only works on 10.5.
# You can't currently build a combined 32/64 framework.
#SDK='/Developer/SDKs/MacOSX10.5.sdk'
#
#MINVER='-mmacosx-version-min=10.5'
#
#ARCHES='-arch ppc64 -arch x86_64'
SDK64='/Developer/SDKs/MacOSX10.5.sdk'
MINVER64='-mmacosx-version-min=10.5'
if test -d $SDK; then
echo "Configuring libcurl for 32 bit universal framework..."
ARCHES64='-arch ppc64 -arch x86_64'
if test -d $SDK32; then
echo "----Configuring libcurl for 32 bit universal framework..."
./configure --disable-dependency-tracking --disable-static --with-gssapi \
CFLAGS="-isysroot $SDK $ARCHES $MINVER" \
LDFLAGS="-Wl,-syslibroot,$SDK $ARCHES $MINVER -Wl,-headerpad_max_install_names"
CFLAGS="-Os -isysroot $SDK32 $ARCHES32 $MINVER32" \
LDFLAGS="-Wl,-syslibroot,$SDK32 $ARCHES32 $MINVER32 -Wl,-headerpad_max_install_names" \
CC=$CC
echo "Building libcurl..."
echo "----Building 32 bit libcurl..."
make
echo "Creating framework..."
echo "----Creating 32 bit framework..."
rm -r libcurl.framework
mkdir -p libcurl.framework/Versions/A/Resources
cp lib/.libs/libcurl.dylib libcurl.framework/Versions/A/libcurl
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/Versions/A/libcurl libcurl.framework/Versions/A/libcurl
/usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/Versions/A/Resources/Info.plist
mkdir -p libcurl.framework/Versions/A/Headers
cp include/curl/*.h libcurl.framework/Versions/A/Headers
cd libcurl.framework
mkdir -p libcurl.framework/Versions/A/Headers/curl
cp include/curl/*.h libcurl.framework/Versions/A/Headers/curl
pushd libcurl.framework
ln -fs Versions/A/libcurl libcurl
ln -fs Versions/A/Resources Resources
ln -fs Versions/A/Headers Headers
cd Versions
ln -fs A Current
if test -d $SDK64; then
popd
make clean
echo "----Configuring libcurl for 64 bit universal framework..."
./configure --disable-dependency-tracking --disable-static --with-gssapi \
CFLAGS="-Os -isysroot $SDK64 $ARCHES64 $MINVER64" \
LDFLAGS="-Wl,-syslibroot,$SDK64 $ARCHES64 $MINVER64 -Wl,-headerpad_max_install_names" \
CC=$CC
echo "----Building 64 bit libcurl..."
make
echo "----Appending 64 bit framework to 32 bit framework..."
cp lib/.libs/libcurl.dylib libcurl.framework/Versions/A/libcurl64
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/Versions/A/libcurl libcurl.framework/Versions/A/libcurl64
cp libcurl.framework/Versions/A/libcurl libcurl.framework/Versions/A/libcurl32
lipo libcurl.framework/Versions/A/libcurl32 libcurl.framework/Versions/A/libcurl64 -create -output libcurl.framework/Versions/A/libcurl
rm libcurl.framework/Versions/A/libcurl32 libcurl.framework/Versions/A/libcurl64
cp libcurl.framework/Versions/A/Headers/curl/curlbuild.h libcurl.framework/Versions/A/Headers/curl/curlbuild32.h
cp include/curl/curlbuild.h libcurl.framework/Versions/A/Headers/curl/curlbuild64.h
cat >libcurl.framework/Versions/A/Headers/curl/curlbuild.h <<EOF
#ifdef __LP64__
#include "curl/curlbuild64.h"
#else
#include "curl/curlbuild32.h"
#endif
EOF
fi
lipo -info libcurl.framework/Versions/A/libcurl
echo "libcurl.framework is built and can now be included in other projects."
echo "Copy libcurl.framework to your bundle's Contents/Frameworks folder, ~/Library/Frameworks or /Library/Frameworks."
else
echo "Building libcurl.framework requires Mac OS X 10.4 or later with the MacOSX10.4u SDK installed."
fi

View File

@@ -25,9 +25,15 @@ AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
curl-style.el sample.emacs RELEASE-NOTES buildconf buildconf.bat \
libcurl.pc.in vc6curl.dsw MacOSX-Framework
CMAKE_DIST = CMakeLists.txt CMake/CheckTypeSize.c.in CMake/CheckTypeSize.cmake \
CMake/CMakeConfigurableFile.in CMake/CurlCheckCSourceCompiles.cmake \
CMake/CurlCheckCSourceRuns.cmake CMake/CurlTests.c CMake/FindOpenSSL.cmake \
CMake/FindZLIB.cmake CMake/OtherTests.cmake CMake/Platforms/WindowsCache.cmake \
CMake/Utilities.cmake include/curl/curlbuild.h.cmake
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
curl-style.el sample.emacs RELEASE-NOTES buildconf buildconf.bat \
libcurl.pc.in vc6curl.dsw MacOSX-Framework $(CMAKE_DIST)
bin_SCRIPTS = curl-config

View File

@@ -1,57 +1,53 @@
Curl and libcurl 7.19.4
Curl and libcurl 7.19.5
Public curl releases: 110
Public curl releases: 111
Command line options: 132
curl_easy_setopt() options: 163
Public functions in libcurl: 58
Known libcurl bindings: 38
Contributors: 700
This release includes the following security-related fix:
o CVE-2009-0037 with the curl advisory here:
http://curl.haxx.se/docs/adv_20090303.html
Contributors: 715
This release includes the following changes:
o Added CURLOPT_NOPROXY and the corresponding --noproxy
o the OpenSSL-specific code disables TICKET (rfc5077) which is enabled by
default in openssl 0.9.8j
o Added CURLOPT_TFTP_BLKSIZE
o Added CURLOPT_SOCKS5_GSSAPI_SERVICE and CURLOPT_SOCKS5_GSSAPI_NEC - with
the corresponding curl options --socks5-gssapi-service and
--socks5-gssapi-nec
o Improved IPv6 support when built with with c-ares >= 1.6.1
o Added CURLPROXY_HTTP_1_0 and --proxy1.0
o Added docs/libcurl/symbols-in-versions
o Added CURLINFO_CONDITION_UNMET
o Added support for Digest and NTLM authentication using GnuTLS
o CURLOPT_FTP_CREATE_MISSING_DIRS can now be set to 2 to retry the CWD even
when MKD fails
o GnuTLS initing moved to curl_global_init()
o Added CURLOPT_REDIR_PROTOCOLS and CURLOPT_PROTOCOLS
o libcurl now closes all dead connections whenever you attempt to open a new
connection
o libssh2's version number can now be figured out run-time instead of using
the build-time fixed number
o CURLOPT_SEEKFUNCTION may now return CURL_SEEKFUNC_CANTSEEK
o curl can now upload with resume even when reading from a pipe
o a build-time configured curl_socklen_t is now used instead of socklen_t
This release includes the following bugfixes:
o missing ssh.obj in VS makefiles
o FTP ;type=i URLs now work with CURLOPT_PROXY_TRANSFER_MODE in Turkish
locale
o realms with quoted quotation marks in HTTP Digest headers
o VC9 makefiles are now really included
o multi interface memory leak with CURLMOPT_MAXCONNECTS set
o CURLINFO_CONTENT_LENGTH_DOWNLOAD size from file:// "transfers" with
CURLOPT_NOBODY set true
o memory leak on some libz errors for content encodings
o NSS-enabled build is repaired
o superfluous wait in SFTP downloads removed
o FTP with the multi interface no longer kills the control connection as
easily on transfer failures
o compilation halting when using VS2008 to build a Windows 2000 target
o ease creation of libcurl Mac OS X Framework
o CURLINFO_CONTENT_LENGTH_DOWNLOAD and CURLINFO_CONTENT_LENGTH_UPLOAD are -1
if unknown
o Negotiate proxy authentication
o CURLOPT_INTERFACE and CURLOPT_LOCALPORT used together
o NTLM authentication memory leak on SSPI enabled Windows builds
o fixed the GnuTLS-using code to do correct return code checks
o an alloc-related call in the OpenSSL-using code didn't check the return value
o curl_easy_duphandle() failed to duplicate cookies at times
o missing TELNET timeout support in Windows builds
o missing Curl_read() and write callback result checking in TELNET transfers
o more ciphers enabled in libcurl built to use NSS
o properly return an error code in curl_easy_recv
o Sun compilers specific preprocessor block removed from curlbuild.h.dist
o allow creation of four way fat libcurl Mac OS X Framework
o several memory leaks in libcurl+NSS
o improved the CURLOPT_NOBODY set to 0 confusions
o persistent connections when doing FTP over a HTTP proxy
o --libcurl bogus strings where other data was pointed to
o crash related to FTP and "Re-used connection seems dead, get a new one"
o CURLINFO_APPCONNECT_TIME with the multi interface
o Enhanced upload speeds on Windows
o TFTP problems after a failed transfer to the same host
o improved out of the box TPF compatibility
o HTTP PUT protocol line endings portions mangled from CRLF to CRCRLF
o Rejected SSL session ids are killed properly (for OpenSSL and GnuTLS builds)
o Deal with the TFTP OACK packet
o fixed roff mistakes in man pages
o use SOCKS proxy with the multi interface
o fixed the Curl_getoff_all_pipelines SIGSEGV
o POST, NTLM and following a redirect hang
o libcurl+NSS endless loop on incorrect password for private key
o gzip decompression memory leak
o no_proxy flaw with user name in URL
This release includes the following known bugs:
@@ -60,11 +56,12 @@ This release includes the following known bugs:
This release would not have looked like this without help, code, reports and
advice from friends like these:
Lisa Xu, Daniel Fandrich, Craig A West, Alexey Borzov, Sharad Gupta,
Peter Sylvester, Chad Monroe, Markus Moeller, Yang Tse, Scott Cantor,
Patrick Scott, Hidemoto Nakada, Jocelyn Jaubert, Andre Guibert de Bruet,
Kamil Dudka, Patrik Thunstrom, Linus Nielsen Feltzing, Mark Incley,
Daniel Johnson, James Cheng, Brian J. Murrell, Senthil Raja Velu,
Markus Koetter, David Kierznowski, Michal Marek
Daniel Fandrich, Yang Tse, David James, Chris Deidun, Bill Egert,
Andre Guibert de Bruet, Andreas Farber, Frank Hempel, Pierre Brico,
Kamil Dudka, Jim Freeman, Daniel Johnson, Toshio Kuratomi, Martin Storsjo,
Pramod Sharma, Gisle Vanem, Lenaic Lefever, Rainer Koenig, Sven Wegener,
Tim Chen, Constantine Sapuntzakis, David McCreedy, Michael Smith,
Colin Watson, Ebenezer Ikonne, Laurent Rabret, Michael Cronenworth,
Balint Szilakszi, James Bursa
Thanks! (and sorry if I forgot to mention someone)

View File

@@ -1,11 +1,9 @@
To be addressed in 7.19.5 (planned release: May 2009)
To be addressed in 7.19.6 (planned release: July 2009)
=========================
216 - Markus Moeller's "proxy question" to reverse lookup SOCKS proxys and more
226 - Active Mode FTPS Data Port Range
215 - Patch for Metalink Support (for the curl tool)
235 - KNOWN_BUG #65
Code adjustment for FTP over socks proxy remains
220 - Take advantage of libssh2_version() that's been added for the upcoming
1.1, to extract the run-time version number properly.
221 -
240 -

View File

@@ -22,53 +22,6 @@
#***************************************************************************
dnl CURL_CHECK_COMPILER_HALT_ON_ERROR
dnl -------------------------------------------------
dnl Verifies if the compiler actually halts after the
dnl compilation phase without generating any object
dnl code file, when the source compiles with errors.
AC_DEFUN([CURL_CHECK_COMPILER_HALT_ON_ERROR], [
AC_MSG_CHECKING([if compiler halts on compilation errors])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
]],[[
force compilation error
]])
],[
AC_MSG_RESULT([no])
AC_MSG_ERROR([compiler does not halt on compilation errors.])
],[
AC_MSG_RESULT([yes])
])
])
dnl CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
dnl -------------------------------------------------
dnl Verifies if the compiler actually halts after the
dnl compilation phase without generating any object
dnl code file, when the source code tries to define a
dnl type for a constant array with negative dimension.
AC_DEFUN([CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE], [
AC_REQUIRE([CURL_CHECK_COMPILER_HALT_ON_ERROR])dnl
AC_MSG_CHECKING([if compiler halts on negative sized arrays])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ];
]],[[
bad_t dummy;
]])
],[
AC_MSG_RESULT([no])
AC_MSG_ERROR([compiler does not halt on negative sized arrays.])
],[
AC_MSG_RESULT([yes])
])
])
dnl CURL_CHECK_DEF (SYMBOL, [INCLUDES], [SILENT])
dnl -------------------------------------------------
dnl Use the C preprocessor to find out if the given object-style symbol
@@ -118,6 +71,72 @@ CURL_DEF_TOKEN $1
])
dnl CURL_CHECK_DEF_CC (SYMBOL, [INCLUDES], [SILENT])
dnl -------------------------------------------------
dnl Use the C compiler to find out only if the given symbol is defined
dnl or not, this can not find out its expansion. This macro will not use
dnl default includes even if no INCLUDES argument is given. This macro
dnl will run silently when invoked with three arguments.
AC_DEFUN([CURL_CHECK_DEF_CC], [
AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])dnl
ifelse($3,,[AC_MSG_CHECKING([for compiler definition of $1])])
AC_COMPILE_IFELSE([
AC_LANG_SOURCE(
ifelse($2,,,[$2])[[
int main (void)
{
#ifdef $1
return 0;
#else
force compilation error
#endif
}
]])
],[
tst_symbol_defined="yes"
],[
tst_symbol_defined="no"
])
if test "$tst_symbol_defined" = "yes"; then
AS_VAR_SET(ac_HaveDef, yes)
ifelse($3,,[AC_MSG_RESULT([yes])])
else
AS_VAR_SET(ac_HaveDef, no)
ifelse($3,,[AC_MSG_RESULT([no])])
fi
AS_VAR_POPDEF([ac_HaveDef])dnl
])
dnl CURL_CHECK_LIB_XNET
dnl -------------------------------------------------
dnl Verify if X/Open network library is required.
AC_DEFUN([CURL_CHECK_LIB_XNET], [
AC_MSG_CHECKING([if X/Open network library is required])
tst_lib_xnet_required="no"
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([[
int main (void)
{
#if defined(__hpux) && defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600)
return 0;
#elif defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
return 0;
#else
force compilation error
#endif
}
]])
],[
tst_lib_xnet_required="yes"
LIBS="$LIBS -lxnet"
])
AC_MSG_RESULT([$tst_lib_xnet_required])
])
dnl CURL_CHECK_AIX_ALL_SOURCE
dnl -------------------------------------------------
dnl Provides a replacement of traditional AC_AIX with
@@ -893,91 +912,55 @@ AC_DEFUN([CURL_CHECK_HEADER_MALLOC], [
])
dnl CURL_CHECK_TYPE_SOCKLEN_T
dnl CURL_CHECK_HEADER_MEMORY
dnl -------------------------------------------------
dnl Check for existing socklen_t type, and provide
dnl an equivalent type if socklen_t not available
dnl Check for compilable and valid memory.h header,
dnl and check if it is needed even with stdlib.h for
dnl memory related functions.
AC_DEFUN([CURL_CHECK_TYPE_SOCKLEN_T], [
AC_REQUIRE([CURL_CHECK_HEADER_WS2TCPIP])dnl
AC_CHECK_TYPE([socklen_t], ,[
dnl socklen_t not available
AC_CACHE_CHECK([for socklen_t equivalent],
[curl_cv_socklen_t_equiv], [
curl_cv_socklen_t_equiv="unknown"
for arg1 in 'int' 'SOCKET'; do
for arg2 in "struct sockaddr" void; do
for t in int size_t unsigned long "unsigned long"; do
if test "$curl_cv_socklen_t_equiv" = "unknown"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#undef inline
#ifdef HAVE_WINDOWS_H
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#else
#ifdef HAVE_WINSOCK_H
#include <winsock.h>
#endif
#endif
#define GETPEERNCALLCONV PASCAL
#else
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#define GETPEERNCALLCONV
#endif
extern int GETPEERNCALLCONV getpeername($arg1, $arg2 *, $t *);
]],[[
$t len=0;
getpeername(0,0,&len);
]])
],[
curl_cv_socklen_t_equiv="$t"
])
fi
done
done
done
AC_DEFUN([CURL_CHECK_HEADER_MEMORY], [
AC_CACHE_CHECK([for memory.h], [ac_cv_header_memory_h], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <memory.h>
]],[[
void *p = malloc(10);
void *q = calloc(10,10);
free(p);
free(q);
]])
],[
ac_cv_header_memory_h="yes"
],[
ac_cv_header_memory_h="no"
])
case "$curl_cv_socklen_t_equiv" in
unknown)
AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
;;
*)
AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv,
[Type to use in place of socklen_t when system does not provide it.])
])
if test "$ac_cv_header_memory_h" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_MEMORY_H, 1,
[Define to 1 if you have the memory.h header file.])
#
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <stdlib.h>
]],[[
void *p = malloc(10);
void *q = calloc(10,10);
free(p);
free(q);
]])
],[
curl_cv_need_header_memory_h="no"
],[
curl_cv_need_header_memory_h="yes"
])
#
case "$curl_cv_need_header_memory_h" in
yes)
AC_DEFINE_UNQUOTED(NEED_MEMORY_H, 1,
[Define to 1 if you need the memory.h header file even with stdlib.h])
;;
esac
],[
#undef inline
#ifdef HAVE_WINDOWS_H
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
#endif
#else
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#endif
])
fi
])
@@ -994,7 +977,6 @@ dnl argument in GETNAMEINFO_QUAL_ARG1.
AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
AC_REQUIRE([CURL_CHECK_HEADER_WS2TCPIP])dnl
AC_REQUIRE([CURL_CHECK_TYPE_SOCKLEN_T])dnl
AC_CHECK_HEADERS(sys/types.h sys/socket.h netdb.h)
#
AC_MSG_CHECKING([for getnameinfo])
@@ -2217,6 +2199,168 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
])
dnl CURL_DEFINE_UNQUOTED (VARIABLE, [VALUE])
dnl -------------------------------------------------
dnl Like AC_DEFINE_UNQUOTED this macro will define a C preprocessor
dnl symbol that can be further used in custom template configuration
dnl files. This macro, unlike AC_DEFINE_UNQUOTED, does not use a third
dnl argument for the description. Symbol definitions done with this
dnl macro are intended to be exclusively used in handcrafted *.h.in
dnl template files. Contrary to what AC_DEFINE_UNQUOTED does, this one
dnl prevents autoheader generation and insertion of symbol template
dnl stub and definition into the first configuration header file. Do
dnl not use this macro as a replacement for AC_DEFINE_UNQUOTED, each
dnl one serves different functional needs.
AC_DEFUN([CURL_DEFINE_UNQUOTED], [
cat >>confdefs.h <<_EOF
[@%:@define] $1 ifelse($#, 2, [$2], 1)
_EOF
])
dnl CURL_CONFIGURE_LONG
dnl -------------------------------------------------
dnl Find out the size of long as reported by sizeof() and define
dnl CURL_SIZEOF_LONG as appropriate to be used in template file
dnl include/curl/curlbuild.h.in to properly configure the library.
dnl The size of long is a build time characteristic and as such
dnl must be recorded in curlbuild.h
AC_DEFUN([CURL_CONFIGURE_LONG], [
if test -z "$ac_cv_sizeof_long" ||
test "$ac_cv_sizeof_long" -eq "0"; then
AC_MSG_ERROR([cannot find out size of long.])
fi
CURL_DEFINE_UNQUOTED([CURL_SIZEOF_LONG], [$ac_cv_sizeof_long])
])
dnl CURL_CONFIGURE_CURL_SOCKLEN_T
dnl -------------------------------------------------
dnl Find out suitable curl_socklen_t data type definition and size, making
dnl appropriate definitions for template file include/curl/curlbuild.h.in
dnl to properly configure and use the library.
dnl
dnl The need for the curl_socklen_t definition arises mainly to properly
dnl interface HP-UX systems which on one hand have a typedef'ed socklen_t
dnl data type which is 32 or 64-Bit wide depending on the data model being
dnl used, and that on the other hand is only actually used when interfacing
dnl the X/Open sockets provided in the xnet library.
AC_DEFUN([CURL_CONFIGURE_CURL_SOCKLEN_T], [
AC_REQUIRE([CURL_INCLUDES_WS2TCPIP])dnl
AC_REQUIRE([CURL_INCLUDES_SYS_SOCKET])dnl
AC_REQUIRE([CURL_PREPROCESS_CALLCONV])dnl
#
AC_MSG_CHECKING([for curl_socklen_t data type])
curl_typeof_curl_socklen_t="unknown"
for arg1 in int SOCKET; do
for arg2 in 'struct sockaddr' void; do
for t in socklen_t int size_t 'unsigned int' long 'unsigned long' void; do
if test "$curl_typeof_curl_socklen_t" = "unknown"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$curl_includes_ws2tcpip
$curl_includes_sys_socket
$curl_preprocess_callconv
extern int FUNCALLCONV getpeername($arg1, $arg2 *, $t *);
]],[[
$t *lenptr = 0;
if(0 != getpeername(0, 0, lenptr))
return 1;
]])
],[
curl_typeof_curl_socklen_t="$t"
])
fi
done
done
done
for t in socklen_t int; do
if test "$curl_typeof_curl_socklen_t" = "void"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$curl_includes_sys_socket
typedef $t curl_socklen_t;
]],[[
curl_socklen_t dummy;
]])
],[
curl_typeof_curl_socklen_t="$t"
])
fi
done
AC_MSG_RESULT([$curl_typeof_curl_socklen_t])
if test "$curl_typeof_curl_socklen_t" = "void" ||
test "$curl_typeof_curl_socklen_t" = "unknown"; then
AC_MSG_ERROR([cannot find data type for curl_socklen_t.])
fi
#
AC_MSG_CHECKING([size of curl_socklen_t])
curl_sizeof_curl_socklen_t="unknown"
curl_pull_headers_socklen_t="unknown"
if test "$ac_cv_header_ws2tcpip_h" = "yes"; then
tst_pull_header_checks='none ws2tcpip'
tst_size_checks='4'
else
tst_pull_header_checks='none systypes syssocket'
tst_size_checks='4 8 2'
fi
for tst_size in $tst_size_checks; do
for tst_pull_headers in $tst_pull_header_checks; do
if test "$curl_sizeof_curl_socklen_t" = "unknown"; then
case $tst_pull_headers in
ws2tcpip)
tmp_includes="$curl_includes_ws2tcpip"
;;
systypes)
tmp_includes="$curl_includes_sys_types"
;;
syssocket)
tmp_includes="$curl_includes_sys_socket"
;;
*)
tmp_includes=""
;;
esac
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$tmp_includes
typedef $curl_typeof_curl_socklen_t curl_socklen_t;
typedef char dummy_arr[sizeof(curl_socklen_t) == $tst_size ? 1 : -1];
]],[[
curl_socklen_t dummy;
]])
],[
curl_sizeof_curl_socklen_t="$tst_size"
curl_pull_headers_socklen_t="$tst_pull_headers"
])
fi
done
done
AC_MSG_RESULT([$curl_sizeof_curl_socklen_t])
if test "$curl_sizeof_curl_socklen_t" = "unknown"; then
AC_MSG_ERROR([cannot find out size of curl_socklen_t.])
fi
#
case $curl_pull_headers_socklen_t in
ws2tcpip)
CURL_DEFINE_UNQUOTED([CURL_PULL_WS2TCPIP_H])
;;
systypes)
CURL_DEFINE_UNQUOTED([CURL_PULL_SYS_TYPES_H])
;;
syssocket)
CURL_DEFINE_UNQUOTED([CURL_PULL_SYS_TYPES_H])
CURL_DEFINE_UNQUOTED([CURL_PULL_SYS_SOCKET_H])
;;
esac
CURL_DEFINE_UNQUOTED([CURL_TYPEOF_CURL_SOCKLEN_T], [$curl_typeof_curl_socklen_t])
CURL_DEFINE_UNQUOTED([CURL_SIZEOF_CURL_SOCKLEN_T], [$curl_sizeof_curl_socklen_t])
])
dnl CURL_CHECK_FUNC_SELECT
dnl -------------------------------------------------
dnl Test if the socket select() function is available,
@@ -2640,67 +2784,6 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]),
])
dnl CURL_DEFINE_UNQUOTED (VARIABLE, [VALUE])
dnl -------------------------------------------------
dnl Like AC_DEFINE_UNQUOTED this macro will define a C preprocessor
dnl symbol that can be further used in custom template configuration
dnl files. This macro, unlike AC_DEFINE_UNQUOTED, does not use a third
dnl argument for the description. Symbol definitions done with this
dnl macro are intended to be exclusively used in handcrafted *.h.in
dnl template files. Contrary to what AC_DEFINE_UNQUOTED does, this one
dnl prevents autoheader generation and insertion of symbol template
dnl stub and definition into the first configuration header file. Do
dnl not use this macro as a replacement for AC_DEFINE_UNQUOTED, each
dnl one serves different functional needs.
AC_DEFUN([CURL_DEFINE_UNQUOTED], [
cat >>confdefs.h <<_EOF
[@%:@define] $1 ifelse($#, 2, [$2], 1)
_EOF
])
dnl CURL_INCLUDES_INTTYPES
dnl -------------------------------------------------
dnl Set up variable with list of headers that must be
dnl included when inttypes.h is to be included.
AC_DEFUN([CURL_INCLUDES_INTTYPES], [
curl_includes_inttypes="\
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
/* includes end */"
AC_CHECK_HEADERS(
sys/types.h stdint.h inttypes.h,
[], [], [$curl_includes_inttypes])
])
dnl CURL_CONFIGURE_LONG
dnl -------------------------------------------------
dnl Find out the size of long as reported by sizeof() and define
dnl CURL_SIZEOF_LONG as appropriate to be used in template file
dnl include/curl/curlbuild.h.in to properly configure the library.
dnl The size of long is a build time characteristic and as such
dnl must be recorded in curlbuild.h
AC_DEFUN([CURL_CONFIGURE_LONG], [
if test -z "$ac_cv_sizeof_long" ||
test "$ac_cv_sizeof_long" -eq "0"; then
AC_MSG_ERROR([cannot find out size of long.])
fi
CURL_DEFINE_UNQUOTED([CURL_SIZEOF_LONG], [$ac_cv_sizeof_long])
])
dnl DO_CURL_OFF_T_CHECK (TYPE, SIZE)
dnl -------------------------------------------------
dnl Internal macro for CURL_CONFIGURE_CURL_OFF_T

View File

@@ -1,24 +1,26 @@
configure
autom4te.cache
*.lo
.deps
.libs
Makefile
Makefile.in
aclocal.m4
adig
ahost
config.log
config.status
aclocal.m4
.deps
Makefile.in
ares_build.h
ares_version.h.dist
autom4te.cache
config.guess
config.h
config.h.in
config.log
config.lt
config.status
config.sub
libtool
ltmain.sh
stamp-h1
*.lo
.libs
configure
depcomp
libcares.la
missing
ares_version.h.dist
libcares.pc
libtool
ltmain.sh
missing
stamp-h*

View File

@@ -1,5 +1,20 @@
Changelog for the c-ares project
* May 11 2009 (Daniel Stenberg)
- Gregor Jasny made c-ares link with libtool 's -export-symbols-regex option to
only expose functions starting with ares_.
* May 2 2009 (Yang Tse)
- Use a build-time configured ares_socklen_t data type instead of socklen_t.
* April 21 2009 (Yang Tse)
- Moved potential inclusion of system's malloc.h and memory.h header files to
setup_once.h. Inclusion of each header file is based on the definition of
NEED_MALLOC_H and NEED_MEMORY_H respectively.
* March 11 2009 (Yang Tse)
- Japheth Cleaver fixed acountry.c replacing u_long with unsigned long.
* February 20 2009 (Yang Tse)
- Do not halt compilation when using VS2008 to build a Windows 2000 target.

View File

@@ -46,7 +46,9 @@ noinst_PROGRAMS =$(PROGS)
EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj \
Makefile.m32 Makefile.netware Makefile.vc6 $(man_MANS) $(MSVCFILES) \
config-win32.h RELEASE-NOTES libcares.pc.in buildconf get_ver.awk maketgz \
TODO
TODO ares_build.h.in buildconf.bat
DISTCLEANFILES = ares_build.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libcares.pc
@@ -85,8 +87,9 @@ if NO_UNDEFINED
UNDEF = -no-undefined
endif
EXPORT_SYMBOLS = -export-symbols-regex '^ares_[[:alnum:]].*'
libcares_la_LDFLAGS = $(UNDEF) $(VER)
libcares_la_LDFLAGS = $(UNDEF) $(VER) $(EXPORT_SYMBOLS)
# Makefile.inc provides the CSOURCES and HHEADERS defines
include Makefile.inc
@@ -96,7 +99,8 @@ libcares_la_SOURCES = $(CSOURCES) $(HHEADERS)
# where to install the c-ares headers
libcares_ladir = $(includedir)
# what headers to install on 'make install':
libcares_la_HEADERS = ares.h ares_version.h ares_dns.h
libcares_la_HEADERS = ares.h ares_version.h ares_dns.h \
ares_build.h ares_rules.h
ahost_SOURCES = ahost.c ares_getopt.c ares_getopt.h
ahost_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)

View File

@@ -23,13 +23,14 @@ CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_IOCTLSOCKET \
-DRECV_TYPE_ARG1='int' -DRECV_TYPE_ARG2='void*' \
-DRECV_TYPE_ARG3='int' -DRECV_TYPE_ARG4='int' \
-DRECV_TYPE_RETV='int' -DHAVE_STRUCT_TIMEVAL \
-Dselect=select_s -Dsocklen_t=int -UHAVE_CONFIG_H \
-Dselect=select_s -UHAVE_CONFIG_H \
-DRECVFROM_TYPE_ARG1='int' -DRECVFROM_TYPE_ARG2='void' \
-DRECVFROM_TYPE_ARG3='int' -DRECVFROM_TYPE_ARG4='int' \
-DRECVFROM_TYPE_ARG6='int' -DRECVFROM_TYPE_RETV='int' \
-DRECVFROM_TYPE_ARG5='struct sockaddr' -DHAVE_RECVFROM \
-DRECVFROM_TYPE_ARG2_IS_VOID -DHAVE_STRDUP -DHAVE_NETDB_H \
-DHAVE_STRCASECMP -DHAVE_STRNCASECMP -DHAVE_GETHOSTNAME
-DHAVE_STRCASECMP -DHAVE_STRNCASECMP -DHAVE_GETHOSTNAME \
-DHAVE_LIMITS_H
LDFLAGS = -s

View File

@@ -6,11 +6,13 @@ ares_timeout.c ares_destroy.c ares_mkquery.c ares_version.c \
ares_expand_name.c ares_parse_a_reply.c windows_port.c ares_strdup.c \
ares_expand_string.c ares_parse_ptr_reply.c ares_parse_aaaa_reply.c \
ares_getnameinfo.c inet_net_pton.c bitncmp.c inet_ntop.c ares_writev.c \
ares_parse_ns_reply.c ares_llist.c ares__timeval.c ares_strcasecmp.c
ares_parse_ns_reply.c ares_llist.c ares__timeval.c ares_strcasecmp.c \
ares_library_init.c
HHEADERS = ares.h ares_private.h setup.h ares_dns.h ares_version.h \
nameser.h inet_net_pton.h inet_ntop.h ares_ipv6.h bitncmp.h setup_once.h \
ares_llist.h ares_strdup.h ares_strcasecmp.h ares_writev.h
ares_llist.h ares_strdup.h ares_strcasecmp.h ares_writev.h ares_build.h \
ares_rules.h ares_library_init.h
MANPAGES= ares_destroy.3 ares_expand_name.3 ares_expand_string.3 ares_fds.3 \
ares_free_hostent.3 ares_free_string.3 ares_gethostbyaddr.3 \

View File

@@ -40,7 +40,7 @@ tags:
%.exe: %.o ares_getopt.o $(LIB)
$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
$(OBJLIB): ares.h ares_dns.h ares_private.h
$(OBJLIB): ares.h ares_dns.h ares_private.h ares_build.h ares_rules.h
.c.o:
$(CC) $(CFLAGS) -c $<
@@ -55,7 +55,8 @@ install:
${RANLIB} ${DESTDIR}${libdir}/$(LIB)
chmod u-w ${DESTDIR}${libdir}/$(LIB)
${INSTALL} -m 444 ${srcdir}/ares.h ${DESTDIR}${includedir}
${INSTALL} -m 444 ${srcdir}/ares_version.h ${DESTDIR}${includedir}
${INSTALL} -m 444 ${srcdir}/ares_build.h ${DESTDIR}${includedir}
${INSTALL} -m 444 ${srcdir}/ares_rules.h ${DESTDIR}${includedir}
(for man in $(MANPAGES); do \
${INSTALL} -m 444 ${srcdir}/$${man} ${DESTDIR}${mandir}/man3; \
done)

View File

@@ -160,7 +160,7 @@ lib: prebuild $(LTARGET)
nlm: prebuild $(TARGETS)
prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h
prebuild: $(OBJDIR) ares_build.h $(OBJDIR)/version.inc config.h
install: $(INSTDIR) all
@$(CP) *.nlm $(INSTDIR)
@@ -303,7 +303,6 @@ ifeq ($(LIBARCH),CLIB)
@echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
@echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
@echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
@echo $(DL)#define socklen_t int$(DL) >> $@
else
@echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
@echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@
@@ -311,7 +310,6 @@ else
@echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@
@echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
@echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
@echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
@echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
@echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
@echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
@@ -361,6 +359,7 @@ endif
@echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
@echo $(DL)#define HAVE_IOCTL 1$(DL) >> $@
@echo $(DL)#define HAVE_IOCTL_FIONBIO 1$(DL) >> $@
@echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
@echo $(DL)#define HAVE_LL 1$(DL) >> $@
@echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@
@echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
@@ -407,7 +406,24 @@ endif
@echo $(DL)#else$(DL) >> $@
@echo $(DL)#define HAVE_VARIADIC_MACROS_C99 1$(DL) >> $@
@echo $(DL)#endif$(DL) >> $@
ifdef OLD_NOVELLSDK
@echo $(DL)#define socklen_t int$(DL) >> $@
endif
FORCE: ;
ares_build.h: Makefile.netware FORCE
@echo Creating $@
@echo $(DL)/* $@ intended for NetWare target.$(DL) > $@
@echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
@echo $(DL)** All your changes will be lost!!$(DL) >> $@
@echo $(DL)*/$(DL) >> $@
@echo $(DL)#ifndef __CARES_BUILD_H$(DL) >> $@
@echo $(DL)#define __CARES_BUILD_H$(DL) >> $@
ifeq ($(LIBARCH),CLIB)
@echo $(DL)#define CARES_TYPEOF_ARES_SOCKLEN_T int$(DL) >> $@
@echo $(DL)#define CARES_SIZEOF_ARES_SOCKLEN_T 4$(DL) >> $@
else
@echo $(DL)#define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int$(DL) >> $@
@echo $(DL)#define CARES_SIZEOF_ARES_SOCKLEN_T 4$(DL) >> $@
endif
@echo $(DL)#define CARES_SIZEOF_LONG 4$(DL) >> $@
@echo $(DL)typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;$(DL) >> $@
@echo $(DL)#endif /* __CARES_BUILD_H */$(DL) >> $@

View File

@@ -43,6 +43,8 @@ CFLAGS = $(CFLAGS) -O2 -Og
LDFLAGS = $(LDFLAGS) -release
!endif
CFLAGS = $(CFLAGS) -I.\.
OBJECTS = $(OBJ_DIR)\ares_fds.obj \
$(OBJ_DIR)\ares_process.obj \
$(OBJ_DIR)\ares_free_hostent.obj \
@@ -61,6 +63,7 @@ OBJECTS = $(OBJ_DIR)\ares_fds.obj \
$(OBJ_DIR)\ares_strerror.obj \
$(OBJ_DIR)\ares_cancel.obj \
$(OBJ_DIR)\ares_init.obj \
$(OBJ_DIR)\ares_library_init.obj \
$(OBJ_DIR)\ares_llist.obj \
$(OBJ_DIR)\ares_timeout.obj \
$(OBJ_DIR)\ares__timeval.obj \
@@ -108,6 +111,8 @@ $(DEF_FILE): $(OBJECTS) Makefile.VC6
@echo ares_getsock >> $@
@echo ares_init >> $@
@echo ares_init_options >> $@
@echo ares_library_init >> $@
@echo ares_library_cleanup >> $@
@echo ares_mkquery >> $@
@echo ares_parse_a_reply >> $@
@echo ares_parse_ptr_reply >> $@
@@ -154,101 +159,116 @@ vclean realclean: clean
# Copyright "gcc -MM .."
#
$(OBJ_DIR)\ares_fds.obj: ares_fds.c setup.h setup_once.h ares.h ares_private.h \
ares_ipv6.h
ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_process.obj: ares_process.c setup.h setup_once.h nameser.h \
ares.h ares_dns.h ares_private.h ares_ipv6.h
ares.h ares_dns.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_free_hostent.obj: ares_free_hostent.c setup.h setup_once.h \
ares.h ares_private.h ares_ipv6.h
ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_query.obj: ares_query.c setup.h setup_once.h nameser.h \
ares.h ares_dns.h ares_private.h ares_ipv6.h
ares.h ares_dns.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares__close_sockets.obj: ares__close_sockets.c setup.h setup_once.h \
ares.h ares_private.h ares_ipv6.h
ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_free_string.obj: ares_free_string.c setup.h setup_once.h ares.h
$(OBJ_DIR)\ares_free_string.obj: ares_free_string.c setup.h setup_once.h \
ares.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_search.obj: ares_search.c setup.h setup_once.h nameser.h \
ares.h ares_private.h ares_ipv6.h
ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares__get_hostent.obj: ares__get_hostent.c setup.h setup_once.h \
ares.h ares_private.h ares_ipv6.h inet_net_pton.h
ares.h ares_private.h ares_ipv6.h inet_net_pton.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_gethostbyaddr.obj: ares_gethostbyaddr.c setup.h setup_once.h \
nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h
nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h ares_build.h \
ares_rules.h
$(OBJ_DIR)\ares_send.obj: ares_send.c setup.h setup_once.h nameser.h ares.h \
ares_dns.h ares_private.h ares_ipv6.h
ares_dns.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares__read_line.obj: ares__read_line.c setup.h setup_once.h ares.h \
ares_private.h ares_ipv6.h
ares_private.h ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_gethostbyname.obj: ares_gethostbyname.c setup.h setup_once.h \
nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h bitncmp.h
nameser.h ares.h ares_private.h ares_ipv6.h inet_net_pton.h bitncmp.h \
ares_build.h ares_rules.h
$(OBJ_DIR)\ares_strcasecmp.obj: ares_strcasecmp.c setup.h setup_once.h ares.h
$(OBJ_DIR)\ares_strcasecmp.obj: ares_strcasecmp.c setup.h setup_once.h ares.h \
ares_build.h ares_rules.h
$(OBJ_DIR)\ares_strerror.obj: ares_strerror.c setup.h setup_once.h ares.h
$(OBJ_DIR)\ares_strerror.obj: ares_strerror.c setup.h setup_once.h ares.h \
ares_build.h ares_rules.h
$(OBJ_DIR)\ares_cancel.obj: ares_cancel.c setup.h setup_once.h ares.h \
ares_private.h ares_ipv6.h
ares_private.h ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_init.obj: ares_init.c setup.h setup_once.h nameser.h ares.h \
ares_private.h ares_ipv6.h inet_net_pton.h
ares_private.h ares_ipv6.h inet_net_pton.h ares_build.h ares_rules.h \
ares_library_init.h
$(OBJ_DIR)\ares_timeout.obj: ares_timeout.c setup.h setup_once.h ares.h \
ares_private.h ares_ipv6.h
ares_private.h ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares__timeval.obj: ares__timeval.c setup.h setup_once.h ares.h \
ares_private.h ares_ipv6.h
ares_private.h ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_destroy.obj: ares_destroy.c setup.h setup_once.h ares.h \
ares_private.h ares_ipv6.h
ares_private.h ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_mkquery.obj: ares_mkquery.c setup.h setup_once.h nameser.h \
ares.h ares_dns.h
ares.h ares_dns.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_version.obj: ares_version.c setup.h setup_once.h ares_version.h
$(OBJ_DIR)\ares_version.obj: ares_version.c setup.h setup_once.h ares.h \
ares_version.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_expand_name.obj: ares_expand_name.c setup.h setup_once.h \
nameser.h ares.h ares_private.h ares_ipv6.h
nameser.h ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_parse_a_reply.obj: ares_parse_a_reply.c setup.h setup_once.h \
nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h
nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h ares_build.h \
ares_rules.h
$(OBJ_DIR)\windows_port.obj: windows_port.c setup.h setup_once.h nameser.h \
ares.h ares_private.h ares_ipv6.h
ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_expand_string.obj: ares_expand_string.c setup.h setup_once.h \
nameser.h ares.h ares_private.h ares_ipv6.h
nameser.h ares.h ares_private.h ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_parse_ptr_reply.obj: ares_parse_ptr_reply.c setup.h \
setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h
setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h \
ares_build.h ares_rules.h
$(OBJ_DIR)\ares_parse_aaaa_reply.obj: ares_parse_aaaa_reply.c setup.h \
setup_once.h nameser.h ares.h ares_dns.h inet_net_pton.h ares_private.h \
ares_ipv6.h
ares_ipv6.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_parse_ns_reply.obj: ares_parse_ns_reply.c setup.h \
setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h
setup_once.h nameser.h ares.h ares_dns.h ares_private.h ares_ipv6.h \
ares_build.h ares_rules.h
$(OBJ_DIR)\ares_getnameinfo.obj: ares_getnameinfo.c setup.h setup_once.h \
nameser.h ares.h ares_private.h ares_ipv6.h inet_ntop.h
nameser.h ares.h ares_private.h ares_ipv6.h inet_ntop.h ares_build.h \
ares_rules.h
$(OBJ_DIR)\inet_net_pton.obj: inet_net_pton.c setup.h setup_once.h nameser.h \
ares_ipv6.h inet_net_pton.h
ares_ipv6.h inet_net_pton.h ares_build.h ares_rules.h
$(OBJ_DIR)\bitncmp.obj: bitncmp.c bitncmp.h
$(OBJ_DIR)\bitncmp.obj: bitncmp.c bitncmp.h ares_build.h ares_rules.h
$(OBJ_DIR)\inet_ntop.obj: inet_ntop.c setup.h setup_once.h nameser.h \
ares_ipv6.h inet_ntop.h
ares_ipv6.h inet_ntop.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_getopt.obj: ares_getopt.c ares_getopt.h
$(OBJ_DIR)\ares_getopt.obj: ares_getopt.c ares_getopt.h ares_build.h \
ares_rules.h
$(OBJ_DIR)\ares_library_init.obj: ares_library_init.c setup.h setup_once.h \
ares.h ares_private.h ares_library_init.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_llist.obj: ares_llist.c setup.h setup_once.h ares.h \
ares_private.h ares_llist.h
ares_private.h ares_llist.h ares_build.h ares_rules.h
$(OBJ_DIR)\ares_writev.obj: ares_writev.c setup.h setup_once.h ares.h \
ares_writev.h
ares_writev.h ares_build.h ares_rules.h

View File

@@ -23,3 +23,41 @@ original ares.
You'll find all c-ares details and news here:
http://c-ares.haxx.se/
NOTES FOR C-ARES HACKERS
The following notes apply to c-ares version 1.6.1 and later.
* The distributed ares_build.h file is only intended to be used on systems
which can not run the also distributed configure script.
* The distributed ares_build.h file is generated as a copy of ares_build.h.dist
when the c-ares source code distribution archive file is originally created.
* If you check out from CVS on a non-configure platform, you must run the
appropriate buildconf* script to set up ares_build.h and other local files
before being able of compiling the library.
* On systems capable of running the configure script, the configure process
will overwrite the distributed ares_build.h file with one that is suitable
and specific to the library being configured and built, this new file is
generated from the ares_build.h.in template file.
* If you intend to distribute an already compiled c-ares library you _MUST_
also distribute along with it the generated ares_build.h which has been
used to compile it. Otherwise the library will be of no use for the users of
the library that you have built. It is _your_ responsability to provide this
file. No one at the c-ares project can know how you have built the library.
* File ares_build.h includes platform and configuration dependant info,
and must not be modified by anyone. Configure script generates it for you.
* We cannot assume anything else but very basic compiler features being
present. While c-ares requires an ANSI C compiler to build, some of the
earlier ANSI compilers clearly can't deal with some preprocessor operators.
* Newlines must remain unix-style for older compilers' sake.
* Comments must be written in the old-style /* unnested C-fashion */

View File

@@ -4,16 +4,18 @@ Changed:
o in6_addr is not used in ares.h anymore, but a private ares_in6_addr is
instead declared and used
p ares_gethostbyname() now supports 'AF_UNSPEC' as a family for resolving
o ares_gethostbyname() now supports 'AF_UNSPEC' as a family for resolving
either AF_INET6 or AF_INET
o a build-time configured ares_socklen_t is now used instead of socklen_t
Fixed:
o ares_parse_*_reply() functions now return ARES_EBADRESP instead of
ARES_EBADNAME if the name in the response failed to decode
o only expose/export symbols starting with 'ares_'
Thanks go to these friendly people for their efforts and contributions:
Phil Blundell
Phil Blundell, Japheth Cleaver, Yang Tse, Gregor Jasny
Have fun!

View File

@@ -1,52 +1,5 @@
dnl CURL_CHECK_COMPILER_HALT_ON_ERROR
dnl -------------------------------------------------
dnl Verifies if the compiler actually halts after the
dnl compilation phase without generating any object
dnl code file, when the source compiles with errors.
AC_DEFUN([CURL_CHECK_COMPILER_HALT_ON_ERROR], [
AC_MSG_CHECKING([if compiler halts on compilation errors])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
]],[[
force compilation error
]])
],[
AC_MSG_RESULT([no])
AC_MSG_ERROR([compiler does not halt on compilation errors.])
],[
AC_MSG_RESULT([yes])
])
])
dnl CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
dnl -------------------------------------------------
dnl Verifies if the compiler actually halts after the
dnl compilation phase without generating any object
dnl code file, when the source code tries to define a
dnl type for a constant array with negative dimension.
AC_DEFUN([CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE], [
AC_REQUIRE([CURL_CHECK_COMPILER_HALT_ON_ERROR])dnl
AC_MSG_CHECKING([if compiler halts on negative sized arrays])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ];
]],[[
bad_t dummy;
]])
],[
AC_MSG_RESULT([no])
AC_MSG_ERROR([compiler does not halt on negative sized arrays.])
],[
AC_MSG_RESULT([yes])
])
])
dnl CURL_CHECK_DEF (SYMBOL, [INCLUDES], [SILENT])
dnl -------------------------------------------------
dnl Use the C preprocessor to find out if the given object-style symbol
@@ -96,6 +49,72 @@ CURL_DEF_TOKEN $1
])
dnl CURL_CHECK_DEF_CC (SYMBOL, [INCLUDES], [SILENT])
dnl -------------------------------------------------
dnl Use the C compiler to find out only if the given symbol is defined
dnl or not, this can not find out its expansion. This macro will not use
dnl default includes even if no INCLUDES argument is given. This macro
dnl will run silently when invoked with three arguments.
AC_DEFUN([CURL_CHECK_DEF_CC], [
AS_VAR_PUSHDEF([ac_HaveDef], [curl_cv_have_def_$1])dnl
ifelse($3,,[AC_MSG_CHECKING([for compiler definition of $1])])
AC_COMPILE_IFELSE([
AC_LANG_SOURCE(
ifelse($2,,,[$2])[[
int main (void)
{
#ifdef $1
return 0;
#else
force compilation error
#endif
}
]])
],[
tst_symbol_defined="yes"
],[
tst_symbol_defined="no"
])
if test "$tst_symbol_defined" = "yes"; then
AS_VAR_SET(ac_HaveDef, yes)
ifelse($3,,[AC_MSG_RESULT([yes])])
else
AS_VAR_SET(ac_HaveDef, no)
ifelse($3,,[AC_MSG_RESULT([no])])
fi
AS_VAR_POPDEF([ac_HaveDef])dnl
])
dnl CARES_CHECK_LIB_XNET
dnl -------------------------------------------------
dnl Verify if X/Open network library is required.
AC_DEFUN([CARES_CHECK_LIB_XNET], [
AC_MSG_CHECKING([if X/Open network library is required])
tst_lib_xnet_required="no"
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([[
int main (void)
{
#if defined(__hpux) && defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600)
return 0;
#elif defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
return 0;
#else
force compilation error
#endif
}
]])
],[
tst_lib_xnet_required="yes"
LIBS="$LIBS -lxnet"
])
AC_MSG_RESULT([$tst_lib_xnet_required])
])
dnl CARES_CHECK_AIX_ALL_SOURCE
dnl -------------------------------------------------
dnl Provides a replacement of traditional AC_AIX with
@@ -360,91 +379,55 @@ AC_DEFUN([CURL_CHECK_HEADER_MALLOC], [
])
dnl CURL_CHECK_TYPE_SOCKLEN_T
dnl CURL_CHECK_HEADER_MEMORY
dnl -------------------------------------------------
dnl Check for existing socklen_t type, and provide
dnl an equivalent type if socklen_t not available
dnl Check for compilable and valid memory.h header,
dnl and check if it is needed even with stdlib.h for
dnl memory related functions.
AC_DEFUN([CURL_CHECK_TYPE_SOCKLEN_T], [
AC_REQUIRE([CURL_CHECK_HEADER_WS2TCPIP])dnl
AC_CHECK_TYPE([socklen_t], ,[
dnl socklen_t not available
AC_CACHE_CHECK([for socklen_t equivalent],
[curl_cv_socklen_t_equiv], [
curl_cv_socklen_t_equiv="unknown"
for arg1 in 'int' 'SOCKET'; do
for arg2 in "struct sockaddr" void; do
for t in int size_t unsigned long "unsigned long"; do
if test "$curl_cv_socklen_t_equiv" = "unknown"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#undef inline
#ifdef HAVE_WINDOWS_H
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#else
#ifdef HAVE_WINSOCK_H
#include <winsock.h>
#endif
#endif
#define GETPEERNCALLCONV PASCAL
#else
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#define GETPEERNCALLCONV
#endif
extern int GETPEERNCALLCONV getpeername($arg1, $arg2 *, $t *);
]],[[
$t len=0;
getpeername(0,0,&len);
]])
],[
curl_cv_socklen_t_equiv="$t"
])
fi
done
done
done
AC_DEFUN([CURL_CHECK_HEADER_MEMORY], [
AC_CACHE_CHECK([for memory.h], [ac_cv_header_memory_h], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <memory.h>
]],[[
void *p = malloc(10);
void *q = calloc(10,10);
free(p);
free(q);
]])
],[
ac_cv_header_memory_h="yes"
],[
ac_cv_header_memory_h="no"
])
case "$curl_cv_socklen_t_equiv" in
unknown)
AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
;;
*)
AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv,
[Type to use in place of socklen_t when system does not provide it.])
])
if test "$ac_cv_header_memory_h" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_MEMORY_H, 1,
[Define to 1 if you have the memory.h header file.])
#
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <stdlib.h>
]],[[
void *p = malloc(10);
void *q = calloc(10,10);
free(p);
free(q);
]])
],[
curl_cv_need_header_memory_h="no"
],[
curl_cv_need_header_memory_h="yes"
])
#
case "$curl_cv_need_header_memory_h" in
yes)
AC_DEFINE_UNQUOTED(NEED_MEMORY_H, 1,
[Define to 1 if you need the memory.h header file even with stdlib.h])
;;
esac
],[
#undef inline
#ifdef HAVE_WINDOWS_H
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
#endif
#else
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#endif
])
fi
])
@@ -461,7 +444,6 @@ dnl argument in GETNAMEINFO_QUAL_ARG1.
AC_DEFUN([CURL_CHECK_FUNC_GETNAMEINFO], [
AC_REQUIRE([CURL_CHECK_HEADER_WS2TCPIP])dnl
AC_REQUIRE([CURL_CHECK_TYPE_SOCKLEN_T])dnl
AC_CHECK_HEADERS(sys/types.h sys/socket.h netdb.h)
#
AC_MSG_CHECKING([for getnameinfo])
@@ -1685,6 +1667,168 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
])
dnl CARES_DEFINE_UNQUOTED (VARIABLE, [VALUE])
dnl -------------------------------------------------
dnl Like AC_DEFINE_UNQUOTED this macro will define a C preprocessor
dnl symbol that can be further used in custom template configuration
dnl files. This macro, unlike AC_DEFINE_UNQUOTED, does not use a third
dnl argument for the description. Symbol definitions done with this
dnl macro are intended to be exclusively used in handcrafted *.h.in
dnl template files. Contrary to what AC_DEFINE_UNQUOTED does, this one
dnl prevents autoheader generation and insertion of symbol template
dnl stub and definition into the first configuration header file. Do
dnl not use this macro as a replacement for AC_DEFINE_UNQUOTED, each
dnl one serves different functional needs.
AC_DEFUN([CARES_DEFINE_UNQUOTED], [
cat >>confdefs.h <<_EOF
[@%:@define] $1 ifelse($#, 2, [$2], 1)
_EOF
])
dnl CARES_CONFIGURE_LONG
dnl -------------------------------------------------
dnl Find out the size of long as reported by sizeof() and define
dnl CARES_SIZEOF_LONG as appropriate to be used in template file
dnl ares_build.h.in to properly configure the library.
dnl The size of long is a build time characteristic and as such
dnl must be recorded in ares_build.h
AC_DEFUN([CARES_CONFIGURE_LONG], [
if test -z "$ac_cv_sizeof_long" ||
test "$ac_cv_sizeof_long" -eq "0"; then
AC_MSG_ERROR([cannot find out size of long.])
fi
CARES_DEFINE_UNQUOTED([CARES_SIZEOF_LONG], [$ac_cv_sizeof_long])
])
dnl CARES_CONFIGURE_ARES_SOCKLEN_T
dnl -------------------------------------------------
dnl Find out suitable ares_socklen_t data type definition and size, making
dnl appropriate definitions for template file ares_build.h.in
dnl to properly configure and use the library.
dnl
dnl The need for the ares_socklen_t definition arises mainly to properly
dnl interface HP-UX systems which on one hand have a typedef'ed socklen_t
dnl data type which is 32 or 64-Bit wide depending on the data model being
dnl used, and that on the other hand is only actually used when interfacing
dnl the X/Open sockets provided in the xnet library.
AC_DEFUN([CARES_CONFIGURE_ARES_SOCKLEN_T], [
AC_REQUIRE([CARES_INCLUDES_WS2TCPIP])dnl
AC_REQUIRE([CARES_INCLUDES_SYS_SOCKET])dnl
AC_REQUIRE([CARES_PREPROCESS_CALLCONV])dnl
#
AC_MSG_CHECKING([for ares_socklen_t data type])
cares_typeof_ares_socklen_t="unknown"
for arg1 in int SOCKET; do
for arg2 in 'struct sockaddr' void; do
for t in socklen_t int size_t 'unsigned int' long 'unsigned long' void; do
if test "$cares_typeof_ares_socklen_t" = "unknown"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$cares_includes_ws2tcpip
$cares_includes_sys_socket
$cares_preprocess_callconv
extern int FUNCALLCONV getpeername($arg1, $arg2 *, $t *);
]],[[
$t *lenptr = 0;
if(0 != getpeername(0, 0, lenptr))
return 1;
]])
],[
cares_typeof_ares_socklen_t="$t"
])
fi
done
done
done
for t in socklen_t int; do
if test "$cares_typeof_ares_socklen_t" = "void"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$cares_includes_sys_socket
typedef $t ares_socklen_t;
]],[[
ares_socklen_t dummy;
]])
],[
cares_typeof_ares_socklen_t="$t"
])
fi
done
AC_MSG_RESULT([$cares_typeof_ares_socklen_t])
if test "$cares_typeof_ares_socklen_t" = "void" ||
test "$cares_typeof_ares_socklen_t" = "unknown"; then
AC_MSG_ERROR([cannot find data type for ares_socklen_t.])
fi
#
AC_MSG_CHECKING([size of ares_socklen_t])
cares_sizeof_ares_socklen_t="unknown"
cares_pull_headers_socklen_t="unknown"
if test "$ac_cv_header_ws2tcpip_h" = "yes"; then
tst_pull_header_checks='none ws2tcpip'
tst_size_checks='4'
else
tst_pull_header_checks='none systypes syssocket'
tst_size_checks='4 8 2'
fi
for tst_size in $tst_size_checks; do
for tst_pull_headers in $tst_pull_header_checks; do
if test "$cares_sizeof_ares_socklen_t" = "unknown"; then
case $tst_pull_headers in
ws2tcpip)
tmp_includes="$cares_includes_ws2tcpip"
;;
systypes)
tmp_includes="$cares_includes_sys_types"
;;
syssocket)
tmp_includes="$cares_includes_sys_socket"
;;
*)
tmp_includes=""
;;
esac
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$tmp_includes
typedef $cares_typeof_ares_socklen_t ares_socklen_t;
typedef char dummy_arr[sizeof(ares_socklen_t) == $tst_size ? 1 : -1];
]],[[
ares_socklen_t dummy;
]])
],[
cares_sizeof_ares_socklen_t="$tst_size"
cares_pull_headers_socklen_t="$tst_pull_headers"
])
fi
done
done
AC_MSG_RESULT([$cares_sizeof_ares_socklen_t])
if test "$cares_sizeof_ares_socklen_t" = "unknown"; then
AC_MSG_ERROR([cannot find out size of ares_socklen_t.])
fi
#
case $cares_pull_headers_socklen_t in
ws2tcpip)
CARES_DEFINE_UNQUOTED([CARES_PULL_WS2TCPIP_H])
;;
systypes)
CARES_DEFINE_UNQUOTED([CARES_PULL_SYS_TYPES_H])
;;
syssocket)
CARES_DEFINE_UNQUOTED([CARES_PULL_SYS_TYPES_H])
CARES_DEFINE_UNQUOTED([CARES_PULL_SYS_SOCKET_H])
;;
esac
CARES_DEFINE_UNQUOTED([CARES_TYPEOF_ARES_SOCKLEN_T], [$cares_typeof_ares_socklen_t])
CARES_DEFINE_UNQUOTED([CARES_SIZEOF_ARES_SOCKLEN_T], [$cares_sizeof_ares_socklen_t])
])
dnl This macro determines if the specified struct exists in the specified file
dnl Syntax:
dnl CARES_CHECK_STRUCT(headers, struct name, if found, [if not found])

View File

@@ -116,6 +116,13 @@ int main(int argc, char **argv)
WSAStartup(wVersionRequested, &wsaData);
#endif
status = ares_library_init(ARES_LIB_INIT_ALL);
if (status != ARES_SUCCESS)
{
fprintf(stderr, "ares_library_init: %s\n", ares_strerror(status));
return 1;
}
while ((ch = ares_getopt(argc, argv, "dvh?")) != -1)
switch (ch)
{
@@ -178,6 +185,8 @@ int main(int argc, char **argv)
wait_ares(channel);
ares_destroy(channel);
ares_library_cleanup();
#if defined(WIN32) && !defined(WATT32)
WSACleanup();
#endif
@@ -547,7 +556,7 @@ static void find_country_from_cname(const char *cname, struct in_addr addr)
const struct search_list *country;
char ccode_A2[3], *ccopy, *dot_4;
int cnumber, z0, z1, ver_1, ver_2;
u_long ip;
unsigned long ip;
ip = ntohl(addr.s_addr);
z0 = tolower(cname[0]);

View File

@@ -187,6 +187,13 @@ int main(int argc, char **argv)
WSAStartup(wVersionRequested, &wsaData);
#endif
status = ares_library_init(ARES_LIB_INIT_ALL);
if (status != ARES_SUCCESS)
{
fprintf(stderr, "ares_library_init: %s\n", ares_strerror(status));
return 1;
}
options.flags = ARES_FLAG_NOCHECKRESP;
options.servers = NULL;
options.nservers = 0;
@@ -325,6 +332,8 @@ int main(int argc, char **argv)
ares_destroy(channel);
ares_library_cleanup();
#ifdef USE_WINSOCK
WSACleanup();
#endif

View File

@@ -42,6 +42,7 @@
#include "inet_ntop.h"
#include "inet_net_pton.h"
#include "ares_getopt.h"
#include "ares_ipv6.h"
#ifndef HAVE_STRDUP
# include "ares_strdup.h"
@@ -76,6 +77,13 @@ int main(int argc, char **argv)
WSAStartup(wVersionRequested, &wsaData);
#endif
status = ares_library_init(ARES_LIB_INIT_ALL);
if (status != ARES_SUCCESS)
{
fprintf(stderr, "ares_library_init: %s\n", ares_strerror(status));
return 1;
}
while ((c = ares_getopt(argc,argv,"dt:h")) != -1)
{
switch (c)
@@ -146,6 +154,8 @@ int main(int argc, char **argv)
ares_destroy(channel);
ares_library_cleanup();
#ifdef USE_WINSOCK
WSACleanup();
#endif

View File

@@ -19,6 +19,10 @@
#ifndef ARES__H
#define ARES__H
#include "ares_version.h" /* c-ares version defines */
#include "ares_build.h" /* c-ares build definitions */
#include "ares_rules.h" /* c-ares rules enforcement */
/*
* Define WIN32 when build target is Win32 API
*/
@@ -90,6 +94,11 @@ extern "C" {
#define ARES_ENONAME 19
#define ARES_EBADHINTS 20
/* ares_library_init error codes */
#define ARES_ELOADIPHLPAPI 21
#define ARES_ELOADADVAPI32 22
#define ARES_EADDRGetNetworkParams 23
/* Flag values */
#define ARES_FLAG_USEVC (1 << 0)
#define ARES_FLAG_PRIMARY (1 << 1)
@@ -158,6 +167,11 @@ extern "C" {
#define ARES_GETSOCK_WRITABLE(bits,num) (bits & (1 << ((num) + \
ARES_GETSOCK_MAXNUM)))
/* c-ares library initialization flag values */
#define ARES_LIB_INIT_NONE (0)
#define ARES_LIB_INIT_WIN32 (1 << 0)
#define ARES_LIB_INIT_ALL (ARES_LIB_INIT_WIN32)
/*
* Typedef our socket type
@@ -232,6 +246,10 @@ typedef void (*ares_nameinfo_callback)(void *arg, int status, int timeouts,
typedef int (*ares_sock_create_callback)(ares_socket_t socket_fd,
int type, void *data);
int ares_library_init(int flags);
void ares_library_cleanup(void);
const char *ares_version(int *version);
int ares_init(ares_channel *channelptr);
int ares_init_options(ares_channel *channelptr, struct ares_options *options,
int optmask);
@@ -257,7 +275,7 @@ int ares_gethostbyname_file(ares_channel channel, const char *name,
void ares_gethostbyaddr(ares_channel channel, const void *addr, int addrlen,
int family, ares_host_callback callback, void *arg);
void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
socklen_t salen, int flags,
ares_socklen_t salen, int flags,
ares_nameinfo_callback callback,
void *arg);
int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds);

View File

@@ -47,7 +47,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
int status, linesize, end_at_hostname, naliases;
struct in_addr addr;
struct in6_addr addr6;
int addrlen = sizeof(struct in_addr);
size_t addrlen = sizeof(struct in_addr);
struct hostent *hostent = NULL;
while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS)
@@ -162,7 +162,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
hostent->h_aliases[naliases] = NULL;
hostent->h_addrtype = family;
hostent->h_length = addrlen;
hostent->h_length = (int)addrlen;
if (family == AF_INET)
memcpy(hostent->h_addr_list[0], &addr, addrlen);
else if (family == AF_INET6)

253
ares/ares_build.h.dist Normal file
View File

@@ -0,0 +1,253 @@
#ifndef __CARES_BUILD_H
#define __CARES_BUILD_H
/* $Id$ */
/* Copyright (C) 2009 by Daniel Stenberg et al
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of M.I.T. not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. M.I.T. makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*/
/* ================================================================ */
/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
/* ================================================================ */
/*
* NOTE 1:
* -------
*
* See file ares_build.h.in, run configure, and forget that this file
* exists it is only used for non-configure systems.
* But you can keep reading if you want ;-)
*
*/
/* ================================================================ */
/* NOTES FOR NON-CONFIGURE SYSTEMS */
/* ================================================================ */
/*
* NOTE 1:
* -------
*
* Nothing in this file is intended to be modified or adjusted by the
* c-ares library user nor by the c-ares library builder.
*
* If you think that something actually needs to be changed, adjusted
* or fixed in this file, then, report it on the c-ares development
* mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/
*
* Try to keep one section per platform, compiler and architecture,
* otherwise, if an existing section is reused for a different one and
* later on the original is adjusted, probably the piggybacking one can
* be adversely changed.
*
* In order to differentiate between platforms/compilers/architectures
* use only compiler built in predefined preprocessor symbols.
*
* This header file shall only export symbols which are 'cares' or 'CARES'
* prefixed, otherwise public name space would be polluted.
*
* NOTE 2:
* -------
*
* Right now you might be staring at file ares_build.h.dist or ares_build.h,
* this is due to the following reason: file ares_build.h.dist is renamed
* to ares_build.h when the c-ares source code distribution archive file is
* created.
*
* File ares_build.h.dist is not included in the distribution archive.
* File ares_build.h is not present in the CVS tree.
*
* The distributed ares_build.h file is only intended to be used on systems
* which can not run the also distributed configure script.
*
* On systems capable of running the configure script, the configure process
* will overwrite the distributed ares_build.h file with one that is suitable
* and specific to the library being configured and built, which is generated
* from the ares_build.h.in template file.
*
* If you check out from CVS on a non-configure platform, you must run the
* appropriate buildconf* script to set up ares_build.h and other local files.
*
*/
/* ================================================================ */
/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
/* ================================================================ */
#ifdef CARES_SIZEOF_LONG
# error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h"
Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined
#endif
#ifdef CARES_TYPEOF_ARES_SOCKLEN_T
# error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined
#endif
#ifdef CARES_SIZEOF_ARES_SOCKLEN_T
# error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined
#endif
/* ================================================================ */
/* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */
/* ================================================================ */
#if defined(__DJGPP__) || defined(__GO32__)
# define CARES_SIZEOF_LONG 4
# define CARES_TYPEOF_ARES_SOCKLEN_T int
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
#elif defined(__SALFORDC__)
# define CARES_SIZEOF_LONG 4
# define CARES_TYPEOF_ARES_SOCKLEN_T int
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
#elif defined(__BORLANDC__)
# define CARES_SIZEOF_LONG 4
# define CARES_TYPEOF_ARES_SOCKLEN_T int
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
#elif defined(__TURBOC__)
# define CARES_SIZEOF_LONG 4
# define CARES_TYPEOF_ARES_SOCKLEN_T int
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
#elif defined(__WATCOMC__)
# define CARES_SIZEOF_LONG 4
# define CARES_TYPEOF_ARES_SOCKLEN_T int
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
#elif defined(__POCC__)
# define CARES_SIZEOF_LONG 4
# define CARES_TYPEOF_ARES_SOCKLEN_T int
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
#elif defined(__LCC__)
# define CARES_SIZEOF_LONG 4
# define CARES_TYPEOF_ARES_SOCKLEN_T int
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
#elif defined(__SYMBIAN32__)
# define CARES_SIZEOF_LONG 4
# define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
#elif defined(__MWERKS__)
# define CARES_SIZEOF_LONG 4
# define CARES_TYPEOF_ARES_SOCKLEN_T int
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
#elif defined(_WIN32_WCE)
# define CARES_SIZEOF_LONG 4
# define CARES_TYPEOF_ARES_SOCKLEN_T int
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
#elif defined(__MINGW32__)
# define CARES_SIZEOF_LONG 4
# define CARES_TYPEOF_ARES_SOCKLEN_T int
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
#elif defined(__VMS)
# define CARES_SIZEOF_LONG 4
# define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
#elif defined(__OS400__)
# if defined(__ILEC400__)
# define CARES_SIZEOF_LONG 4
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
# define CARES_PULL_SYS_TYPES_H 1
# define CARES_PULL_SYS_SOCKET_H 1
# endif
#elif defined(__MVS__)
# if defined(__IBMC__) || defined(__IBMCPP__)
# if defined(_ILP32)
# define CARES_SIZEOF_LONG 4
# elif defined(_LP64)
# define CARES_SIZEOF_LONG 8
# endif
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
# define CARES_PULL_SYS_TYPES_H 1
# define CARES_PULL_SYS_SOCKET_H 1
# endif
#elif defined(__370__)
# if defined(__IBMC__) || defined(__IBMCPP__)
# if defined(_ILP32)
# define CARES_SIZEOF_LONG 4
# elif defined(_LP64)
# define CARES_SIZEOF_LONG 8
# endif
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
# define CARES_PULL_SYS_TYPES_H 1
# define CARES_PULL_SYS_SOCKET_H 1
# endif
#elif defined(TPF)
# define CARES_SIZEOF_LONG 8
# define CARES_TYPEOF_ARES_SOCKLEN_T int
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
/* ===================================== */
/* KEEP MSVC THE PENULTIMATE ENTRY */
/* ===================================== */
#elif defined(_MSC_VER)
# define CARES_SIZEOF_LONG 4
# define CARES_TYPEOF_ARES_SOCKLEN_T int
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
/* ===================================== */
/* KEEP GENERIC GCC THE LAST ENTRY */
/* ===================================== */
#elif defined(__GNUC__)
# if defined(__i386__) || defined(__ppc__)
# define CARES_SIZEOF_LONG 4
# elif defined(__x86_64__) || defined(__ppc64__)
# define CARES_SIZEOF_LONG 8
# endif
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
# define CARES_SIZEOF_ARES_SOCKLEN_T 4
# define CARES_PULL_SYS_TYPES_H 1
# define CARES_PULL_SYS_SOCKET_H 1
#else
# error "Unknown non-configure build target!"
Error Compilation_aborted_Unknown_non_configure_build_target
#endif
/* CARES_PULL_SYS_TYPES_H is defined above when inclusion of header file */
/* sys/types.h is required here to properly make type definitions below. */
#ifdef CARES_PULL_SYS_TYPES_H
# include <sys/types.h>
#endif
/* CARES_PULL_SYS_SOCKET_H is defined above when inclusion of header file */
/* sys/socket.h is required here to properly make type definitions below. */
#ifdef CARES_PULL_SYS_SOCKET_H
# include <sys/socket.h>
#endif
/* Data type definition of ares_socklen_t. */
#ifdef CARES_TYPEOF_ARES_SOCKLEN_T
typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;
#endif
#endif /* __CARES_BUILD_H */

111
ares/ares_build.h.in Normal file
View File

@@ -0,0 +1,111 @@
#ifndef __CARES_BUILD_H
#define __CARES_BUILD_H
/* $Id$ */
/* Copyright (C) 2009 by Daniel Stenberg et al
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of M.I.T. not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. M.I.T. makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*/
/* ================================================================ */
/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
/* ================================================================ */
/*
* NOTE 1:
* -------
*
* Nothing in this file is intended to be modified or adjusted by the
* c-ares library user nor by the c-ares library builder.
*
* If you think that something actually needs to be changed, adjusted
* or fixed in this file, then, report it on the c-ares development
* mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/
*
* This header file shall only export symbols which are 'cares' or 'CARES'
* prefixed, otherwise public name space would be polluted.
*
* NOTE 2:
* -------
*
* Right now you might be staring at file ares_build.h.in or ares_build.h,
* this is due to the following reason:
*
* On systems capable of running the configure script, the configure process
* will overwrite the distributed ares_build.h file with one that is suitable
* and specific to the library being configured and built, which is generated
* from the ares_build.h.in template file.
*
*/
/* ================================================================ */
/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
/* ================================================================ */
#ifdef CARES_SIZEOF_LONG
# error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h"
Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined
#endif
#ifdef CARES_TYPEOF_ARES_SOCKLEN_T
# error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined
#endif
#ifdef CARES_SIZEOF_ARES_SOCKLEN_T
# error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined
#endif
/* ================================================================ */
/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
/* ================================================================ */
/* Configure process defines this to 1 when it finds out that system */
/* header file ws2tcpip.h must be included by the external interface. */
#undef CARES_PULL_WS2TCPIP_H
#ifdef CARES_PULL_WS2TCPIP_H
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
# include <winsock2.h>
# include <ws2tcpip.h>
#endif
/* Configure process defines this to 1 when it finds out that system */
/* header file sys/types.h must be included by the external interface. */
#undef CARES_PULL_SYS_TYPES_H
#ifdef CARES_PULL_SYS_TYPES_H
# include <sys/types.h>
#endif
/* Configure process defines this to 1 when it finds out that system */
/* header file sys/socket.h must be included by the external interface. */
#undef CARES_PULL_SYS_SOCKET_H
#ifdef CARES_PULL_SYS_SOCKET_H
# include <sys/socket.h>
#endif
/* The size of `long', as computed by sizeof. */
#undef CARES_SIZEOF_LONG
/* Integral data type used for ares_socklen_t. */
#undef CARES_TYPEOF_ARES_SOCKLEN_T
/* The size of `ares_socklen_t', as computed by sizeof. */
#undef CARES_SIZEOF_ARES_SOCKLEN_T
/* Data type definition of ares_socklen_t. */
typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;
#endif /* __CARES_BUILD_H */

View File

@@ -145,16 +145,23 @@ static void addr_callback(void *arg, int status, int timeouts,
{
struct addr_query *aquery = (struct addr_query *) arg;
struct hostent *host;
size_t addrlen;
aquery->timeouts += timeouts;
if (status == ARES_SUCCESS)
{
if (aquery->addr.family == AF_INET)
status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV4,
sizeof(struct in_addr), AF_INET, &host);
{
addrlen = sizeof(struct in_addr);
status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV4,
(int)addrlen, AF_INET, &host);
}
else
status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV6,
sizeof(struct in6_addr), AF_INET6, &host);
{
addrlen = sizeof(struct in6_addr);
status = ares_parse_ptr_reply(abuf, alen, &aquery->addr.addrV6,
(int)addrlen, AF_INET6, &host);
}
end_aquery(aquery, status, host);
}
else if (status == ARES_EDESTRUCTION)

View File

@@ -275,12 +275,12 @@ static int fake_hostent(const char *name, int family, ares_host_callback callbac
if (family == AF_INET)
{
hostent.h_length = sizeof(struct in_addr);
hostent.h_length = (int)sizeof(struct in_addr);
addrs[0] = (char *)&in;
}
else if (family == AF_INET6)
{
hostent.h_length = sizeof(struct in6_addr);
hostent.h_length = (int)sizeof(struct in6_addr);
addrs[0] = (char *)&in6;
}
/* Duplicate the name, to avoid a constness violation. */

View File

@@ -14,7 +14,7 @@
.\" this software for any purpose. It is provided "as is"
.\" without express or implied warranty.
.\"
.TH ARES_GETNAMEINFO 3 "16 May 2005"
.TH ARES_GETNAMEINFO 3 "1 May 2009"
.SH NAME
ares_getnameinfo \- Address-to-nodename translation in protocol-independent manner
.SH SYNOPSIS
@@ -25,7 +25,7 @@ ares_getnameinfo \- Address-to-nodename translation in protocol-independent mann
.B int \fItimeouts\fP, char *\fInode\fP, char *\fIservice\fP)
.PP
.B void ares_getnameinfo(ares_channel \fIchannel\fP, const struct sockaddr *\fIsa\fP,
.B socklen_t \fIsalen\fP, int \fIflags\fP, ares_nameinfo_callback \fIcallback\fP,
.B ares_socklen_t \fIsalen\fP, int \fIflags\fP, ares_nameinfo_callback \fIcallback\fP,
.B void *\fIarg\fP)
.fi
.SH DESCRIPTION

View File

@@ -92,7 +92,8 @@ static void append_scopeid(struct sockaddr_in6 *addr6, unsigned int scopeid,
#endif
static char *ares_striendstr(const char *s1, const char *s2);
void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa, socklen_t salen,
void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa,
ares_socklen_t salen,
int flags, ares_nameinfo_callback callback, void *arg)
{
struct sockaddr_in *addr = NULL;

View File

@@ -1,7 +1,7 @@
/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
* Copyright (C) 2007-2008 by Daniel Stenberg
* Copyright (C) 2007-2009 by Daniel Stenberg
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
@@ -20,7 +20,6 @@
#if defined(WIN32) && !defined(WATT32)
#include <iphlpapi.h>
#include <malloc.h>
#endif
#ifdef HAVE_SYS_PARAM_H
@@ -68,6 +67,7 @@
#include <errno.h>
#include "ares.h"
#include "inet_net_pton.h"
#include "ares_library_init.h"
#include "ares_private.h"
#ifdef WATT32
@@ -559,11 +559,8 @@ static int get_res_interfaces_nt(HKEY hKey, const char *subkey, char **obuf)
static int get_iphlpapi_dns_info (char *ret_buf, size_t ret_size)
{
FIXED_INFO *fi = alloca (sizeof(*fi));
FIXED_INFO *fi, *newfi;
DWORD size = sizeof (*fi);
typedef DWORD (WINAPI* get_net_param_func) (FIXED_INFO*, DWORD*);
get_net_param_func fpGetNetworkParams; /* available only on Win-98/2000+ */
HMODULE handle;
IP_ADDR_STRING *ipAddr;
int i, count = 0;
int debug = 0;
@@ -572,23 +569,21 @@ static int get_iphlpapi_dns_info (char *ret_buf, size_t ret_size)
char *ret = ret_buf;
HRESULT res;
fi = malloc(size);
if (!fi)
return (0);
handle = LoadLibrary ("iphlpapi.dll");
if (!handle)
return (0);
fpGetNetworkParams = (get_net_param_func) GetProcAddress (handle, "GetNetworkParams");
if (!fpGetNetworkParams)
goto quit;
return 0;
res = (*fpGetNetworkParams) (fi, &size);
if ((res != ERROR_BUFFER_OVERFLOW) && (res != ERROR_SUCCESS))
goto quit;
fi = alloca (size);
if (!fi || (*fpGetNetworkParams) (fi, &size) != ERROR_SUCCESS)
newfi = realloc(fi, size);
if (!newfi)
goto quit;
fi = newfi;
res = (*fpGetNetworkParams) (fi, &size);
if (res != ERROR_SUCCESS)
goto quit;
if (debug)
@@ -621,14 +616,14 @@ static int get_iphlpapi_dns_info (char *ret_buf, size_t ret_size)
}
quit:
if (handle)
FreeLibrary (handle);
if (fi)
free(fi);
if (debug && left <= ip_size)
printf ("Too many nameservers. Truncating to %d addressess", count);
if (ret > ret_buf)
ret[-1] = '\0';
return (count);
return count;
}
#endif
@@ -1490,15 +1485,13 @@ static void randomize_key(unsigned char* key,int key_data_len)
int randomized = 0;
int counter=0;
#ifdef WIN32
HMODULE lib=LoadLibrary("ADVAPI32.DLL");
if (lib) {
BOOLEAN (APIENTRY *pfn)(void*, ULONG) =
(BOOLEAN (APIENTRY *)(void*,ULONG))GetProcAddress(lib,"SystemFunction036");
if (pfn && pfn(key,key_data_len) )
randomized = 1;
FreeLibrary(lib);
}
BOOLEAN res;
if (fpSystemFunction036)
{
res = (*fpSystemFunction036) (key, key_data_len);
if (res)
randomized = 1;
}
#else /* !WIN32 */
#ifdef RANDOM_FILE
FILE *f = fopen(RANDOM_FILE, "rb");

View File

@@ -49,7 +49,7 @@ struct addrinfo
int ai_family;
int ai_socktype;
int ai_protocol;
socklen_t ai_addrlen; /* Follow rfc3493 struct addrinfo */
ares_socklen_t ai_addrlen; /* Follow rfc3493 struct addrinfo */
char *ai_canonname;
struct sockaddr *ai_addr;
struct addrinfo *ai_next;

109
ares/ares_library_init.c Normal file
View File

@@ -0,0 +1,109 @@
/* $Id$ */
#include "setup.h"
#include "ares.h"
#include "ares_library_init.h"
#include "ares_private.h"
/* library-private global and unique instance vars */
#ifdef WIN32
fpGetNetworkParams_t fpGetNetworkParams = ZERO_NULL;
fpSystemFunction036_t fpSystemFunction036 = ZERO_NULL;
#endif
/* library-private global vars with source visibility restricted to this file */
static unsigned int ares_initialized;
static int ares_init_flags;
#ifdef WIN32
static HMODULE hnd_iphlpapi;
static HMODULE hnd_advapi32;
#endif
static int ares_win32_init(void)
{
#ifdef WIN32
hnd_iphlpapi = 0;
hnd_iphlpapi = LoadLibrary("iphlpapi.dll");
if (!hnd_iphlpapi)
return ARES_ELOADIPHLPAPI;
fpGetNetworkParams = (fpGetNetworkParams_t)
GetProcAddress(hnd_iphlpapi, "GetNetworkParams");
if (!fpGetNetworkParams)
{
FreeLibrary(hnd_iphlpapi);
return ARES_EADDRGetNetworkParams;
}
hnd_advapi32 = 0;
hnd_advapi32 = LoadLibrary("advapi32.dll");
if (!hnd_advapi32)
{
FreeLibrary(hnd_iphlpapi);
return ARES_ELOADADVAPI32;
}
fpSystemFunction036 = (fpSystemFunction036_t)
GetProcAddress(hnd_advapi32, "SystemFunction036");
/*
* Intentionally avoid checking if the address of SystemFunction036, a.k.a.
* RtlGenRandom, has been located or not. This function is only available on
* WinXP and later. When unavailable c-ares uses portable rand() function.
*/
#endif
return ARES_SUCCESS;
}
static void ares_win32_cleanup(void)
{
#ifdef WIN32
if (hnd_advapi32)
FreeLibrary(hnd_advapi32);
if (hnd_iphlpapi)
FreeLibrary(hnd_iphlpapi);
#endif
}
int ares_library_init(int flags)
{
int res;
if (ares_initialized)
return ARES_SUCCESS;
ares_initialized++;
if (flags & ARES_LIB_INIT_WIN32)
{
res = ares_win32_init();
if (res != ARES_SUCCESS)
return res;
}
ares_init_flags = flags;
return ARES_SUCCESS;
}
void ares_library_cleanup(void)
{
if (!ares_initialized)
return;
ares_initialized--;
if (ares_init_flags & ARES_LIB_INIT_WIN32)
ares_win32_cleanup();
ares_init_flags = ARES_LIB_INIT_NONE;
}

24
ares/ares_library_init.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef HEADER_CARES_LIBRARY_INIT_H
#define HEADER_CARES_LIBRARY_INIT_H
/* $Id$ */
#include "setup.h"
#ifdef WIN32
#include <iphlpapi.h>
typedef DWORD (WINAPI *fpGetNetworkParams_t) (FIXED_INFO*, DWORD*);
typedef BOOLEAN (APIENTRY *fpSystemFunction036_t) (void*, ULONG);
/* Forward-declaration of variables defined in ares_library_init.c */
/* that are global and unique instances for whole c-ares library. */
extern fpGetNetworkParams_t fpGetNetworkParams;
extern fpSystemFunction036_t fpSystemFunction036;
#endif /* WIN32 */
#endif /* HEADER_CARES_LIBRARY_INIT_H */

View File

@@ -44,7 +44,10 @@
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
#include "ares.h"
#include "ares_dns.h"
#include "ares_private.h"

View File

@@ -44,7 +44,10 @@
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
#include "ares.h"
#include "ares_dns.h"
#include "inet_net_pton.h"

View File

@@ -1,7 +1,7 @@
/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
* Copyright (C) 2004-2008 by Daniel Stenberg
* Copyright (C) 2004-2009 by Daniel Stenberg
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
@@ -104,7 +104,7 @@ static void end_query(ares_channel channel, struct query *query, int status,
int ares__timedout(struct timeval *now,
struct timeval *check)
{
int secs = (now->tv_sec - check->tv_sec);
long secs = (now->tv_sec - check->tv_sec);
if(secs > 0)
return 1; /* yes, timed out */
@@ -429,7 +429,7 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds,
unsigned char buf[PACKETSZ + 1];
#ifdef HAVE_RECVFROM
struct sockaddr_in from;
socklen_t fromlen;
ares_socklen_t fromlen;
#endif
if(!read_fds && (read_fd == ARES_SOCKET_BAD))

145
ares/ares_rules.h Normal file
View File

@@ -0,0 +1,145 @@
#ifndef __CARES_RULES_H
#define __CARES_RULES_H
/* $Id$ */
/* Copyright (C) 2009 by Daniel Stenberg et al
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of M.I.T. not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. M.I.T. makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*/
/* ================================================================ */
/* COMPILE TIME SANITY CHECKS */
/* ================================================================ */
/*
* NOTE 1:
* -------
*
* All checks done in this file are intentionally placed in a public
* header file which is pulled by ares.h when an application is
* being built using an already built c-ares library. Additionally
* this file is also included and used when building the library.
*
* If compilation fails on this file it is certainly sure that the
* problem is elsewhere. It could be a problem in the ares_build.h
* header file, or simply that you are using different compilation
* settings than those used to build the library.
*
* Nothing in this file is intended to be modified or adjusted by the
* c-ares library user nor by the c-ares library builder.
*
* Do not deactivate any check, these are done to make sure that the
* library is properly built and used.
*
* You can find further help on the c-ares development mailing list:
* http://cool.haxx.se/mailman/listinfo/c-ares/
*
* NOTE 2
* ------
*
* Some of the following compile time checks are based on the fact
* that the dimension of a constant array can not be a negative one.
* In this way if the compile time verification fails, the compilation
* will fail issuing an error. The error description wording is compiler
* dependant but it will be quite similar to one of the following:
*
* "negative subscript or subscript is too large"
* "array must have at least one element"
* "-1 is an illegal array size"
* "size of array is negative"
*
* If you are building an application which tries to use an already
* built c-ares library and you are getting this kind of errors on
* this file, it is a clear indication that there is a mismatch between
* how the library was built and how you are trying to use it for your
* application. Your already compiled or binary library provider is the
* only one who can give you the details you need to properly use it.
*/
/*
* Verify that some macros are actually defined.
*/
#ifndef CARES_SIZEOF_LONG
# error "CARES_SIZEOF_LONG definition is missing!"
Error Compilation_aborted_CARES_SIZEOF_LONG_is_missing
#endif
#ifndef CARES_TYPEOF_ARES_SOCKLEN_T
# error "CARES_TYPEOF_ARES_SOCKLEN_T definition is missing!"
Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_is_missing
#endif
#ifndef CARES_SIZEOF_ARES_SOCKLEN_T
# error "CARES_SIZEOF_ARES_SOCKLEN_T definition is missing!"
Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_is_missing
#endif
/*
* Macros private to this header file.
*/
#define CareschkszEQ(t, s) sizeof(t) == s ? 1 : -1
#define CareschkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1
/*
* Verify that the size previously defined and expected for long
* is the same as the one reported by sizeof() at compile time.
*/
typedef char
__cares_rule_01__
[CareschkszEQ(long, CARES_SIZEOF_LONG)];
/*
* Verify that the size previously defined and expected for
* ares_socklen_t is actually the the same as the one reported
* by sizeof() at compile time.
*/
typedef char
__cares_rule_02__
[CareschkszEQ(ares_socklen_t, CARES_SIZEOF_ARES_SOCKLEN_T)];
/*
* Verify at compile time that the size of ares_socklen_t as reported
* by sizeof() is greater or equal than the one reported for int for
* the current compilation.
*/
typedef char
__cares_rule_03__
[CareschkszGE(ares_socklen_t, int)];
/* ================================================================ */
/* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */
/* ================================================================ */
/*
* Get rid of macros private to this header file.
*/
#undef CareschkszEQ
#undef CareschkszGE
/*
* Get rid of macros not intended to exist beyond this point.
*/
#undef CARES_PULL_WS2TCPIP_H
#undef CARES_PULL_SYS_TYPES_H
#undef CARES_PULL_SYS_SOCKET_H
#undef CARES_TYPEOF_ARES_SOCKLEN_T
#endif /* __CARES_RULES_H */

View File

@@ -43,7 +43,10 @@ const char *ares_strerror(int code)
"Misformatted string",
"Illegal flags specified",
"Given hostname is not numeric",
"Illegal hints flags specified"
"Illegal hints flags specified",
"Error loading iphlpapi.dll",
"Error loading advapi32.dll",
"Could not find GetNetworkParams function"
};
if(code >= 0 && code < (int)(sizeof(errtext) / sizeof(*errtext)))

View File

@@ -1,7 +1,7 @@
/* $Id$ */
#include "setup.h"
#include "ares_version.h"
#include "ares.h"
const char *ares_version(int *version)
{

View File

@@ -11,15 +11,12 @@
(ARES_VERSION_PATCH))
#define ARES_VERSION_STR "1.6.1-CVS"
#ifdef __cplusplus
extern "C" {
#endif
const char *ares_version(int *version);
#ifdef __cplusplus
}
#if (ARES_VERSION >= 0x010601)
# define CARES_HAVE_ARES_LIBRARY_INIT 1
# define CARES_HAVE_ARES_LIBRARY_CLEANUP 1
#else
# undef CARES_HAVE_ARES_LIBRARY_INIT
# undef CARES_HAVE_ARES_LIBRARY_CLEANUP
#endif
#endif

View File

@@ -18,7 +18,10 @@
#include "setup.h"
#include <limits.h>
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
#include "ares.h"
#include "ares_private.h"

8
ares/buildconf.bat Normal file
View File

@@ -0,0 +1,8 @@
@echo off
REM set up a CVS tree to build when there's no autotools
REM $Revision$
REM $Date$
REM create ares_build.h
copy /Y ares_build.h.dist ares_build.h

View File

@@ -29,6 +29,9 @@
#define HAVE_GETOPT_H 1
#endif
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1

View File

@@ -7,7 +7,7 @@ AC_INIT([c-ares], [-],
CARES_OVERRIDE_AUTOCONF
AC_CONFIG_SRCDIR([ares_ipv6.h])
AM_CONFIG_HEADER([config.h])
AM_CONFIG_HEADER([config.h ares_build.h])
AM_MAINTAINER_MODE
CARES_CHECK_OPTION_DEBUG
@@ -158,8 +158,8 @@ case $host in
#
esac
CURL_CHECK_COMPILER_HALT_ON_ERROR
CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
CARES_CHECK_COMPILER_HALT_ON_ERROR
CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
dnl **********************************************************************
dnl Compilation based checks should not be done before this point.
@@ -191,6 +191,8 @@ dnl **********************************************************************
dnl Checks for libraries.
dnl **********************************************************************
CARES_CHECK_LIB_XNET
dnl gethostbyname without lib or in the nsl lib?
AC_CHECK_FUNC(gethostbyname,
[HAVE_GETHOSTBYNAME="1"
@@ -430,6 +432,7 @@ dnl Checks for header files.
AC_HEADER_STDC
CURL_CHECK_HEADER_MALLOC
CURL_CHECK_HEADER_MEMORY
dnl check for a few basic system headers we need
AC_CHECK_HEADERS(
@@ -448,6 +451,7 @@ AC_CHECK_HEADERS(
strings.h \
stdbool.h \
time.h \
limits.h \
arpa/nameser.h \
arpa/nameser_compat.h \
arpa/inet.h,
@@ -487,7 +491,9 @@ AC_HEADER_TIME
CURL_CHECK_STRUCT_TIMEVAL
AC_CHECK_SIZEOF(size_t)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
CARES_CONFIGURE_LONG
AC_CHECK_SIZEOF(time_t)
AC_CHECK_TYPE(long long,
@@ -523,8 +529,7 @@ AC_CHECK_TYPE([bool],[
#endif
])
# Check for socklen_t or equivalent
CURL_CHECK_TYPE_SOCKLEN_T
CARES_CONFIGURE_ARES_SOCKLEN_T
TYPE_IN_ADDR_T
@@ -743,7 +748,7 @@ AC_CHECK_FUNCS([bitncmp \
],[
AC_MSG_RESULT([yes])
eval "ac_cv_func_$func=yes"
AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$func])], [1],
AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$func]), [1],
[Define to 1 if you have the $func function.])
],[
AC_MSG_RESULT([but still no])

View File

@@ -1,7 +1,7 @@
#***************************************************************************
# $Id$
#
# Copyright (C) 2008 by Daniel Stenberg et al
# Copyright (C) 2009 by Daniel Stenberg et al
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted, provided
@@ -16,7 +16,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
# serial 46
# serial 51
dnl CARES_CHECK_COMPILER
@@ -186,7 +186,6 @@ AC_DEFUN([CARES_CHECK_COMPILER_INTEL_C], [
if test "$curl_cv_have_def___INTEL_COMPILER" = "yes"; then
AC_MSG_RESULT([yes])
compiler_num="$curl_cv_def___INTEL_COMPILER"
CURL_CHECK_DEF([__i386__], [], [silent])
CURL_CHECK_DEF([__unix__], [], [silent])
if test "$curl_cv_have_def___unix__" = "yes"; then
compiler_id="INTEL_UNIX_C"
@@ -196,13 +195,6 @@ AC_DEFUN([CARES_CHECK_COMPILER_INTEL_C], [
flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
flags_opt_yes="-O2"
flags_opt_off="-O0"
dnl icc 9.1 optimization on IA32 triggers SIGSEGV
if test "$curl_cv_have_def___i386__" = "yes" &&
test "$compiler_num" -eq "910"; then
INTEL_UNIX_C_OPT_SIGSEGV="yes"
else
INTEL_UNIX_C_OPT_SIGSEGV="no"
fi
else
compiler_id="INTEL_WINDOWS_C"
flags_dbg_all="/ZI /Zi /zI /zi /ZD /Zd /zD /zd /Z7 /z7 /Oy /Oy-"
@@ -382,8 +374,8 @@ dnl -------------------------------------------------
dnl Changes standard include paths present in CFLAGS
dnl and CPPFLAGS into isystem include paths. This is
dnl done to prevent GNUC from generating warnings on
dnl headers from these locations, even though this is
dnl not reliable on ancient GNUC versions.
dnl headers from these locations, although on ancient
dnl GNUC versions these warnings are not silenced.
AC_DEFUN([CARES_CONVERT_INCLUDE_TO_ISYSTEM], [
AC_REQUIRE([CARES_SHFUNC_SQUEEZE])dnl
@@ -908,11 +900,7 @@ AC_DEFUN([CARES_SET_COMPILER_WARNING_OPTS], [
#
if test "$want_warnings" = "yes"; then
dnl Issue all warnings
dnl tmp_CFLAGS="$tmp_CFLAGS +w1"
dnl Due to the HP-UX socklen_t issue it is insane to use the +w1
dnl warning level. Until the issue is somehow fixed we will just
dnl use the +w2 warning level.
tmp_CFLAGS="$tmp_CFLAGS +w2"
tmp_CFLAGS="$tmp_CFLAGS +w1"
fi
;;
#
@@ -961,39 +949,6 @@ AC_DEFUN([CARES_SET_COMPILER_WARNING_OPTS], [
dnl Disable vectorizer diagnostic information
tmp_CFLAGS="$tmp_CFLAGS -vec-report0"
fi
dnl Disable some optimizations to debug icc 9.1 SIGSEGV
if test "$INTEL_UNIX_C_OPT_SIGSEGV" = "yes"; then
dnl Disable interprocedural optimizations
tmp_CFLAGS="$tmp_CFLAGS -no-ip -no-ipo"
dnl Separate functions for the linker
tmp_CFLAGS="$tmp_CFLAGS -ffunction-sections"
dnl Disable inlining of user-defined functions
tmp_CFLAGS="$tmp_CFLAGS -Ob0"
dnl Disable inline expansion of intrinsic functions
tmp_CFLAGS="$tmp_CFLAGS -fno-builtin"
dnl Disable inlining of functions
tmp_CFLAGS="$tmp_CFLAGS -fno-inline"
dnl Disable some IPO for single file optimizations
tmp_CFLAGS="$tmp_CFLAGS -fno-inline-functions"
dnl Disable inlining of standard library functions
tmp_CFLAGS="$tmp_CFLAGS -nolib-inline"
dnl Disable full and partial inlining when IPO
tmp_CFLAGS="$tmp_CFLAGS -ip-no-inlining"
dnl Enable floating-point stack integrity checks
tmp_CFLAGS="$tmp_CFLAGS -fpstkchk"
dnl Enable run-time detection of buffer overruns.
tmp_CFLAGS="$tmp_CFLAGS -fstack-security-check"
dnl Assume aliasing in the program.
tmp_CFLAGS="$tmp_CFLAGS -falias"
dnl Assume that arguments may be aliased.
tmp_CFLAGS="$tmp_CFLAGS -alias-args"
dnl Assume aliasing within functions
tmp_CFLAGS="$tmp_CFLAGS -ffnalias"
dnl Disable prefetch insertion optimization
tmp_CFLAGS="$tmp_CFLAGS -no-prefetch"
dnl Disable loop unrolling optimization
tmp_CFLAGS="$tmp_CFLAGS -unroll0"
fi
;;
#
INTEL_WINDOWS_C)
@@ -1162,6 +1117,115 @@ AC_DEFUN([CARES_CHECK_PROG_CC], [
])
dnl CARES_CHECK_COMPILER_HALT_ON_ERROR
dnl -------------------------------------------------
dnl Verifies if the compiler actually halts after the
dnl compilation phase without generating any object
dnl code file, when the source compiles with errors.
AC_DEFUN([CARES_CHECK_COMPILER_HALT_ON_ERROR], [
AC_MSG_CHECKING([if compiler halts on compilation errors])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
]],[[
force compilation error
]])
],[
AC_MSG_RESULT([no])
AC_MSG_ERROR([compiler does not halt on compilation errors.])
],[
AC_MSG_RESULT([yes])
])
])
dnl CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
dnl -------------------------------------------------
dnl Verifies if the compiler actually halts after the
dnl compilation phase without generating any object
dnl code file, when the source code tries to define a
dnl type for a constant array with negative dimension.
AC_DEFUN([CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE], [
AC_REQUIRE([CARES_CHECK_COMPILER_HALT_ON_ERROR])dnl
AC_MSG_CHECKING([if compiler halts on negative sized arrays])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ];
]],[[
bad_t dummy;
]])
],[
AC_MSG_RESULT([no])
AC_MSG_ERROR([compiler does not halt on negative sized arrays.])
],[
AC_MSG_RESULT([yes])
])
])
dnl CARES_CHECK_COMPILER_STRUCT_MEMBER_SIZE
dnl -------------------------------------------------
dnl Verifies if the compiler is capable of handling the
dnl size of a struct member, struct which is a function
dnl result, as a compilation-time condition inside the
dnl type definition of a constant array.
AC_DEFUN([CARES_CHECK_COMPILER_STRUCT_MEMBER_SIZE], [
AC_REQUIRE([CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE])dnl
AC_MSG_CHECKING([if compiler struct member size checking works])
tst_compiler_check_one_works="unknown"
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
struct mystruct {
int mi;
char mc;
struct mystruct *next;
};
struct mystruct myfunc();
typedef char good_t1[sizeof(myfunc().mi) == sizeof(int) ? 1 : -1 ];
typedef char good_t2[sizeof(myfunc().mc) == sizeof(char) ? 1 : -1 ];
]],[[
good_t1 dummy1;
good_t2 dummy2;
]])
],[
tst_compiler_check_one_works="yes"
],[
tst_compiler_check_one_works="no"
sed 's/^/cc-src: /' conftest.$ac_ext >&6
sed 's/^/cc-err: /' conftest.err >&6
])
tst_compiler_check_two_works="unknown"
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
struct mystruct {
int mi;
char mc;
struct mystruct *next;
};
struct mystruct myfunc();
typedef char bad_t1[sizeof(myfunc().mi) != sizeof(int) ? 1 : -1 ];
typedef char bad_t2[sizeof(myfunc().mc) != sizeof(char) ? 1 : -1 ];
]],[[
bad_t1 dummy1;
bad_t2 dummy2;
]])
],[
tst_compiler_check_two_works="no"
],[
tst_compiler_check_two_works="yes"
])
if test "$tst_compiler_check_one_works" = "yes" &&
test "$tst_compiler_check_two_works" = "yes"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([compiler fails struct member size checking.])
fi
])
dnl CARES_VAR_MATCH (VARNAME, VALUE)
dnl -------------------------------------------------
dnl Verifies if shell variable VARNAME contains VALUE.

View File

@@ -1,7 +1,7 @@
#***************************************************************************
# $Id$
#
# Copyright (C) 2008 by Daniel Stenberg et al
# Copyright (C) 2008 - 2009 by Daniel Stenberg et al
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted, provided
@@ -16,7 +16,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
# serial 26
# serial 29
dnl CARES_INCLUDES_ARPA_INET
@@ -187,6 +187,24 @@ cares_includes_sys_socket="\
])
dnl CARES_INCLUDES_SYS_TYPES
dnl -------------------------------------------------
dnl Set up variable with list of headers that must be
dnl included when sys/types.h is to be included.
AC_DEFUN([CARES_INCLUDES_SYS_TYPES], [
cares_includes_sys_types="\
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
/* includes end */"
AC_CHECK_HEADERS(
sys/types.h,
[], [], [$cares_includes_sys_types])
])
dnl CARES_INCLUDES_SYS_UIO
dnl -------------------------------------------------
dnl Set up variable with list of headers that must be
@@ -284,6 +302,23 @@ cares_includes_ws2tcpip="\
])
dnl CARES_PREPROCESS_CALLCONV
dnl -------------------------------------------------
dnl Set up variable with a preprocessor block which
dnl defines function calling convention.
AC_DEFUN([CARES_PREPROCESS_CALLCONV], [
cares_preprocess_callconv="\
/* preprocess start */
#ifdef HAVE_WINDOWS_H
# define FUNCALLCONV __stdcall
#else
# define FUNCALLCONV
#endif
/* preprocess end */"
])
dnl CARES_CHECK_FUNC_FCNTL
dnl -------------------------------------------------
dnl Verify if fcntl is available, prototyped, and

View File

@@ -3,7 +3,7 @@
/* $Id$ */
/* Copyright (C) 2004 - 2008 by Daniel Stenberg et al
/* Copyright (C) 2004 - 2009 by Daniel Stenberg et al
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
@@ -39,6 +39,15 @@
#endif /* HAVE_CONFIG_H */
/* ================================================================ */
/* Definition of preprocessor macros/symbols which modify compiler */
/* behaviour or generated code characteristics must be done here, */
/* as appropriate, before any system header file is included. It is */
/* also possible to have them defined in the config file included */
/* before this point. As a result of all this we frown inclusion of */
/* system header files in our config files, avoid this at any cost. */
/* ================================================================ */
/*
* Tru64 needs _REENTRANT set for a few function prototypes and
* things to appear in the system header files. Unixware needs it
@@ -51,6 +60,29 @@
# endif
#endif
/* ================================================================ */
/* If you need to include a system header file for your platform, */
/* please, do it beyond the point further indicated in this file. */
/* ================================================================ */
/*
* c-ares external interface definitions are also used internally,
* and might also include required system header files to define them.
*/
#include <ares_build.h>
/*
* Compile time sanity checks must also be done when building the library.
*/
#include <ares_rules.h>
/* ================================================================ */
/* No system header file shall be included in this file before this */
/* point. The only allowed ones are those included from curlbuild.h */
/* ================================================================ */
/*
* Include header files for windows builds before redefining anything.
* Use this preproessor block only to include or exclude windows.h,

View File

@@ -3,7 +3,7 @@
/* $Id$ */
/* Copyright (C) 2004 - 2008 by Daniel Stenberg et al
/* Copyright (C) 2004 - 2009 by Daniel Stenberg et al
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
@@ -42,6 +42,14 @@
#include <sys/types.h>
#endif
#ifdef NEED_MALLOC_H
#include <malloc.h>
#endif
#ifdef NEED_MEMORY_H
#include <memory.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
@@ -91,23 +99,6 @@ struct timeval {
#endif
/*
* Windows build targets have socklen_t definition in
* ws2tcpip.h but some versions of ws2tcpip.h do not
* have the definition. It seems that when the socklen_t
* definition is missing from ws2tcpip.h the definition
* for INET_ADDRSTRLEN is also missing, and that when one
* definition is present the other one also is available.
*/
#if defined(WIN32) && !defined(HAVE_CONFIG_H)
# if ( defined(_MSC_VER) && !defined(INET_ADDRSTRLEN) ) || \
(!defined(_MSC_VER) && !defined(HAVE_WS2TCPIP_H) )
# define socklen_t int
# endif
#endif
#if defined(__minix)
/* Minix doesn't support recv on TCP sockets */
#define sread(x,y,z) (ssize_t)read((RECV_TYPE_ARG1)(x), \
@@ -436,88 +427,5 @@ typedef int sig_atomic_t;
#define ZERO_NULL 0
#if defined (__LP64__) && defined(__hpux) && !defined(_XOPEN_SOURCE_EXTENDED)
#include <sys/socket.h>
/* HP-UX has this oddity where it features a few functions that don't work
with socklen_t so we need to convert to ints
This is due to socklen_t being a 64bit int under 64bit ABI, but the
pre-xopen (default) interfaces require an int, which is 32bits.
Therefore, Anytime socklen_t is passed by pointer, the libc function
truncates the 64bit socklen_t value by treating it as a 32bit value.
Note that some socket calls are allowed to have a NULL pointer for
the socklen arg.
*/
inline static int Curl_hp_getsockname(int s, struct sockaddr *name,
socklen_t *namelen)
{
int rc;
if(namelen) {
int len = *namelen;
rc = getsockname(s, name, &len);
*namelen = len;
}
else
rc = getsockname(s, name, 0);
return rc;
}
inline static int Curl_hp_getsockopt(int s, int level, int optname,
void *optval, socklen_t *optlen)
{
int rc;
if(optlen) {
int len = *optlen;
rc = getsockopt(s, level, optname, optval, &len);
*optlen = len;
}
else
rc = getsockopt(s, level, optname, optval, 0);
return rc;
}
inline static int Curl_hp_accept(int sockfd, struct sockaddr *addr,
socklen_t *addrlen)
{
int rc;
if(addrlen) {
int len = *addrlen;
rc = accept(sockfd, addr, &len);
*addrlen = len;
}
else
rc = accept(sockfd, addr, 0);
return rc;
}
inline static ssize_t Curl_hp_recvfrom(int s, void *buf, size_t len, int flags,
struct sockaddr *from,
socklen_t *fromlen)
{
ssize_t rc;
if(fromlen) {
int fromlen32 = *fromlen;
rc = recvfrom(s, buf, len, flags, from, &fromlen32);
*fromlen = fromlen32;
}
else {
rc = recvfrom(s, buf, len, flags, from, 0);
}
return rc;
}
#define getsockname(a,b,c) Curl_hp_getsockname((a),(b),(c))
#define getsockopt(a,b,c,d,e) Curl_hp_getsockopt((a),(b),(c),(d),(e))
#define accept(a,b,c) Curl_hp_accept((a),(b),(c))
#define recvfrom(a,b,c,d,e,f) Curl_hp_recvfrom((a),(b),(c),(d),(e),(f))
#endif /* HPUX work-around */
#endif /* __SETUP_ONCE_H */

View File

@@ -41,8 +41,8 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -65,8 +65,8 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe

View File

@@ -41,8 +41,8 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -65,8 +65,8 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe

View File

@@ -41,8 +41,8 @@ RSC=rc.exe
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -65,8 +65,8 @@ LINK32=link.exe
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe

View File

@@ -145,6 +145,10 @@ SOURCE=..\..\ares_init.c
# End Source File
# Begin Source File
SOURCE=..\..\ares_library_init.c
# End Source File
# Begin Source File
SOURCE=..\..\ares_llist.c
# End Source File
# Begin Source File
@@ -225,6 +229,10 @@ SOURCE=..\..\ares.h
# End Source File
# Begin Source File
SOURCE=..\..\ares_build.h
# End Source File
# Begin Source File
SOURCE=..\..\ares_dns.h
# End Source File
# Begin Source File
@@ -233,6 +241,10 @@ SOURCE=..\..\ares_ipv6.h
# End Source File
# Begin Source File
SOURCE=..\..\ares_library_init.h
# End Source File
# Begin Source File
SOURCE=..\..\ares_llist.h
# End Source File
# Begin Source File
@@ -241,6 +253,10 @@ SOURCE=..\..\ares_private.h
# End Source File
# Begin Source File
SOURCE=..\..\ares_rules.h
# End Source File
# Begin Source File
SOURCE=..\..\ares_strcasecmp.h
# End Source File
# Begin Source File

View File

@@ -294,6 +294,11 @@ done
echo "buildconf: running libtoolize"
$libtoolize --copy --automake --force || die "The libtoolize command failed"
if test ! -f m4/curl-functions.m4; then
echo "buildconf: cURL m4 macros not found"
exit 1
fi
echo "buildconf: running aclocal"
${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS || die "The aclocal command line failed"

View File

@@ -1,13 +1,21 @@
@echo off
REM set up a CVS tree to build when there's no autotools
REM $Revision$
REM $Date$
REM create hugehelp.c
copy src\hugehelp.c.cvs src\hugehelp.c
REM create Makefile
copy Makefile.dist Makefile
REM create curlbuild.h
copy include\curl\curlbuild.h.dist include\curl\curlbuild.h
@echo off
REM set up a CVS tree to build when there's no autotools
REM $Revision$
REM $Date$
REM create hugehelp.c
copy src\hugehelp.c.cvs src\hugehelp.c
REM create Makefile
copy Makefile.dist Makefile
REM create curlbuild.h
copy include\curl\curlbuild.h.dist include\curl\curlbuild.h
REM setup c-ares CVS tree
if not exist ares\buildconf.bat goto end_c_ares
cd ares
call buildconf.bat
cd ..
:end_c_ares

View File

@@ -30,7 +30,7 @@ AC_INIT([curl], [-], [a suitable curl mailing list => http://curl.haxx.se/mail/]
CURL_OVERRIDE_AUTOCONF
dnl configure script copyright
AC_COPYRIGHT([Copyright (c) 1998 - 2008 Daniel Stenberg, <daniel@haxx.se>
AC_COPYRIGHT([Copyright (c) 1998 - 2009 Daniel Stenberg, <daniel@haxx.se>
This configure script may be copied, distributed and modified under the
terms of the curl license; see COPYING for more details])
@@ -498,6 +498,8 @@ dnl **********************************************************************
dnl Checks for libraries.
dnl **********************************************************************
CURL_CHECK_LIB_XNET
dnl gethostbyname without lib or in the nsl lib?
AC_CHECK_FUNC(gethostbyname,
[HAVE_GETHOSTBYNAME="1"
@@ -1171,7 +1173,7 @@ if test X"$OPT_SSL" != Xno; then
PKGTEST="no"
PREFIX_OPENSSL=$OPT_SSL
LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
if [ "$PREFIX_OPENSSL" != "/usr" ] ; then
if test "$PREFIX_OPENSSL" != "/usr" ; then
LDFLAGS="$LDFLAGS -L$LIB_OPENSSL"
CPPFLAGS="$CPPFLAGS -I$PREFIX_OPENSSL/include"
fi
@@ -1494,6 +1496,9 @@ if test X"$OPT_LIBSSH2" != Xno; then
dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
dnl to prevent further configure tests to fail due to this
dnl libssh2_version is a post 1.0 addition
AC_CHECK_FUNCS( libssh2_version )
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_LIBSSH2"
export LD_LIBRARY_PATH
AC_MSG_NOTICE([Added $LIB_LIBSSH2 to LD_LIBRARY_PATH])
@@ -1866,6 +1871,7 @@ dnl Checks for header files.
AC_HEADER_STDC
CURL_CHECK_HEADER_MALLOC
CURL_CHECK_HEADER_MEMORY
dnl Now check for the very most basic headers. Then we can use these
dnl ones as default-headers when checking for the rest!
@@ -1993,8 +1999,7 @@ AC_CHECK_TYPE([bool],[
#endif
])
# Check for socklen_t or equivalent
CURL_CHECK_TYPE_SOCKLEN_T
CURL_CONFIGURE_CURL_SOCKLEN_T
TYPE_IN_ADDR_T
@@ -2099,7 +2104,7 @@ AC_CHECK_FUNCS([basename \
],[
AC_MSG_RESULT([yes])
eval "ac_cv_func_$func=yes"
AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$func])], [1],
AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$func]), [1],
[Define to 1 if you have the $func function.])
],[
AC_MSG_RESULT([but still no])
@@ -2545,7 +2550,6 @@ AC_CONFIG_FILES([Makefile \
packages/Linux/RPM/curl.spec \
packages/Linux/RPM/curl-ssl.spec \
packages/Solaris/Makefile \
packages/DOS/Makefile \
packages/EPM/curl.list \
packages/EPM/Makefile \
packages/vms/Makefile \

View File

@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 2001 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 2001 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -21,10 +21,7 @@
#
# $Id$
###########################################################################
#
# The idea to this kind of setup info script was stolen from numerous
# other packages, such as neon, libxml and gnome.
#
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@

View File

@@ -35,7 +35,7 @@
(setq tab-width 8
indent-tabs-mode nil ; Use spaces. Not tabs.
comment-column 40
c-font-lock-extra-types (append '("bool" "CURL" "CURLcode" "ssize_t" "size_t" "socklen_t" "fd_set" "time_t" "curl_off_t" "curl_socket_t" "in_addr_t" "CURLSHcode" "CURLMcode" "Curl_addrinfo"))
c-font-lock-extra-types (append '("bool" "CURL" "CURLcode" "ssize_t" "size_t" "curl_socklen_t" "fd_set" "time_t" "curl_off_t" "curl_socket_t" "in_addr_t" "CURLSHcode" "CURLMcode" "Curl_addrinfo"))
)
;; keybindings for C, C++, and Objective-C. We can put these in
;; c-mode-base-map because of inheritance ...

View File

@@ -33,7 +33,6 @@ hugehelp.c
libcurl.pc
curl-config
stamp-h*
curl
curllib.dsp
curllib.vcproj
*.spec

View File

@@ -177,6 +177,9 @@ Win32
KB140584 - How to link with the correct C Run-Time (CRT) library
http://support.microsoft.com/kb/140584/en-us
KB190799 - Potential Errors Passing CRT Objects Across DLL Boundaries
http://msdn.microsoft.com/en-us/library/ms235460
If your app is misbehaving in some strange way, or it is suffering
from memory corruption, before asking for further help, please try
first to rebuild every single library your app uses as well as your
@@ -383,7 +386,7 @@ Win32
- Modify lib/setup.h
- Modify lib/Makefile.vc6
- Add defines to Project/Settings/C/C++/General/Preprocessor Definitions
in the libcurl.dsw/libcurl.dsp Visual C++ 6 IDE project.
in the vc6libcurl.dsw/vc6libcurl.dsp Visual C++ 6 IDE project.
Important static libcurl usage note

View File

@@ -472,3 +472,6 @@ Building Releases
need to fill in the Makefile.am files properly for which files that should
be included in the release archives.
NOTE: you need to have curl checked out from CVS to be able to do a proper
release build. The release tarballs do not have everything setup in order to
do releases properly.

View File

@@ -3,6 +3,22 @@ join in and help us correct one or more of these! Also be sure to check the
changelog of the current development status, as one or more of these problems
may have been fixed since this was written!
65. When doing FTP over a socks proxy or CONNECT through HTTP proxy and the
multi interface is used, libcurl will fail if the (passive) TCP connection
for the data transfer isn't more or less instant as the code does not
properly wait for the connect to be confirmed. See test case 564 for a first
shot at a test case.
64. The threaded resolver used in libcurl on Windows has some kind of race
problem when multiple simultanoes resolves are done, like with the multi
interface transferring many files in parallell:
http://curl.haxx.se/mail/lib-2009-04/0028.html
63. When CURLOPT_CONNECT_ONLY is used, the handle cannot reliably be re-used
for any further requests or transfers. The work-around is then to close that
handle with curl_easy_cleanup() and create a new. Some more details:
http://curl.haxx.se/mail/lib-2009-04/0300.html
62. CURLOPT_TIMEOUT does not work properly with the regular multi and
multi_socket interfaces. The work-around for apps is to simply remove the
easy handle once the time is up. See also:
@@ -18,7 +34,8 @@ may have been fixed since this was written!
http://curl.haxx.se/mail/lib-2008-08/0462.html
59. If the CURLOPT_PORT option is used on an FTP URL like
"ftp://example.com/file;type=A" the ";type=A" is stripped off.
"ftp://example.com/file;type=A" using a proxy, the ";type=A" is stripped off.
See the comment in parse_remote_port()
58. It seems sensible to be able to use CURLOPT_NOBODY and
CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is

View File

@@ -21,6 +21,7 @@ Alexander Kourakos
Alexander Krasnostavsky
Alexander Lazic
Alexander Zhuravlev
Alexey Borzov
Alexey Pesternikov
Alexey Simak
Alexis Carvalho
@@ -80,6 +81,7 @@ Brendan Jurd
Brent Beardsley
Brian Akins
Brian Dessent
Brian J. Murrell
Brian R Duffy
Brian Ulm
Brock Noland
@@ -88,6 +90,7 @@ Bryan Henderson
Bryan Kemp
Caolan McNamara
Casey O'Donnell
Chad Monroe
Chih-Chung Chang
Chris "Bob Bob"
Chris Combes
@@ -111,6 +114,7 @@ Colin Watson
Colm Buckley
Constantine Sapuntzakis
Cory Nelson
Craig A West
Craig Davison
Craig Markwardt
Cris Bailiff
@@ -144,6 +148,7 @@ David Houlder
David Hull
David J Meyer
David James
David Kierznowski
David Kimdon
David Lang
David LeBlanc
@@ -262,6 +267,7 @@ Hardeep Singh
Harshal Pradhan
Heikki Korpela
Henrik Storner
Hidemoto Nakada
Hzhijun
Ian Ford
Ian Gulliver
@@ -281,6 +287,7 @@ Ingo Wilken
Jacky Lam
Jacob Meuser
James Bursa
James Cheng
James Clancy
James Cone
James Gallagher
@@ -316,6 +323,7 @@ Jesper Jensen
Jesse Noller
Jim Drash
Jim Meyering
Jocelyn Jaubert
Joe Halpin
Joe Malicki
Joel Chen
@@ -353,6 +361,7 @@ J
J<EFBFBD>rn Hartroth
Kai Sommerfeld
Kai-Uwe Rommel
Kamil Dudka
Kang-Jin Lee
Karl Moerder
Karol Pietrzak
@@ -396,6 +405,7 @@ Liam Healy
Linas Vepstas
Ling Thio
Linus Nielsen Feltzing
Lisa Xu
Loic Dachary
Loren Kirkby
Luca Altea
@@ -416,6 +426,7 @@ Mario Schroeder
Mark Butler
Mark Davies
Mark Eichin
Mark Incley
Mark Karpeles
Mark Lentczner
Markus Koetter
@@ -498,7 +509,9 @@ P R Schaffner
Pascal Terjan
Patrick Bihan-Faou
Patrick Monnerat
Patrick Scott
Patrick Smith
Patrik Thunstrom
Paul Harrington
Paul Marquis
Paul Moore
@@ -602,9 +615,11 @@ Scott Cantor
Scott Davis
Scott McCreary
Sebastien Willemijns
Senthil Raja Velu
Sergio Ballestrero
Seshubabu Pasam
Sh Diao
Sharad Gupta
Shard
Shawn Poulson
Shmulik Regev

View File

@@ -551,7 +551,13 @@ to provide the data to send.
curl_strnequal
They will instead become curlx_ - alternatives. That makes the curl app
still capable of building with them from source.
still capable of using them, by building with them from source.
These functions have no purpose anymore:
curl_multi_socket
curl_multi_socket_all
15.5 remove CURLOPT_FAILONERROR

View File

@@ -1482,8 +1482,10 @@ default statistics.
.I ~/.curlrc
.RS
Default config file, see \fI-K/--config\fP for details.
.SH ENVIRONMENT
The environment variables can be specified in lower case or upper case. The
lower case version has precedence. http_proxy is an exception as it is only
available in lower case.
.IP "http_proxy [protocol://]<host>[:port]"
Sets the proxy server to use for HTTP.
.IP "HTTPS_PROXY [protocol://]<host>[:port]"

View File

@@ -142,6 +142,7 @@ static void StartElement(void *voidContext,
context->title = "";
context->addTitle = true;
}
(void) attributes;
}
//

View File

@@ -13,7 +13,7 @@ ABI - Application Binary Interface
conventions, function arguments, return values, struct sizes/defines and
more.
For a longer descricption, see
For a longer description, see
http://en.wikipedia.org/wiki/Application_binary_interface
Upgrades
@@ -36,7 +36,7 @@ Soname Bumps
breakage, that may require your application to get attention or possibly be
changed to adhere to new things, we will bump the soname. Then the library
will get a different output name and thus can in fact be installed in
parallell with an older installed lib (on most systems). Thus, old
parallel with an older installed lib (on most systems). Thus, old
applications built against the previous ABI version will remain working and
using the older lib, while newer applications build and use the newer one.
@@ -52,3 +52,18 @@ Downgrades
that doesn't support the options your application needs. Or possibly you
even downgrade so far so you cross an ABI break border and thus a different
soname, and then your application may need to adapt to the modified ABI.
History
The previous major library soname number bumps (breaking backwards
compatibility) have happened the following times:
0 - libcurl 7.1, August 2000
1 - libcurl 7.5 December 2000
2 - libcurl 7.7 March 2001
3 - libcurl 7.12.0 June 2004
4 - libcurl 7.16.0 October 2006

View File

@@ -19,44 +19,47 @@ man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3 \
libcurl-tutorial.3 curl_easy_reset.3 curl_easy_escape.3 \
curl_easy_unescape.3 curl_multi_setopt.3 curl_multi_socket.3 \
curl_multi_timeout.3 curl_formget.3 curl_multi_assign.3 \
curl_easy_pause.3 curl_easy_recv.3 curl_easy_send.3
curl_easy_pause.3 curl_easy_recv.3 curl_easy_send.3 \
curl_multi_socket_action.3
HTMLPAGES = curl_easy_cleanup.html curl_easy_getinfo.html \
curl_easy_init.html curl_easy_perform.html curl_easy_setopt.html \
curl_easy_duphandle.html curl_formadd.html curl_formfree.html \
curl_getdate.html curl_getenv.html curl_slist_append.html \
curl_slist_free_all.html curl_version.html curl_version_info.html \
curl_escape.html curl_unescape.html curl_free.html curl_strequal.html \
curl_mprintf.html curl_global_init.html curl_global_cleanup.html \
curl_multi_add_handle.html curl_multi_cleanup.html curl_multi_fdset.html \
curl_multi_info_read.html curl_multi_init.html curl_multi_perform.html \
curl_multi_remove_handle.html curl_share_cleanup.html \
curl_share_init.html curl_share_setopt.html libcurl.html \
libcurl-multi.html libcurl-easy.html libcurl-share.html \
libcurl-errors.html curl_easy_strerror.html curl_multi_strerror.html \
curl_share_strerror.html curl_global_init_mem.html libcurl-tutorial.html \
curl_easy_reset.html curl_easy_escape.html curl_easy_unescape.html \
curl_multi_setopt.html curl_multi_socket.html curl_multi_timeout.html \
curl_formget.html curl_multi_assign.html curl_easy_pause.html \
curl_easy_recv.html curl_easy_send.html
HTMLPAGES = curl_easy_cleanup.html curl_easy_getinfo.html \
curl_easy_init.html curl_easy_perform.html curl_easy_setopt.html \
curl_easy_duphandle.html curl_formadd.html curl_formfree.html \
curl_getdate.html curl_getenv.html curl_slist_append.html \
curl_slist_free_all.html curl_version.html curl_version_info.html \
curl_escape.html curl_unescape.html curl_free.html curl_strequal.html \
curl_mprintf.html curl_global_init.html curl_global_cleanup.html \
curl_multi_add_handle.html curl_multi_cleanup.html \
curl_multi_fdset.html curl_multi_info_read.html curl_multi_init.html \
curl_multi_perform.html curl_multi_remove_handle.html \
curl_share_cleanup.html curl_share_init.html curl_share_setopt.html \
libcurl.html libcurl-multi.html libcurl-easy.html libcurl-share.html \
libcurl-errors.html curl_easy_strerror.html curl_multi_strerror.html \
curl_share_strerror.html curl_global_init_mem.html \
libcurl-tutorial.html curl_easy_reset.html curl_easy_escape.html \
curl_easy_unescape.html curl_multi_setopt.html curl_multi_socket.html \
curl_multi_timeout.html curl_formget.html curl_multi_assign.html \
curl_easy_pause.html curl_easy_recv.html curl_easy_send.html \
curl_multi_socket_action.html
PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf curl_easy_init.pdf \
curl_easy_perform.pdf curl_easy_setopt.pdf curl_easy_duphandle.pdf \
curl_formadd.pdf curl_formfree.pdf curl_getdate.pdf curl_getenv.pdf \
curl_slist_append.pdf curl_slist_free_all.pdf curl_version.pdf \
curl_version_info.pdf curl_escape.pdf curl_unescape.pdf curl_free.pdf \
curl_strequal.pdf curl_mprintf.pdf curl_global_init.pdf \
curl_global_cleanup.pdf curl_multi_add_handle.pdf curl_multi_cleanup.pdf \
curl_multi_fdset.pdf curl_multi_info_read.pdf curl_multi_init.pdf \
curl_multi_perform.pdf curl_multi_remove_handle.pdf \
curl_share_cleanup.pdf curl_share_init.pdf curl_share_setopt.pdf \
libcurl.pdf libcurl-multi.pdf libcurl-easy.pdf libcurl-share.pdf \
libcurl-errors.pdf curl_easy_strerror.pdf curl_multi_strerror.pdf \
curl_share_strerror.pdf curl_global_init_mem.pdf libcurl-tutorial.pdf \
curl_easy_reset.pdf curl_easy_escape.pdf curl_easy_unescape.pdf \
curl_multi_setopt.pdf curl_multi_socket.pdf curl_multi_timeout.pdf \
curl_formget.pdf curl_multi_assign.pdf curl_easy_pause.pdf \
curl_easy_recv.pdf curl_easy_send.pdf
PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf \
curl_easy_init.pdf curl_easy_perform.pdf curl_easy_setopt.pdf \
curl_easy_duphandle.pdf curl_formadd.pdf curl_formfree.pdf \
curl_getdate.pdf curl_getenv.pdf curl_slist_append.pdf \
curl_slist_free_all.pdf curl_version.pdf curl_version_info.pdf \
curl_escape.pdf curl_unescape.pdf curl_free.pdf curl_strequal.pdf \
curl_mprintf.pdf curl_global_init.pdf curl_global_cleanup.pdf \
curl_multi_add_handle.pdf curl_multi_cleanup.pdf curl_multi_fdset.pdf \
curl_multi_info_read.pdf curl_multi_init.pdf curl_multi_perform.pdf \
curl_multi_remove_handle.pdf curl_share_cleanup.pdf curl_share_init.pdf \
curl_share_setopt.pdf libcurl.pdf libcurl-multi.pdf libcurl-easy.pdf \
libcurl-share.pdf libcurl-errors.pdf curl_easy_strerror.pdf \
curl_multi_strerror.pdf curl_share_strerror.pdf \
curl_global_init_mem.pdf libcurl-tutorial.pdf curl_easy_reset.pdf \
curl_easy_escape.pdf curl_easy_unescape.pdf curl_multi_setopt.pdf \
curl_multi_socket.pdf curl_multi_timeout.pdf curl_formget.pdf \
curl_multi_assign.pdf curl_easy_pause.pdf curl_easy_recv.pdf \
curl_easy_send.pdf curl_multi_socket_action.pdf
CLEANFILES = $(HTMLPAGES) $(PDFPAGES)

View File

@@ -43,7 +43,7 @@ explicitly mentioned below.
.SH AVAILABLE INFORMATION
The following information can be extracted:
.IP CURLINFO_EFFECTIVE_URL
Pass a pointer to a 'char *' to receive the last used effective URL.
Pass a pointer to a char pointer to receive the last used effective URL.
.IP CURLINFO_RESPONSE_CODE
Pass a pointer to a long to receive the last received HTTP or FTP code. This
option was known as CURLINFO_HTTP_CODE in libcurl 7.10.7 and earlier. This
@@ -140,15 +140,15 @@ if the size isn't known.
Pass a pointer to a double to receive the specified size of the upload. Since
7.19.4, this returns -1 if the size isn't known.
.IP CURLINFO_CONTENT_TYPE
Pass a pointer to a 'char *' to receive the content-type of the downloaded
Pass a pointer to a char pointer to receive the content-type of the downloaded
object. This is the value read from the Content-Type: field. If you get NULL,
it means that the server didn't send a valid Content-Type header or that the
protocol used doesn't support this.
.IP CURLINFO_PRIVATE
Pass a pointer to a 'char *' to receive the pointer to the private data
Pass a pointer to a char pointer to receive the pointer to the private data
associated with the curl handle (set with the CURLOPT_PRIVATE option to
\fIcurl_easy_setopt(3)\fP). Please note that for internal reasons, the
value is returned as a 'char *', although effectively being a 'void *'.
value is returned as a char pointer, although effectively being a 'void *'.
(Added in 7.10.3)
.IP CURLINFO_HTTPAUTH_AVAIL
Pass a pointer to a long to receive a bitmask indicating the authentication
@@ -188,10 +188,10 @@ libcurl close the socket and cleanup other resources associated with the
handle. This is typically used in combination with \fICURLOPT_CONNECT_ONLY\fP.
(Added in 7.15.2)
.IP CURLINFO_FTP_ENTRY_PATH
Pass a pointer to a 'char *' to receive a pointer to a string holding the path
of the entry path. That is the initial path libcurl ended up in when logging
on to the remote FTP server. This stores a NULL as pointer if something is
wrong. (Added in 7.15.4)
Pass a pointer to a char pointer to receive a pointer to a string holding the
path of the entry path. That is the initial path libcurl ended up in when
logging on to the remote FTP server. This stores a NULL as pointer if
something is wrong. (Added in 7.15.4)
.IP CURLINFO_CERTINFO
Pass a pointer to a 'struct curl_certinfo *' and you'll get it set to point to
struct that holds a number of linked lists with info about the certificate
@@ -209,7 +209,7 @@ this returns a 1 you know that the reason you didn't get data in return is
because it didn't fulfill the condition. The long ths argument points to will
get a zero stored if the condition instead was met. (Added in 7.19.4)
.SH TIMES
.NF
.nf
An overview of the six time values available from curl_easy_getinfo()
curl_easy_perform()
@@ -221,7 +221,7 @@ curl_easy_perform()
|--|--|--|--|--STARTTRANSFER
|--|--|--|--|--|--TOTAL
|--|--|--|--|--|--REDIRECT
.FI
.fi
.IP NAMELOOKUP
\fICURLINFO_NAMELOOKUP_TIME\fP. The time it took from the start until the name
resolving was completed.

View File

@@ -189,8 +189,11 @@ uploaded bytes with the normal read function/callback). It is also called to
rewind a stream when doing a HTTP PUT or POST with a multi-pass authentication
method. The function shall work like "fseek" or "lseek" and accepted SEEK_SET,
SEEK_CUR and SEEK_END as argument for origin, although (in 7.18.0) libcurl
only passes SEEK_SET. The callback must return 0 on success as returning
something else will cause the upload operation to fail.
only passes SEEK_SET. The callback must return 0 (CURL_SEEKFUNC_OK) on
success, 1 (CURL_SEEKFUNC_FAIL) to cause the upload operation to fail or 2
(CURL_SEEKFUNC_CANTSEEK) to indicate that while the seek failed, libcurl is
free to work around the problem if possible. The latter can sometimes be done
by instead reading from the input or similar.
If you forward the input arguments directly to "fseek" or "lseek", note that
the data type for \fIoffset\fP is not the same as defined for curl_off_t on
@@ -208,9 +211,10 @@ currently only one value is supported: \fICURLSOCKTYPE_IPCXN\fP for the
primary connection (meaning the control connection in the FTP case). Future
versions of libcurl may support more purposes. It passes the newly created
socket descriptor so additional setsockopt() calls can be done at the user's
discretion. A non-zero return code from the callback function will signal an
unrecoverable error to the library and it will close the socket and return
\fICURLE_COULDNT_CONNECT\fP. (Option added in 7.15.6.)
discretion. Return 0 (zero) from the callback on success. Return 1 from the
callback function to signal an unrecoverable error to the library and it will
close the socket and return \fICURLE_COULDNT_CONNECT\fP. (Option added in
7.15.6.)
.IP CURLOPT_SOCKOPTDATA
Pass a pointer that will be untouched by libcurl and passed as the first
argument in the sockopt callback set with \fICURLOPT_SOCKOPTFUNCTION\fP.
@@ -231,9 +235,9 @@ at the user's discretion. \fICURL_SOCKET_BAD\fP return value from the
callback function will signal an unrecoverable error to the library and it
will return \fICURLE_COULDNT_CONNECT\fP. This return code can be used for IP
address blacklisting. The default behavior is:
.Bd -literal -offset indent
.nf
return socket(addr->family, addr->socktype, addr->protocol);
.Ed
.fi
(Option added in 7.17.1.)
.IP CURLOPT_OPENSOCKETDATA
Pass a pointer that will be untouched by libcurl and passed as the first
@@ -1077,11 +1081,11 @@ rename, rm, rmdir, symlink (see
.BR curl (1))
(SFTP support added in 7.16.3)
.IP CURLOPT_POSTQUOTE
Pass a pointer to a linked list of FTP or SFTP commands to pass to the
server after your FTP transfer request. The linked list should be a
fully valid list of struct curl_slist structs properly filled in as
described for \fICURLOPT_QUOTE\fP. Disable this operation again by
setting a NULL to this option.
Pass a pointer to a linked list of FTP or SFTP commands to pass to the server
after your FTP transfer request. The commands will only be run if no error
occurred. The linked list should be a fully valid list of struct curl_slist
structs properly filled in as described for \fICURLOPT_QUOTE\fP. Disable this
operation again by setting a NULL to this option.
.IP CURLOPT_PREQUOTE
Pass a pointer to a linked list of FTP commands to pass to the server after
the transfer type is set. The linked list should be a fully valid list of
@@ -1726,8 +1730,9 @@ Pass a share handle as a parameter. The share handle must have been created by
a previous call to \fIcurl_share_init(3)\fP. Setting this option, will make
this curl handle use the data from the shared handle instead of keeping the
data to itself. This enables several curl handles to share data. If the curl
handles are used simultaneously, you \fBMUST\fP use the locking methods in the
share handle. See \fIcurl_share_setopt(3)\fP for details.
handles are used simultaneously in multiple threads, you \fBMUST\fP use the
locking methods in the share handle. See \fIcurl_share_setopt(3)\fP for
details.
If you add a share that is set to share cookies, your easy handle will use
that cookie cache and get the cookie engine enabled. If you unshare an object

View File

@@ -34,7 +34,7 @@ If more involved information is wanted, the particular "easy handle" in
present in that struct and can thus be used in subsequent regular
\fIcurl_easy_getinfo(3)\fP calls (or similar):
.NF
.nf
struct CURLMsg {
CURLMSG msg; /* what this message means */
CURL *easy_handle; /* the handle it concerns */
@@ -43,7 +43,7 @@ present in that struct and can thus be used in subsequent regular
CURLcode result; /* return code for transfer */
} data;
};
.fi
When \fBmsg\fP is \fICURLMSG_DONE\fP, the message identifies a transfer that
is done, and then \fBresult\fP contains the return code for the easy handle
that just completed.

View File

@@ -15,8 +15,9 @@ specified easy handle be removed from this multi handle's control.
When the easy handle has been removed from a multi stack, it is again
perfectly legal to invoke \fIcurl_easy_perform()\fP on this easy handle.
Removing a handle while being used, will effectively halt all transfers in
progress.
Removing an easy handle while being used, will effectively halt the transfer
in progress involving that easy handle. All other easy handles and transfers
will remain unaffected.
.SH RETURN VALUE
CURLMcode type, general libcurl multi interface error code.
.SH "SEE ALSO"

View File

@@ -6,14 +6,6 @@ curl_multi_socket \- reads/writes available data
.SH SYNOPSIS
.nf
#include <curl/curl.h>
CURLMcode curl_multi_socket_action(CURLM * multi_handle,
curl_socket_t sockfd, int ev_bitmask,
int *running_handles);
.fi
.B "Now deprecated versions:"
.nf
CURLMcode curl_multi_socket(CURLM * multi_handle, curl_socket_t sockfd,
int *running_handles);
@@ -21,19 +13,8 @@ CURLMcode curl_multi_socket_all(CURLM *multi_handle,
int *running_handles);
.fi
.SH DESCRIPTION
Alternative versions of \fIcurl_multi_perform(3)\fP that allows the
application to pass in the file descriptor/socket that has been detected to
have \&"action" on it and let libcurl perform. This lets libcurl avoid having
to scan through all possible file descriptors to check for action.
When the application has detected action on a socket handled by libcurl, it
should call \fIcurl_multi_socket_action(3)\fP with the \fBsockfd\fP argument
set to the socket with the action. When the events on a socket are known, they
can be passed as an events bitmask \fBev_bitmask\fP by first setting
\fBev_bitmask\fP to 0, and then adding using bitwise OR (|) any combination of
events to be chosen from CURL_CSELECT_IN, CURL_CSELECT_OUT or
CURL_CSELECT_ERR. When the events on a socket are unknown, pass 0 instead, and
libcurl will test the descriptor internally.
These functions are deprecated. Do not use! See
\fIcurl_multi_socket_action(3)\fP instead!
At return, the integer \fBrunning_handles\fP points to will contain the number
of still running easy handles within the multi handle. When this number

View File

@@ -0,0 +1,132 @@
.\" $Id$
.\"
.TH curl_multi_socket_action 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual"
.SH NAME
curl_multi_socket_action \- reads/writes available data given an action
.SH SYNOPSIS
.nf
#include <curl/curl.h>
CURLMcode curl_multi_socket_action(CURLM * multi_handle,
curl_socket_t sockfd, int ev_bitmask,
int *running_handles);
.fi
.SH DESCRIPTION
When the application has detected action on a socket handled by libcurl, it
should call \fIcurl_multi_socket_action(3)\fP with the \fBsockfd\fP argument
set to the socket with the action. When the events on a socket are known, they
can be passed as an events bitmask \fBev_bitmask\fP by first setting
\fBev_bitmask\fP to 0, and then adding using bitwise OR (|) any combination of
events to be chosen from CURL_CSELECT_IN, CURL_CSELECT_OUT or
CURL_CSELECT_ERR. When the events on a socket are unknown, pass 0 instead, and
libcurl will test the descriptor internally.
At return, the integer \fBrunning_handles\fP points to will contain the number
of still running easy handles within the multi handle. When this number
reaches zero, all transfers are complete/done. Note that when you call
\fIcurl_multi_socket_action(3)\fP on a specific socket and the counter
decreases by one, it DOES NOT necessarily mean that this exact socket/transfer
is the one that completed. Use \fIcurl_multi_info_read(3)\fP to figure out
which easy handle that completed.
The \fBcurl_multi_socket_action(3)\fP functions inform the application about
updates in the socket (file descriptor) status by doing none, one, or multiple
calls to the socket callback function set with the CURLMOPT_SOCKETFUNCTION
option to \fIcurl_multi_setopt(3)\fP. They update the status with changes
since the previous time the callback was called.
Get the timeout time by setting the \fICURLMOPT_TIMERFUNCTION\fP option with
\fIcurl_multi_setopt(3)\fP. Your application will then get called with
information on how long to wait for socket actions at most before doing the
timeout action: call the \fBcurl_multi_socket_action(3)\fP function with the
\fBsockfd\fP argument set to CURL_SOCKET_TIMEOUT. You can also use the
\fIcurl_multi_timeout(3)\fP function to poll the value at any given time, but
for an event-based system using the callback is far better than relying on
polling the timeout value.
.SH "CALLBACK DETAILS"
The socket \fBcallback\fP function uses a prototype like this
.nf
int curl_socket_callback(CURL *easy, /* easy handle */
curl_socket_t s, /* socket */
int action, /* see values below */
void *userp, /* private callback pointer */
void *socketp); /* private socket pointer */
.fi
The callback MUST return 0.
The \fIeasy\fP argument is a pointer to the easy handle that deals with this
particular socket. Note that a single handle may work with several sockets
simultaneously.
The \fIs\fP argument is the actual socket value as you use it within your
system.
The \fIaction\fP argument to the callback has one of five values:
.RS
.IP "CURL_POLL_NONE (0)"
register, not interested in readiness (yet)
.IP "CURL_POLL_IN (1)"
register, interested in read readiness
.IP "CURL_POLL_OUT (2)"
register, interested in write readiness
.IP "CURL_POLL_INOUT (3)"
register, interested in both read and write readiness
.IP "CURL_POLL_REMOVE (4)"
unregister
.RE
The \fIsocketp\fP argument is a private pointer you have previously set with
\fIcurl_multi_assign(3)\fP to be associated with the \fIs\fP socket. If no
pointer has been set, socketp will be NULL. This argument is of course a
service to applications that want to keep certain data or structs that are
strictly associated to the given socket.
The \fIuserp\fP argument is a private pointer you have previously set with
\fIcurl_multi_setopt(3)\fP and the CURLMOPT_SOCKETDATA option.
.SH "RETURN VALUE"
CURLMcode type, general libcurl multi interface error code.
Legacy: If you receive \fICURLM_CALL_MULTI_PERFORM\fP, this basically means
that you should call \fIcurl_multi_socket_action(3)\fP again, before you wait
for more actions on libcurl's sockets. You don't have to do it immediately,
but the return code means that libcurl may have more data available to return
or that there may be more data to send off before it is "satisfied".
In modern libcurls, \fICURLM_CALL_MULTI_PERFORM\fP or
\fICURLM_CALL_MULTI_SOKCET\fP should not be returned and no application needs
to care about them.
NOTE that the return code is for the whole multi stack. Problems still might have
occurred on individual transfers even when one of these functions
return OK.
.SH "TYPICAL USAGE"
1. Create a multi handle
2. Set the socket callback with CURLMOPT_SOCKETFUNCTION
3. Set the timeout callback with CURLMOPT_TIMERFUNCTION, to get to know what
timeout value to use when waiting for socket activities.
4. Add easy handles with curl_multi_add_handle()
5. Provide some means to manage the sockets libcurl is using, so you can check
them for activity. This can be done through your application code, or by way
of an external library such as libevent or glib.
6. Wait for activity on any of libcurl's sockets, use the timeout value your
callback has been told
7, When activity is detected, call curl_multi_socket_action() for the
socket(s) that got action. If no activity is detected and the timeout expires,
call \fIcurl_multi_socket_action(3)\fP with \fICURL_SOCKET_TIMEOUT\fP
8. Go back to step 6.
.SH AVAILABILITY
This function was added in libcurl 7.15.4, and is deemed stable since 7.16.0.
.SH "SEE ALSO"
.BR curl_multi_cleanup "(3), " curl_multi_init "(3), "
.BR curl_multi_fdset "(3), " curl_multi_info_read "(3), "
.BR "the hiperfifo.c example"

View File

@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -124,7 +124,7 @@ applications to not only avoid being forced to use select(), but it also
offers a much more high-performance API that will make a significant difference
for applications using large numbers of simultaneous connections.
\fIcurl_multi_socket(3)\fP (and \fIcurl_multi_socket_all(3)\fP) is then used
\fIcurl_multi_socket_action(3)\fP is then used
instead of \fIcurl_multi_perform(3)\fP.
.SH "BLOCKING"
A few areas in the code are still using blocking code, even when used from the
@@ -136,6 +136,8 @@ the future, you should be aware of the following current restrictions:
- GnuTLS SSL connections
- Active FTP connections
- HTTP proxy CONNECT operations
- SOCKS proxy handshakes
- TFTP transfers
- file:// transfers
- TELNET transfers
.fi

View File

@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
.\" * $Id$
.\" **************************************************************************
.\"
.TH libcurl-tutorial 3 "17 Nov 2008" "libcurl" "libcurl programming"
.TH libcurl-tutorial 3 "4 Mar 2009" "libcurl" "libcurl programming"
.SH NAME
libcurl-tutorial \- libcurl programming tutorial
.SH "Objective"
@@ -200,7 +200,7 @@ Using that property, you can easily pass local data between your application
and the function that gets invoked by libcurl. libcurl itself won't touch the
data you pass with \fICURLOPT_WRITEDATA\fP.
libcurl offers its own default internal callback that'll take care of the data
libcurl offers its own default internal callback that will take care of the data
if you don't set the callback with \fICURLOPT_WRITEFUNCTION\fP. It will then
simply output the received data to stdout. You can have the default callback
write the data to a different file handle by passing a 'FILE *' to a file
@@ -381,7 +381,7 @@ them URL encoded, as %XX where XX is a two-digit hexadecimal number.
libcurl also provides options to set various passwords. The user name and
password as shown embedded in the URL can instead get set with the
CURLOPT_USERPWD option. The argument passed to libcurl should be a char * to
a string in the format "user:password:". In a manner like this:
a string in the format "user:password". In a manner like this:
curl_easy_setopt(easyhandle, CURLOPT_USERPWD, "myname:thesecret");
@@ -557,7 +557,7 @@ post handle:
curl_easy_perform(easyhandle); /* post away! */
curl_formfree(post); /* free post */
curl_slist_free_all(post); /* free custom header list */
curl_slist_free_all(headers); /* free custom header list */
.fi
Since all options on an easyhandle are "sticky", they remain the same until
@@ -667,14 +667,14 @@ default to assume a HTTP proxy):
.IP "Environment Variables"
libcurl automatically checks and uses a set of environment variables to
know what proxies to use for certain protocols. The names of the variables
are following an ancient de facto standard and are built up as
"[protocol]_proxy" (note the lower casing). Which makes the variable
'http_proxy' checked for a name of a proxy to use when the input URL is
HTTP. Following the same rule, the variable named 'ftp_proxy' is checked
for FTP URLs. Again, the proxies are always HTTP proxies, the different
names of the variables simply allows different HTTP proxies to be used.
libcurl automatically checks and uses a set of environment variables to know
what proxies to use for certain protocols. The names of the variables are
following an ancient de facto standard and are built up as "[protocol]_proxy"
(note the lower casing). Which makes the variable \&'http_proxy' checked for a
name of a proxy to use when the input URL is HTTP. Following the same rule,
the variable named 'ftp_proxy' is checked for FTP URLs. Again, the proxies are
always HTTP proxies, the different names of the variables simply allows
different HTTP proxies to be used.
The proxy environment variable contents should be in the format
\&"[protocol://][user:password@]machine[:port]". Where the protocol:// part is
@@ -738,24 +738,24 @@ stand in the way for such innovative actions either!
.IP "Proxy Auto-Config"
Netscape first came up with this. It is basically a web page (usually using a
\&.pac extension) with a javascript that when executed by the browser with the
\&.pac extension) with a Javascript that when executed by the browser with the
requested URL as input, returns information to the browser on how to connect
to the URL. The returned information might be "DIRECT" (which means no proxy
should be used), "PROXY host:port" (to tell the browser where the proxy for
this particular URL is) or "SOCKS host:port" (to direct the browser to a SOCKS
proxy).
libcurl has no means to interpret or evaluate javascript and thus it doesn't
libcurl has no means to interpret or evaluate Javascript and thus it doesn't
support this. If you get yourself in a position where you face this nasty
invention, the following advice have been mentioned and used in the past:
- Depending on the javascript complexity, write up a script that translates it
- Depending on the Javascript complexity, write up a script that translates it
to another language and execute that.
- Read the javascript code and rewrite the same logic in another language.
- Read the Javascript code and rewrite the same logic in another language.
- Implement a javascript interpreted, people have successfully used the
Mozilla javascript engine in the past.
- Implement a Javascript interpreted, people have successfully used the
Mozilla Javascript engine in the past.
- Ask your admins to stop this, for a static proxy setup or similar.
@@ -836,7 +836,7 @@ If just changing the actual HTTP request keyword is what you want, like when
GET, HEAD or POST is not good enough for you, CURLOPT_CUSTOMREQUEST is there
for you. It is very simple to use:
curl_easy_setopt(easyhandle, CURLOPT_CUSTOMREQUEST, "MYOWNRUQUEST");
curl_easy_setopt(easyhandle, CURLOPT_CUSTOMREQUEST, "MYOWNREQUEST");
When using the custom request, you change the request keyword of the actual
request you are performing. Thus, by default you make a GET request but you can
@@ -908,7 +908,7 @@ Sending custom commands to a FTP server means that you need to send the
commands exactly as the FTP server expects them (RFC959 is a good guide
here), and you can only use commands that work on the control-connection
alone. All kinds of commands that require data interchange and thus need
a data-connection must be left to libcurl's own judgment. Also be aware
a data-connection must be left to libcurl's own judgement. Also be aware
that libcurl will do its very best to change directory to the target
directory before doing any transfer, so if you change directory (with CWD
or similar) you might confuse libcurl and then it might not attempt to
@@ -1062,20 +1062,32 @@ actually true headers, but in this case we pretend they are! ;-)
.SH "Security Considerations"
libcurl is in itself not insecure. If used the right way, you can use libcurl
to transfer data pretty safely.
The libcurl project takes security seriously. The library is written with
caution and precautions are taken to mitigate many kinds of risks encountered
while operating with potentially malicious servers on the Internet. It is a
powerful library, however, which allows application writers to make trade offs
between ease of writing and exposure to potential risky operations. If
used the right way, you can use libcurl to transfer data pretty safely.
There are of course many things to consider that may loosen up this
situation:
Many applications are used in closed networks where users and servers
can be trusted, but many others are used on arbitrary servers and are fed
input from potentially untrusted users. Following is a discussion about
some risks in the ways in which applications commonly use libcurl and
potential mitigations of those risks. It is by no means comprehensive, but
shows classes of attacks that robust applications should consider. The
Common Weakness Enumeration project at http://cwe.mitre.org/ is a good
reference for many of these and similar types of weaknesses of which
application writers should be aware.
.IP "Command Lines"
If you use a command line tool (such as curl) that uses libcurl, and you give
option to the tool on the command line those options can very likely get read
options to the tool on the command line those options can very likely get read
by other users of your system when they use 'ps' or other tools to list
currently running processes.
To avoid this problem, never feed sensitive things to programs using command
line options.
line options. Write them to a protected file and use the \-K option to
avoid this.
.IP ".netrc"
\&.netrc is a pretty handy file/feature that allows you to login quickly and
@@ -1091,14 +1103,143 @@ plain text anywhere.
.IP "Clear Text Passwords"
Many of the protocols libcurl supports send name and password unencrypted as
clear text (HTTP Basic authentication, FTP, TELNET etc). It is very easy for
anyone on your network or a network nearby yours, to just fire up a network
anyone on your network or a network nearby yours to just fire up a network
analyzer tool and eavesdrop on your passwords. Don't let the fact that HTTP
Basic uses base64 encoded passwords fool you. They may not look readable at a
first glance, but they very easily "deciphered" by anyone within seconds.
To avoid this problem, use HTTP athentication methods or other protocols that
To avoid this problem, use HTTP authentication methods or other protocols that
don't let snoopers see your password: HTTP with Digest, NTLM or GSS
authentication, HTTPS, FTPS, SCP, SFTP and FTP-kerberos are a few examples.
authentication, HTTPS, FTPS, SCP, SFTP and FTP-Kerberos are a few examples.
.IP "Redirects"
The CURLOPT_FOLLOWLOCATION option automatically follows HTTP redirects sent
by a remote server. These redirects can refer to any kind of URL, not just
HTTP. A redirect to a file: URL would cause the libcurl to read (or write)
arbitrary files from the local filesystem. If the application returns
the data back to the user (as would happen in some kinds of CGI scripts),
an attacker could leverage this to read otherwise forbidden data (e.g.
file://localhost/etc/passwd).
If authentication credentials are stored in the ~/.netrc file, or Kerberos
is in use, any other URL type (not just file:) that requires
authentication is also at risk. A redirect such as
ftp://some-internal-server/private-file would then return data even when
the server is password protected.
In the same way, if an unencrypted SSH private key has been configured for
the user running the libcurl application, SCP: or SFTP: URLs could access
password or private-key protected resources,
e.g. sftp://user@some-internal-server/etc/passwd
The CURLOPT_REDIR_PROTOCOLS and CURLOPT_NETRC options can be used to
mitigate against this kind of attack.
A redirect can also specify a location available only on the machine running
libcurl, including servers hidden behind a firewall from the attacker.
e.g. http://127.0.0.1/ or http://intranet/delete-stuff.cgi?delete=all or
tftp://bootp-server/pc-config-data
Apps can mitigate against this by disabling CURLOPT_FOLLOWLOCATION and
handling redirects itself, sanitizing URLs as necessary. Alternately, an
app could leave CURLOPT_FOLLOWLOCATION enabled but set CURLOPT_REDIR_PROTOCOLS
and install a CURLOPT_OPENSOCKETFUNCTION callback function in which addresses
are sanitized before use.
.IP "Private Resources"
A user who can control the DNS server of a domain being passed in within
a URL can change the address of the host to a local, private address
which the libcurl application will then use. e.g. The innocuous URL
http://fuzzybunnies.example.com/ could actually resolve to the IP address
of a server behind a firewall, such as 127.0.0.1 or 10.1.2.3
Apps can mitigate against this by setting a CURLOPT_OPENSOCKETFUNCTION
and checking the address before a connection.
All the malicious scenarios regarding redirected URLs apply just as well
to non-redirected URLs, if the user is allowed to specify an arbitrary URL
that could point to a private resource. For example, a web app providing
a translation service might happily translate file://localhost/etc/passwd
and display the result. Apps can mitigate against this with the
CURLOPT_PROTOCOLS option as well as by similar mitigation techniques for
redirections.
A malicious FTP server could in response to the PASV command return an
IP address and port number for a server local to the app running libcurl
but behind a firewall. Apps can mitigate against this by using the
CURLOPT_FTP_SKIP_PASV_IP option or CURLOPT_FTPPORT.
.IP Uploads
When uploading, a redirect can cause a local (or remote) file to be
overwritten. Apps must not allow any unsanitized URL to be passed in
for uploads. Also, CURLOPT_FOLLOWLOCATION should not be used on uploads.
Instead, the app should handle redirects itself, sanitizing each URL first.
.IP Authentication
Use of CURLOPT_UNRESTRICTED_AUTH could cause authentication information to
be sent to an unknown second server. Apps can mitigate against this
by disabling CURLOPT_FOLLOWLOCATION and handling redirects itself,
sanitizing where necessary.
Use of the CURLAUTH_ANY option to CURLOPT_HTTPAUTH could result in user
name and password being sent in clear text to an HTTP server. Instead,
use CURLAUTH_ANYSAFE which ensures that the password is encrypted over
the network, or else fail the request.
Use of the CURLUSESSL_TRY option to CURLOPT_USE_SSL could result in user
name and password being sent in clear text to an FTP server. Instead,
use CURLUSESSL_CONTROL to ensure that an encrypted connection is used or
else fail the request.
.IP Cookies
If cookies are enabled and cached, then a user could craft a URL which
performs some malicious action to a site whose authentication is already
stored in a cookie. e.g. http://mail.example.com/delete-stuff.cgi?delete=all
Apps can mitigate against this by disabling cookies or clearing them
between requests.
.IP "Dangerous URLs"
SCP URLs can contain raw commands within the scp: URL, which is a side effect
of how the SCP protocol is designed. e.g.
scp://user:pass@host/a;date >/tmp/test;
Apps must not allow unsanitized SCP: URLs to be passed in for downloads.
.IP "Denial of Service"
A malicious server could cause libcurl to effectively hang by sending
a trickle of data through, or even no data at all but just keeping the TCP
connection open. This could result in a denial-of-service attack. The
CURLOPT_TIMEOUT and/or CURLOPT_LOW_SPEED_LIMIT options can be used to
mitigate against this.
A malicious server could cause libcurl to effectively hang by starting to
send data, then severing the connection without cleanly closing the
TCP connection. The app could install a CURLOPT_SOCKOPTFUNCTION callback
function and set the TCP SO_KEEPALIVE option to mitigate against this.
Setting one of the timeout options would also work against this attack.
A malicious server could cause libcurl to download an infinite amount of
data, potentially causing all of memory or disk to be filled. Setting
the CURLOPT_MAXFILESIZE_LARGE option is not sufficient to guard against this.
Instead, the app should monitor the amount of data received within the
write or progress callback and abort once the limit is reached.
A malicious HTTP server could cause an infinite redirection loop, causing a
denial-of-service. This can be mitigated by using the CURLOPT_MAXREDIRS
option.
.IP "Arbitrary Headers"
User-supplied data must be sanitized when used in options like
CURLOPT_USERAGENT, CURLOPT_HTTPHEADER, CURLOPT_POSTFIELDS and others that
are used to generate structured data. Characters like embedded carriage
returns or ampersands could allow the user to create additional headers or
fields that could cause malicious transactions.
.IP "Server Certificates"
A secure application should never use the CURLOPT_SSL_VERIFYPEER option to
disable certificate validation. There are numerous attacks that are enabled
by apps that fail to properly validate server TLS/SSL certificates,
thus enabling a malicious server to spoof a legitimate one. HTTPS without
validated certificates is potentially as insecure as a plain HTTP connection.
.IP "Showing What You Do"
On a related issue, be aware that even in situations like when you have
problems with libcurl and ask someone for help, everything you reveal in order

View File

@@ -19,6 +19,95 @@ CURLAUTH_DIGEST 7.10.6
CURLAUTH_DIGEST_IE 7.19.3
CURLAUTH_GSSNEGOTIATE 7.10.6
CURLAUTH_NTLM 7.10.6
CURLCLOSEPOLICY_CALLBACK 7.7
CURLCLOSEPOLICY_LEAST_RECENTLY_USED 7.7
CURLCLOSEPOLICY_LEAST_TRAFFIC 7.7
CURLCLOSEPOLICY_OLDEST 7.7
CURLCLOSEPOLICY_SLOWEST 7.7
CURLE_ABORTED_BY_CALLBACK 7.1
CURLE_AGAIN 7.18.2
CURLE_BAD_CALLING_ORDER 7.1 7.17.0
CURLE_BAD_CONTENT_ENCODING 7.10
CURLE_BAD_FUNCTION_ARGUMENT 7.1
CURLE_BAD_PASSWORD_ENTERED - 7.17.0
CURLE_COULDNT_CONNECT 7.1
CURLE_COULDNT_RESOLVE_HOST 7.1
CURLE_COULDNT_RESOLVE_PROXY 7.1
CURLE_FAILED_INIT 7.1
CURLE_FILESIZE_EXCEEDED 7.10.8
CURLE_FILE_COULDNT_READ_FILE 7.1
CURLE_FTP_ACCESS_DENIED 7.1
CURLE_FTP_BAD_DOWNLOAD_RESUME 7.1
CURLE_FTP_CANT_GET_HOST 7.1
CURLE_FTP_CANT_RECONNECT 7.1 7.17.0
CURLE_FTP_COULDNT_GET_SIZE 7.1 7.17.0
CURLE_FTP_COULDNT_RETR_FILE 7.1
CURLE_FTP_COULDNT_SET_ASCII 7.1 7.17.0
CURLE_FTP_COULDNT_SET_BINARY 7.1 7.17.0
CURLE_FTP_COULDNT_SET_TYPE 7.17.0
CURLE_FTP_COULDNT_STOR_FILE 7.1
CURLE_FTP_COULDNT_USE_REST 7.1
CURLE_FTP_PORT_FAILED 7.1
CURLE_FTP_QUOTE_ERROR 7.1 7.17.0
CURLE_FTP_SSL_FAILED - 7.17.0
CURLE_FTP_USER_PASSWORD_INCORRECT 7.1 7.17.0
CURLE_FTP_WEIRD_227_FORMAT 7.1
CURLE_FTP_WEIRD_PASS_REPLY 7.1
CURLE_FTP_WEIRD_PASV_REPLY 7.1
CURLE_FTP_WEIRD_SERVER_REPLY 7.1
CURLE_FTP_WEIRD_USER_REPLY 7.1 7.17.0
CURLE_FTP_WRITE_ERROR 7.1 7.17.0
CURLE_FUNCTION_NOT_FOUND 7.1
CURLE_GOT_NOTHING 7.9.1
CURLE_HTTP_NOT_FOUND 7.1
CURLE_HTTP_PORT_FAILED - 7.12.0
CURLE_HTTP_POST_ERROR 7.1
CURLE_HTTP_RANGE_ERROR 7.1 7.17.0
CURLE_INTERFACE_FAILED 7.12.0
CURLE_LDAP_CANNOT_BIND 7.1
CURLE_LDAP_INVALID_URL 7.10.8
CURLE_LDAP_SEARCH_FAILED 7.1
CURLE_LIBRARY_NOT_FOUND 7.1 7.17.0
CURLE_MALFORMAT_USER 7.1 7.17.0
CURLE_OK 7.1
CURLE_OPERATION_TIMEDOUT 7.17.0
CURLE_OPERATION_TIMEOUTED 7.1 7.17.0
CURLE_OUT_OF_MEMORY 7.1
CURLE_PARTIAL_FILE 7.1
CURLE_PEER_FAILED_VERIFICATION - 7.17.1
CURLE_QUOTE_ERROR 7.17.0
CURLE_RANGE_ERROR 7.17.0
CURLE_READ_ERROR 7.1
CURLE_RECV_ERROR 7.13.0
CURLE_REMOTE_ACCESS_DENIED 7.17.0
CURLE_REMOTE_DISK_FULL 7.17.0
CURLE_SEND_ERROR 7.13.0
CURLE_SHARE_IN_USE - 7.17.0
CURLE_SSH 7.16.1
CURLE_SSL_CACERT 7.10
CURLE_SSL_CERTPROBLEM 7.10
CURLE_SSL_CIPHER 7.10
CURLE_SSL_CONNECT_ERROR 7.1
CURLE_SSL_CRL_BADFILE 7.19.0
CURLE_SSL_ENGINE_INITFAILED 7.13.0
CURLE_SSL_ENGINE_NOTFOUND 7.9.3
CURLE_SSL_ENGINE_SETFAILED 7.9.3
CURLE_SSL_ISSUER_ERROR 7.19.0
CURLE_SSL_PEER_CERTIFICATE 7.17.1
CURLE_SSL_SHUTDOWN_FAILED 7.16.1
CURLE_TELNET_OPTION_SYNTAX 7.7
CURLE_TFTP_DISKFULL 7.15.0 7.17.0
CURLE_TFTP_EXISTS 7.15.0 7.17.0
CURLE_TFTP_ILLEGAL 7.15.0
CURLE_TFTP_NOSUCHUSER 7.15.0
CURLE_TFTP_UNKNOWNID 7.15.0
CURLE_TOO_MANY_REDIRECTS 7.5
CURLE_UNKNOWN_TELNET_OPTION 7.7
CURLE_UNSUPPORTED_PROTOCOL 7.1
CURLE_URL_MALFORMAT 7.1
CURLE_URL_MALFORMAT_USER 7.1 7.17.0
CURLE_USE_SSL_FAILED 7.17.0
CURLE_WRITE_ERROR 7.1
CURLFTPAUTH_DEFAULT 7.12.2
CURLFTPAUTH_DEFAULT 7.12.2
CURLFTPAUTH_SSL 7.12.2
@@ -28,9 +117,13 @@ CURLFTPAUTH_TLS 7.12.2
CURLFTPMETHOD_MULTICWD 7.15.1
CURLFTPMETHOD_NOCWD 7.15.1
CURLFTPMETHOD_SINGLECWD 7.15.1
CURLFTPSSL_ALL - 7.17.0
CURLFTPSSL_CCC_ACTIVE 7.16.1
CURLFTPSSL_CCC_NONE 7.16.1
CURLFTPSSL_CCC_PASSIVE 7.16.1
CURLFTPSSL_CONTROL 7.11.0 7.17.0
CURLFTPSSL_NONE 7.11.0 7.17.0
CURLFTPSSL_TRY 7.11.0 7.17.0
CURLFTP_CREATE_DIR 7.19.4
CURLFTP_CREATE_DIR_NONE 7.19.4
CURLFTP_CREATE_DIR_RETRY 7.19.4
@@ -44,6 +137,7 @@ CURLINFO_CONTENT_TYPE 7.9.4
CURLINFO_COOKIELIST 7.14.1
CURLINFO_DATA_IN 7.9.6
CURLINFO_DATA_OUT 7.9.6
CURLINFO_EFFECTIVE_URL 7.3
CURLINFO_FILETIME 7.5
CURLINFO_FTP_ENTRY_PATH 7.15.4
CURLINFO_HEADER_IN 7.9.6
@@ -75,6 +169,14 @@ CURLINFO_SSL_VERIFYRESULT 7.5
CURLINFO_STARTTRANSFER_TIME 7.9.2
CURLINFO_TEXT 7.9.6
CURLINFO_TOTAL_TIME 7.4.1
CURLMSG_DONE 7.9.6
CURLM_BAD_EASY_HANDLE 7.9.6
CURLM_BAD_HANDLE 7.9.6
CURLM_CALL_MULTI_PERFORM 7.9.6
CURLM_CALL_MULTI_SOCKET 7.15.5
CURLM_INTERNAL_ERROR 7.9.6
CURLM_OK 7.9.6
CURLM_OUT_OF_MEMORY 7.9.6
CURLOPT_ADDRESS_SCOPE 7.19.0
CURLOPT_APPEND 7.16.4
CURLOPT_AUTOREFERER 7.1
@@ -150,9 +252,9 @@ CURLOPT_IOCTLDATA 7.12.3
CURLOPT_IOCTLFUNCTION 7.12.3
CURLOPT_IPRESOLVE 7.10.8
CURLOPT_ISSUERCERT 7.19.0
CURLOPT_KEYPASSWD 7.17.0
CURLOPT_KRB4LEVEL 7.3
CURLOPT_KRBLEVEL 7.16.4
CURLOPT_KEYPASSWD - 7.17.0
CURLOPT_KRB4LEVEL 7.3 7.17.0
CURLOPT_KRBLEVEL 7.17.0
CURLOPT_LOCALPORT 7.15.2
CURLOPT_LOCALPORTRANGE 7.15.2
CURLOPT_LOW_SPEED_LIMIT 7.1
@@ -230,11 +332,13 @@ CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 7.17.1
CURLOPT_SSH_PRIVATE_KEYFILE 7.16.1
CURLOPT_SSH_PUBLIC_KEYFILE 7.16.1
CURLOPT_SSLCERT 7.1
CURLOPT_SSLCERTPASSWD 7.17.0
CURLOPT_SSLCERTTYPE 7.9.3
CURLOPT_SSLENGINE 7.9.3
CURLOPT_SSLENGINE_DEFAULT 7.9.3
CURLOPT_SSLKEY 7.9.3
CURLOPT_SSLKEYPASSWD 7.17.0
CURLOPT_SSLKEYPASSWD 7.17.0
CURLOPT_SSLKEYTYPE 7.9.3
CURLOPT_SSLVERSION 7.1
CURLOPT_SSL_CIPHER_LIST 7.9
@@ -282,10 +386,24 @@ CURLPROXY_SOCKS4 7.10
CURLPROXY_SOCKS4A 7.18.0
CURLPROXY_SOCKS5 7.10
CURLPROXY_SOCKS5_HOSTNAME 7.18.0
CURLSSH_AUTH_DEFAULT 7.16.1
CURLSSH_AUTH_HOST 7.16.1
CURLSSH_AUTH_KEYBOARD 7.16.1
CURLSSH_AUTH_NONE 7.16.1
CURLSSH_AUTH_PASSWORD 7.16.1
CURLSSH_AUTH_PUBLICKEY 7.16.1
CURLUSESSL_ALL 7.17.0
CURLUSESSL_ALL 7.17.0
CURLUSESSL_CONTROL 7.17.0
CURLUSESSL_CONTROL 7.17.0
CURLUSESSL_NONE 7.17.0
CURLUSESSL_NONE 7.17.0
CURLUSESSL_TRY 7.17.0
CURLUSESSL_TRY 7.17.0
CURLVERSION_FIRST 7.10
CURLVERSION_NOW 7.10
CURLVERSION_SECOND 7.11.1
CURLVERSION_THIRD 7.12.0
CURL_HTTP_VERSION_1_0 7.9.1
CURL_HTTP_VERSION_1_1 7.9.1
CURL_HTTP_VERSION_NONE 7.9.1
@@ -295,10 +413,16 @@ CURL_IPRESOLVE_WHATEVER 7.10.8
CURL_NETRC_IGNORED 7.9.8
CURL_NETRC_OPTIONAL 7.9.8
CURL_NETRC_REQUIRED 7.9.8
CURL_SEEKFUNC_CANTSEEK 7.19.5
CURL_SEEKFUNC_FAIL 7.19.5
CURL_SEEKFUNC_OK 7.19.5
CURL_SSLVERSION_DEFAULT 7.9.2
CURL_SSLVERSION_SSLv2 7.9.2
CURL_SSLVERSION_SSLv3 7.9.2
CURL_SSLVERSION_TLSv1 7.9.2
CURL_TIMECOND_IFMODSINCE 7.9.7
CURL_TIMECOND_IFUNMODSINCE 7.9.7
CURL_TIMECOND_LASTMOD 7.9.7
CURL_VERSION_ASYNCHDNS 7.10.7
CURL_VERSION_CONV 7.15.4
CURL_VERSION_DEBUG 7.10.6

View File

@@ -186,15 +186,21 @@ typedef size_t (*curl_write_callback)(char *buffer,
size_t nitems,
void *outstream);
/* this is the return codes for the seek callbacks */
#define CURL_SEEKFUNC_OK 0
#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */
#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so
libcurl might try other means instead */
typedef int (*curl_seek_callback)(void *instream,
curl_off_t offset,
int origin); /* 'whence' */
/* This is a return code for the read callback that, when returned, will
signal libcurl to immediately abort the current transfer. */
#define CURL_READFUNC_ABORT 0x10000000
/* This is a return code for the read callback that, when returned, will
signal libcurl to pause sending data on the current transfer. */
#define CURL_READFUNC_PAUSE 0x10000001
typedef int (*curl_seek_callback)(void *instream,
curl_off_t offset,
int origin); /* 'whence' */
typedef size_t (*curl_read_callback)(char *buffer,
size_t size,
@@ -1510,7 +1516,9 @@ CURL_EXTERN void curl_free(void *p);
* DESCRIPTION
*
* curl_global_init() should be invoked exactly once for each application that
* uses libcurl
* uses libcurl and before any call of other libcurl function.
*
* This function is not thread-safe!
*/
CURL_EXTERN CURLcode curl_global_init(long flags);

View File

@@ -0,0 +1,153 @@
#ifndef __CURL_CURLBUILD_H
#define __CURL_CURLBUILD_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* $Id$
***************************************************************************/
/* ================================================================ */
/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
/* ================================================================ */
/*
* NOTE 1:
* -------
*
* Nothing in this file is intended to be modified or adjusted by the
* curl library user nor by the curl library builder.
*
* If you think that something actually needs to be changed, adjusted
* or fixed in this file, then, report it on the libcurl development
* mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/
*
* This header file shall only export symbols which are 'curl' or 'CURL'
* prefixed, otherwise public name space would be polluted.
*
* NOTE 2:
* -------
*
* Right now you might be staring at file include/curl/curlbuild.h.in or
* at file include/curl/curlbuild.h, this is due to the following reason:
*
* On systems capable of running the configure script, the configure process
* will overwrite the distributed include/curl/curlbuild.h file with one that
* is suitable and specific to the library being configured and built, which
* is generated from the include/curl/curlbuild.h.in template file.
*
*/
/* ================================================================ */
/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
/* ================================================================ */
#ifdef CURL_SIZEOF_LONG
# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
#endif
#ifdef CURL_TYPEOF_CURL_OFF_T
# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
#endif
#ifdef CURL_FORMAT_CURL_OFF_T
# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
#endif
#ifdef CURL_FORMAT_CURL_OFF_TU
# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
#endif
#ifdef CURL_FORMAT_OFF_T
# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
#endif
#ifdef CURL_SIZEOF_CURL_OFF_T
# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
#endif
#ifdef CURL_SUFFIX_CURL_OFF_T
# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
#endif
#ifdef CURL_SUFFIX_CURL_OFF_TU
# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
#endif
/* ================================================================ */
/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
/* ================================================================ */
/* Configure process defines this to 1 when it finds out that system */
/* header file sys/types.h must be included by the external interface. */
#cmakedefine CURL_PULL_SYS_TYPES_H ${CURL_PULL_SYS_TYPES_H}
#ifdef CURL_PULL_SYS_TYPES_H
# include <sys/types.h>
#endif
/* Configure process defines this to 1 when it finds out that system */
/* header file stdint.h must be included by the external interface. */
#cmakedefine CURL_PULL_STDINT_H ${CURL_PULL_STDINT_H}
#ifdef CURL_PULL_STDINT_H
# include <stdint.h>
#endif
/* Configure process defines this to 1 when it finds out that system */
/* header file inttypes.h must be included by the external interface. */
#cmakedefine CURL_PULL_INTTYPES_H ${CURL_PULL_INTTYPES_H}
#ifdef CURL_PULL_INTTYPES_H
# include <inttypes.h>
#endif
/* The size of `long', as computed by sizeof. */
#cmakedefine CURL_SIZEOF_LONG ${CURL_SIZEOF_LONG}
/* Signed integral data type used for curl_off_t. */
#cmakedefine CURL_TYPEOF_CURL_OFF_T ${CURL_TYPEOF_CURL_OFF_T}
/* Data type definition of curl_off_t. */
typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
/* curl_off_t formatting string directive without "%" conversion specifier. */
#cmakedefine CURL_FORMAT_CURL_OFF_T ${CURL_FORMAT_CURL_OFF_T}
/* unsigned curl_off_t formatting string without "%" conversion specifier. */
#cmakedefine CURL_FORMAT_CURL_OFF_TU ${CURL_FORMAT_CURL_OFF_TU}
/* curl_off_t formatting string directive with "%" conversion specifier. */
#cmakedefine CURL_FORMAT_OFF_T ${CURL_FORMAT_OFF_T}
/* The size of `curl_off_t', as computed by sizeof. */
#cmakedefine CURL_SIZEOF_CURL_OFF_T ${CURL_SIZEOF_CURL_OFF_T}
/* curl_off_t constant suffix. */
#cmakedefine CURL_SUFFIX_CURL_OFF_T ${CURL_SUFFIX_CURL_OFF_T}
/* unsigned curl_off_t constant suffix. */
#cmakedefine CURL_SUFFIX_CURL_OFF_TU ${CURL_SUFFIX_CURL_OFF_TU}
#endif /* __CURL_CURLBUILD_H */

View File

@@ -114,6 +114,16 @@
Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
#endif
#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined
#endif
#ifdef CURL_SIZEOF_CURL_SOCKLEN_T
# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined
#endif
#ifdef CURL_TYPEOF_CURL_OFF_T
# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
@@ -155,314 +165,336 @@
#if defined(__DJGPP__) || defined(__GO32__)
# if defined(__DJGPP__) && (__DJGPP__ > 1)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# else
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
#elif defined(__SALFORDC__)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_TYPEOF_CURL_SOCKLEN_T int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
#elif defined(__BORLANDC__)
# if (__BORLANDC__ < 0x520)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# else
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T __int64
# define CURL_FORMAT_CURL_OFF_T "I64d"
# define CURL_FORMAT_CURL_OFF_TU "I64u"
# define CURL_FORMAT_OFF_T "%I64d"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T i64
# define CURL_SUFFIX_CURL_OFF_TU ui64
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T __int64
# define CURL_FORMAT_CURL_OFF_T "I64d"
# define CURL_FORMAT_CURL_OFF_TU "I64u"
# define CURL_FORMAT_OFF_T "%I64d"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T i64
# define CURL_SUFFIX_CURL_OFF_TU ui64
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
#elif defined(__TURBOC__)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_TYPEOF_CURL_SOCKLEN_T int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
#elif defined(__WATCOMC__)
# if defined(__386__)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T __int64
# define CURL_FORMAT_CURL_OFF_T "I64d"
# define CURL_FORMAT_CURL_OFF_TU "I64u"
# define CURL_FORMAT_OFF_T "%I64d"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T i64
# define CURL_SUFFIX_CURL_OFF_TU ui64
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T __int64
# define CURL_FORMAT_CURL_OFF_T "I64d"
# define CURL_FORMAT_CURL_OFF_TU "I64u"
# define CURL_FORMAT_OFF_T "%I64d"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T i64
# define CURL_SUFFIX_CURL_OFF_TU ui64
# else
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
#elif defined(__POCC__)
# if (__POCC__ < 280)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# elif defined(_MSC_VER)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T __int64
# define CURL_FORMAT_CURL_OFF_T "I64d"
# define CURL_FORMAT_CURL_OFF_TU "I64u"
# define CURL_FORMAT_OFF_T "%I64d"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T i64
# define CURL_SUFFIX_CURL_OFF_TU ui64
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T __int64
# define CURL_FORMAT_CURL_OFF_T "I64d"
# define CURL_FORMAT_CURL_OFF_TU "I64u"
# define CURL_FORMAT_OFF_T "%I64d"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T i64
# define CURL_SUFFIX_CURL_OFF_TU ui64
# else
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
#elif defined(__LCC__)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_TYPEOF_CURL_SOCKLEN_T int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
#elif defined(__SYMBIAN32__)
# if defined(__EABI__) /* Treat all ARM compilers equally */
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# elif defined(__CW32__)
# pragma longlong on
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# elif defined(__VC32__)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T __int64
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T __int64
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
#elif defined(__MWERKS__)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_TYPEOF_CURL_SOCKLEN_T int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
#elif defined(_WIN32_WCE)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T __int64
# define CURL_FORMAT_CURL_OFF_T "I64d"
# define CURL_FORMAT_CURL_OFF_TU "I64u"
# define CURL_FORMAT_OFF_T "%I64d"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T i64
# define CURL_SUFFIX_CURL_OFF_TU ui64
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T __int64
# define CURL_FORMAT_CURL_OFF_T "I64d"
# define CURL_FORMAT_CURL_OFF_TU "I64u"
# define CURL_FORMAT_OFF_T "%I64d"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T i64
# define CURL_SUFFIX_CURL_OFF_TU ui64
# define CURL_TYPEOF_CURL_SOCKLEN_T int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
#elif defined(__MINGW32__)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "I64d"
# define CURL_FORMAT_CURL_OFF_TU "I64u"
# define CURL_FORMAT_OFF_T "%I64d"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "I64d"
# define CURL_FORMAT_CURL_OFF_TU "I64u"
# define CURL_FORMAT_OFF_T "%I64d"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_TYPEOF_CURL_SOCKLEN_T int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
#elif defined(__VMS)
# if defined(__alpha) || defined(__ia64)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# else
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
#elif defined(__OS400__)
# if defined(__ILEC400__)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
# define CURL_PULL_SYS_TYPES_H 1
# define CURL_PULL_SYS_SOCKET_H 1
# endif
#elif defined(__MVS__)
# if defined(__IBMC__) || defined(__IBMCPP__)
# if defined(_ILP32)
# define CURL_SIZEOF_LONG 4
# define CURL_SIZEOF_LONG 4
# elif defined(_LP64)
# define CURL_SIZEOF_LONG 8
# define CURL_SIZEOF_LONG 8
# endif
# if defined(_LONG_LONG)
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# elif defined(_LP64)
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# else
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
# define CURL_PULL_SYS_TYPES_H 1
# define CURL_PULL_SYS_SOCKET_H 1
# endif
#elif defined(__370__)
# if defined(__IBMC__) || defined(__IBMCPP__)
# if defined(_ILP32)
# define CURL_SIZEOF_LONG 4
# define CURL_SIZEOF_LONG 4
# elif defined(_LP64)
# define CURL_SIZEOF_LONG 8
# define CURL_SIZEOF_LONG 8
# endif
# if defined(_LONG_LONG)
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# elif defined(_LP64)
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# else
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
# define CURL_PULL_SYS_TYPES_H 1
# define CURL_PULL_SYS_SOCKET_H 1
# endif
/* ===================================== */
/* SunPro Compilers */
/* ===================================== */
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
#include <sys/types.h>
#include <stdint.h>
# define CURL_TYPEOF_CURL_OFF_T off_t
# define CURL_SIZEOF_CURL_OFF_T 8
# if defined(__amd64) || defined(__sparcv9)
# define CURL_SIZEOF_LONG 8
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# else
# define CURL_SIZEOF_LONG 4
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# endif
#elif defined(TPF)
# define CURL_SIZEOF_LONG 8
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_TYPEOF_CURL_SOCKLEN_T int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
/* ===================================== */
/* KEEP MSVC THE PENULTIMATE ENTRY */
@@ -470,24 +502,26 @@
#elif defined(_MSC_VER)
# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T __int64
# define CURL_FORMAT_CURL_OFF_T "I64d"
# define CURL_FORMAT_CURL_OFF_TU "I64u"
# define CURL_FORMAT_OFF_T "%I64d"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T i64
# define CURL_SUFFIX_CURL_OFF_TU ui64
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T __int64
# define CURL_FORMAT_CURL_OFF_T "I64d"
# define CURL_FORMAT_CURL_OFF_TU "I64u"
# define CURL_FORMAT_OFF_T "%I64d"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T i64
# define CURL_SUFFIX_CURL_OFF_TU ui64
# else
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 4
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T int
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
/* ===================================== */
/* KEEP GENERIC GCC THE LAST ENTRY */
@@ -495,30 +529,52 @@
#elif defined(__GNUC__)
# if defined(__i386__) || defined(__ppc__)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# elif defined(__x86_64__) || defined(__ppc64__)
# define CURL_SIZEOF_LONG 8
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_SIZEOF_LONG 8
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
# define CURL_SIZEOF_CURL_SOCKLEN_T 4
# define CURL_PULL_SYS_TYPES_H 1
# define CURL_PULL_SYS_SOCKET_H 1
#else
# error "Unknown non-configure build target!"
Error Compilation_aborted_Unknown_non_configure_build_target
#endif
/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */
/* sys/types.h is required here to properly make type definitions below. */
#ifdef CURL_PULL_SYS_TYPES_H
# include <sys/types.h>
#endif
/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file */
/* sys/socket.h is required here to properly make type definitions below. */
#ifdef CURL_PULL_SYS_SOCKET_H
# include <sys/socket.h>
#endif
/* Data type definition of curl_socklen_t. */
#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
#endif
/* Data type definition of curl_off_t. */
#ifdef CURL_TYPEOF_CURL_OFF_T

View File

@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -63,6 +63,16 @@
Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
#endif
#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined
#endif
#ifdef CURL_SIZEOF_CURL_SOCKLEN_T
# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined
#endif
#ifdef CURL_TYPEOF_CURL_OFF_T
# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
@@ -102,6 +112,18 @@
/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
/* ================================================================ */
/* Configure process defines this to 1 when it finds out that system */
/* header file ws2tcpip.h must be included by the external interface. */
#undef CURL_PULL_WS2TCPIP_H
#ifdef CURL_PULL_WS2TCPIP_H
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
# include <winsock2.h>
# include <ws2tcpip.h>
#endif
/* Configure process defines this to 1 when it finds out that system */
/* header file sys/types.h must be included by the external interface. */
#undef CURL_PULL_SYS_TYPES_H
@@ -123,9 +145,25 @@
# include <inttypes.h>
#endif
/* Configure process defines this to 1 when it finds out that system */
/* header file sys/socket.h must be included by the external interface. */
#undef CURL_PULL_SYS_SOCKET_H
#ifdef CURL_PULL_SYS_SOCKET_H
# include <sys/socket.h>
#endif
/* The size of `long', as computed by sizeof. */
#undef CURL_SIZEOF_LONG
/* Integral data type used for curl_socklen_t. */
#undef CURL_TYPEOF_CURL_SOCKLEN_T
/* The size of `curl_socklen_t', as computed by sizeof. */
#undef CURL_SIZEOF_CURL_SOCKLEN_T
/* Data type definition of curl_socklen_t. */
typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
/* Signed integral data type used for curl_off_t. */
#undef CURL_TYPEOF_CURL_OFF_T

View File

@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -81,6 +81,16 @@
Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing
#endif
#ifndef CURL_TYPEOF_CURL_SOCKLEN_T
# error "CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!"
Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_is_missing
#endif
#ifndef CURL_SIZEOF_CURL_SOCKLEN_T
# error "CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!"
Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_is_missing
#endif
#ifndef CURL_TYPEOF_CURL_OFF_T
# error "CURL_TYPEOF_CURL_OFF_T definition is missing!"
Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing
@@ -153,6 +163,26 @@ typedef char
__curl_rule_03__
[CurlchkszGE(curl_off_t, long)];
/*
* Verify that the size previously defined and expected for
* curl_socklen_t is actually the the same as the one reported
* by sizeof() at compile time.
*/
typedef char
__curl_rule_04__
[CurlchkszEQ(curl_socklen_t, CURL_SIZEOF_CURL_SOCKLEN_T)];
/*
* Verify at compile time that the size of curl_socklen_t as reported
* by sizeof() is greater or equal than the one reported for int for
* the current compilation.
*/
typedef char
__curl_rule_05__
[CurlchkszGE(curl_socklen_t, int)];
/* ================================================================ */
/* EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS */
/* ================================================================ */
@@ -207,10 +237,13 @@ typedef char
* Get rid of macros not intended to exist beyond this point.
*/
#undef CURL_PULL_WS2TCPIP_H
#undef CURL_PULL_SYS_TYPES_H
#undef CURL_PULL_SYS_SOCKET_H
#undef CURL_PULL_STDINT_H
#undef CURL_PULL_INTTYPES_H
#undef CURL_TYPEOF_CURL_SOCKLEN_T
#undef CURL_TYPEOF_CURL_OFF_T
#endif /* __CURL_CURLRULES_H */

View File

@@ -31,13 +31,13 @@
/* This is the version number of the libcurl package from which this header
file origins: */
#define LIBCURL_VERSION "7.19.4-CVS"
#define LIBCURL_VERSION "7.19.5-CVS"
/* The numeric version number is also available "in parts" by using these
defines: */
#define LIBCURL_VERSION_MAJOR 7
#define LIBCURL_VERSION_MINOR 19
#define LIBCURL_VERSION_PATCH 4
#define LIBCURL_VERSION_PATCH 5
/* This is the numeric version of the libcurl version number, meant for easier
parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
@@ -54,7 +54,7 @@
and it is always a greater number in a more recent release. It makes
comparisons with greater than and less than work.
*/
#define LIBCURL_VERSION_NUM 0x071304
#define LIBCURL_VERSION_NUM 0x071305
/*
* This is the date and time when the full source package was created. The

View File

@@ -1,12 +1,22 @@
*.dist
*.in
*.la
*.lo
Makefile
*.in
.deps
.libs
DLL-Debug
DLL-Release
LIB-Debug
LIB-Release
Makefile
config.h
stamp-*
getdate.c
libcurl.dsp
libcurl.vcproj
*.dist
stamp-*
vc6libcurl.dsp
vc6libcurl.ncb
vc6libcurl.opt
vc6libcurl.sln
vc6libcurl.suo
vc6libcurl.vcproj

121
lib/CMakeLists.txt Normal file
View File

@@ -0,0 +1,121 @@
SET(LIB_NAME libcurl)
CONFIGURE_FILE(${CURL_SOURCE_DIR}/include/curl/curlbuild.h.cmake
${CURL_BINARY_DIR}/include/curl/curlbuild.h)
CONFIGURE_FILE(config.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/config.h)
TRANSFORM_MAKEFILE_INC("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
INCLUDE(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake)
LIST(APPEND HHEADERS
${CMAKE_CURRENT_BINARY_DIR}/config.h
${CURL_BINARY_DIR}/include/curl/curlbuild.h
)
IF(MSVC)
LIST(APPEND CSOURCES libcurl.rc)
ENDIF()
# SET(CSOURCES
# # memdebug.c -not used
# # nwlib.c - Not used
# # strtok.c - specify later
# # strtoofft.c - specify later
# )
# # if we have Kerberos 4, right now this is never on
# #OPTION(CURL_KRB4 "Use Kerberos 4" OFF)
# IF(CURL_KRB4)
# SET(CSOURCES ${CSOURCES}
# krb4.c
# security.c
# )
# ENDIF(CURL_KRB4)
# #OPTION(CURL_MALLOC_DEBUG "Debug mallocs in Curl" OFF)
# MARK_AS_ADVANCED(CURL_MALLOC_DEBUG)
# IF(CURL_MALLOC_DEBUG)
# SET(CSOURCES ${CSOURCES}
# memdebug.c
# )
# ENDIF(CURL_MALLOC_DEBUG)
# # only build compat strtoofft if we need to
# IF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64)
# SET(CSOURCES ${CSOURCES}
# strtoofft.c
# )
# ENDIF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64)
IF(HAVE_FEATURES_H)
SET_SOURCE_FILES_PROPERTIES(
cookie.c
easy.c
formdata.c
getenv.c
hash.c
http.c
if2ip.c
mprintf.c
multi.c
sendf.c
telnet.c
transfer.c
url.c
COMPILE_FLAGS -D_BSD_SOURCE)
ENDIF(HAVE_FEATURES_H)
# The rest of the build
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../include)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../include)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/..)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
IF(CURL_STATICLIB)
# Static lib
SET(CURL_USER_DEFINED_DYNAMIC_OR_STATIC STATIC)
ELSE()
# DLL / so dynamic lib
SET(CURL_USER_DEFINED_DYNAMIC_OR_STATIC SHARED)
ENDIF()
ADD_LIBRARY(
${LIB_NAME}
${CURL_USER_DEFINED_DYNAMIC_OR_STATIC}
${HHEADERS} ${CSOURCES}
)
TARGET_LINK_LIBRARIES(${LIB_NAME} ${CURL_LIBS})
IF(WIN32)
ADD_DEFINITIONS( -D_USRDLL )
ENDIF()
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES COMPILE_DEFINITIONS BUILDING_LIBCURL)
SETUP_CURL_DEPENDENCIES(${LIB_NAME})
# Remove the "lib" prefix since the library is already named "libcurl".
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX "")
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES IMPORT_PREFIX "")
IF(MSVC)
IF(NOT BUILD_RELEASE_DEBUG_DIRS)
# Ugly workaround to remove the "/debug" or "/release" in each output
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX "../")
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES IMPORT_PREFIX "../")
ENDIF()
ENDIF()
IF(WIN32)
IF(NOT CURL_STATICLIB)
# Add "_imp" as a suffix before the extension to avoid conflicting with the statically linked "libcurl.lib"
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib")
ENDIF()
ENDIF()

View File

@@ -68,7 +68,8 @@ OBJS = $(OBJ_DIR)\base64.obj $(OBJ_DIR)\connect.obj &
$(OBJ_DIR)\strtok.obj $(OBJ_DIR)\strtoofft.obj &
$(OBJ_DIR)\telnet.obj $(OBJ_DIR)\tftp.obj &
$(OBJ_DIR)\timeval.obj $(OBJ_DIR)\transfer.obj &
$(OBJ_DIR)\url.obj $(OBJ_DIR)\version.obj
$(OBJ_DIR)\url.obj $(OBJ_DIR)\version.obj &
$(OBJ_DIR)\slist.obj
#
# Use $(OBJS) as a template to generate $(OBJS_STAT) and $(OBJS_DYN).
@@ -153,7 +154,7 @@ $(OBJ_DIR)\file.obj: file.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
progress.h sendf.h escape.h file.h speedcheck.h getinfo.h transfer.h &
url.h memory.h parsedate.h ..\include\curl\mprintf.h memdebug.h
url.h curl_memory.h parsedate.h ..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\timeval.obj: timeval.c timeval.h setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h
$(OBJ_DIR)\base64.obj: base64.c setup.h config-win32.h ..\include\curl\curlbuild.h &
@@ -162,14 +163,14 @@ $(OBJ_DIR)\base64.obj: base64.c setup.h config-win32.h ..\include\curl\curlbuild
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h urldata.h cookie.h ..\include\curl\curl.h &
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
curl_addrinfo.h splay.h easyif.h curl_base64.h memory.h memdebug.h
curl_addrinfo.h splay.h easyif.h curl_base64.h curl_memory.h memdebug.h
$(OBJ_DIR)\hostip.obj: hostip.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
share.h strerror.h url.h inet_ntop.h ..\include\curl\mprintf.h memory.h &
share.h strerror.h url.h inet_ntop.h ..\include\curl\mprintf.h curl_memory.h &
memdebug.h
$(OBJ_DIR)\progress.obj: progress.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
@@ -183,7 +184,7 @@ $(OBJ_DIR)\formdata.obj: formdata.c setup.h config-win32.h ..\include\curl\curlb
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
llist.h curl_addrinfo.h splay.h easyif.h strequal.h memory.h &
llist.h curl_addrinfo.h splay.h easyif.h strequal.h curl_memory.h &
..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\cookie.obj: cookie.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\mprintf.h &
@@ -191,7 +192,7 @@ $(OBJ_DIR)\cookie.obj: cookie.c setup.h config-win32.h ..\include\curl\curlbuild
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h urldata.h cookie.h ..\include\curl\curl.h &
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
curl_addrinfo.h splay.h strequal.h strtok.h sendf.h memory.h share.h &
curl_addrinfo.h splay.h strequal.h strtok.h sendf.h curl_memory.h share.h &
strtoofft.h rawstr.h memdebug.h
$(OBJ_DIR)\http.obj: http.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
@@ -201,7 +202,7 @@ $(OBJ_DIR)\http.obj: http.c setup.h config-win32.h ..\include\curl\curlbuild.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
transfer.h sendf.h easyif.h progress.h curl_base64.h strequal.h &
sslgen.h http_digest.h http_ntlm.h http_negotiate.h url.h share.h &
http.h memory.h select.h parsedate.h strtoofft.h multiif.h rawstr.h &
http.h curl_memory.h select.h parsedate.h strtoofft.h multiif.h rawstr.h &
..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\sendf.obj: sendf.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
@@ -209,7 +210,7 @@ $(OBJ_DIR)\sendf.obj: sendf.c setup.h config-win32.h ..\include\curl\curlbuild.h
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
llist.h curl_addrinfo.h splay.h sendf.h connect.h sslgen.h ssh.h &
multiif.h ..\include\curl\mprintf.h memory.h strerror.h easyif.h &
multiif.h ..\include\curl\mprintf.h curl_memory.h strerror.h easyif.h &
memdebug.h
$(OBJ_DIR)\ftp.obj: ftp.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
@@ -220,7 +221,7 @@ $(OBJ_DIR)\ftp.obj: ftp.c setup.h config-win32.h ..\include\curl\curlbuild.h &
transfer.h escape.h http.h socks.h ftp.h strtoofft.h strequal.h &
sslgen.h connect.h strerror.h inet_ntop.h inet_pton.h select.h &
parsedate.h sockaddr.h multiif.h url.h ..\include\curl\mprintf.h &
memory.h memdebug.h
curl_memory.h memdebug.h
$(OBJ_DIR)\url.obj: url.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
@@ -231,7 +232,7 @@ $(OBJ_DIR)\url.obj: url.c setup.h config-win32.h ..\include\curl\curlbuild.h &
strtok.h share.h content_encoding.h http_digest.h http_negotiate.h &
select.h multiif.h easyif.h speedcheck.h rawstr.h ftp.h dict.h telnet.h &
tftp.h http.h file.h curl_ldap.h ssh.h url.h connect.h inet_ntop.h &
http_ntlm.h socks.h ..\include\curl\mprintf.h memory.h memdebug.h
http_ntlm.h socks.h ..\include\curl\mprintf.h curl_memory.h memdebug.h
$(OBJ_DIR)\dict.obj: dict.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
@@ -245,7 +246,7 @@ $(OBJ_DIR)\if2ip.obj: if2ip.c setup.h config-win32.h ..\include\curl\curlbuild.h
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h if2ip.h &
..\include\curl\mprintf.h memory.h memdebug.h
..\include\curl\mprintf.h curl_memory.h memdebug.h
$(OBJ_DIR)\speedcheck.obj: speedcheck.c setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
@@ -273,19 +274,19 @@ $(OBJ_DIR)\getenv.obj: getenv.c setup.h config-win32.h ..\include\curl\curlbuild
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
memory.h memdebug.h
curl_memory.h memdebug.h
$(OBJ_DIR)\escape.obj: escape.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
memory.h urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h &
curl_memory.h urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h &
hash.h llist.h curl_addrinfo.h splay.h easyif.h &
..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\mprintf.obj: mprintf.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\mprintf.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h memory.h ..\include\curl\curl.h memdebug.h
..\include\curl\multi.h curl_memory.h ..\include\curl\curl.h memdebug.h
$(OBJ_DIR)\telnet.obj: telnet.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
@@ -293,19 +294,19 @@ $(OBJ_DIR)\telnet.obj: telnet.c setup.h config-win32.h ..\include\curl\curlbuild
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
transfer.h sendf.h telnet.h connect.h ..\include\curl\mprintf.h &
arpa_telnet.h memory.h select.h strequal.h rawstr.h memdebug.h
arpa_telnet.h curl_memory.h select.h strequal.h rawstr.h memdebug.h
$(OBJ_DIR)\netrc.obj: netrc.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
netrc.h strequal.h strtok.h memory.h rawstr.h ..\include\curl\mprintf.h &
netrc.h strequal.h strtok.h curl_memory.h rawstr.h ..\include\curl\mprintf.h &
memdebug.h
$(OBJ_DIR)\getinfo.obj: getinfo.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
llist.h curl_addrinfo.h splay.h getinfo.h memory.h sslgen.h connect.h &
llist.h curl_addrinfo.h splay.h getinfo.h curl_memory.h sslgen.h connect.h &
memdebug.h
$(OBJ_DIR)\transfer.obj: transfer.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h strtoofft.h strequal.h &
@@ -315,7 +316,7 @@ $(OBJ_DIR)\transfer.obj: transfer.c setup.h config-win32.h ..\include\curl\curlb
cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
curl_addrinfo.h splay.h netrc.h content_encoding.h transfer.h sendf.h &
speedcheck.h progress.h http.h url.h getinfo.h sslgen.h http_digest.h &
http_ntlm.h http_negotiate.h share.h memory.h select.h multiif.h &
http_ntlm.h http_negotiate.h share.h curl_memory.h select.h multiif.h &
easyif.h ..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\strequal.obj: strequal.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h strequal.h &
@@ -329,7 +330,7 @@ $(OBJ_DIR)\easy.obj: easy.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\multi.h ..\include\curl\curl.h urldata.h cookie.h &
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
curl_addrinfo.h splay.h transfer.h sslgen.h url.h getinfo.h share.h &
strdup.h memory.h progress.h easyif.h select.h sendf.h http_ntlm.h &
strdup.h curl_memory.h progress.h easyif.h select.h sendf.h http_ntlm.h &
connect.h ..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\security.obj: security.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h
@@ -342,7 +343,7 @@ $(OBJ_DIR)\memdebug.obj: memdebug.c setup.h config-win32.h ..\include\curl\curlb
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
..\include\curl\mprintf.h urldata.h cookie.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h memory.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h curl_memory.h &
memdebug.h
$(OBJ_DIR)\http_chunks.obj: http_chunks.c setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
@@ -350,7 +351,7 @@ $(OBJ_DIR)\http_chunks.obj: http_chunks.c setup.h config-win32.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
content_encoding.h http.h memory.h easyif.h ..\include\curl\mprintf.h &
content_encoding.h http.h curl_memory.h easyif.h ..\include\curl\mprintf.h &
memdebug.h
$(OBJ_DIR)\strtok.obj: strtok.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h strtok.h
@@ -360,10 +361,10 @@ $(OBJ_DIR)\connect.obj: connect.c setup.h config-win32.h ..\include\curl\curlbui
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h urldata.h cookie.h ..\include\curl\curl.h &
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
curl_addrinfo.h splay.h sendf.h if2ip.h strerror.h connect.h memory.h &
curl_addrinfo.h splay.h sendf.h if2ip.h strerror.h connect.h curl_memory.h &
select.h url.h multiif.h sockaddr.h inet_ntop.h sslgen.h memdebug.h
$(OBJ_DIR)\llist.obj: llist.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h llist.h memory.h &
..\include\curl\curlrules.h setup_once.h llist.h curl_memory.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h memdebug.h
@@ -371,7 +372,7 @@ $(OBJ_DIR)\hash.obj: hash.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h hash.h llist.h &
..\include\curl\mprintf.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h memory.h &
..\include\curl\easy.h ..\include\curl\multi.h curl_memory.h &
..\include\curl\curl.h memdebug.h
$(OBJ_DIR)\multi.obj: multi.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
@@ -379,7 +380,7 @@ $(OBJ_DIR)\multi.obj: multi.c setup.h config-win32.h ..\include\curl\curlbuild.h
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
llist.h curl_addrinfo.h splay.h transfer.h url.h connect.h progress.h &
easyif.h multiif.h sendf.h http.h ..\include\curl\mprintf.h memory.h &
easyif.h multiif.h sendf.h http.h ..\include\curl\mprintf.h curl_memory.h &
memdebug.h
$(OBJ_DIR)\content_encoding.obj: content_encoding.c setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h
@@ -388,14 +389,14 @@ $(OBJ_DIR)\share.obj: share.c setup.h config-win32.h ..\include\curl\curlbuild.h
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
llist.h curl_addrinfo.h splay.h share.h memory.h memdebug.h
llist.h curl_addrinfo.h splay.h share.h curl_memory.h memdebug.h
$(OBJ_DIR)\http_digest.obj: http_digest.c setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
urldata.h cookie.h ..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
rawstr.h curl_base64.h curl_md5.h http_digest.h strtok.h url.h memory.h &
rawstr.h curl_base64.h curl_md5.h http_digest.h strtok.h url.h curl_memory.h &
easyif.h ..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\md5.obj: md5.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h curl_md5.h
@@ -407,7 +408,7 @@ $(OBJ_DIR)\http_ntlm.obj: http_ntlm.c setup.h config-win32.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h easyif.h &
sendf.h rawstr.h curl_base64.h http_ntlm.h url.h memory.h ssluse.h &
sendf.h rawstr.h curl_base64.h http_ntlm.h url.h curl_memory.h ssluse.h &
..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\inet_pton.obj: inet_pton.c setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
@@ -429,21 +430,21 @@ $(OBJ_DIR)\hostares.obj: hostares.c setup.h config-win32.h ..\include\curl\curlb
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
share.h strerror.h url.h multiif.h inet_pton.h connect.h select.h &
..\include\curl\mprintf.h memory.h memdebug.h
..\include\curl\mprintf.h curl_memory.h memdebug.h
$(OBJ_DIR)\hostasyn.obj: hostasyn.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
share.h strerror.h url.h ..\include\curl\mprintf.h memory.h memdebug.h
share.h strerror.h url.h ..\include\curl\mprintf.h curl_memory.h memdebug.h
$(OBJ_DIR)\hostip4.obj: hostip4.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
share.h strerror.h url.h inet_pton.h ..\include\curl\mprintf.h memory.h &
share.h strerror.h url.h inet_pton.h ..\include\curl\mprintf.h curl_memory.h &
memdebug.h
$(OBJ_DIR)\hostip6.obj: hostip6.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
@@ -452,14 +453,14 @@ $(OBJ_DIR)\hostip6.obj: hostip6.c setup.h config-win32.h ..\include\curl\curlbui
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
share.h strerror.h url.h inet_pton.h connect.h &
..\include\curl\mprintf.h memory.h memdebug.h
..\include\curl\mprintf.h curl_memory.h memdebug.h
$(OBJ_DIR)\hostsyn.obj: hostsyn.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
share.h strerror.h url.h ..\include\curl\mprintf.h memory.h memdebug.h
share.h strerror.h url.h ..\include\curl\mprintf.h curl_memory.h memdebug.h
$(OBJ_DIR)\hostthre.obj: hostthre.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
@@ -467,7 +468,7 @@ $(OBJ_DIR)\hostthre.obj: hostthre.c setup.h config-win32.h ..\include\curl\curlb
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
share.h strerror.h url.h multiif.h inet_pton.h &
..\include\curl\mprintf.h inet_ntop.h memory.h memdebug.h
..\include\curl\mprintf.h inet_ntop.h curl_memory.h memdebug.h
$(OBJ_DIR)\inet_ntop.obj: inet_ntop.c setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
..\include\curl\mprintf.h ..\include\curl\curl.h &
@@ -492,7 +493,7 @@ $(OBJ_DIR)\sslgen.obj: sslgen.c setup.h config-win32.h ..\include\curl\curlbuild
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sslgen.h &
ssluse.h gtls.h nssg.h qssl.h sendf.h rawstr.h url.h memory.h &
ssluse.h gtls.h nssg.h qssl.h sendf.h rawstr.h url.h curl_memory.h &
progress.h memdebug.h
$(OBJ_DIR)\tftp.obj: tftp.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
@@ -501,7 +502,7 @@ $(OBJ_DIR)\tftp.obj: tftp.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
transfer.h sendf.h tftp.h progress.h connect.h strerror.h sockaddr.h &
url.h ..\include\curl\mprintf.h memory.h select.h memdebug.h
url.h ..\include\curl\mprintf.h curl_memory.h select.h memdebug.h
$(OBJ_DIR)\splay.obj: splay.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h splay.h
$(OBJ_DIR)\strdup.obj: strdup.c setup.h config-win32.h ..\include\curl\curlbuild.h &
@@ -534,4 +535,4 @@ $(OBJ_DIR)\curl_addrinfo.obj: curl_addrinfo.c setup.h config-win32.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h curl_addrinfo.h &
..\include\curl\mprintf.h memory.h memdebug.h
..\include\curl\mprintf.h curl_memory.h memdebug.h

View File

@@ -22,21 +22,23 @@
###########################################################################
AUTOMAKE_OPTIONS = foreign nostdinc
DSP = libcurl.dsp
DSP = vc6libcurl.dsp
VCPROJ = libcurl.vcproj
DOCS = README.encoding README.memoryleak README.ares README.curlx \
README.hostip README.multi_socket README.httpauth README.pipelining \
README.NSS README.curl_off_t
CMAKE_DIST = CMakeLists.txt config.h.cmake
EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 Makefile.riscos $(DSP) \
libcurl.dsw config-win32.h config-win32ce.h config-riscos.h config-mac.h \
config.h.in makefile.dj config.dos libcurl.plist \
vc6libcurl.dsw config-win32.h config-win32ce.h config-riscos.h \
config-mac.h config.h.in makefile.dj config.dos libcurl.plist \
libcurl.rc config-amigaos.h amigaos.c amigaos.h makefile.amiga \
Makefile.netware nwlib.c nwos.c libcurl.imp msvcproj.head msvcproj.foot \
config-win32ce.h config-os400.h setup-os400.h config-symbian.h \
Makefile.Watcom config-tpf.h $(DOCS) $(VCPROJ) mk-ca-bundle.pl \
firefox-db2pem.sh
firefox-db2pem.sh $(CMAKE_DIST)
CLEANFILES = $(DSP) $(VCPROJ)
@@ -52,11 +54,15 @@ LIBCURL_LIBS = @LIBCURL_LIBS@
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/config.h file
# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
# $(top_srcdir)/ares is for in-tree c-ares's external include files
INCLUDES = -I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(top_builddir)/lib \
-I$(top_srcdir)/lib
-I$(top_srcdir)/lib \
-I$(top_builddir)/ares \
-I$(top_srcdir)/ares
if SONAME_BUMP
#

Some files were not shown because too many files have changed in this diff Show More