Compare commits
259 Commits
curl-7_19_
...
curl-7_19_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6247b6d468 | ||
![]() |
966cb698e6 | ||
![]() |
4b44638f4d | ||
![]() |
13afff5752 | ||
![]() |
e73fe837a8 | ||
![]() |
a9caeb1064 | ||
![]() |
171eef68c3 | ||
![]() |
33368ebd02 | ||
![]() |
501f9f8309 | ||
![]() |
9fe787fc1f | ||
![]() |
0dec3e5e6a | ||
![]() |
66f5baa16e | ||
![]() |
1cb921b7f3 | ||
![]() |
0cf6721898 | ||
![]() |
97c8bc9757 | ||
![]() |
2cad095425 | ||
![]() |
37d509f04f | ||
![]() |
35eb9fc6ad | ||
![]() |
df09088a96 | ||
![]() |
1a14966577 | ||
![]() |
0606b792f0 | ||
![]() |
a53525e930 | ||
![]() |
3a9c03bef3 | ||
![]() |
f0dbdcff9d | ||
![]() |
9d03dd7fb8 | ||
![]() |
781b82baf5 | ||
![]() |
2838362a7b | ||
![]() |
0b66efac9c | ||
![]() |
47a9660ec1 | ||
![]() |
aabf62e7d2 | ||
![]() |
6d891d2a3b | ||
![]() |
c0e8bed5bf | ||
![]() |
0dce2ff8a0 | ||
![]() |
2642638fca | ||
![]() |
8b0fc9819f | ||
![]() |
bf5f91244b | ||
![]() |
e8e84cf1da | ||
![]() |
0179dbe1c2 | ||
![]() |
8978b87728 | ||
![]() |
0684128209 | ||
![]() |
9b5c00a664 | ||
![]() |
b347a7a96e | ||
![]() |
240bfaa69e | ||
![]() |
7dc48e57a6 | ||
![]() |
8570883412 | ||
![]() |
1d5627b181 | ||
![]() |
038fff6c9f | ||
![]() |
21dd9a8021 | ||
![]() |
59934c1176 | ||
![]() |
2f6ff57d96 | ||
![]() |
77eba8727d | ||
![]() |
47c392e135 | ||
![]() |
9cff716925 | ||
![]() |
4c207a004c | ||
![]() |
650543a042 | ||
![]() |
5f0cae8037 | ||
![]() |
95c2ab77e7 | ||
![]() |
d7f33b7e4e | ||
![]() |
56e6441ceb | ||
![]() |
b74b5e0602 | ||
![]() |
b4dcbbfabd | ||
![]() |
6dd0277c22 | ||
![]() |
fb08218a04 | ||
![]() |
08d95bff5e | ||
![]() |
b476530755 | ||
![]() |
a8ea1e9ef4 | ||
![]() |
6dade671ad | ||
![]() |
38b88b5892 | ||
![]() |
340e3b952f | ||
![]() |
35c91f6ea9 | ||
![]() |
f5f9354093 | ||
![]() |
600460ffc6 | ||
![]() |
18b3833f90 | ||
![]() |
f671d0513c | ||
![]() |
100f6b7703 | ||
![]() |
4e75c70874 | ||
![]() |
bdbfe1f8a9 | ||
![]() |
bea9d2cafd | ||
![]() |
d709cb2ae3 | ||
![]() |
444bb03fab | ||
![]() |
966cc10fcc | ||
![]() |
0c7087c41f | ||
![]() |
c42a06bc1f | ||
![]() |
b4c00a8fb0 | ||
![]() |
f3403d4c5b | ||
![]() |
5cf78472e1 | ||
![]() |
2aaff16a87 | ||
![]() |
6236198d43 | ||
![]() |
83fb285d40 | ||
![]() |
3050f10676 | ||
![]() |
175fc5096d | ||
![]() |
18f238dd53 | ||
![]() |
4f551259dd | ||
![]() |
9cb68c6e32 | ||
![]() |
a9a89c604a | ||
![]() |
e96a9190a3 | ||
![]() |
1ff4e9008b | ||
![]() |
2d716517a8 | ||
![]() |
22226a8aec | ||
![]() |
9b8e56c97c | ||
![]() |
ad1bfc5468 | ||
![]() |
2c0c05e96d | ||
![]() |
d6d63147b6 | ||
![]() |
98f7771d74 | ||
![]() |
37eba37019 | ||
![]() |
40b2f2553b | ||
![]() |
d3e35d49ae | ||
![]() |
a0474685c1 | ||
![]() |
0b317b72ae | ||
![]() |
afe06d1563 | ||
![]() |
c40365e9b6 | ||
![]() |
4b6d3a2bfd | ||
![]() |
7ae624e700 | ||
![]() |
c32cf33a16 | ||
![]() |
7eb59de7df | ||
![]() |
5931cf77f4 | ||
![]() |
989aace192 | ||
![]() |
65cf30e441 | ||
![]() |
d4480c979d | ||
![]() |
169e94d68b | ||
![]() |
0cc8184057 | ||
![]() |
a7c75142fa | ||
![]() |
02d3c452e4 | ||
![]() |
1c148575ea | ||
![]() |
d1a1865650 | ||
![]() |
067544abc5 | ||
![]() |
77da57057f | ||
![]() |
aa1da57c37 | ||
![]() |
c2ce2aa4de | ||
![]() |
90c9fd55fc | ||
![]() |
47e403640b | ||
![]() |
4ea513cc38 | ||
![]() |
3ca0b9bb47 | ||
![]() |
e592da5a59 | ||
![]() |
2c93f889fd | ||
![]() |
6173ce6463 | ||
![]() |
065a51d2e1 | ||
![]() |
7edcc22136 | ||
![]() |
352177090f | ||
![]() |
9d18c0b156 | ||
![]() |
ec65a9a364 | ||
![]() |
5c4b6a8ef0 | ||
![]() |
5d502eb90c | ||
![]() |
d6662d8442 | ||
![]() |
1d97f13462 | ||
![]() |
2c16681225 | ||
![]() |
065047dc62 | ||
![]() |
eba8d6d5f5 | ||
![]() |
744dceaffe | ||
![]() |
8740d147c9 | ||
![]() |
16ae283fb4 | ||
![]() |
312600fe9c | ||
![]() |
3e0c067e43 | ||
![]() |
f90551ff41 | ||
![]() |
9442fc0b52 | ||
![]() |
dbb93a2718 | ||
![]() |
242cf423f8 | ||
![]() |
217faf778b | ||
![]() |
01b74950b7 | ||
![]() |
420bfbcf40 | ||
![]() |
89f6567fda | ||
![]() |
efec05d581 | ||
![]() |
47198dce5d | ||
![]() |
f45500c612 | ||
![]() |
6f3e817372 | ||
![]() |
cfda5df020 | ||
![]() |
2b4f41603d | ||
![]() |
448f448d14 | ||
![]() |
ee6a618116 | ||
![]() |
e08f81c891 | ||
![]() |
9324f1c29f | ||
![]() |
d71c1514f2 | ||
![]() |
2df75e84e7 | ||
![]() |
9ab89734de | ||
![]() |
960c0319c4 | ||
![]() |
439891cb9f | ||
![]() |
bdfb3ef11c | ||
![]() |
8d581f7fe4 | ||
![]() |
262907d0a3 | ||
![]() |
15be673054 | ||
![]() |
16a5649670 | ||
![]() |
6582895b51 | ||
![]() |
e3d65389d7 | ||
![]() |
027cb376f3 | ||
![]() |
f1261bcdd7 | ||
![]() |
2e7b36d04f | ||
![]() |
ce1a58414a | ||
![]() |
1012c5705a | ||
![]() |
1c2947581b | ||
![]() |
00883822be | ||
![]() |
13fdb9d8a5 | ||
![]() |
52b2bc4109 | ||
![]() |
b59b3a5152 | ||
![]() |
fe6c03370e | ||
![]() |
e3f128875c | ||
![]() |
7bf82a814b | ||
![]() |
e1270928a3 | ||
![]() |
6fce5b54a8 | ||
![]() |
3c38eafd75 | ||
![]() |
9dcc1b3370 | ||
![]() |
e3c37aac28 | ||
![]() |
61a967095d | ||
![]() |
c0e004ec1c | ||
![]() |
0a1b7296b9 | ||
![]() |
cd5e6743f7 | ||
![]() |
2091fe530f | ||
![]() |
cda8d63d43 | ||
![]() |
bef1b140e9 | ||
![]() |
c9188e2260 | ||
![]() |
15eaf27bc7 | ||
![]() |
bf2277e263 | ||
![]() |
348ffbc47e | ||
![]() |
f13cbcf175 | ||
![]() |
9418c56fd3 | ||
![]() |
7dbd502931 | ||
![]() |
0bf9c1e881 | ||
![]() |
bf07d37737 | ||
![]() |
eecb713616 | ||
![]() |
bf085e2c4b | ||
![]() |
ce1a97d6c8 | ||
![]() |
34c9ec4e1a | ||
![]() |
e73fb6808a | ||
![]() |
1c93d9dcfe | ||
![]() |
675d6ec5e6 | ||
![]() |
1ad43c54c0 | ||
![]() |
1cf6c15ab4 | ||
![]() |
8fc17ed764 | ||
![]() |
26028068e8 | ||
![]() |
8519682564 | ||
![]() |
5ca0c73e98 | ||
![]() |
4c979aa44f | ||
![]() |
274dc3ecac | ||
![]() |
5e2b5edde5 | ||
![]() |
b8b6521659 | ||
![]() |
e37b1b0623 | ||
![]() |
4a79462c3e | ||
![]() |
c328cc9608 | ||
![]() |
cf2d39220a | ||
![]() |
7dbd649f60 | ||
![]() |
4282199bb4 | ||
![]() |
7071dd0162 | ||
![]() |
e61a687eda | ||
![]() |
7e85d2fbd4 | ||
![]() |
969ab28261 | ||
![]() |
90d36cc630 | ||
![]() |
1bb68cbcfa | ||
![]() |
de7a14003c | ||
![]() |
e3ead9f585 | ||
![]() |
a461b0ae44 | ||
![]() |
1b28f9fa89 | ||
![]() |
dff8076022 | ||
![]() |
dd3c187484 | ||
![]() |
4677778f85 | ||
![]() |
f96204dbe0 | ||
![]() |
0427b783e2 | ||
![]() |
4650732f4a | ||
![]() |
1e138c1401 | ||
![]() |
89fb7c85bf | ||
![]() |
0e51fc90e3 |
@@ -5,7 +5,7 @@ aclocal.m4.bak
|
||||
autom4te.cache
|
||||
compile
|
||||
config.guess
|
||||
config.h
|
||||
curl_config.h
|
||||
config.log
|
||||
config.lt
|
||||
config.status
|
||||
|
65
Android.mk
Normal file
65
Android.mk
Normal file
@@ -0,0 +1,65 @@
|
||||
# Google Android makefile for curl and libcurl
|
||||
# Place the curl source (including this makefile) into external/curl/ in the
|
||||
# Android source tree. Then build them with 'make curl' or just 'make libcurl'
|
||||
# from the Android root.
|
||||
#
|
||||
# Note: you must first create a curl_config.h file by running configure in the
|
||||
# Android environment. I haven't found an easy way to do this yet. If there is
|
||||
# no easy way, a static config-android.h may need to be created and checked in
|
||||
# to the libcurl source tree.
|
||||
#
|
||||
# Dan Fandrich
|
||||
# July 2009
|
||||
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
|
||||
common_CFLAGS := -Wpointer-arith -Wwrite-strings -Wunused -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal -Wno-multichar -Wsign-compare -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wno-system-headers -DHAVE_CONFIG_H
|
||||
|
||||
#########################
|
||||
# Build the libcurl library
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
include $(LOCAL_PATH)/lib/Makefile.inc
|
||||
CURL_HEADERS := \
|
||||
curlbuild.h \
|
||||
curl.h \
|
||||
curlrules.h \
|
||||
curlver.h \
|
||||
easy.h \
|
||||
mprintf.h \
|
||||
multi.h \
|
||||
stdcheaders.h \
|
||||
typecheck-gcc.h \
|
||||
types.h
|
||||
|
||||
LOCAL_SRC_FILES := $(addprefix lib/,$(CSOURCES))
|
||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include/
|
||||
LOCAL_CFLAGS += $(common_CFLAGS)
|
||||
|
||||
LOCAL_COPY_HEADERS_TO := libcurl/curl
|
||||
LOCAL_COPY_HEADERS := $(addprefix include/curl/,$(CURL_HEADERS))
|
||||
|
||||
LOCAL_MODULE:= libcurl
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
||||
#########################
|
||||
# Build the curl binary
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
include $(LOCAL_PATH)/src/Makefile.inc
|
||||
LOCAL_SRC_FILES := $(addprefix src/,$(CURL_SOURCES))
|
||||
|
||||
LOCAL_MODULE := curl
|
||||
LOCAL_STATIC_LIBRARIES := libcurl
|
||||
LOCAL_SYSTEM_SHARED_LIBRARIES := libc
|
||||
|
||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/lib
|
||||
|
||||
# This will also need to include $(CURLX_ONES) in order to correctly build
|
||||
# a dynamic library
|
||||
LOCAL_CFLAGS += $(common_CFLAGS)
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
316
CHANGES
316
CHANGES
@@ -6,6 +6,322 @@
|
||||
|
||||
Changelog
|
||||
|
||||
Version 7.19.6 (12 August 2009)
|
||||
|
||||
Daniel Stenberg (12 Aug 2009)
|
||||
- Carsten Lange reported a bug and provided a patch for TFTP upload and the
|
||||
sending of the TSIZE option. I don't like fixing bugs just hours before
|
||||
a release, but since it was broken and the patch fixes this for him I decided
|
||||
to get it in anyway.
|
||||
|
||||
Daniel Stenberg (11 Aug 2009)
|
||||
- Peter Sylvester made the HTTPS test server use specific certificates for
|
||||
each test, so that the test suite can now be used to actually test the
|
||||
verification of cert names etc. This made an error show up in the OpenSSL-
|
||||
specific code where it would attempt to match the CN field even if a
|
||||
subjectAltName exists that doesn't match. This is now fixed and verified
|
||||
in test 311.
|
||||
|
||||
- Benbuck Nason posted the bug report #2835196
|
||||
(http://curl.haxx.se/bug/view.cgi?id=2835196), fixing a few compiler
|
||||
warnings when mixing ints and bools.
|
||||
|
||||
Daniel Fandrich (10 Aug 2009)
|
||||
- Fixed a memory leak in the FTP code and an off-by-one heap buffer overflow.
|
||||
|
||||
Daniel Fandrich (9 Aug 2009)
|
||||
- Fixed some memory leaks in the command-line tool that caused most of the
|
||||
torture tests to fail.
|
||||
|
||||
Daniel Stenberg (2 Aug 2009)
|
||||
- Curt Bogmine reported a problem with SNI enabled on a particular server. We
|
||||
should introduce an option to disable SNI, but as we're in feature freeze
|
||||
now I've addressed the obvious bug here (pointed out by Peter Sylvester): we
|
||||
shouldn't try to enable SNI when SSLv2 or SSLv3 is explicitly selected.
|
||||
Code for OpenSSL and GnuTLS was fixed. NSS doesn't seem to have a particular
|
||||
option for SNI, or are we simply not using it?
|
||||
|
||||
Daniel Stenberg (1 Aug 2009)
|
||||
- Scott Cantor posted the bug report #2829955
|
||||
(http://curl.haxx.se/bug/view.cgi?id=2829955) mentioning the recent SSL cert
|
||||
verification flaw found and exploited by Moxie Marlinspike. The presentation
|
||||
he did at Black Hat is available here:
|
||||
https://www.blackhat.com/html/bh-usa-09/bh-usa-09-archives.html#Marlinspike
|
||||
|
||||
Apparently at least one CA allowed a subjectAltName or CN that contain a
|
||||
zero byte, and thus clients that assumed they would never have zero bytes
|
||||
were exploited to OK a certificate that didn't actually match the site. Like
|
||||
if the name in the cert was "example.com\0theatualsite.com", libcurl would
|
||||
happily verify that cert for example.com.
|
||||
|
||||
libcurl now better uses the length of the extracted name, not using the zero
|
||||
termination for getting the string length.
|
||||
|
||||
This fixing only made and needed in OpenSSL interfacing code.
|
||||
|
||||
- Tanguy Fautre pointed out that OpenSSL's function RAND_screen() (present
|
||||
only in some OpenSSL installs - like on Windows) isn't thread-safe and we
|
||||
agreed that moving it to the global_init() function is a decent way to deal
|
||||
with this situation.
|
||||
|
||||
- Alexander Beedie provided the patch for a noproxy problem: If I have set
|
||||
CURLOPT_NOPROXY to "*", or to a host that should not use a proxy, I actually
|
||||
could still end up using a proxy if a proxy environment variable was set.
|
||||
|
||||
Daniel Stenberg (27 Jul 2009)
|
||||
- All the quote options (CURLOPT_QUOTE, CURLOPT_POSTQUOTE and
|
||||
CURLOPT_PREQUOTE) now accept a preceeding asterisk before the command to
|
||||
send when using FTP, as a sign that libcurl shall simply ignore the response
|
||||
from the server instead of treating it as an error. Not treating a 400+ FTP
|
||||
response code as an error means that failed commands will not abort the
|
||||
chain of commands, nor will they cause the connection to get disconnected.
|
||||
|
||||
Daniel Stenberg (26 Jul 2009)
|
||||
- Johan van Selst posted bug report #2825989
|
||||
(http://curl.haxx.se/bug/view.cgi?id=2825989) pointing out that
|
||||
OpenSSL-powered libcurl didn't support the SHA-2 digest algorithm, and
|
||||
provided the solution too: to use OpenSSL_add_all_algorithms() in addition
|
||||
to the older SSLeay_* alternative. OpenSSL_add_all_algorithms was added in
|
||||
OpenSSL 0.9.5
|
||||
|
||||
Daniel Stenberg (23 Jul 2009)
|
||||
- Added CURLOPT_SSH_KNOWNHOSTS, CURLOPT_SSH_KEYFUNCTION, CURLOPT_SSH_KEYDATA.
|
||||
They introduce known_host support for SSH keys to libcurl. See docs for
|
||||
details. Note that this feature depends on a new enough libssh2 version, to
|
||||
be supported in libssh2 1.2 and later (or current git repo at this time).
|
||||
|
||||
Michal Marek (22 Jul 2009)
|
||||
- David Binderman found a memory and fd leak in lib/gtls.c:load_file()
|
||||
(https://bugzilla.novell.com/523919). When looking at the code, I found that
|
||||
also the ptr pointer can leak.
|
||||
|
||||
Kamil Dudka (20 Jul 2009)
|
||||
- Claes Jakobsson improved the support for client certificates handling in
|
||||
NSS-powered libcurl. Now the client certificates can be selected
|
||||
automatically by a NSS built-in hook. Additionally pre-login to all PKCS11
|
||||
slots is no more performed. It used to cause problems with HW tokens.
|
||||
|
||||
- Fixed reference counting for NSS client certificates. Now the PEM reader
|
||||
module should be always properly unloaded on Curl_nss_cleanup(). If the
|
||||
unload fails though, libcurl will try to reuse the already loaded instance.
|
||||
|
||||
Daniel Fandrich (15 Jul 2009)
|
||||
- Added nonblock.c to the non-automake makefiles (note that the dependencies
|
||||
in the Watcom makefiles aren't quite correct).
|
||||
|
||||
Michal Marek (15 Jul 2009)
|
||||
- Changed the description of CURLINFO_OS_ERRNO to make it clear that the
|
||||
errno is not reset on success.
|
||||
|
||||
Guenter Knauf (14 Jul 2009)
|
||||
- renamed generated config.h to curl_config.h to avoid any future clashes
|
||||
with config.h from other projects.
|
||||
|
||||
Daniel Stenberg (9 Jul 2009)
|
||||
- Eric Wong introduced curlx_nonblock() that the curl tool now (re-)uses for
|
||||
setting a file descriptor non-blocking. Used by the functionality Eric
|
||||
himself brough on June 15th.
|
||||
|
||||
Daniel Stenberg (8 Jul 2009)
|
||||
- Constantine Sapuntzakis posted bug report #2813123
|
||||
(http://curl.haxx.se/bug/view.cgi?id=2813123) and an a patch that fixes the
|
||||
problem:
|
||||
|
||||
Url A is accessed using auth. Url A redirects to Url B (on a different
|
||||
server0. Url B reuses a persistent connection. Url B has auth, even though
|
||||
it's on a different server.
|
||||
|
||||
Note: if Url B does not reuse a persistent connection, auth is not sent.
|
||||
|
||||
reason:
|
||||
|
||||
data->state.first_host is not initialized becuase Curl_http_connect is not
|
||||
called when a connection is reused.
|
||||
|
||||
Solution:
|
||||
|
||||
move initialization of data->state.first_host to Curl_http. No code before
|
||||
Curl_http uses data->state.first_host anyway.
|
||||
|
||||
Guenter Knauf (4 Jul 2009)
|
||||
- Markus Koetter provided a patch to avoid getnameinfo() usage which broke a
|
||||
couple of both IPv4 and IPv6 autobuilds.
|
||||
|
||||
Daniel Stenberg (29 Jun 2009)
|
||||
- Markus Koetter made CURLOPT_FTPPORT (and curl's -P/--ftpport) support a port
|
||||
range if given colon-separated after the host name/address part. Like
|
||||
"192.168.0.1:2000-10000"
|
||||
|
||||
- Modified the separators used for CURLOPT_CERTINFO in multi-part outputs. I
|
||||
don't know how they got wrong in the first place, but using this output
|
||||
format makes it possible to quite easily separate the string into an array
|
||||
of multiple items.
|
||||
|
||||
Daniel Fandrich (16 June 2009)
|
||||
- Added a few more compiler warning options for gcc.
|
||||
|
||||
Daniel Stenberg (16 Jun 2009)
|
||||
- Reuven Wachtfogel made curl -o - properly produce a binary output on windows
|
||||
(no newline translations). Use -B/--use-ascii if you rather get the ascii
|
||||
approach.
|
||||
|
||||
Michal Marek (16 Jun 2009)
|
||||
- When doing non-anonymous ftp via http proxies and the password is not
|
||||
provided in the url, add it there (squid needs this).
|
||||
|
||||
Daniel Stenberg (15 Jun 2009)
|
||||
- Eric Wong's patch:
|
||||
|
||||
This allows curl(1) to be used as a client-side tunnel for arbitrary stream
|
||||
protocols by abusing chunked transfer encoding in both the HTTP request and
|
||||
HTTP response. This requires server support for sending a response while a
|
||||
request is still being read, of course.
|
||||
|
||||
If attempting to read from stdin returns EAGAIN, then we pause our sender.
|
||||
This leaves curl to attempt to read from the socket while reading from stdin
|
||||
(and thus sending) is paused.
|
||||
|
||||
This change was needed to allow successfully tunneling the git protocol over
|
||||
HTTP (--no-buffer is needed, as well).
|
||||
|
||||
Patrick Monnerat (15 Jun 2009)
|
||||
- Replaced use of standard C library rand()/srand() by our own pseudo-random
|
||||
number generator.
|
||||
|
||||
Yang Tse (11 Jun 2009)
|
||||
- I adapted testcurl script to allow building test harness programs when
|
||||
cross-compiling for a *-*-mingw* host.
|
||||
|
||||
Daniel Stenberg (10 Jun 2009)
|
||||
- Fabian Keil ran clang on the (lib)curl code, found a bunch of warnings and
|
||||
contributed a range of patches to fix them.
|
||||
|
||||
Yang Tse (10 Jun 2009)
|
||||
- I introduced configure script option --enable-curldebug which now allows
|
||||
the decoupled enabling or disabling of the curl debug memory tracking
|
||||
feature from the --enable-debug option which no longer controls this.
|
||||
|
||||
curl --version will list 'Debug' feature for debug enabled builds, and
|
||||
will list 'TrackMemory' feature for curl debug memory tracking capable
|
||||
builds. These features are independent and can be controlled when running
|
||||
the configure script. When --enable-debug is given both features will be
|
||||
enabled, unless some restriction prevents memory tracking from being used.
|
||||
|
||||
Internally, definition of preprocessor symbol DEBUGBUILD restricts code
|
||||
which is only compiled for debug enabled builds. And symbol CURLDEBUG is
|
||||
used to differentiate code which is _only_ used for memory tracking.
|
||||
|
||||
Yang Tse (9 Jun 2009)
|
||||
- Daniel Steinberg pointed out that Curl_FormInit() in formdata.c was not
|
||||
initializing the fread callback pointer and this triggered a compiler
|
||||
warning, also provided a friendly suggestion on how to fix it.
|
||||
|
||||
Daniel Stenberg (8 Jun 2009)
|
||||
- Claes Jakobsson provided a patch for libcurl-NSS that fixed a bad refcount
|
||||
issue with client certs that caused issues like segfaults.
|
||||
http://curl.haxx.se/mail/lib-2009-05/0316.html
|
||||
|
||||
- Triggered by bug report #2798852 and the patch in there, I fixed configure
|
||||
to detect gnutls build options with pkg-config only and not libgnutls-config
|
||||
anymore since GnuTLS has stopped distributing that tool. If an explicit path
|
||||
is given to configure, we will instead guess on how to link and use that
|
||||
lib. I did not use the patch from the bug report.
|
||||
|
||||
Yang Tse (8 Jun 2009)
|
||||
- Igor Novoseltsev adjusted Makefile.vxworks to get sources and headers
|
||||
included from Makefile.inc, and provided docs\INSTALL VxWorks section.
|
||||
|
||||
- I removed buildconf.bat from release and daily snapshot archives. This
|
||||
file is only for CVS tree checkout builds.
|
||||
|
||||
Daniel Stenberg (8 Jun 2009)
|
||||
- Eric Wong fixed --no-buffer to actually switch off output buffering. Been
|
||||
broken since 7.19.0
|
||||
|
||||
Bill Hoffman (6 Jun 2009)
|
||||
- Added some cmake docs and fixed socklen_t in the build.
|
||||
|
||||
Yang Tse (5 Jun 2009)
|
||||
- John E. Malmberg provided VMS specific patch: "This fixes an existing bug
|
||||
in urlglob.c where it was not converting the Curl Unix exit code to a VMS
|
||||
DCL compatible exit code. This fix required the enhancement described next.
|
||||
This also adds an enhancement to main.c so that when curl is run under a
|
||||
Unix shell like Bash on VMS, it will return the standard Unix exit codes
|
||||
and messages." And another patch for docs/examples.
|
||||
|
||||
I introduced os-specific.c and os-specific.h for use in curl tool code
|
||||
and adjusted John E. Malmberg's patch placement to use these new files
|
||||
as an effort to prevent main.c from growing ad infinitum. Code already
|
||||
existing in main.c which is OS specific should be moved into these files.
|
||||
|
||||
Daniel Stenberg (4 June 2009)
|
||||
- Setting the Content-Length: header from your app when you do a POST or PUT
|
||||
is almost always a VERY BAD IDEA. Yet there are still apps out there doing
|
||||
this, and now recently it triggered a bug/side-effect in libcurl as when
|
||||
libcurl sends a POST or PUT with NTLM, it sends an empty post first when it
|
||||
knows it will just get a 401/407 back. If the app then replaced the
|
||||
Content-Length header, it caused the server to wait for input that libcurl
|
||||
wouldn't send. Aaron Oneal reported this problem in bug report #2799008
|
||||
(http://curl.haxx.se/bug/view.cgi?id=2799008) and helped us verify the fix.
|
||||
|
||||
Yang Tse (4 Jun 2009)
|
||||
- Igor Novoseltsev provided patches and information, that after some
|
||||
adjustments to better fit curl's way of doing things, have resulted
|
||||
in the posibility of building libcurl for VxWorks.
|
||||
|
||||
Daniel Fandrich (2 June 2009)
|
||||
- Checked in a Google Android make file. To use it, you must first
|
||||
create a config.h file by running configure in the Android environment,
|
||||
which doesn't seem to be easy to do. If no easy way can be found, a
|
||||
static config-android.h may need to be created and checked in to the
|
||||
libcurl source tree.
|
||||
|
||||
Daniel Stenberg (1 June 2009)
|
||||
- Claes Jakobsson fixed the configure script to better find and use NSS
|
||||
without pkg-config.
|
||||
|
||||
Yang Tse (1 Jun 2009)
|
||||
- John E. Malmberg provided a VMS specific clean-up for curl.h, and pointed
|
||||
out that the configure script was failing to detect the timeval struct on
|
||||
VMS when building with _XOPEN_SOURCE_EXTENDED undefined due to definition
|
||||
taking place in socket.h instead of time.h. I have adjusted configure
|
||||
script to also include this header when checking struct timeval.
|
||||
|
||||
Daniel Stenberg (27 May 2009)
|
||||
- Frank McGeough provided a small OpenSSL #include fix to make libcurl compile
|
||||
fine with Nokia 5th edition 1.0 SDK for Symbian.
|
||||
|
||||
- Andre Guibert de Bruet found a call to a OpenSSL function that didn't check
|
||||
for a failure properly.
|
||||
|
||||
- Mike Crowe pointed out that setting CURLOPT_USERPWD to NULL used to clear
|
||||
the auth credentials back in 7.19.0 and earlier while now you have to set ""
|
||||
to get the same effect. His patch brings back the ability to use NULL.
|
||||
|
||||
- Claes Jakobsson fixed libcurl-NSS to build fine even without the
|
||||
PK11_CreateGenericObject() function.
|
||||
|
||||
Daniel Stenberg (25 May 2009)
|
||||
- bug report #2796358 (http://curl.haxx.se/bug/view.cgi?id=2796358) pointed
|
||||
out that the cookie parser would leak memory when it parses cookies that are
|
||||
received with domain, path etc set multiple times in the same header. While
|
||||
such a cookie is questionable, they occur in the wild and libcurl no longer
|
||||
leaks memory for them. I added such a header to test case 8.
|
||||
|
||||
Daniel Fandrich (22 May 2009)
|
||||
- Removed some obsolete digest code that caused a valgrind error in test 551.
|
||||
|
||||
Daniel Fandrich (20 May 2009)
|
||||
- Added "non-existing host" test keywords to make it easy to skip those
|
||||
tests on machines that have broken DNS configurations (such as
|
||||
those configured to use OpenDNS).
|
||||
|
||||
Daniel Stenberg (19 May 2009)
|
||||
- Kamil Dudka brought the patch from the Redhat bug entry
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=427966 which was libcurl closing
|
||||
a bad file descriptor when closing down the FTP data connection. Caolan
|
||||
McNamara seems to be the original author of it.
|
||||
|
||||
Version 7.19.5 (18 May 2009)
|
||||
|
||||
Daniel Stenberg (17 May 2009)
|
||||
|
@@ -6,6 +6,13 @@
|
||||
# include <sys/types.h>
|
||||
#endif /* HAVE_SYS_TYPES_H */
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif /* HAVE_STDINT_H */
|
||||
|
@@ -6,51 +6,51 @@
|
||||
# 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)
|
||||
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)
|
||||
|
@@ -12,43 +12,43 @@
|
||||
# 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}")
|
||||
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)
|
||||
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
|
||||
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
|
||||
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
|
||||
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)
|
||||
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
|
||||
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}
|
||||
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}
|
||||
@@ -56,20 +56,20 @@ MACRO(CURL_CHECK_C_SOURCE_COMPILES SOURCE VAR)
|
||||
"${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
|
||||
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
|
||||
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)
|
||||
endif(${VAR})
|
||||
endif("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
||||
endmacro(CURL_CHECK_C_SOURCE_COMPILES)
|
||||
|
@@ -12,43 +12,43 @@
|
||||
# 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}")
|
||||
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)
|
||||
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
|
||||
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
|
||||
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
|
||||
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)
|
||||
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
|
||||
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
|
||||
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}
|
||||
@@ -57,27 +57,27 @@ MACRO(CURL_CHECK_C_SOURCE_RUNS SOURCE VAR)
|
||||
"${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(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
|
||||
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
|
||||
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)
|
||||
endif("${result_var}" EQUAL 0)
|
||||
endif("${VAR}" MATCHES "^${VAR}$" OR "${VAR}" MATCHES "UNKNOWN")
|
||||
endmacro(CURL_CHECK_C_SOURCE_RUNS)
|
||||
|
42
CMake/FindCARES.cmake
Executable file
42
CMake/FindCARES.cmake
Executable file
@@ -0,0 +1,42 @@
|
||||
# - Find c-ares
|
||||
# Find the c-ares includes and library
|
||||
# This module defines
|
||||
# CARES_INCLUDE_DIR, where to find ares.h, etc.
|
||||
# CARES_LIBRARIES, the libraries needed to use c-ares.
|
||||
# CARES_FOUND, If false, do not try to use c-ares.
|
||||
# also defined, but not for general use are
|
||||
# CARES_LIBRARY, where to find the c-ares library.
|
||||
|
||||
FIND_PATH(CARES_INCLUDE_DIR ares.h
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
SET(CARES_NAMES ${CARES_NAMES} cares)
|
||||
FIND_LIBRARY(CARES_LIBRARY
|
||||
NAMES ${CARES_NAMES}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
)
|
||||
|
||||
IF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
|
||||
SET(CARES_LIBRARIES ${CARES_LIBRARY})
|
||||
SET(CARES_FOUND "YES")
|
||||
ELSE (CARES_LIBRARY AND CARES_INCLUDE_DIR)
|
||||
SET(CARES_FOUND "NO")
|
||||
ENDIF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
|
||||
|
||||
|
||||
IF (CARES_FOUND)
|
||||
IF (NOT CARES_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found c-ares: ${CARES_LIBRARIES}")
|
||||
ENDIF (NOT CARES_FIND_QUIETLY)
|
||||
ELSE (CARES_FOUND)
|
||||
IF (CARES_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find c-ares library")
|
||||
ENDIF (CARES_FIND_REQUIRED)
|
||||
ENDIF (CARES_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CARES_LIBRARY
|
||||
CARES_INCLUDE_DIR
|
||||
)
|
@@ -1,19 +1,19 @@
|
||||
# Extension of the standard FindOpenSSL.cmake
|
||||
# Adds OPENSSL_INCLUDE_DIRS and libeay32
|
||||
INCLUDE("${CMAKE_ROOT}/Modules/FindOpenSSL.cmake")
|
||||
include("${CMAKE_ROOT}/Modules/FindOpenSSL.cmake")
|
||||
|
||||
# Bill Hoffman told that libeay32 is necessary for him:
|
||||
FIND_LIBRARY(SSL_LIBEAY NAMES libeay32)
|
||||
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)
|
||||
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()
|
||||
if(OPENSSL_FOUND)
|
||||
set(OPENSSL_INCLUDE_DIRS ${OPENSSL_INCLUDE_DIR})
|
||||
endif()
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# Locate zlib
|
||||
INCLUDE("${CMAKE_ROOT}/Modules/FindZLIB.cmake")
|
||||
include("${CMAKE_ROOT}/Modules/FindZLIB.cmake")
|
||||
|
||||
FIND_LIBRARY(ZLIB_LIBRARY_DEBUG NAMES zd zlibd zdlld zlib1d )
|
||||
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()
|
||||
if(ZLIB_FOUND AND ZLIB_LIBRARY_DEBUG)
|
||||
set( ZLIB_LIBRARIES optimized "${ZLIB_LIBRARY}" debug ${ZLIB_LIBRARY_DEBUG})
|
||||
endif()
|
||||
|
@@ -1,250 +1,250 @@
|
||||
INCLUDE(CurlCheckCSourceCompiles)
|
||||
SET(EXTRA_DEFINES "__unused1\n#undef inline\n#define __unused2")
|
||||
SET(HEADER_INCLUDES)
|
||||
SET(headers_hack)
|
||||
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
|
||||
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)
|
||||
endif(${check})
|
||||
endmacro(add_header_include)
|
||||
|
||||
SET(signature_call_conv)
|
||||
IF(HAVE_WINDOWS_H)
|
||||
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}
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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("
|
||||
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
|
||||
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}")
|
||||
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")
|
||||
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)
|
||||
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)
|
||||
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("
|
||||
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)
|
||||
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
|
||||
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}")
|
||||
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")
|
||||
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)
|
||||
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 "${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)
|
||||
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
|
||||
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)
|
||||
endif(${check})
|
||||
endmacro(add_header_include header)
|
||||
|
||||
IF(HAVE_WINDOWS_H)
|
||||
SET(EXTRA_DEFINES ${EXTRA_DEFINES}
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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(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
|
||||
set(CHECK_TYPE_SIZE_PREINCLUDE
|
||||
"#undef inline")
|
||||
|
||||
IF(HAVE_WINDOWS_H)
|
||||
SET(CHECK_TYPE_SIZE_PREINCLUDE "${CHECK_TYPE_SIZE_PREINCLUDE}
|
||||
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}
|
||||
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}
|
||||
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}
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
|
||||
|
@@ -1,121 +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)
|
||||
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_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_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_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_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(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(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)
|
||||
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)
|
||||
|
||||
|
@@ -1,31 +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()
|
||||
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()
|
||||
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()
|
||||
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()
|
||||
|
1087
CMakeLists.txt
1087
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,6 @@ 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 "my.cdash.org")
|
||||
set(CTEST_DROP_LOCATION "/submit.php?project=CURL")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||
|
@@ -32,8 +32,8 @@ 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)
|
||||
curl-style.el sample.emacs RELEASE-NOTES buildconf \
|
||||
libcurl.pc.in vc6curl.dsw MacOSX-Framework Android.mk $(CMAKE_DIST)
|
||||
|
||||
bin_SCRIPTS = curl-config
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
Curl and libcurl 7.19.5
|
||||
Curl and libcurl 7.19.6
|
||||
|
||||
Public curl releases: 111
|
||||
Public curl releases: 112
|
||||
Command line options: 132
|
||||
curl_easy_setopt() options: 163
|
||||
Public functions in libcurl: 58
|
||||
@@ -9,45 +9,42 @@ Curl and libcurl 7.19.5
|
||||
|
||||
This release includes the following changes:
|
||||
|
||||
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
|
||||
o CURLOPT_FTPPORT (and curl's -P/--ftpport) support port ranges
|
||||
o Added CURLOPT_SSH_KNOWNHOSTS, CURLOPT_SSH_KEYFUNCTION, CURLOPT_SSH_KEYDATA
|
||||
o CURLOPT_QUOTE, CURLOPT_POSTQUOTE and CURLOPT_PREQUOTE can be told to ignore
|
||||
error responses when used with FTP
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
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
|
||||
o crash on bad socket close with FTP
|
||||
o leaking cookie memory when duplicate domains or paths were used
|
||||
o build fix for Symbian
|
||||
o CURLOPT_USERPWD set to NULL clears auth credentials
|
||||
o libcurl-NSS build fixes
|
||||
o configure script fixed for VMS
|
||||
o set Content-Length: with POST and PUT failed with NTLM auth
|
||||
o allow building libcurl for VxWorks
|
||||
o curl tool exit codes fixed for VMS
|
||||
o --no-buffer treated correctly
|
||||
o djgpp build fix
|
||||
o configure detection of GnuTLS now based on pkg-config as well
|
||||
o libcurl-NSS client cert handling segfaults
|
||||
o curl uploading from stdin/pipes now works in non-blocking way so that it
|
||||
continues the downloading even when the read stalls
|
||||
o ftp credentials are added to the url if needed for http proxies
|
||||
o curl -o - sends data to stdout using binary mode on windows
|
||||
o fixed the separators for "array" style string that CURLINFO_CERTINFO returns
|
||||
o auth problem over several hosts with re-used connection
|
||||
o improved the support for client certificates in libcurl+NSS
|
||||
o fix leak in gtls code
|
||||
o missing algorithms in libcurl+OpenSSL
|
||||
o with noproxy set you could still get a proxy if a proxy env was set
|
||||
o rand seeding on libcurl on windows built with OpenSSL was not thread-safe
|
||||
o fixed the zero byte inserted in cert name flaw in libcurl+OpenSSL
|
||||
o don't try SNI with SSLv2 or SSLv3 (OpenSSL and GnuTLS builds)
|
||||
o libcurl+OpenSSL would wrongly acknowledge a cert if CN matched but
|
||||
subjectAltName didn't
|
||||
o TFTP upload sent illegal TSIZE packets
|
||||
|
||||
This release includes the following known bugs:
|
||||
|
||||
@@ -56,12 +53,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:
|
||||
|
||||
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
|
||||
Yang Tse, Daniel Fandrich, Kamil Dudka, Caolan McNamara, Frank McGeough,
|
||||
Andre Guibert de Bruet, Mike Crowe, Claes Jakobsson, John E. Malmberg,
|
||||
Aaron Oneal, Igor Novoseltsev, Eric Wong, Bill Hoffman, Daniel Steinberg,
|
||||
Fabian Keil, Michal Marek, Reuven Wachtfogel, Markus Koetter,
|
||||
Constantine Sapuntzakis, David Binderman, Johan van Selst, Alexander Beedie,
|
||||
Tanguy Fautre, Scott Cantor, Curt Bogmine, Peter Sylvester, Benbuck Nason,
|
||||
Carsten Lange
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
||||
|
32
TODO-RELEASE
32
TODO-RELEASE
@@ -1,9 +1,31 @@
|
||||
To be addressed in 7.19.6 (planned release: July 2009)
|
||||
To be addressed in 7.19.7 (planned release: October 2009)
|
||||
=========================
|
||||
|
||||
226 - Active Mode FTPS Data Port Range
|
||||
248 - "Pausing pipeline problems."
|
||||
http://curl.haxx.se/mail/lib-2009-07/0214.html
|
||||
|
||||
235 - KNOWN_BUG #65
|
||||
Code adjustment for FTP over socks proxy remains
|
||||
251 - TFTP block size / better integration in transfer
|
||||
http://curl.haxx.se/mail/lib-2009-08/0028.html
|
||||
|
||||
254 - Problem re-using easy handle after call to curl_multi_remove_handle
|
||||
http://curl.haxx.se/mail/lib-2009-07/0249.html
|
||||
|
||||
255 - debugging a crash in Curl_pgrsTime/checkPendPipeline?
|
||||
http://curl.haxx.se/mail/lib-2009-08/0066.html
|
||||
|
||||
256 - "More questions about ares behavior"
|
||||
http://curl.haxx.se/mail/lib-2009-08/0012.html
|
||||
|
||||
244 - patch for [out] parameters
|
||||
http://curl.haxx.se/mail/lib-2009-06/0342.html
|
||||
|
||||
245 - HTTP version getinfo
|
||||
http://curl.haxx.se/mail/lib-2009-06/0312.html
|
||||
|
||||
247 - Using CURLINFO_ERROR in Curl_failf
|
||||
http://curl.haxx.se/mail/lib-2009-06/0065.html
|
||||
|
||||
253 - add option to disable SNI for TLS handshakes
|
||||
|
||||
257 -
|
||||
|
||||
240 -
|
||||
|
51
acinclude.m4
51
acinclude.m4
@@ -1852,7 +1852,7 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
|
||||
AC_REQUIRE([AC_HEADER_TIME])dnl
|
||||
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl
|
||||
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl
|
||||
AC_CHECK_HEADERS(sys/types.h sys/time.h time.h)
|
||||
AC_CHECK_HEADERS(sys/types.h sys/time.h time.h sys/socket.h)
|
||||
AC_CACHE_CHECK([for struct timeval], [ac_cv_struct_timeval], [
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
@@ -1882,6 +1882,9 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
]],[[
|
||||
struct timeval ts;
|
||||
@@ -2199,6 +2202,52 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_LIBS_CONNECT
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify if network connect function is already available
|
||||
dnl using current libraries or if another one is required.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_LIBS_CONNECT], [
|
||||
AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
|
||||
AC_MSG_CHECKING([for connect in libraries])
|
||||
tst_connect_save_LIBS="$LIBS"
|
||||
tst_connect_need_LIBS="unknown"
|
||||
for tst_lib in '' '-lsocket' ; do
|
||||
if test "$tst_connect_need_LIBS" = "unknown"; then
|
||||
LIBS="$tst_lib $tst_connect_save_LIBS"
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$curl_includes_winsock2
|
||||
#ifndef HAVE_WINDOWS_H
|
||||
int connect(int, void*, int);
|
||||
#endif
|
||||
]],[[
|
||||
if(0 != connect(0, 0, 0))
|
||||
return 1;
|
||||
]])
|
||||
],[
|
||||
tst_connect_need_LIBS="$tst_lib"
|
||||
])
|
||||
fi
|
||||
done
|
||||
LIBS="$tst_connect_save_LIBS"
|
||||
#
|
||||
case X-"$tst_connect_need_LIBS" in
|
||||
X-unknown)
|
||||
AC_MSG_RESULT([cannot find connect])
|
||||
AC_MSG_ERROR([cannot find connect function in libraries.])
|
||||
;;
|
||||
X-)
|
||||
AC_MSG_RESULT([yes])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([$tst_connect_need_LIBS])
|
||||
LIBS="$tst_connect_need_LIBS $tst_connect_save_LIBS"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_DEFINE_UNQUOTED (VARIABLE, [VALUE])
|
||||
dnl -------------------------------------------------
|
||||
dnl Like AC_DEFINE_UNQUOTED this macro will define a C preprocessor
|
||||
|
@@ -1,4 +1,6 @@
|
||||
*.html
|
||||
*.lo
|
||||
*.pdf
|
||||
.deps
|
||||
.libs
|
||||
Makefile
|
||||
@@ -10,8 +12,8 @@ ares_build.h
|
||||
ares_version.h.dist
|
||||
autom4te.cache
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in
|
||||
ares_config.h
|
||||
ares_config.h.in
|
||||
config.log
|
||||
config.lt
|
||||
config.status
|
||||
@@ -22,5 +24,6 @@ libcares.la
|
||||
libcares.pc
|
||||
libtool
|
||||
ltmain.sh
|
||||
man3
|
||||
missing
|
||||
stamp-h*
|
||||
|
48
ares/CHANGES
48
ares/CHANGES
@@ -1,5 +1,53 @@
|
||||
Changelog for the c-ares project
|
||||
|
||||
* 3 Aug 2009 (Daniel Stenberg)
|
||||
- Joshua Kwan fixed the init routine to fill in the defaults for stuff that
|
||||
fails to get inited by other means. This fixes a case of when the c-ares
|
||||
init fails when internet access is fone.
|
||||
|
||||
- Timo Teras changed the reason code used in the resolve callback done when
|
||||
ares_cancel() is used, to be ARES_ECANCELLED instead of ARES_ETIMEOUT to
|
||||
better allow the callback to know what's happening.
|
||||
|
||||
* 14 Jul 2009 (Guenter Knauf)
|
||||
- renamed generated config.h to ares_config.h to avoid any future clashes
|
||||
with config.h from other projects.
|
||||
|
||||
* June 8 2009 (Yang Tse)
|
||||
- Removed buildconf.bat from release and daily snapshot archives. This
|
||||
file is only for CVS tree checkout builds.
|
||||
|
||||
* May 26 2009 (Yang Tse)
|
||||
- Added --enable-curldebug configure option to enable and disable building
|
||||
with the low-level curl debug memory tracking 'feature' to allow decoupled
|
||||
setting from --enable-debug, allowing again to build c-ares independently
|
||||
out of the CVS tree.
|
||||
|
||||
For the c-ares library option --enable-debug enables debug build features
|
||||
which are _not_ related with memory tracking. For the c-ares library when
|
||||
--enable-debug is given it does not enable the memory tracking feature. If
|
||||
you wish to enable the curl debug memory tracking you must use configure
|
||||
option --enable-curldebug explicitily to do so.
|
||||
|
||||
Internally, definition of preprocessor symbol DEBUGBUILD restricts code
|
||||
which is only compiled for debug enabled builds. And symbol CURLDEBUG is
|
||||
used to differentiate code which is _only_ used for memory tracking.
|
||||
|
||||
* May 19 2009 (Yang Tse)
|
||||
- Introduced ares_library_init() and ares_library_cleanup() functions.
|
||||
|
||||
This is an API and ABI break for Win32/64 systems. Non-Win32/64 build targets
|
||||
using c-ares 1.6.1 can still survive without calling these functions. Read all
|
||||
the details on ares_library_init(3) and ares_library_cleanup(3) man pages that
|
||||
are included.
|
||||
|
||||
curl/libcurl 7.19.5 is fully compatible with c-ares 1.6.1 on all systems.
|
||||
|
||||
In order to use c-ares 1.6.1 with curl/libcurl on Win32/64 systems it is
|
||||
required that curl/libcurl is 7.19.5 or newer. In other words, it is not
|
||||
possible on Win32/64 to use c-ares 1.6.1 with a curl/libcurl version less
|
||||
than 7.19.5
|
||||
|
||||
* 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_.
|
||||
|
7
ares/CVS-INFO
Normal file
7
ares/CVS-INFO
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
CVS-INFO
|
||||
|
||||
This file is only present in the CVS - never in release archives. It is used
|
||||
as a sentinel file in buildconf.bat in order to differentiate a CVS checkout
|
||||
from release and daily snapshot archives.
|
||||
|
@@ -14,11 +14,13 @@ ACLOCAL_AMFLAGS = -I m4
|
||||
# libcurl, but we do this anyway for convenience.
|
||||
#
|
||||
# $(top_builddir)/../include is for libcurl's generated curl/curlbuild.h file
|
||||
# $(top_builddir) is for c-ares's generated config.h file
|
||||
# $(top_srcdir)/../include is for libcurl's external include files
|
||||
# $(top_builddir) is for c-ares's generated ares_config.h file
|
||||
# $(top_srcdir) is for c-ares's lib/setup.h and other "c-ares-private" files
|
||||
|
||||
if CURLDEBUG
|
||||
INCLUDES = -I$(top_builddir)/../include \
|
||||
-I$(top_srcdir)/../include \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)
|
||||
else
|
||||
@@ -33,7 +35,7 @@ man_MANS = $(MANPAGES)
|
||||
MSVCFILES = vc/vc.dsw vc/acountry/acountry.dsp vc/adig/adig.dsp \
|
||||
vc/ahost/ahost.dsp vc/areslib/areslib.dsp vc/areslib/areslib.dsw
|
||||
|
||||
if DEBUGBUILD
|
||||
if CURLDEBUG
|
||||
PROGS =
|
||||
else
|
||||
PROGS = ahost adig acountry
|
||||
@@ -46,7 +48,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 ares_build.h.in buildconf.bat
|
||||
TODO ares_build.h.in $(PDFPAGES)
|
||||
|
||||
CLEANFILES = $(PDFPAGES) $(HTMLPAGES)
|
||||
|
||||
DISTCLEANFILES = ares_build.h
|
||||
|
||||
@@ -87,7 +91,7 @@ if NO_UNDEFINED
|
||||
UNDEF = -no-undefined
|
||||
endif
|
||||
|
||||
EXPORT_SYMBOLS = -export-symbols-regex '^ares_[[:alnum:]].*'
|
||||
# EXPORT_SYMBOLS = -export-symbols-regex '^ares_[[:alnum:]].*'
|
||||
|
||||
libcares_la_LDFLAGS = $(UNDEF) $(VER) $(EXPORT_SYMBOLS)
|
||||
|
||||
@@ -103,13 +107,52 @@ 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)
|
||||
ahost_LDADD = $(top_builddir)/libcares.la
|
||||
|
||||
adig_SOURCES = adig.c ares_getopt.c ares_getopt.h
|
||||
adig_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)
|
||||
adig_LDADD = $(top_builddir)/libcares.la
|
||||
|
||||
acountry_SOURCES = acountry.c ares_getopt.c ares_getopt.h
|
||||
acountry_LDADD = $(top_builddir)/$(lib_LTLIBRARIES)
|
||||
acountry_LDADD = $(top_builddir)/libcares.la
|
||||
|
||||
SOURCEDMANDIR = man3
|
||||
SOURCEDMANPAGES = ares_init.3
|
||||
|
||||
clean-local: clean-sourced-manpages
|
||||
|
||||
clean-sourced-manpages:
|
||||
@srcdmandir='$(SOURCEDMANDIR)'; \
|
||||
echo "rm -rf $(top_builddir)/$$srcdmandir"; \
|
||||
rm -rf $(top_builddir)/$$srcdmandir
|
||||
|
||||
sourced-manpages: clean-sourced-manpages
|
||||
@srcdmandir='$(SOURCEDMANDIR)'; \
|
||||
srcdmanfiles='$(SOURCEDMANPAGES)'; \
|
||||
mkdir $(top_builddir)/$$srcdmandir; \
|
||||
for file in $$srcdmanfiles; do \
|
||||
if test -f $(top_srcdir)/$$file; then \
|
||||
echo "cp $(top_srcdir)/$$file $(top_builddir)/$$srcdmandir/$$file"; \
|
||||
cp $(top_srcdir)/$$file $(top_builddir)/$$srcdmandir/$$file; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
MAN2HTML = roffit --mandir=. < $< >$@
|
||||
|
||||
SUFFIXES = .3 .html
|
||||
|
||||
html: sourced-manpages $(HTMLPAGES)
|
||||
|
||||
.3.html:
|
||||
$(MAN2HTML)
|
||||
|
||||
pdf: sourced-manpages $(PDFPAGES)
|
||||
|
||||
.3.pdf:
|
||||
@(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
|
||||
groff -Tps -man $< >$$foo.ps; \
|
||||
ps2pdf $$foo.ps $@; \
|
||||
rm $$foo.ps; \
|
||||
echo "converted $< to $@")
|
||||
|
||||
# Make files named *.dist replace the file without .dist extension
|
||||
dist-hook:
|
||||
|
@@ -4,37 +4,17 @@
|
||||
#
|
||||
# $Id$
|
||||
|
||||
|
||||
TOPDIR = ..
|
||||
|
||||
include ../packages/DOS/common.dj
|
||||
|
||||
include Makefile.inc
|
||||
|
||||
CFLAGS += -DWATT32 -DHAVE_AF_INET6 -DHAVE_PF_INET6 -DHAVE_IOCTLSOCKET \
|
||||
-DHAVE_IOCTLSOCKET_FIONBIO -DHAVE_STRUCT_IN6_ADDR \
|
||||
-DHAVE_SOCKADDR_IN6_SIN6_SCOPE_ID -DHAVE_SYS_TIME_H \
|
||||
-DHAVE_STRUCT_SOCKADDR_IN6 -DHAVE_STRUCT_ADDRINFO \
|
||||
-DHAVE_ARPA_NAMESER_H -DHAVE_ARPA_INET_H -DHAVE_SYS_SOCKET_H \
|
||||
-DHAVE_SYS_UIO_H -DHAVE_NETINET_IN_H -DHAVE_NETINET_TCP_H \
|
||||
-DNS_INADDRSZ=4 -DHAVE_RECV -DHAVE_SEND -DHAVE_GETTIMEOFDAY \
|
||||
-DSEND_TYPE_ARG1='int' -DSEND_QUAL_ARG2='const' \
|
||||
-DSEND_TYPE_ARG2='void*' -DSEND_TYPE_ARG3='int' \
|
||||
-DSEND_TYPE_ARG4='int' -DSEND_TYPE_RETV='int' \
|
||||
-DRECV_TYPE_ARG1='int' -DRECV_TYPE_ARG2='void*' \
|
||||
-DRECV_TYPE_ARG3='int' -DRECV_TYPE_ARG4='int' \
|
||||
-DRECV_TYPE_RETV='int' -DHAVE_STRUCT_TIMEVAL \
|
||||
-Dselect=select_s -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_LIMITS_H
|
||||
CFLAGS += -DWATT32 -Dselect=select_s
|
||||
|
||||
LDFLAGS = -s
|
||||
|
||||
ifeq ($(USE_DEBUG),1)
|
||||
ifeq ($(USE_CURLDEBUG),1)
|
||||
EX_LIBS = ../lib/libcurl.a
|
||||
OBJ_HACK = $(OBJECTS)
|
||||
else
|
||||
@@ -57,12 +37,15 @@ EX_LIBS += $(WATT32_ROOT)/lib/libwatt.a
|
||||
|
||||
OBJECTS = $(addprefix $(OBJ_DIR)/, $(CSOURCES:.c=.o))
|
||||
|
||||
all: $(OBJ_DIR) libcares.a ahost.exe adig.exe acountry.exe
|
||||
all: $(OBJ_DIR) ares_config.h libcares.a ahost.exe adig.exe acountry.exe
|
||||
@echo Welcome to c-ares.
|
||||
|
||||
libcares.a: $(OBJECTS)
|
||||
ar rs $@ $?
|
||||
|
||||
ares_config.h: config.dos
|
||||
$(COPY) $^ $@
|
||||
|
||||
ahost.exe: ahost.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
||||
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
||||
|
||||
@@ -72,12 +55,30 @@ adig.exe: adig.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
||||
acountry.exe: acountry.c $(OBJ_DIR)/ares_getopt.o $(OBJ_HACK)
|
||||
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(EX_LIBS)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) libcares.a
|
||||
# clean generated files
|
||||
#
|
||||
genclean:
|
||||
- $(DELETE) ares_config.h
|
||||
|
||||
vclean realclean: clean
|
||||
rm -f ahost.exe adig.exe acountry.exe depend.dj
|
||||
- rmdir $(OBJ_DIR)
|
||||
# clean object files and subdir
|
||||
#
|
||||
objclean: genclean
|
||||
- $(DELETE) $(OBJ_DIR)$(DS)*.o
|
||||
- $(RMDIR) $(OBJ_DIR)
|
||||
|
||||
# clean without removing built library and programs
|
||||
#
|
||||
clean: objclean
|
||||
- $(DELETE) depend.dj
|
||||
|
||||
# clean everything
|
||||
#
|
||||
realclean vclean: clean
|
||||
- $(DELETE) libcares.a
|
||||
- $(DELETE) acountry.exe
|
||||
- $(DELETE) adig.exe
|
||||
- $(DELETE) ahost.exe
|
||||
- $(DELETE) libcares.a
|
||||
|
||||
-include depend.dj
|
||||
|
||||
|
@@ -1,25 +1,157 @@
|
||||
CSOURCES = ares_fds.c ares_getsock.c ares_process.c ares_free_hostent.c \
|
||||
ares_query.c ares__close_sockets.c ares_free_string.c ares_search.c \
|
||||
ares__get_hostent.c ares_gethostbyaddr.c ares_send.c ares__read_line.c \
|
||||
ares_gethostbyname.c ares_strerror.c ares_cancel.c ares_init.c \
|
||||
ares_timeout.c ares_destroy.c ares_mkquery.c ares_version.c \
|
||||
ares_expand_name.c ares_parse_a_reply.c windows_port.c ares_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_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_build.h \
|
||||
ares_rules.h ares_library_init.h
|
||||
CSOURCES = ares__close_sockets.c \
|
||||
ares__get_hostent.c \
|
||||
ares__read_line.c \
|
||||
ares__timeval.c \
|
||||
ares_cancel.c \
|
||||
ares_destroy.c \
|
||||
ares_expand_name.c \
|
||||
ares_expand_string.c \
|
||||
ares_fds.c \
|
||||
ares_free_hostent.c \
|
||||
ares_free_string.c \
|
||||
ares_gethostbyaddr.c \
|
||||
ares_gethostbyname.c \
|
||||
ares_getnameinfo.c \
|
||||
ares_getsock.c \
|
||||
ares_init.c \
|
||||
ares_library_init.c \
|
||||
ares_llist.c \
|
||||
ares_mkquery.c \
|
||||
ares_parse_a_reply.c \
|
||||
ares_parse_aaaa_reply.c \
|
||||
ares_parse_ns_reply.c \
|
||||
ares_parse_ptr_reply.c \
|
||||
ares_process.c \
|
||||
ares_query.c \
|
||||
ares_search.c \
|
||||
ares_send.c \
|
||||
ares_strcasecmp.c \
|
||||
ares_strdup.c \
|
||||
ares_strerror.c \
|
||||
ares_timeout.c \
|
||||
ares_version.c \
|
||||
ares_writev.c \
|
||||
bitncmp.c \
|
||||
inet_net_pton.c \
|
||||
inet_ntop.c \
|
||||
windows_port.c
|
||||
|
||||
HHEADERS = ares.h \
|
||||
ares_build.h \
|
||||
ares_dns.h \
|
||||
ares_ipv6.h \
|
||||
ares_library_init.h \
|
||||
ares_llist.h \
|
||||
ares_private.h \
|
||||
ares_rules.h \
|
||||
ares_strcasecmp.h \
|
||||
ares_strdup.h \
|
||||
ares_version.h \
|
||||
ares_writev.h \
|
||||
bitncmp.h \
|
||||
inet_net_pton.h \
|
||||
inet_ntop.h \
|
||||
nameser.h \
|
||||
setup.h \
|
||||
setup_once.h
|
||||
|
||||
MANPAGES = ares_cancel.3 \
|
||||
ares_destroy.3 \
|
||||
ares_destroy_options.3 \
|
||||
ares_dup.3 \
|
||||
ares_expand_name.3 \
|
||||
ares_expand_string.3 \
|
||||
ares_fds.3 \
|
||||
ares_free_hostent.3 \
|
||||
ares_free_string.3 \
|
||||
ares_gethostbyaddr.3 \
|
||||
ares_gethostbyname.3 \
|
||||
ares_gethostbyname_file.3 \
|
||||
ares_getnameinfo.3 \
|
||||
ares_getsock.3 \
|
||||
ares_init.3 \
|
||||
ares_init_options.3 \
|
||||
ares_library_cleanup.3 \
|
||||
ares_library_init.3 \
|
||||
ares_mkquery.3 \
|
||||
ares_parse_a_reply.3 \
|
||||
ares_parse_aaaa_reply.3 \
|
||||
ares_parse_ns_reply.3 \
|
||||
ares_parse_ptr_reply.3 \
|
||||
ares_process.3 \
|
||||
ares_query.3 \
|
||||
ares_save_options.3 \
|
||||
ares_search.3 \
|
||||
ares_send.3 \
|
||||
ares_set_socket_callback.3 \
|
||||
ares_strerror.3 \
|
||||
ares_timeout.3 \
|
||||
ares_version.3
|
||||
|
||||
HTMLPAGES = ares_cancel.html \
|
||||
ares_destroy.html \
|
||||
ares_destroy_options.html \
|
||||
ares_dup.html \
|
||||
ares_expand_name.html \
|
||||
ares_expand_string.html \
|
||||
ares_fds.html \
|
||||
ares_free_hostent.html \
|
||||
ares_free_string.html \
|
||||
ares_gethostbyaddr.html \
|
||||
ares_gethostbyname.html \
|
||||
ares_gethostbyname_file.html \
|
||||
ares_getnameinfo.html \
|
||||
ares_getsock.html \
|
||||
ares_init.html \
|
||||
ares_init_options.html \
|
||||
ares_library_cleanup.html \
|
||||
ares_library_init.html \
|
||||
ares_mkquery.html \
|
||||
ares_parse_a_reply.html \
|
||||
ares_parse_aaaa_reply.html \
|
||||
ares_parse_ns_reply.html \
|
||||
ares_parse_ptr_reply.html \
|
||||
ares_process.html \
|
||||
ares_query.html \
|
||||
ares_save_options.html \
|
||||
ares_search.html \
|
||||
ares_send.html \
|
||||
ares_set_socket_callback.html \
|
||||
ares_strerror.html \
|
||||
ares_timeout.html \
|
||||
ares_version.html
|
||||
|
||||
PDFPAGES = ares_cancel.pdf \
|
||||
ares_destroy.pdf \
|
||||
ares_destroy_options.pdf \
|
||||
ares_dup.pdf \
|
||||
ares_expand_name.pdf \
|
||||
ares_expand_string.pdf \
|
||||
ares_fds.pdf \
|
||||
ares_free_hostent.pdf \
|
||||
ares_free_string.pdf \
|
||||
ares_gethostbyaddr.pdf \
|
||||
ares_gethostbyname.pdf \
|
||||
ares_gethostbyname_file.pdf \
|
||||
ares_getnameinfo.pdf \
|
||||
ares_getsock.pdf \
|
||||
ares_init.pdf \
|
||||
ares_init_options.pdf \
|
||||
ares_library_cleanup.pdf \
|
||||
ares_library_init.pdf \
|
||||
ares_mkquery.pdf \
|
||||
ares_parse_a_reply.pdf \
|
||||
ares_parse_aaaa_reply.pdf \
|
||||
ares_parse_ns_reply.pdf \
|
||||
ares_parse_ptr_reply.pdf \
|
||||
ares_process.pdf \
|
||||
ares_query.pdf \
|
||||
ares_save_options.pdf \
|
||||
ares_search.pdf \
|
||||
ares_send.pdf \
|
||||
ares_set_socket_callback.pdf \
|
||||
ares_strerror.pdf \
|
||||
ares_timeout.pdf \
|
||||
ares_version.pdf
|
||||
|
||||
MANPAGES= ares_destroy.3 ares_expand_name.3 ares_expand_string.3 ares_fds.3 \
|
||||
ares_free_hostent.3 ares_free_string.3 ares_gethostbyaddr.3 \
|
||||
ares_gethostbyname.3 ares_init.3 ares_init_options.3 ares_mkquery.3 \
|
||||
ares_parse_a_reply.3 ares_parse_ptr_reply.3 ares_process.3 \
|
||||
ares_query.3 ares_search.3 ares_send.3 ares_strerror.3 ares_timeout.3 \
|
||||
ares_version.3 ares_cancel.3 ares_parse_aaaa_reply.3 ares_getnameinfo.3 \
|
||||
ares_getsock.3 ares_parse_ns_reply.3 ares_dup.3 \
|
||||
ares_destroy_options.3 ares_save_options.3 ares_gethostbyname_file.3 \
|
||||
ares_set_socket_callback.3
|
||||
|
@@ -160,7 +160,7 @@ lib: prebuild $(LTARGET)
|
||||
|
||||
nlm: prebuild $(TARGETS)
|
||||
|
||||
prebuild: $(OBJDIR) ares_build.h $(OBJDIR)/version.inc config.h
|
||||
prebuild: $(OBJDIR) ares_build.h $(OBJDIR)/version.inc ares_config.h
|
||||
|
||||
install: $(INSTDIR) all
|
||||
@$(CP) *.nlm $(INSTDIR)
|
||||
@@ -170,7 +170,7 @@ install: $(INSTDIR) all
|
||||
@$(CP) ../RELEASE-NOTES $(INSTDIR)
|
||||
|
||||
clean:
|
||||
-$(RM) $(LTARGET) $(TARGETS) config.h
|
||||
-$(RM) $(LTARGET) $(TARGETS) ares_config.h
|
||||
-$(RM) -r $(OBJDIR)
|
||||
-$(RM) -r arpa
|
||||
|
||||
@@ -269,7 +269,7 @@ ifeq ($(LD),nlmconv)
|
||||
@echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
|
||||
endif
|
||||
|
||||
config.h: Makefile.netware
|
||||
ares_config.h: Makefile.netware
|
||||
@echo Creating $@
|
||||
@echo $(DL)/* $@ for NetWare target.$(DL) > $@
|
||||
@echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
|
||||
|
@@ -12,8 +12,8 @@ USE_WATT32 = 0
|
||||
# Configurations:
|
||||
# -MD - msvcrt.dll, threads, release (normal)
|
||||
# -MDd - msvcrtd.dll, threads, debug
|
||||
# -ML - libc, no threads, release
|
||||
# -MLd - libc, no threads, debug
|
||||
# -ML - libc, no threads, release (not available on VC-2008+)
|
||||
# -MLd - libc, no threads, debug (not available on VC-2008+)
|
||||
# -MT - libc, threads, release
|
||||
# -MTd - libc, threads, debug
|
||||
|
||||
@@ -26,7 +26,7 @@ OBJ_DIR = VC6_obj
|
||||
DEF_FILE = cares.def
|
||||
|
||||
!if "$(USE_WATT32)" == "1"
|
||||
CFLAGS = $(CFLAGS) -UWIN32 -DWATT32 -D_USE_32BIT_TIME_T -I$(WATT_ROOT)\inc
|
||||
CFLAGS = $(CFLAGS) -UWIN32 -DWATT32 -I$(WATT_ROOT)\inc
|
||||
EX_LIBS = $(WATT_ROOT)\lib\wattcpvc_imp.lib
|
||||
|
||||
!else
|
||||
@@ -35,7 +35,7 @@ EX_LIBS = advapi32.lib ws2_32.lib
|
||||
!endif
|
||||
|
||||
!if "$(DEBUG_MODEL)" == "d"
|
||||
CFLAGS = $(CFLAGS) -D_DEBUG -GZ
|
||||
CFLAGS = $(CFLAGS) -DDEBUGBUILD -D_DEBUG -GZ
|
||||
LDFLAGS = $(LDFLAGS) -debug -fixed:no
|
||||
|
||||
!else
|
||||
|
@@ -7,15 +7,21 @@ Changed:
|
||||
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
|
||||
o new ares_library_init() and ares_library_cleanup() functions
|
||||
o new --enable-curldebug configure option
|
||||
o ARES_ECANCELLED is now sent as reason for ares_cancel()
|
||||
|
||||
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_'
|
||||
o fix \Device\TCP handle leaks triggered by buggy iphlpapi.dll
|
||||
o init without internet gone no longer fails
|
||||
|
||||
Thanks go to these friendly people for their efforts and contributions:
|
||||
|
||||
Phil Blundell, Japheth Cleaver, Yang Tse, Gregor Jasny
|
||||
Phil Blundell, Japheth Cleaver, Yang Tse, Gregor Jasny, Joshua Kwan,
|
||||
Timo Teras
|
||||
|
||||
Have fun!
|
||||
|
10
ares/TODO
10
ares/TODO
@@ -6,3 +6,13 @@ ares_gethostbyname
|
||||
- When built to support IPv6, it needs to also support PF_UNSPEC or similar,
|
||||
so that an application can ask for any protocol and then c-ares would return
|
||||
all known resolves and not just explicitly IPv4 _or_ IPv6 resolves.
|
||||
|
||||
ares_process
|
||||
|
||||
- Upon next ABI breakage ares_process() should be changed to return 'int'
|
||||
and return ARES_ENOTINITIALIZED if ares_library_init() has not been called.
|
||||
|
||||
ares_process_fd
|
||||
|
||||
- Upon next ABI breakage ares_process_fd() should be changed to return
|
||||
'int' and return ARES_ENOTINITIALIZED if library has not been initialized.
|
||||
|
@@ -1320,7 +1320,7 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
|
||||
AC_REQUIRE([AC_HEADER_TIME])dnl
|
||||
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl
|
||||
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl
|
||||
AC_CHECK_HEADERS(sys/types.h sys/time.h time.h)
|
||||
AC_CHECK_HEADERS(sys/types.h sys/time.h time.h sys/socket.h)
|
||||
AC_CACHE_CHECK([for struct timeval], [ac_cv_struct_timeval], [
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
@@ -1350,6 +1350,9 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
]],[[
|
||||
struct timeval ts;
|
||||
@@ -1667,6 +1670,52 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_LIBS_CONNECT
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify if network connect function is already available
|
||||
dnl using current libraries or if another one is required.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_LIBS_CONNECT], [
|
||||
AC_REQUIRE([CARES_INCLUDES_WINSOCK2])dnl
|
||||
AC_MSG_CHECKING([for connect in libraries])
|
||||
tst_connect_save_LIBS="$LIBS"
|
||||
tst_connect_need_LIBS="unknown"
|
||||
for tst_lib in '' '-lsocket' ; do
|
||||
if test "$tst_connect_need_LIBS" = "unknown"; then
|
||||
LIBS="$tst_lib $tst_connect_save_LIBS"
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$cares_includes_winsock2
|
||||
#ifndef HAVE_WINDOWS_H
|
||||
int connect(int, void*, int);
|
||||
#endif
|
||||
]],[[
|
||||
if(0 != connect(0, 0, 0))
|
||||
return 1;
|
||||
]])
|
||||
],[
|
||||
tst_connect_need_LIBS="$tst_lib"
|
||||
])
|
||||
fi
|
||||
done
|
||||
LIBS="$tst_connect_save_LIBS"
|
||||
#
|
||||
case X-"$tst_connect_need_LIBS" in
|
||||
X-unknown)
|
||||
AC_MSG_RESULT([cannot find connect])
|
||||
AC_MSG_ERROR([cannot find connect function in libraries.])
|
||||
;;
|
||||
X-)
|
||||
AC_MSG_RESULT([yes])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([$tst_connect_need_LIBS])
|
||||
LIBS="$tst_connect_need_LIBS $tst_connect_save_LIBS"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_DEFINE_UNQUOTED (VARIABLE, [VALUE])
|
||||
dnl -------------------------------------------------
|
||||
dnl Like AC_DEFINE_UNQUOTED this macro will define a C preprocessor
|
||||
|
@@ -10,8 +10,8 @@
|
||||
* CNAME = zz<CC>.countries.nerd.dk with address 127.0.x.y (ver 1) or
|
||||
* CNAME = <a.b.c.d>.zz.countries.nerd.dk with address 127.0.x.y (ver 2)
|
||||
*
|
||||
* The 2 letter country code in <CC> and the ISO-3166 country
|
||||
* number in x.y (number = x*256 + y). Version 2 of the protocol is missing
|
||||
* The 2 letter country code is in <CC> and the ISO-3166 country
|
||||
* number is in x.y (number = x*256 + y). Version 2 of the protocol is missing
|
||||
* the <CC> number.
|
||||
*
|
||||
* Ref: http://countries.nerd.dk/more.html
|
||||
@@ -612,9 +612,14 @@ static void find_country_from_cname(const char *cname, struct in_addr addr)
|
||||
printf("Name for country-number %d not found.\n", cnumber);
|
||||
else
|
||||
{
|
||||
if (ver_1 && *(unsigned short*)&country->short_name != *(unsigned*)&ccode_A2)
|
||||
printf("short-name mismatch; %s vs %s\n", country->short_name, ccode_A2);
|
||||
|
||||
if (ver_1)
|
||||
{
|
||||
if ((country->short_name[0] != ccode_A2[0]) ||
|
||||
(country->short_name[1] != ccode_A2[1]) ||
|
||||
(country->short_name[2] != ccode_A2[2]))
|
||||
printf("short-name mismatch; %s vs %s\n",
|
||||
country->short_name, ccode_A2);
|
||||
}
|
||||
printf("%s (%s), number %d.\n",
|
||||
country->long_name, country->short_name, cnumber);
|
||||
}
|
||||
|
20
ares/adig.c
20
ares/adig.c
@@ -84,6 +84,11 @@
|
||||
#define T_SRV 33 /* server selection */
|
||||
#endif
|
||||
|
||||
/* AIX portability check */
|
||||
#ifndef T_NAPTR
|
||||
#define T_NAPTR 35 /* naming authority pointer */
|
||||
#endif
|
||||
|
||||
struct nv {
|
||||
const char *name;
|
||||
int value;
|
||||
@@ -214,9 +219,10 @@ int main(int argc, char **argv)
|
||||
if (strcmp(flags[i].name, optarg) == 0)
|
||||
break;
|
||||
}
|
||||
if (i == nflags)
|
||||
if (i < nflags)
|
||||
options.flags |= flags[i].value;
|
||||
else
|
||||
usage();
|
||||
options.flags |= flags[i].value;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
@@ -251,9 +257,10 @@ int main(int argc, char **argv)
|
||||
if (strcasecmp(classes[i].name, optarg) == 0)
|
||||
break;
|
||||
}
|
||||
if (i == nclasses)
|
||||
if (i < nclasses)
|
||||
dnsclass = classes[i].value;
|
||||
else
|
||||
usage();
|
||||
dnsclass = classes[i].value;
|
||||
break;
|
||||
|
||||
case 't':
|
||||
@@ -263,9 +270,10 @@ int main(int argc, char **argv)
|
||||
if (strcasecmp(types[i].name, optarg) == 0)
|
||||
break;
|
||||
}
|
||||
if (i == ntypes)
|
||||
if (i < ntypes)
|
||||
type = types[i].value;
|
||||
else
|
||||
usage();
|
||||
type = types[i].value;
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
|
@@ -86,6 +86,7 @@ extern "C" {
|
||||
#define ARES_ENOMEM 15
|
||||
#define ARES_EDESTRUCTION 16
|
||||
#define ARES_EBADSTR 17
|
||||
#define ARES_ECANCELLED 21
|
||||
|
||||
/* ares_getnameinfo error codes */
|
||||
#define ARES_EBADFLAGS 18
|
||||
@@ -94,10 +95,12 @@ extern "C" {
|
||||
#define ARES_ENONAME 19
|
||||
#define ARES_EBADHINTS 20
|
||||
|
||||
/* Uninitialized library error code */
|
||||
#define ARES_ENOTINITIALIZED 21
|
||||
|
||||
/* ares_library_init error codes */
|
||||
#define ARES_ELOADIPHLPAPI 21
|
||||
#define ARES_ELOADADVAPI32 22
|
||||
#define ARES_EADDRGetNetworkParams 23
|
||||
#define ARES_ELOADIPHLPAPI 22
|
||||
#define ARES_EADDRGETNETWORKPARAMS 23
|
||||
|
||||
/* Flag values */
|
||||
#define ARES_FLAG_USEVC (1 << 0)
|
||||
|
@@ -54,14 +54,14 @@ void ares__close_sockets(ares_channel channel, struct server_state *server)
|
||||
if (server->tcp_socket != ARES_SOCKET_BAD)
|
||||
{
|
||||
SOCK_STATE_CALLBACK(channel, server->tcp_socket, 0, 0);
|
||||
closesocket(server->tcp_socket);
|
||||
sclose(server->tcp_socket);
|
||||
server->tcp_socket = ARES_SOCKET_BAD;
|
||||
server->tcp_connection_generation = ++channel->tcp_connection_generation;
|
||||
}
|
||||
if (server->udp_socket != ARES_SOCKET_BAD)
|
||||
{
|
||||
SOCK_STATE_CALLBACK(channel, server->udp_socket, 0, 0);
|
||||
closesocket(server->udp_socket);
|
||||
sclose(server->udp_socket);
|
||||
server->udp_socket = ARES_SOCKET_BAD;
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ ares_cancel \- Cancel a resolve
|
||||
The \fBares_cancel\fP function cancels all lookups/requests made on the the
|
||||
name service channel identified by \fIchannel\fP. \fBares_cancel\fP invokes
|
||||
the callbacks for each pending query on the channel, passing a status of
|
||||
.BR ARES_ETIMEOUT .
|
||||
.BR ARES_ECANCELLED .
|
||||
These calls give the callbacks a chance to clean up any state which
|
||||
might have been stored in their arguments.
|
||||
.SH SEE ALSO
|
||||
@@ -35,5 +35,10 @@ might have been stored in their arguments.
|
||||
.BR ares_destroy (3)
|
||||
.SH NOTES
|
||||
This function was added in c-ares 1.2.0
|
||||
|
||||
c-ares 1.6.0 and earlier pass a status of
|
||||
.BR ARES_ETIMEOUT
|
||||
instead of
|
||||
.BR ARES_ECANCELLED .
|
||||
.SH AUTHOR
|
||||
Dirk Manske
|
||||
|
@@ -36,7 +36,7 @@ void ares_cancel(ares_channel channel)
|
||||
{
|
||||
query = list_node->data;
|
||||
list_node = list_node->next; /* since we're deleting the query */
|
||||
query->callback(query->arg, ARES_ETIMEOUT, 0, NULL, 0);
|
||||
query->callback(query->arg, ARES_ECANCELLED, 0, NULL, 0);
|
||||
ares__free_query(query);
|
||||
}
|
||||
#ifndef NDEBUG
|
||||
|
@@ -1,6 +1,6 @@
|
||||
.\" $Id$
|
||||
.\"
|
||||
.\" Copyright (C) 2007-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
|
||||
@@ -14,7 +14,7 @@
|
||||
.\" this software for any purpose. It is provided "as is"
|
||||
.\" without express or implied warranty.
|
||||
.\"
|
||||
.TH ARES_DUP 3 "2 Dec 2008"
|
||||
.TH ARES_DUP 3 "26 May 2009"
|
||||
.SH NAME
|
||||
ares_dup \- Duplicate a resolver channel
|
||||
.SH SYNOPSIS
|
||||
@@ -35,7 +35,8 @@ with additional options set exactly as the \fIsource\fP channel has them
|
||||
configured.
|
||||
.SH SEE ALSO
|
||||
.BR ares_destroy(3),
|
||||
.BR ares_init(3)
|
||||
.BR ares_init(3),
|
||||
.BR ares_library_init(3)
|
||||
.SH AVAILABILITY
|
||||
ares_dup(3) was added in c-ares 1.6.0
|
||||
.SH AUTHOR
|
||||
|
@@ -1,150 +1,150 @@
|
||||
.\" $Id$
|
||||
.\"
|
||||
.\" Copyright 2005 by Dominick Meglio.
|
||||
.\"
|
||||
.\" 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.
|
||||
.\"
|
||||
.TH ARES_GETNAMEINFO 3 "1 May 2009"
|
||||
.SH NAME
|
||||
ares_getnameinfo \- Address-to-nodename translation in protocol-independent manner
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <ares.h>
|
||||
.PP
|
||||
.B typedef void (*ares_nameinfo_callback)(void *\fIarg\fP, int \fIstatus\fP,
|
||||
.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 ares_socklen_t \fIsalen\fP, int \fIflags\fP, ares_nameinfo_callback \fIcallback\fP,
|
||||
.B void *\fIarg\fP)
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.B ares_getnameinfo
|
||||
function is defined for protocol-independent address translation. The function
|
||||
is a combination of \fIares_gethostbyaddr(3)\fP and \fIgetservbyport(3)\fP. The function will
|
||||
translate the address either by executing a host query on the name service channel
|
||||
identified by
|
||||
.IR channel
|
||||
or it will attempt to resolve it locally if possible.
|
||||
The parameters
|
||||
.I sa
|
||||
and
|
||||
.I len
|
||||
give the address as a sockaddr structure, and
|
||||
.I flags
|
||||
gives the options that the function will use. Valid flags are listed below:
|
||||
.TP 19
|
||||
.B ARES_NI_NOFQDN
|
||||
Only the nodename portion of the FQDN is returned for local hosts.
|
||||
.TP 19
|
||||
.B ARES_NI_NUMERICHOST
|
||||
The numeric form of the hostname is returned rather than the name.
|
||||
.TP 19
|
||||
.B ARES_NI_NAMEREQD
|
||||
An error is returned if the hostname cannot be found in the DNS.
|
||||
.TP 19
|
||||
.B ARES_NI_NUMERICSERV
|
||||
The numeric form of the service is returned rather than the name.
|
||||
.TP 19
|
||||
.B ARES_NI_TCP
|
||||
The service name is to be looked up for the TCP protocol.
|
||||
.TP 19
|
||||
.B ARES_NI_UDP
|
||||
The service name is to be looked up for the UDP protocol.
|
||||
.TP 19
|
||||
.B ARES_NI_SCTP
|
||||
The service name is to be looked up for the SCTP protocol.
|
||||
.TP 19
|
||||
.B ARES_NI_DCCP
|
||||
The service name is to be looked up for the DCCP protocol.
|
||||
.TP 19
|
||||
.B ARES_NI_NUMERICSCOPE
|
||||
The numeric form of the scope ID is returned rather than the name.
|
||||
.TP 19
|
||||
.B ARES_NI_LOOKUPHOST
|
||||
A hostname lookup is being requested.
|
||||
.TP 19
|
||||
.B ARES_NI_LOOKUPSERVICE
|
||||
A service name lookup is being requested.
|
||||
.PP
|
||||
When the query
|
||||
is complete or has
|
||||
failed, the ares library will invoke \fIcallback\fP. Completion or failure of
|
||||
the query may happen immediately, or may happen during a later call to
|
||||
\fIares_process(3)\fP, \fIares_destroy(3)\fP or \fIares_cancel(3)\fP.
|
||||
.PP
|
||||
The callback argument
|
||||
.I arg
|
||||
is copied from the
|
||||
.B ares_getnameinfo
|
||||
argument
|
||||
.IR arg .
|
||||
The callback argument
|
||||
.I status
|
||||
indicates whether the query succeeded and, if not, how it failed. It
|
||||
may have any of the following values:
|
||||
.TP 19
|
||||
.B ARES_SUCCESS
|
||||
The host lookup completed successfully.
|
||||
.TP 19
|
||||
.B ARES_ENOTIMP
|
||||
The ares library does not know how to look up addresses of type
|
||||
.IR family .
|
||||
.TP 19
|
||||
.B ARES_ENOTFOUND
|
||||
The address
|
||||
.I addr
|
||||
was not found.
|
||||
.TP 19
|
||||
.B ARES_ENOMEM
|
||||
Memory was exhausted.
|
||||
.TP 19
|
||||
.B ARES_EDESTRUCTION
|
||||
The name service channel
|
||||
.I channel
|
||||
is being destroyed; the query will not be completed.
|
||||
.TP 19
|
||||
.B ARES_EBADFLAGS
|
||||
The
|
||||
.I flags
|
||||
parameter contains an illegal value.
|
||||
.PP
|
||||
The callback argument
|
||||
.I timeouts
|
||||
reports how many times a query timed out during the execution of the
|
||||
given request.
|
||||
.PP
|
||||
On successful completion of the query, the callback argument
|
||||
.I node
|
||||
contains a string representing the hostname (assuming
|
||||
.B ARES_NI_LOOKUPHOST
|
||||
was specified). Additionally,
|
||||
.I service
|
||||
contains a string representing the service name (assuming
|
||||
.B ARES_NI_LOOKUPSERVICE
|
||||
was specified).
|
||||
If the query did not complete successfully, or one of the values
|
||||
was not requested,
|
||||
.I node
|
||||
or
|
||||
.I service
|
||||
will be
|
||||
.BR NULL .
|
||||
.SH SEE ALSO
|
||||
.BR ares_process (3),
|
||||
.BR ares_getaddrinfo (3)
|
||||
.SH AUTHOR
|
||||
Dominick Meglio
|
||||
.br
|
||||
Copyright 2005 by Dominick Meglio.
|
||||
.\" $Id$
|
||||
.\"
|
||||
.\" Copyright 2005 by Dominick Meglio.
|
||||
.\"
|
||||
.\" 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.
|
||||
.\"
|
||||
.TH ARES_GETNAMEINFO 3 "1 May 2009"
|
||||
.SH NAME
|
||||
ares_getnameinfo \- Address-to-nodename translation in protocol-independent manner
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <ares.h>
|
||||
.PP
|
||||
.B typedef void (*ares_nameinfo_callback)(void *\fIarg\fP, int \fIstatus\fP,
|
||||
.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 ares_socklen_t \fIsalen\fP, int \fIflags\fP, ares_nameinfo_callback \fIcallback\fP,
|
||||
.B void *\fIarg\fP)
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.B ares_getnameinfo
|
||||
function is defined for protocol-independent address translation. The function
|
||||
is a combination of \fIares_gethostbyaddr(3)\fP and \fIgetservbyport(3)\fP. The function will
|
||||
translate the address either by executing a host query on the name service channel
|
||||
identified by
|
||||
.IR channel
|
||||
or it will attempt to resolve it locally if possible.
|
||||
The parameters
|
||||
.I sa
|
||||
and
|
||||
.I len
|
||||
give the address as a sockaddr structure, and
|
||||
.I flags
|
||||
gives the options that the function will use. Valid flags are listed below:
|
||||
.TP 19
|
||||
.B ARES_NI_NOFQDN
|
||||
Only the nodename portion of the FQDN is returned for local hosts.
|
||||
.TP 19
|
||||
.B ARES_NI_NUMERICHOST
|
||||
The numeric form of the hostname is returned rather than the name.
|
||||
.TP 19
|
||||
.B ARES_NI_NAMEREQD
|
||||
An error is returned if the hostname cannot be found in the DNS.
|
||||
.TP 19
|
||||
.B ARES_NI_NUMERICSERV
|
||||
The numeric form of the service is returned rather than the name.
|
||||
.TP 19
|
||||
.B ARES_NI_TCP
|
||||
The service name is to be looked up for the TCP protocol.
|
||||
.TP 19
|
||||
.B ARES_NI_UDP
|
||||
The service name is to be looked up for the UDP protocol.
|
||||
.TP 19
|
||||
.B ARES_NI_SCTP
|
||||
The service name is to be looked up for the SCTP protocol.
|
||||
.TP 19
|
||||
.B ARES_NI_DCCP
|
||||
The service name is to be looked up for the DCCP protocol.
|
||||
.TP 19
|
||||
.B ARES_NI_NUMERICSCOPE
|
||||
The numeric form of the scope ID is returned rather than the name.
|
||||
.TP 19
|
||||
.B ARES_NI_LOOKUPHOST
|
||||
A hostname lookup is being requested.
|
||||
.TP 19
|
||||
.B ARES_NI_LOOKUPSERVICE
|
||||
A service name lookup is being requested.
|
||||
.PP
|
||||
When the query
|
||||
is complete or has
|
||||
failed, the ares library will invoke \fIcallback\fP. Completion or failure of
|
||||
the query may happen immediately, or may happen during a later call to
|
||||
\fIares_process(3)\fP, \fIares_destroy(3)\fP or \fIares_cancel(3)\fP.
|
||||
.PP
|
||||
The callback argument
|
||||
.I arg
|
||||
is copied from the
|
||||
.B ares_getnameinfo
|
||||
argument
|
||||
.IR arg .
|
||||
The callback argument
|
||||
.I status
|
||||
indicates whether the query succeeded and, if not, how it failed. It
|
||||
may have any of the following values:
|
||||
.TP 19
|
||||
.B ARES_SUCCESS
|
||||
The host lookup completed successfully.
|
||||
.TP 19
|
||||
.B ARES_ENOTIMP
|
||||
The ares library does not know how to look up addresses of type
|
||||
.IR family .
|
||||
.TP 19
|
||||
.B ARES_ENOTFOUND
|
||||
The address
|
||||
.I addr
|
||||
was not found.
|
||||
.TP 19
|
||||
.B ARES_ENOMEM
|
||||
Memory was exhausted.
|
||||
.TP 19
|
||||
.B ARES_EDESTRUCTION
|
||||
The name service channel
|
||||
.I channel
|
||||
is being destroyed; the query will not be completed.
|
||||
.TP 19
|
||||
.B ARES_EBADFLAGS
|
||||
The
|
||||
.I flags
|
||||
parameter contains an illegal value.
|
||||
.PP
|
||||
The callback argument
|
||||
.I timeouts
|
||||
reports how many times a query timed out during the execution of the
|
||||
given request.
|
||||
.PP
|
||||
On successful completion of the query, the callback argument
|
||||
.I node
|
||||
contains a string representing the hostname (assuming
|
||||
.B ARES_NI_LOOKUPHOST
|
||||
was specified). Additionally,
|
||||
.I service
|
||||
contains a string representing the service name (assuming
|
||||
.B ARES_NI_LOOKUPSERVICE
|
||||
was specified).
|
||||
If the query did not complete successfully, or one of the values
|
||||
was not requested,
|
||||
.I node
|
||||
or
|
||||
.I service
|
||||
will be
|
||||
.BR NULL .
|
||||
.SH SEE ALSO
|
||||
.BR ares_process (3),
|
||||
.BR ares_getaddrinfo (3)
|
||||
.SH AUTHOR
|
||||
Dominick Meglio
|
||||
.br
|
||||
Copyright 2005 by Dominick Meglio.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
.\" $Id$
|
||||
.\"
|
||||
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
.\" Copyright (C) 2007-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
|
||||
@@ -15,7 +15,7 @@
|
||||
.\" this software for any purpose. It is provided "as is"
|
||||
.\" without express or implied warranty.
|
||||
.\"
|
||||
.TH ARES_INIT 3 "13 May 2008"
|
||||
.TH ARES_INIT 3 "26 May 2009"
|
||||
.SH NAME
|
||||
ares_init, ares_init_options \- Initialize a resolver channel
|
||||
.SH SYNOPSIS
|
||||
@@ -184,10 +184,16 @@ A configuration file could not be read.
|
||||
.TP 14
|
||||
.B ARES_ENOMEM
|
||||
The process's available memory was exhausted.
|
||||
.TP 14
|
||||
.B ARES_ENOTINITIALIZED
|
||||
c-ares library initialization not yet performed.
|
||||
.SH SEE ALSO
|
||||
.BR ares_destroy(3),
|
||||
.BR ares_dup(3)
|
||||
.BR ares_dup(3),
|
||||
.BR ares_library_init(3)
|
||||
.SH AUTHOR
|
||||
Greg Hudson, MIT Information Systems
|
||||
.br
|
||||
Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
.br
|
||||
Copyright (C) 2004-2009 by Daniel Stenberg.
|
||||
|
@@ -129,6 +129,9 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
curl_memlimit(atoi(env));
|
||||
#endif
|
||||
|
||||
if (ares_library_initialized() != ARES_SUCCESS)
|
||||
return ARES_ENOTINITIALIZED;
|
||||
|
||||
channel = malloc(sizeof(struct ares_channeldata));
|
||||
if (!channel) {
|
||||
*channelptr = NULL;
|
||||
@@ -198,12 +201,15 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
DEBUGF(fprintf(stderr, "Error: init_by_resolv_conf failed: %s\n",
|
||||
ares_strerror(status)));
|
||||
}
|
||||
if (status == ARES_SUCCESS) {
|
||||
status = init_by_defaults(channel);
|
||||
if (status != ARES_SUCCESS)
|
||||
DEBUGF(fprintf(stderr, "Error: init_by_defaults failed: %s\n",
|
||||
ares_strerror(status)));
|
||||
}
|
||||
|
||||
/*
|
||||
* No matter what failed or succeeded, seed defaults to provide
|
||||
* useful behavior for things that we missed.
|
||||
*/
|
||||
status = init_by_defaults(channel);
|
||||
if (status != ARES_SUCCESS)
|
||||
DEBUGF(fprintf(stderr, "Error: init_by_defaults failed: %s\n",
|
||||
ares_strerror(status)));
|
||||
|
||||
/* Generate random key */
|
||||
|
||||
|
74
ares/ares_library_cleanup.3
Normal file
74
ares/ares_library_cleanup.3
Normal file
@@ -0,0 +1,74 @@
|
||||
.\" $Id$
|
||||
.\"
|
||||
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
.\" Copyright (C) 2004-2009 by Daniel Stenberg
|
||||
.\"
|
||||
.\" 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.
|
||||
.\"
|
||||
.TH ARES_LIBRARY_CLEANUP 3 "19 May 2009"
|
||||
.SH NAME
|
||||
ares_library_cleanup \- c-ares library deinitialization
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <ares.h>
|
||||
.PP
|
||||
.B void ares_library_cleanup(void)
|
||||
.PP
|
||||
.B cc file.c -lcares
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The
|
||||
.B ares_library_cleanup
|
||||
function uninitializes the c-ares library, freeing all resources
|
||||
previously aquired by \fIares_library_init(3)\fP when the library
|
||||
was initialized.
|
||||
.PP
|
||||
This function must be called when the program using c-ares will
|
||||
no longer need any c-ares function. Once the program has called
|
||||
\fIares_library_cleanup(3)\fP it shall not make any further call to any
|
||||
c-ares function.
|
||||
.PP
|
||||
This function does not cancel any pending c-ares lookups or requests
|
||||
previously done. Program must use \fIares_cancel(3)\fP for this purpose.
|
||||
.PP
|
||||
.B This function is not thread safe.
|
||||
You have to call it once the program is about to terminate, but this call must
|
||||
be done once the program has terminated every single thread that it could have
|
||||
initiated. This is required to avoid potential race conditions in library
|
||||
deinitialization, and also due to the fact that \fIares_library_cleanup(3)\fP
|
||||
might call functions from other libraries that are thread unsafe, and could
|
||||
conflict with any other thread that is already using these other libraries.
|
||||
.PP
|
||||
Win32/64 application DLLs shall not call \fIares_library_cleanup(3)\fP from
|
||||
the DllMain function. Doing so will produce deadlocks and other problems.
|
||||
.SH AVAILABILITY
|
||||
This function was first introduced in c-ares version 1.6.1 along with the
|
||||
definition of preprocessor symbol \fICARES_HAVE_ARES_LIBRARY_CLEANUP\fP as an
|
||||
indication of the availability of this function.
|
||||
.PP
|
||||
Since the introduction of this function, it is absolutely mandatory to call it
|
||||
for any Win32/64 program using c-ares.
|
||||
.PP
|
||||
Non-Win32/64 systems can still use c-ares version 1.6.1 without calling
|
||||
\fIares_library_cleanup(3)\fP due to the fact that it is nearly a do-nothing
|
||||
function on non-Win32/64 platforms.
|
||||
.SH SEE ALSO
|
||||
.BR ares_library_init(3),
|
||||
.BR ares_cancel(3)
|
||||
.SH AUTHOR
|
||||
Yang Tse
|
||||
.PP
|
||||
Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
.br
|
||||
Copyright (C) 2004-2009 by Daniel Stenberg.
|
97
ares/ares_library_init.3
Normal file
97
ares/ares_library_init.3
Normal file
@@ -0,0 +1,97 @@
|
||||
.\" $Id$
|
||||
.\"
|
||||
.\" Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
.\" Copyright (C) 2004-2009 by Daniel Stenberg
|
||||
.\"
|
||||
.\" 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.
|
||||
.\"
|
||||
.TH ARES_LIBRARY_INIT 3 "19 May 2009"
|
||||
.SH NAME
|
||||
ares_library_init \- c-ares library initialization
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <ares.h>
|
||||
.PP
|
||||
.B int ares_library_init(int \fIflags\fP)
|
||||
.PP
|
||||
.B cc file.c -lcares
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The
|
||||
.B ares_library_init
|
||||
function performs initializations internally required by the c-ares
|
||||
library that must take place before any other function provided by
|
||||
c-ares can be used in a program.
|
||||
.PP
|
||||
This function must be called one time within the life of a program,
|
||||
before the program actually executes any other c-ares library function.
|
||||
Initializations done by this function remain effective until a
|
||||
call to \fIares_library_cleanup(3)\fP is performed.
|
||||
.PP
|
||||
Successive calls to this function do nothing, only the first call done
|
||||
when c-ares is in an uninitialized state is actually effective.
|
||||
.PP
|
||||
The
|
||||
.I flags
|
||||
parameter is a bit pattern that tells c-ares exactly which features
|
||||
should be initialized, as described below. Set the desired bits by
|
||||
ORing the values together. In normal operation you should specify
|
||||
\fIARES_LIB_INIT_ALL\fP. Don't use any other value unless you are
|
||||
familiar with it and trying to control some internal c-ares feature.
|
||||
.PP
|
||||
.B This function is not thread safe.
|
||||
You have to call it once the program has started, but this call must be done
|
||||
before the program starts any other thread. This is required to avoid
|
||||
potential race conditions in library initialization, and also due to the fact
|
||||
that \fIares_library_init(3)\fP might call functions from other libraries that
|
||||
are thread unsafe, and could conflict with any other thread that is already
|
||||
using these other libraries.
|
||||
.PP
|
||||
Win32/64 application DLLs shall not call \fIares_library_init(3)\fP from the
|
||||
DllMain function. Doing so will produce deadlocks and other problems.
|
||||
.SH FLAGS
|
||||
.TP 5
|
||||
.B ARES_LIB_INIT_ALL
|
||||
Initialize everything possible. This sets all known bits.
|
||||
.TP
|
||||
.B ARES_LIB_INIT_WIN32
|
||||
Initialize Win32/64 specific libraries.
|
||||
.TP
|
||||
.B ARES_LIB_INIT_NONE
|
||||
Initialize nothing extra. This sets no bit.
|
||||
.SH RETURN VALUE
|
||||
Upon successful completion, ares_library_init() will return 0. Otherwise, a
|
||||
non-zero error number will be returned to indicate the error. Except for
|
||||
\fIares_strerror(3)\fP, you shall not call any other c-ares function upon
|
||||
\fIares_library_init(3)\fP failure.
|
||||
.SH AVAILABILITY
|
||||
This function was first introduced in c-ares version 1.6.1 along with the
|
||||
definition of preprocessor symbol \fICARES_HAVE_ARES_LIBRARY_INIT\fP as an
|
||||
indication of the availability of this function.
|
||||
.PP
|
||||
Since the introduction of this function it is absolutely mandatory to
|
||||
call it for any Win32/64 program using c-ares.
|
||||
.PP
|
||||
Non-Win32/64 systems can still use c-ares version 1.6.1 without calling
|
||||
\fIares_library_init(3)\fP due to the fact that it is nearly a do-nothing
|
||||
function on non-Win32/64 platforms at this point.
|
||||
.SH SEE ALSO
|
||||
.BR ares_library_cleanup(3),
|
||||
.BR ares_strerror(3)
|
||||
.SH AUTHOR
|
||||
Yang Tse
|
||||
.PP
|
||||
Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
.br
|
||||
Copyright (C) 2004-2009 by Daniel Stenberg.
|
@@ -1,5 +1,21 @@
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2004-2009 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
* fee is hereby granted, provided that the above copyright
|
||||
* notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of M.I.T. not be used in
|
||||
* advertising or publicity pertaining to distribution of the
|
||||
* software without specific, written prior permission.
|
||||
* M.I.T. makes no representations about the suitability of
|
||||
* this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#include "ares.h"
|
||||
@@ -38,26 +54,23 @@ static int ares_win32_init(void)
|
||||
if (!fpGetNetworkParams)
|
||||
{
|
||||
FreeLibrary(hnd_iphlpapi);
|
||||
return ARES_EADDRGetNetworkParams;
|
||||
return ARES_EADDRGETNETWORKPARAMS;
|
||||
}
|
||||
|
||||
/*
|
||||
* When advapi32.dll is unavailable or advapi32.dll has no SystemFunction036,
|
||||
* also known as RtlGenRandom, which is the case for Windows versions prior
|
||||
* to WinXP then c-ares uses portable rand() function. Then don't error here.
|
||||
*/
|
||||
|
||||
hnd_advapi32 = 0;
|
||||
hnd_advapi32 = LoadLibrary("advapi32.dll");
|
||||
if (!hnd_advapi32)
|
||||
if (hnd_advapi32)
|
||||
{
|
||||
FreeLibrary(hnd_iphlpapi);
|
||||
return ARES_ELOADADVAPI32;
|
||||
fpSystemFunction036 = (fpSystemFunction036_t)
|
||||
GetProcAddress(hnd_advapi32, "SystemFunction036");
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -107,3 +120,14 @@ void ares_library_cleanup(void)
|
||||
ares_init_flags = ARES_LIB_INIT_NONE;
|
||||
}
|
||||
|
||||
|
||||
int ares_library_initialized(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
if (!ares_initialized)
|
||||
return ARES_ENOTINITIALIZED;
|
||||
#endif
|
||||
return ARES_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -3,6 +3,22 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2004-2009 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
* fee is hereby granted, provided that the above copyright
|
||||
* notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of M.I.T. not be used in
|
||||
* advertising or publicity pertaining to distribution of the
|
||||
* software without specific, written prior permission.
|
||||
* M.I.T. makes no representations about the suitability of
|
||||
* this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#ifdef WIN32
|
||||
|
@@ -4,7 +4,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
|
||||
@@ -32,16 +32,11 @@
|
||||
|
||||
#if !defined(WIN32) || defined(WATT32)
|
||||
#include <netinet/in.h>
|
||||
/* We define closesocket() here so that we can use this function all over
|
||||
the source code for closing sockets. */
|
||||
#define closesocket(x) close(x)
|
||||
#endif
|
||||
|
||||
#ifdef WATT32
|
||||
#include <tcp.h>
|
||||
#include <sys/ioctl.h>
|
||||
#undef closesocket
|
||||
#define closesocket(s) close_s(s)
|
||||
#define writev(s,v,c) writev_s(s,v,c)
|
||||
#define HAVE_WRITEV 1
|
||||
#endif
|
||||
@@ -310,6 +305,8 @@ int ares__timeadd(struct timeval *now,
|
||||
/* return time offset between now and (future) check, in milliseconds */
|
||||
long ares__timeoffset(struct timeval *now,
|
||||
struct timeval *check);
|
||||
/* returns ARES_SUCCESS if library has been initialized */
|
||||
int ares_library_initialized(void);
|
||||
void ares__rc4(rc4_key* key,unsigned char *buffer_ptr, int buffer_len);
|
||||
void ares__send_query(ares_channel channel, struct query *query,
|
||||
struct timeval *now);
|
||||
@@ -338,8 +335,8 @@ long ares__tvdiff(struct timeval t1, struct timeval t2);
|
||||
#ifdef CURLDEBUG
|
||||
/* This is low-level hard-hacking memory leak tracking and similar. Using the
|
||||
libcurl lowlevel code from within library is ugly and only works when
|
||||
c-ares is built and linked with a similarly debug-build libcurl, but we do
|
||||
this anyway for convenience. */
|
||||
c-ares is built and linked with a similarly curldebug-enabled libcurl,
|
||||
but we do this anyway for convenience. */
|
||||
#include "../lib/memdebug.h"
|
||||
#endif
|
||||
|
||||
|
@@ -896,7 +896,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
||||
/* Configure it. */
|
||||
if (configure_socket(s, channel) < 0)
|
||||
{
|
||||
closesocket(s);
|
||||
sclose(s);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -911,7 +911,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
||||
if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY,
|
||||
(void *)&opt, sizeof(opt)) == -1)
|
||||
{
|
||||
closesocket(s);
|
||||
sclose(s);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
@@ -927,7 +927,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
||||
|
||||
if (err != EINPROGRESS && err != EWOULDBLOCK)
|
||||
{
|
||||
closesocket(s);
|
||||
sclose(s);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -938,7 +938,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
||||
channel->sock_create_cb_data);
|
||||
if (err < 0)
|
||||
{
|
||||
closesocket(s);
|
||||
sclose(s);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
@@ -963,7 +963,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server)
|
||||
/* Set the socket non-blocking. */
|
||||
if (configure_socket(s, channel) < 0)
|
||||
{
|
||||
closesocket(s);
|
||||
sclose(s);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -978,7 +978,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server)
|
||||
|
||||
if (err != EINPROGRESS && err != EWOULDBLOCK)
|
||||
{
|
||||
closesocket(s);
|
||||
sclose(s);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -989,7 +989,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server)
|
||||
channel->sock_create_cb_data);
|
||||
if (err < 0)
|
||||
{
|
||||
closesocket(s);
|
||||
sclose(s);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
@@ -44,8 +44,8 @@ const char *ares_strerror(int code)
|
||||
"Illegal flags specified",
|
||||
"Given hostname is not numeric",
|
||||
"Illegal hints flags specified",
|
||||
"c-ares library initialization not yet performed",
|
||||
"Error loading iphlpapi.dll",
|
||||
"Error loading advapi32.dll",
|
||||
"Could not find GetNetworkParams function"
|
||||
};
|
||||
|
||||
|
@@ -42,4 +42,4 @@ ${libtoolize} --copy --automake --force
|
||||
${ACLOCAL:-aclocal} -I m4 $ACLOCAL_FLAGS
|
||||
${AUTOHEADER:-autoheader}
|
||||
${AUTOCONF:-autoconf}
|
||||
${AUTOMAKE:-automake} --add-missing
|
||||
${AUTOMAKE:-automake} --add-missing --copy
|
||||
|
@@ -1,8 +1,21 @@
|
||||
@echo off
|
||||
REM set up a CVS tree to build when there's no autotools
|
||||
REM $Revision$
|
||||
REM $Date$
|
||||
REM
|
||||
REM $Id$
|
||||
REM
|
||||
REM This batch file must be used to set up a CVS tree to build on
|
||||
REM systems where there is no autotools support (i.e. Microsoft).
|
||||
REM
|
||||
REM This file is not included nor needed for c-ares' release
|
||||
REM archives, neither for c-ares' daily snapshot archives.
|
||||
|
||||
REM create ares_build.h
|
||||
if exist CVS-INFO goto start_doing
|
||||
ECHO ERROR: This file shall only be used with a c-ares CVS tree checkout.
|
||||
goto end_all
|
||||
:start_doing
|
||||
|
||||
if not exist ares_build.h.dist goto end_ares_build_h
|
||||
copy /Y ares_build.h.dist ares_build.h
|
||||
:end_ares_build_h
|
||||
|
||||
:end_all
|
||||
|
||||
|
112
ares/config.dos
Normal file
112
ares/config.dos
Normal file
@@ -0,0 +1,112 @@
|
||||
#ifndef HEADER_CONFIG_DOS_H
|
||||
#define HEADER_CONFIG_DOS_H
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* ================================================================ */
|
||||
/* ares/config.dos - Hand crafted config file for DOS */
|
||||
/* ================================================================ */
|
||||
|
||||
#define PACKAGE "c-ares"
|
||||
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
#define HAVE_IOCTLSOCKET 1
|
||||
#define HAVE_IOCTLSOCKET_FIONBIO 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_NET_IF_H 1
|
||||
#define HAVE_RECV 1
|
||||
#define HAVE_RECVFROM 1
|
||||
#define HAVE_SEND 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRICMP 1
|
||||
#define HAVE_STRUCT_IN6_ADDR 1
|
||||
#define HAVE_STRUCT_TIMEVAL 1
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_TIME_H 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
#define NEED_MALLOC_H 1
|
||||
|
||||
#define RETSIGTYPE void
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Qualifiers for send(), recv(), recvfrom() and getnameinfo(). */
|
||||
|
||||
#define SEND_TYPE_ARG1 int
|
||||
#define SEND_QUAL_ARG2 const
|
||||
#define SEND_TYPE_ARG2 void *
|
||||
#define SEND_TYPE_ARG3 int
|
||||
#define SEND_TYPE_ARG4 int
|
||||
#define SEND_TYPE_RETV int
|
||||
|
||||
#define RECV_TYPE_ARG1 int
|
||||
#define RECV_TYPE_ARG2 void *
|
||||
#define RECV_TYPE_ARG3 int
|
||||
#define RECV_TYPE_ARG4 int
|
||||
#define RECV_TYPE_RETV int
|
||||
|
||||
#define RECVFROM_TYPE_ARG1 int
|
||||
#define RECVFROM_TYPE_ARG2 void
|
||||
#define RECVFROM_TYPE_ARG3 int
|
||||
#define RECVFROM_TYPE_ARG4 int
|
||||
#define RECVFROM_TYPE_ARG5 struct sockaddr
|
||||
#define RECVFROM_TYPE_ARG6 int
|
||||
#define RECVFROM_TYPE_RETV int
|
||||
#define RECVFROM_TYPE_ARG2_IS_VOID 1
|
||||
|
||||
#define BSD
|
||||
|
||||
#if defined(__HIGHC__) || \
|
||||
(defined(__GNUC__) && (__GNUC__ < 4))
|
||||
#define ssize_t int
|
||||
#endif
|
||||
|
||||
/* Target HAVE_x section */
|
||||
|
||||
#if defined(DJGPP)
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#define HAVE_VARIADIC_MACROS_GCC 1
|
||||
|
||||
/* Because djgpp <= 2.03 doesn't have snprintf() etc. */
|
||||
#if (DJGPP_MINOR < 4)
|
||||
#define _MPRINTF_REPLACE
|
||||
#endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
#elif defined(__HIGHC__)
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#endif
|
||||
|
||||
#ifdef WATT32
|
||||
#define HAVE_AF_INET6 1
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
#define HAVE_ARPA_NAMESER_H 1
|
||||
#define HAVE_CLOSESOCKET_CAMEL 1
|
||||
#define HAVE_GETHOSTNAME 1
|
||||
#define HAVE_NETDB_H 1
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
#define HAVE_NETINET_TCP_H 1
|
||||
#define HAVE_PF_INET6 1
|
||||
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
|
||||
#define HAVE_STRUCT_ADDRINFO 1
|
||||
#define HAVE_STRUCT_IN6_ADDR 1
|
||||
#define HAVE_STRUCT_SOCKADDR_IN6 1
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
#define HAVE_SYS_UIO_H 1
|
||||
#define NS_INADDRSZ 4
|
||||
#define HAVE_STRUCT_SOCKADDR_IN6 1
|
||||
#define CloseSocket(s) close_s((s))
|
||||
#endif
|
||||
|
||||
#undef word
|
||||
#undef byte
|
||||
|
||||
#endif /* HEADER_CONFIG_DOS_H */
|
||||
|
@@ -7,12 +7,13 @@ AC_INIT([c-ares], [-],
|
||||
CARES_OVERRIDE_AUTOCONF
|
||||
|
||||
AC_CONFIG_SRCDIR([ares_ipv6.h])
|
||||
AM_CONFIG_HEADER([config.h ares_build.h])
|
||||
AM_CONFIG_HEADER([ares_config.h ares_build.h])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
CARES_CHECK_OPTION_DEBUG
|
||||
CARES_CHECK_OPTION_OPTIMIZE
|
||||
CARES_CHECK_OPTION_WARNINGS
|
||||
CARES_CHECK_OPTION_CURLDEBUG
|
||||
|
||||
CARES_CHECK_PATH_SEPARATOR
|
||||
|
||||
@@ -94,11 +95,6 @@ esac
|
||||
dnl support building of Windows DLLs
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
|
||||
CARES_PROCESS_DEBUG_BUILD_OPTS
|
||||
|
||||
AM_CONDITIONAL(DEBUGBUILD, test x$want_debug = xyes)
|
||||
AM_CONDITIONAL(CURLDEBUG, test x$want_debug = xyes)
|
||||
|
||||
dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD
|
||||
AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)])
|
||||
case $host in
|
||||
@@ -114,18 +110,6 @@ esac
|
||||
dnl libtool setup
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AC_MSG_CHECKING([if we need -no-undefined])
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
need_no_undefined=yes
|
||||
;;
|
||||
*)
|
||||
need_no_undefined=no
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT($need_no_undefined)
|
||||
AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl platform/compiler/architecture specific checks/flags
|
||||
dnl **********************************************************************
|
||||
@@ -161,6 +145,12 @@ esac
|
||||
CARES_CHECK_COMPILER_HALT_ON_ERROR
|
||||
CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
|
||||
CARES_CHECK_NO_UNDEFINED
|
||||
AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
|
||||
|
||||
CARES_CHECK_CURLDEBUG
|
||||
AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Compilation based checks should not be done before this point.
|
||||
dnl **********************************************************************
|
||||
@@ -347,8 +337,7 @@ if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
|
||||
fi
|
||||
ac_cv_func_strcasecmp="no"
|
||||
|
||||
dnl socket lib?
|
||||
AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ])
|
||||
CARES_CHECK_LIBS_CONNECT
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl In case that function clock_gettime with monotonic timer is available,
|
||||
@@ -448,6 +437,7 @@ AC_CHECK_HEADERS(
|
||||
netinet/tcp.h \
|
||||
net/if.h \
|
||||
errno.h \
|
||||
socket.h \
|
||||
strings.h \
|
||||
stdbool.h \
|
||||
time.h \
|
||||
@@ -544,6 +534,9 @@ CURL_CHECK_FUNC_RECVFROM
|
||||
CURL_CHECK_FUNC_SEND
|
||||
CURL_CHECK_MSG_NOSIGNAL
|
||||
|
||||
CARES_CHECK_FUNC_CLOSESOCKET
|
||||
CARES_CHECK_FUNC_CLOSESOCKET_CAMEL
|
||||
CARES_CHECK_FUNC_CONNECT
|
||||
CARES_CHECK_FUNC_FCNTL
|
||||
CARES_CHECK_FUNC_FREEADDRINFO
|
||||
CARES_CHECK_FUNC_GETADDRINFO
|
||||
@@ -557,6 +550,7 @@ CARES_CHECK_FUNC_IOCTL
|
||||
CARES_CHECK_FUNC_IOCTLSOCKET
|
||||
CARES_CHECK_FUNC_IOCTLSOCKET_CAMEL
|
||||
CARES_CHECK_FUNC_SETSOCKOPT
|
||||
CARES_CHECK_FUNC_SOCKET
|
||||
CARES_CHECK_FUNC_STRCASECMP
|
||||
CARES_CHECK_FUNC_STRCMPI
|
||||
CARES_CHECK_FUNC_STRDUP
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#***************************************************************************
|
||||
|
||||
# File version for 'aclocal' use. Keep it a single number.
|
||||
# serial 51
|
||||
# serial 56
|
||||
|
||||
|
||||
dnl CARES_CHECK_COMPILER
|
||||
@@ -24,6 +24,7 @@ dnl -------------------------------------------------
|
||||
dnl Verify if the C compiler being used is known.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_COMPILER], [
|
||||
AC_BEFORE([$0],[CARES_CHECK_NO_UNDEFINED])dnl
|
||||
#
|
||||
compiler_id="unknown"
|
||||
compiler_num="0"
|
||||
@@ -1070,36 +1071,120 @@ squeeze() {
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_PROCESS_DEBUG_BUILD_OPTS
|
||||
dnl CARES_CHECK_CURLDEBUG
|
||||
dnl -------------------------------------------------
|
||||
dnl Settings which depend on configure's debug given
|
||||
dnl option, and further configure the build process.
|
||||
dnl Don't use this macro for compiler dependant stuff.
|
||||
dnl Settings which depend on configure's curldebug given
|
||||
dnl option, and other additional configure pre-requisites.
|
||||
dnl Using the curl debug memory tracking feature in c-ares
|
||||
dnl is a hack that actually can only be used/enabled when
|
||||
dnl c-ares is built directly in curl's CVS tree, as a static
|
||||
dnl library or as a shared one on those systems on which
|
||||
dnl shared libraries support undefined symbols, along with
|
||||
dnl an equally configured libcurl.
|
||||
|
||||
AC_DEFUN([CARES_PROCESS_DEBUG_BUILD_OPTS], [
|
||||
AC_REQUIRE([CARES_CHECK_OPTION_DEBUG])dnl
|
||||
AC_DEFUN([CARES_CHECK_CURLDEBUG], [
|
||||
AC_REQUIRE([CARES_SHFUNC_SQUEEZE])dnl
|
||||
AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
|
||||
cares_builddir=`pwd`
|
||||
supports_curldebug="unknown"
|
||||
if test "$want_curldebug" = "yes"; then
|
||||
if test "x$enable_shared" != "xno" &&
|
||||
test "x$enable_shared" != "xyes"; then
|
||||
AC_MSG_WARN([unknown enable_shared setting.])
|
||||
supports_curldebug="no"
|
||||
fi
|
||||
if test "x$enable_static" != "xno" &&
|
||||
test "x$enable_static" != "xyes"; then
|
||||
AC_MSG_WARN([unknown enable_static setting.])
|
||||
supports_curldebug="no"
|
||||
fi
|
||||
if test "$supports_curldebug" != "no"; then
|
||||
if test "$enable_shared" = "yes" &&
|
||||
test "$need_no_undefined" = "yes"; then
|
||||
supports_curldebug="no"
|
||||
AC_MSG_WARN([shared library does not support undefined symbols.])
|
||||
fi
|
||||
if test ! -f "$srcdir/../include/curl/curlbuild.h.dist"; then
|
||||
AC_MSG_WARN([c-ares source not embedded in curl's CVS tree.])
|
||||
supports_curldebug="no"
|
||||
elif test ! -f "$srcdir/../include/curl/Makefile.in"; then
|
||||
AC_MSG_WARN([curl's buildconf has not been run.])
|
||||
supports_curldebug="no"
|
||||
elif test ! -f "$cares_builddir/../libcurl.pc" ||
|
||||
test ! -f "$cares_builddir/../include/curl/curlbuild.h"; then
|
||||
AC_MSG_WARN([curl's configure has not been run.])
|
||||
supports_curldebug="no"
|
||||
elif test ! -f "$cares_builddir/../lib/curl_config.h"; then
|
||||
AC_MSG_WARN([libcurl's curl_config.h is missing.])
|
||||
supports_curldebug="no"
|
||||
elif test ! -f "$cares_builddir/../config.status"; then
|
||||
AC_MSG_WARN([curl's config.status is missing.])
|
||||
supports_curldebug="no"
|
||||
fi
|
||||
if test "$supports_curldebug" != "no"; then
|
||||
grep '^#define USE_ARES' "$cares_builddir/../lib/curl_config.h" >/dev/null
|
||||
if test "$?" -ne "0"; then
|
||||
AC_MSG_WARN([libcurl configured without c-ares support.])
|
||||
supports_curldebug="no"
|
||||
fi
|
||||
fi
|
||||
if test "$supports_curldebug" != "no"; then
|
||||
grep 'CPPFLAGS.*CURLDEBUG' "$cares_builddir/../config.status" >/dev/null
|
||||
if test "$?" -ne "0"; then
|
||||
AC_MSG_WARN([libcurl configured without curldebug support.])
|
||||
supports_curldebug="no"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
#
|
||||
if test "$want_debug" = "yes"; then
|
||||
|
||||
dnl when doing the debug stuff, use static library only
|
||||
AC_DISABLE_SHARED
|
||||
|
||||
debugbuild="yes"
|
||||
|
||||
dnl the entire --enable-debug is a hack that lives and runs on top of
|
||||
dnl libcurl stuff so this BUILDING_LIBCURL is not THAT much uglier
|
||||
if test "$want_curldebug" = "yes"; then
|
||||
AC_MSG_CHECKING([if curl debug memory tracking can be enabled])
|
||||
test "$supports_curldebug" = "no" || supports_curldebug="yes"
|
||||
AC_MSG_RESULT([$supports_curldebug])
|
||||
if test "$supports_curldebug" = "no"; then
|
||||
AC_MSG_WARN([cannot enable curl debug memory tracking.])
|
||||
want_curldebug="no"
|
||||
fi
|
||||
fi
|
||||
#
|
||||
if test "$want_curldebug" = "yes"; then
|
||||
dnl TODO: Verify if the BUILDING_LIBCURL definition is still required.
|
||||
AC_DEFINE(BUILDING_LIBCURL, 1, [when building as static part of libcurl])
|
||||
|
||||
CPPFLAGS="$CPPFLAGS -DCURLDEBUG"
|
||||
|
||||
dnl CHECKME: Do we still need so specify this include path here?
|
||||
CPPFLAGS="$CPPFLAGS -I$srcdir/../include"
|
||||
|
||||
# CPPFLAGS="$CPPFLAGS -DCURLDEBUG"
|
||||
CPPFLAGS="$CPPFLAGS -DCURLDEBUG -I../lib"
|
||||
squeeze CPPFLAGS
|
||||
fi
|
||||
#
|
||||
if test "$want_debug" = "yes"; then
|
||||
CPPFLAGS="$CPPFLAGS -DDEBUGBUILD"
|
||||
squeeze CPPFLAGS
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_NO_UNDEFINED
|
||||
dnl -------------------------------------------------
|
||||
dnl Checks if the -no-undefined flag must be used when
|
||||
dnl building shared libraries. This is required on all
|
||||
dnl systems on which shared libraries should not have
|
||||
dnl references to undefined symbols. This check should
|
||||
dnl not be done before AC-PROG-LIBTOOL.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_NO_UNDEFINED], [
|
||||
AC_BEFORE([$0],[CARES_CHECK_CURLDEBUG])dnl
|
||||
AC_MSG_CHECKING([if shared libraries need -no-undefined])
|
||||
need_no_undefined="no"
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc* | *-*-aix*)
|
||||
need_no_undefined="yes"
|
||||
;;
|
||||
esac
|
||||
if test "x$allow_undefined" = "xno"; then
|
||||
need_no_undefined="yes"
|
||||
elif test "x$allow_undefined_flag" = "xunsupported"; then
|
||||
need_no_undefined="yes"
|
||||
fi
|
||||
AC_MSG_RESULT($need_no_undefined)
|
||||
])
|
||||
|
||||
|
||||
|
@@ -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,46 @@
|
||||
#***************************************************************************
|
||||
|
||||
# File version for 'aclocal' use. Keep it a single number.
|
||||
# serial 3
|
||||
# serial 5
|
||||
|
||||
|
||||
dnl CARES_CHECK_OPTION_CURLDEBUG
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify if configure has been invoked with option
|
||||
dnl --enable-curldebug or --disable-curldebug, and set
|
||||
dnl shell variable want_curldebug value as appropriate.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_OPTION_CURLDEBUG], [
|
||||
AC_BEFORE([$0],[CARES_CHECK_CURLDEBUG])dnl
|
||||
AC_MSG_CHECKING([whether to enable curl debug memory tracking])
|
||||
OPT_CURLDEBUG_BUILD="default"
|
||||
AC_ARG_ENABLE(curldebug,
|
||||
AC_HELP_STRING([--enable-curldebug],[Enable curl debug memory tracking])
|
||||
AC_HELP_STRING([--disable-curldebug],[Disable curl debug memory tracking]),
|
||||
OPT_CURLDEBUG_BUILD=$enableval)
|
||||
case "$OPT_CURLDEBUG_BUILD" in
|
||||
no)
|
||||
dnl --disable-curldebug option used
|
||||
want_curldebug="no"
|
||||
;;
|
||||
default)
|
||||
dnl configure option not specified
|
||||
want_curldebug="no"
|
||||
;;
|
||||
*)
|
||||
dnl --enable-curldebug option used.
|
||||
dnl The use of this option value is a request to enable curl's
|
||||
dnl debug memory tracking for the c-ares library. This is a big
|
||||
dnl hack that can only be done when a whole bunch of requisites
|
||||
dnl are simultaneously satisfied. Later on, these requisites are
|
||||
dnl verified and if they are not fully satisfied the option will
|
||||
dnl be ignored and act as if --disable-curldebug had been given
|
||||
dnl setting shell variable want_curldebug to 'no'.
|
||||
want_curldebug="yes"
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT([$want_curldebug])
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_OPTION_DEBUG
|
||||
@@ -27,6 +66,7 @@ dnl variable want_debug value as appropriate.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_OPTION_DEBUG], [
|
||||
AC_BEFORE([$0],[CARES_CHECK_OPTION_WARNINGS])dnl
|
||||
AC_BEFORE([$0],[CARES_CHECK_OPTION_CURLDEBUG])dnl
|
||||
AC_BEFORE([$0],[CARES_CHECK_PROG_CC])dnl
|
||||
AC_MSG_CHECKING([whether to enable debug build options])
|
||||
OPT_DEBUG_BUILD="default"
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#***************************************************************************
|
||||
|
||||
# File version for 'aclocal' use. Keep it a single number.
|
||||
# serial 29
|
||||
# serial 32
|
||||
|
||||
|
||||
dnl CARES_INCLUDES_ARPA_INET
|
||||
@@ -91,6 +91,27 @@ cares_includes_netdb="\
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_INCLUDES_SOCKET
|
||||
dnl -------------------------------------------------
|
||||
dnl Set up variable with list of headers that must be
|
||||
dnl included when socket.h is to be included.
|
||||
|
||||
AC_DEFUN([CARES_INCLUDES_SOCKET], [
|
||||
cares_includes_socket="\
|
||||
/* includes start */
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SOCKET_H
|
||||
# include <socket.h>
|
||||
#endif
|
||||
/* includes end */"
|
||||
AC_CHECK_HEADERS(
|
||||
sys/types.h socket.h,
|
||||
[], [], [$cares_includes_socket])
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_INCLUDES_STDLIB
|
||||
dnl -------------------------------------------------
|
||||
dnl Set up variable with list of headers that must be
|
||||
@@ -319,6 +340,288 @@ cares_preprocess_callconv="\
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_FUNC_CLOSESOCKET
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify if closesocket is available, prototyped, and
|
||||
dnl can be compiled. If all of these are true, and
|
||||
dnl usage has not been previously disallowed with
|
||||
dnl shell variable cares_disallow_closesocket, then
|
||||
dnl HAVE_CLOSESOCKET will be defined.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_FUNC_CLOSESOCKET], [
|
||||
AC_REQUIRE([CARES_INCLUDES_WINSOCK2])dnl
|
||||
AC_REQUIRE([CARES_INCLUDES_SOCKET])dnl
|
||||
#
|
||||
tst_links_closesocket="unknown"
|
||||
tst_proto_closesocket="unknown"
|
||||
tst_compi_closesocket="unknown"
|
||||
tst_allow_closesocket="unknown"
|
||||
#
|
||||
AC_MSG_CHECKING([if closesocket can be linked])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$cares_includes_winsock2
|
||||
$cares_includes_socket
|
||||
]],[[
|
||||
if(0 != closesocket(0))
|
||||
return 1;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_links_closesocket="yes"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
tst_links_closesocket="no"
|
||||
])
|
||||
#
|
||||
if test "$tst_links_closesocket" = "yes"; then
|
||||
AC_MSG_CHECKING([if closesocket is prototyped])
|
||||
AC_EGREP_CPP([closesocket],[
|
||||
$cares_includes_winsock2
|
||||
$cares_includes_socket
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_proto_closesocket="yes"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
tst_proto_closesocket="no"
|
||||
])
|
||||
fi
|
||||
#
|
||||
if test "$tst_proto_closesocket" = "yes"; then
|
||||
AC_MSG_CHECKING([if closesocket is compilable])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$cares_includes_winsock2
|
||||
$cares_includes_socket
|
||||
]],[[
|
||||
if(0 != closesocket(0))
|
||||
return 1;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_compi_closesocket="yes"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
tst_compi_closesocket="no"
|
||||
])
|
||||
fi
|
||||
#
|
||||
if test "$tst_compi_closesocket" = "yes"; then
|
||||
AC_MSG_CHECKING([if closesocket usage allowed])
|
||||
if test "x$cares_disallow_closesocket" != "xyes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_allow_closesocket="yes"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
tst_allow_closesocket="no"
|
||||
fi
|
||||
fi
|
||||
#
|
||||
AC_MSG_CHECKING([if closesocket might be used])
|
||||
if test "$tst_links_closesocket" = "yes" &&
|
||||
test "$tst_proto_closesocket" = "yes" &&
|
||||
test "$tst_compi_closesocket" = "yes" &&
|
||||
test "$tst_allow_closesocket" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE_UNQUOTED(HAVE_CLOSESOCKET, 1,
|
||||
[Define to 1 if you have the closesocket function.])
|
||||
ac_cv_func_closesocket="yes"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
ac_cv_func_closesocket="no"
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_FUNC_CLOSESOCKET_CAMEL
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify if CloseSocket is available, prototyped, and
|
||||
dnl can be compiled. If all of these are true, and
|
||||
dnl usage has not been previously disallowed with
|
||||
dnl shell variable cares_disallow_closesocket_camel,
|
||||
dnl then HAVE_CLOSESOCKET_CAMEL will be defined.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_FUNC_CLOSESOCKET_CAMEL], [
|
||||
AC_REQUIRE([CARES_INCLUDES_SYS_SOCKET])dnl
|
||||
#
|
||||
tst_links_closesocket_camel="unknown"
|
||||
tst_proto_closesocket_camel="unknown"
|
||||
tst_compi_closesocket_camel="unknown"
|
||||
tst_allow_closesocket_camel="unknown"
|
||||
#
|
||||
AC_MSG_CHECKING([if CloseSocket can be linked])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$cares_includes_sys_socket
|
||||
]],[[
|
||||
if(0 != CloseSocket(0))
|
||||
return 1;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_links_closesocket_camel="yes"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
tst_links_closesocket_camel="no"
|
||||
])
|
||||
#
|
||||
if test "$tst_links_closesocket_camel" = "yes"; then
|
||||
AC_MSG_CHECKING([if CloseSocket is prototyped])
|
||||
AC_EGREP_CPP([CloseSocket],[
|
||||
$cares_includes_sys_socket
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_proto_closesocket_camel="yes"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
tst_proto_closesocket_camel="no"
|
||||
])
|
||||
fi
|
||||
#
|
||||
if test "$tst_proto_closesocket_camel" = "yes"; then
|
||||
AC_MSG_CHECKING([if CloseSocket is compilable])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$cares_includes_sys_socket
|
||||
]],[[
|
||||
if(0 != CloseSocket(0))
|
||||
return 1;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_compi_closesocket_camel="yes"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
tst_compi_closesocket_camel="no"
|
||||
])
|
||||
fi
|
||||
#
|
||||
if test "$tst_compi_closesocket_camel" = "yes"; then
|
||||
AC_MSG_CHECKING([if CloseSocket usage allowed])
|
||||
if test "x$cares_disallow_closesocket_camel" != "xyes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_allow_closesocket_camel="yes"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
tst_allow_closesocket_camel="no"
|
||||
fi
|
||||
fi
|
||||
#
|
||||
AC_MSG_CHECKING([if CloseSocket might be used])
|
||||
if test "$tst_links_closesocket_camel" = "yes" &&
|
||||
test "$tst_proto_closesocket_camel" = "yes" &&
|
||||
test "$tst_compi_closesocket_camel" = "yes" &&
|
||||
test "$tst_allow_closesocket_camel" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE_UNQUOTED(HAVE_CLOSESOCKET_CAMEL, 1,
|
||||
[Define to 1 if you have the CloseSocket camel case function.])
|
||||
ac_cv_func_closesocket_camel="yes"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
ac_cv_func_closesocket_camel="no"
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_FUNC_CONNECT
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify if connect is available, prototyped, and
|
||||
dnl can be compiled. If all of these are true, and
|
||||
dnl usage has not been previously disallowed with
|
||||
dnl shell variable cares_disallow_connect, then
|
||||
dnl HAVE_CONNECT will be defined.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_FUNC_CONNECT], [
|
||||
AC_REQUIRE([CARES_INCLUDES_WINSOCK2])dnl
|
||||
AC_REQUIRE([CARES_INCLUDES_SYS_SOCKET])dnl
|
||||
AC_REQUIRE([CARES_INCLUDES_SOCKET])dnl
|
||||
#
|
||||
tst_links_connect="unknown"
|
||||
tst_proto_connect="unknown"
|
||||
tst_compi_connect="unknown"
|
||||
tst_allow_connect="unknown"
|
||||
#
|
||||
AC_MSG_CHECKING([if connect can be linked])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$cares_includes_winsock2
|
||||
$cares_includes_sys_socket
|
||||
$cares_includes_socket
|
||||
]],[[
|
||||
if(0 != connect(0, 0, 0))
|
||||
return 1;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_links_connect="yes"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
tst_links_connect="no"
|
||||
])
|
||||
#
|
||||
if test "$tst_links_connect" = "yes"; then
|
||||
AC_MSG_CHECKING([if connect is prototyped])
|
||||
AC_EGREP_CPP([connect],[
|
||||
$cares_includes_winsock2
|
||||
$cares_includes_sys_socket
|
||||
$cares_includes_socket
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_proto_connect="yes"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
tst_proto_connect="no"
|
||||
])
|
||||
fi
|
||||
#
|
||||
if test "$tst_proto_connect" = "yes"; then
|
||||
AC_MSG_CHECKING([if connect is compilable])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$cares_includes_winsock2
|
||||
$cares_includes_sys_socket
|
||||
$cares_includes_socket
|
||||
]],[[
|
||||
if(0 != connect(0, 0, 0))
|
||||
return 1;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_compi_connect="yes"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
tst_compi_connect="no"
|
||||
])
|
||||
fi
|
||||
#
|
||||
if test "$tst_compi_connect" = "yes"; then
|
||||
AC_MSG_CHECKING([if connect usage allowed])
|
||||
if test "x$cares_disallow_connect" != "xyes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_allow_connect="yes"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
tst_allow_connect="no"
|
||||
fi
|
||||
fi
|
||||
#
|
||||
AC_MSG_CHECKING([if connect might be used])
|
||||
if test "$tst_links_connect" = "yes" &&
|
||||
test "$tst_proto_connect" = "yes" &&
|
||||
test "$tst_compi_connect" = "yes" &&
|
||||
test "$tst_allow_connect" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE_UNQUOTED(HAVE_CONNECT, 1,
|
||||
[Define to 1 if you have the connect function.])
|
||||
ac_cv_func_connect="yes"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
ac_cv_func_connect="no"
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_FUNC_FCNTL
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify if fcntl is available, prototyped, and
|
||||
@@ -2074,6 +2377,104 @@ AC_DEFUN([CARES_CHECK_FUNC_SETSOCKOPT_SO_NONBLOCK], [
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_FUNC_SOCKET
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify if socket is available, prototyped, and
|
||||
dnl can be compiled. If all of these are true, and
|
||||
dnl usage has not been previously disallowed with
|
||||
dnl shell variable cares_disallow_socket, then
|
||||
dnl HAVE_SOCKET will be defined.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_FUNC_SOCKET], [
|
||||
AC_REQUIRE([CARES_INCLUDES_WINSOCK2])dnl
|
||||
AC_REQUIRE([CARES_INCLUDES_SYS_SOCKET])dnl
|
||||
AC_REQUIRE([CARES_INCLUDES_SOCKET])dnl
|
||||
#
|
||||
tst_links_socket="unknown"
|
||||
tst_proto_socket="unknown"
|
||||
tst_compi_socket="unknown"
|
||||
tst_allow_socket="unknown"
|
||||
#
|
||||
AC_MSG_CHECKING([if socket can be linked])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$cares_includes_winsock2
|
||||
$cares_includes_sys_socket
|
||||
$cares_includes_socket
|
||||
]],[[
|
||||
if(0 != socket(0, 0, 0))
|
||||
return 1;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_links_socket="yes"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
tst_links_socket="no"
|
||||
])
|
||||
#
|
||||
if test "$tst_links_socket" = "yes"; then
|
||||
AC_MSG_CHECKING([if socket is prototyped])
|
||||
AC_EGREP_CPP([socket],[
|
||||
$cares_includes_winsock2
|
||||
$cares_includes_sys_socket
|
||||
$cares_includes_socket
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_proto_socket="yes"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
tst_proto_socket="no"
|
||||
])
|
||||
fi
|
||||
#
|
||||
if test "$tst_proto_socket" = "yes"; then
|
||||
AC_MSG_CHECKING([if socket is compilable])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
$cares_includes_winsock2
|
||||
$cares_includes_sys_socket
|
||||
$cares_includes_socket
|
||||
]],[[
|
||||
if(0 != socket(0, 0, 0))
|
||||
return 1;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_compi_socket="yes"
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
tst_compi_socket="no"
|
||||
])
|
||||
fi
|
||||
#
|
||||
if test "$tst_compi_socket" = "yes"; then
|
||||
AC_MSG_CHECKING([if socket usage allowed])
|
||||
if test "x$cares_disallow_socket" != "xyes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
tst_allow_socket="yes"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
tst_allow_socket="no"
|
||||
fi
|
||||
fi
|
||||
#
|
||||
AC_MSG_CHECKING([if socket might be used])
|
||||
if test "$tst_links_socket" = "yes" &&
|
||||
test "$tst_proto_socket" = "yes" &&
|
||||
test "$tst_compi_socket" = "yes" &&
|
||||
test "$tst_allow_socket" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE_UNQUOTED(HAVE_SOCKET, 1,
|
||||
[Define to 1 if you have the socket function.])
|
||||
ac_cv_func_socket="yes"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
ac_cv_func_socket="no"
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_FUNC_STRCASECMP
|
||||
dnl -------------------------------------------------
|
||||
dnl Verify if strcasecmp is available, prototyped, and
|
||||
|
14
ares/maketgz
14
ares/maketgz
@@ -48,10 +48,24 @@ print "makes a new configure script\n";
|
||||
print "running configure\n";
|
||||
`./configure`;
|
||||
|
||||
# generate HTML versions of man pages
|
||||
# Deactivated for now. It seems that man pages need some adjustments
|
||||
# relative to paragraph and/or line breaks for proper html formatting.
|
||||
# EXTRA_DIST will need $(HTMLPAGES) when this is fully activated.
|
||||
# print "running make html\n";
|
||||
# `make -s html`;
|
||||
|
||||
# generate PDF versions of man pages
|
||||
print "running make pdf\n";
|
||||
`make -s pdf`;
|
||||
|
||||
# now make the actual tarball
|
||||
print "running make dist\n";
|
||||
`make dist VERSION=$version`;
|
||||
|
||||
# remove temporay sourced man pages
|
||||
`make -s clean-sourced-manpages`;
|
||||
|
||||
print "removing temporary configure.ac file\n";
|
||||
`rm configure.ac.dist`;
|
||||
print "removing temporary ares_version.h file\n";
|
||||
|
@@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "ares_config.h"
|
||||
#else
|
||||
|
||||
#ifdef WIN32
|
||||
@@ -154,7 +154,7 @@
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
/*
|
||||
* Recent autoconf versions define these symbols in config.h. We don't
|
||||
* Recent autoconf versions define these symbols in ares_config.h. We don't
|
||||
* want them (since they collide with the libcurl ones when we build
|
||||
* --enable-debug) so we undef them again here.
|
||||
*/
|
||||
|
@@ -222,6 +222,19 @@ struct timeval {
|
||||
#endif /* if 0 */
|
||||
|
||||
|
||||
/*
|
||||
* Function-like macro definition used to close a socket.
|
||||
*/
|
||||
|
||||
#if defined(HAVE_CLOSESOCKET)
|
||||
# define sclose(x) closesocket((x))
|
||||
#elif defined(HAVE_CLOSESOCKET_CAMEL)
|
||||
# define sclose(x) CloseSocket((x))
|
||||
#else
|
||||
# define sclose(x) close((x))
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Uppercase macro versions of ANSI/ISO is*() functions/macros which
|
||||
* avoid negative number inputs with argument byte codes > 127.
|
||||
@@ -297,7 +310,7 @@ typedef int sig_atomic_t;
|
||||
* Macro used to include code only in debug builds.
|
||||
*/
|
||||
|
||||
#ifdef CURLDEBUG
|
||||
#ifdef DEBUGBUILD
|
||||
#define DEBUGF(x) x
|
||||
#else
|
||||
#define DEBUGF(x) do { } while (0)
|
||||
@@ -308,7 +321,7 @@ typedef int sig_atomic_t;
|
||||
* Macro used to include assertion code only in debug builds.
|
||||
*/
|
||||
|
||||
#if defined(CURLDEBUG) && defined(HAVE_ASSERT_H)
|
||||
#if defined(DEBUGBUILD) && defined(HAVE_ASSERT_H)
|
||||
#define DEBUGASSERT(x) assert(x)
|
||||
#else
|
||||
#define DEBUGASSERT(x) do { } while (0)
|
||||
|
@@ -1,3 +1,5 @@
|
||||
Debug
|
||||
Release
|
||||
acountry.dep
|
||||
acountry.mak
|
||||
acountry.plg
|
||||
|
@@ -63,8 +63,8 @@ LIB32=link.exe -lib
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "DEBUGBUILD" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /D "WIN32" /D "DEBUGBUILD" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
104
buildconf
104
buildconf
@@ -88,7 +88,7 @@ if test -z "$ac_version"; then
|
||||
echo " You need autoconf version $need_autoconf or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
IFS=.; set $ac_version; IFS=' '
|
||||
old_IFS=$IFS; IFS='.'; set $ac_version; IFS=$old_IFS
|
||||
if test "$1" = "2" -a "$2" -lt "57" || test "$1" -lt "2"; then
|
||||
echo "buildconf: autoconf version $ac_version found."
|
||||
echo " You need autoconf version $need_autoconf or newer installed."
|
||||
@@ -121,7 +121,7 @@ if test -z "$ah_version"; then
|
||||
echo " You need autoheader version 2.50 or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
IFS=.; set $ah_version; IFS=' '
|
||||
old_IFS=$IFS; IFS='.'; set $ah_version; IFS=$old_IFS
|
||||
if test "$1" = "2" -a "$2" -lt "50" || test "$1" -lt "2"; then
|
||||
echo "buildconf: autoheader version $ah_version found."
|
||||
echo " You need autoheader version 2.50 or newer installed."
|
||||
@@ -143,7 +143,7 @@ if test -z "$am_version"; then
|
||||
echo " You need automake version $need_automake or newer installed."
|
||||
exit 1
|
||||
fi
|
||||
IFS=.; set $am_version; IFS=' '
|
||||
old_IFS=$IFS; IFS='.'; set $am_version; IFS=$old_IFS
|
||||
if test "$1" = "1" -a "$2" -lt "7" || test "$1" -lt "1"; then
|
||||
echo "buildconf: automake version $am_version found."
|
||||
echo " You need automake version $need_automake or newer installed."
|
||||
@@ -191,28 +191,28 @@ else
|
||||
libtoolize=`findtool $LIBTOOLIZE`
|
||||
fi
|
||||
|
||||
lt_pversion=`$libtool --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//g' -e 's/[- ].*//'`
|
||||
if test -z "$lt_pversion"; then
|
||||
lt_pver=`$libtool --version 2>/dev/null|head -n 1`
|
||||
lt_qver=`echo $lt_pver|sed -e "s/([^)]*)//g" -e "s/^[^0-9]*//g"`
|
||||
lt_version=`echo $lt_qver|sed -e "s/[- ].*//" -e "s/\([a-z]*\)$//"`
|
||||
if test -z "$lt_version"; then
|
||||
echo "buildconf: libtool not found."
|
||||
echo " You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
|
||||
exit 1
|
||||
fi
|
||||
lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$//'`
|
||||
IFS=.; set $lt_version; IFS=' '
|
||||
old_IFS=$IFS; IFS='.'; set $lt_version; IFS=$old_IFS
|
||||
lt_major=$1
|
||||
lt_minor=$2
|
||||
lt_patch=$3
|
||||
lt_status="good"
|
||||
|
||||
major=$1
|
||||
minor=$2
|
||||
patch=$3
|
||||
|
||||
if test "$major" = "$LIBTOOL_WANTED_MAJOR"; then
|
||||
if test "$minor" -lt "$LIBTOOL_WANTED_MINOR"; then
|
||||
if test "$lt_major" = "$LIBTOOL_WANTED_MAJOR"; then
|
||||
if test "$lt_minor" -lt "$LIBTOOL_WANTED_MINOR"; then
|
||||
lt_status="bad"
|
||||
elif test -n "$LIBTOOL_WANTED_PATCH"; then
|
||||
if test "$minor" -gt "$LIBTOOL_WANTED_MINOR"; then
|
||||
if test "$lt_minor" -gt "$LIBTOOL_WANTED_MINOR"; then
|
||||
lt_status="good"
|
||||
elif test -n "$patch"; then
|
||||
if test "$patch" -lt "$LIBTOOL_WANTED_PATCH"; then
|
||||
elif test -n "$lt_patch"; then
|
||||
if test "$lt_patch" -lt "$LIBTOOL_WANTED_PATCH"; then
|
||||
lt_status="bad"
|
||||
fi
|
||||
else
|
||||
@@ -221,7 +221,7 @@ if test "$major" = "$LIBTOOL_WANTED_MAJOR"; then
|
||||
fi
|
||||
fi
|
||||
if test $lt_status != "good"; then
|
||||
echo "buildconf: libtool version $lt_pversion found."
|
||||
echo "buildconf: libtool version $lt_version found."
|
||||
echo " You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
|
||||
exit 1
|
||||
fi
|
||||
@@ -257,15 +257,23 @@ PERL=`findtool ${PERL:-perl}`
|
||||
# Remove files generated on previous buildconf/configure run.
|
||||
#
|
||||
for fname in .deps \
|
||||
.libs \
|
||||
*.la \
|
||||
*.lo \
|
||||
*.a \
|
||||
*.o \
|
||||
Makefile \
|
||||
Makefile.in \
|
||||
aclocal.m4 \
|
||||
aclocal.m4.bak \
|
||||
ares_build.h \
|
||||
autom4te.cache \
|
||||
compile \
|
||||
config.guess \
|
||||
config.h \
|
||||
config.h.in \
|
||||
curl_config.h \
|
||||
curl_config.h.in \
|
||||
config.log \
|
||||
config.lt \
|
||||
config.status \
|
||||
config.sub \
|
||||
configure \
|
||||
@@ -313,8 +321,8 @@ fi
|
||||
echo "buildconf: running autoheader"
|
||||
${AUTOHEADER:-autoheader} || die "The autoheader command failed"
|
||||
|
||||
echo "buildconf: cp lib/config.h.in src/config.h.in"
|
||||
cp lib/config.h.in src/config.h.in
|
||||
echo "buildconf: cp lib/curl_config.h.in src/curl_config.h.in"
|
||||
cp lib/curl_config.h.in src/curl_config.h.in
|
||||
|
||||
echo "buildconf: running autoconf"
|
||||
${AUTOCONF:-autoconf} || die "The autoconf command failed"
|
||||
@@ -329,5 +337,59 @@ fi
|
||||
echo "buildconf: running automake"
|
||||
${AUTOMAKE:-automake} -a -c || die "The automake command failed"
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Depending on the libtool and automake versions being used, config.guess
|
||||
# might not be installed in the subdirectory until automake has finished.
|
||||
# So we can not attempt to use it until this very last buildconf stage.
|
||||
#
|
||||
|
||||
if test ! -f ./config.guess; then
|
||||
echo "buildconf: config.guess not found"
|
||||
else
|
||||
buildhost=`./config.guess 2>/dev/null|head -n 1`
|
||||
case $buildhost in
|
||||
*-*-hpux*)
|
||||
need_lt_major=1
|
||||
need_lt_minor=5
|
||||
need_lt_patch=24
|
||||
need_lt_check="yes"
|
||||
;;
|
||||
esac
|
||||
if test ! -z "$need_lt_check"; then
|
||||
if test -z "$lt_major"; then
|
||||
lt_status="bad"
|
||||
elif test "$lt_major" -gt "$need_lt_major"; then
|
||||
lt_status="good"
|
||||
elif test "$lt_major" -lt "$need_lt_major"; then
|
||||
lt_status="bad"
|
||||
elif test -z "$lt_minor"; then
|
||||
lt_status="bad"
|
||||
elif test "$lt_minor" -gt "$need_lt_minor"; then
|
||||
lt_status="good"
|
||||
elif test "$lt_minor" -lt "$need_lt_minor"; then
|
||||
lt_status="bad"
|
||||
elif test -z "$lt_patch"; then
|
||||
lt_status="bad"
|
||||
elif test "$lt_patch" -gt "$need_lt_patch"; then
|
||||
lt_status="good"
|
||||
elif test "$lt_patch" -lt "$need_lt_patch"; then
|
||||
lt_status="bad"
|
||||
else
|
||||
lt_status="good"
|
||||
fi
|
||||
if test "$lt_status" != "good"; then
|
||||
need_lt_version="$need_lt_major.$need_lt_minor.$need_lt_patch"
|
||||
echo "buildconf: libtool version $lt_version found."
|
||||
echo " $buildhost requires libtool $need_lt_version or newer installed."
|
||||
rm -f configure
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Finished succesfully.
|
||||
#
|
||||
|
||||
echo "buildconf: OK"
|
||||
exit 0
|
||||
|
@@ -1,16 +1,32 @@
|
||||
@echo off
|
||||
REM set up a CVS tree to build when there's no autotools
|
||||
REM $Revision$
|
||||
REM $Date$
|
||||
REM
|
||||
REM $Id$
|
||||
REM
|
||||
REM This batch file must be used to set up a CVS tree to build on
|
||||
REM systems where there is no autotools support (i.e. Microsoft).
|
||||
REM
|
||||
REM This file is not included nor needed for curl's release
|
||||
REM archives, neither for curl's daily snapshot archives.
|
||||
|
||||
if exist CVS-INFO goto start_doing
|
||||
ECHO ERROR: This file shall only be used with a curl CVS tree checkout.
|
||||
goto end_all
|
||||
:start_doing
|
||||
|
||||
REM create hugehelp.c
|
||||
copy src\hugehelp.c.cvs src\hugehelp.c
|
||||
if not exist src\hugehelp.c.cvs goto end_hugehelp_c
|
||||
copy /Y src\hugehelp.c.cvs src\hugehelp.c
|
||||
:end_hugehelp_c
|
||||
|
||||
REM create Makefile
|
||||
copy Makefile.dist Makefile
|
||||
if not exist Makefile.dist goto end_makefile
|
||||
copy /Y Makefile.dist Makefile
|
||||
:end_makefile
|
||||
|
||||
REM create curlbuild.h
|
||||
copy include\curl\curlbuild.h.dist include\curl\curlbuild.h
|
||||
if not exist include\curl\curlbuild.h.dist goto end_curlbuild_h
|
||||
copy /Y include\curl\curlbuild.h.dist include\curl\curlbuild.h
|
||||
:end_curlbuild_h
|
||||
|
||||
REM setup c-ares CVS tree
|
||||
if not exist ares\buildconf.bat goto end_c_ares
|
||||
@@ -19,3 +35,5 @@ call buildconf.bat
|
||||
cd ..
|
||||
:end_c_ares
|
||||
|
||||
:end_all
|
||||
|
||||
|
109
configure.ac
109
configure.ac
@@ -35,12 +35,13 @@ This configure script may be copied, distributed and modified under the
|
||||
terms of the curl license; see COPYING for more details])
|
||||
|
||||
AC_CONFIG_SRCDIR([lib/urldata.h])
|
||||
AM_CONFIG_HEADER(lib/config.h src/config.h include/curl/curlbuild.h)
|
||||
AM_CONFIG_HEADER(lib/curl_config.h src/curl_config.h include/curl/curlbuild.h)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
CURL_CHECK_OPTION_DEBUG
|
||||
CURL_CHECK_OPTION_OPTIMIZE
|
||||
CURL_CHECK_OPTION_WARNINGS
|
||||
CURL_CHECK_OPTION_CURLDEBUG
|
||||
|
||||
CURL_CHECK_PATH_SEPARATOR
|
||||
|
||||
@@ -155,8 +156,6 @@ AC_SYS_LARGEFILE
|
||||
dnl support building of Windows DLLs
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
|
||||
CURL_PROCESS_DEBUG_BUILD_OPTS
|
||||
|
||||
dnl force libtool to build static libraries with PIC on AMD64-Linux & FreeBSD
|
||||
AC_MSG_CHECKING([if arch-OS host is AMD64-Linux/FreeBSD (to build static libraries with PIC)])
|
||||
case $host in
|
||||
@@ -172,18 +171,6 @@ esac
|
||||
dnl libtool setup
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AC_MSG_CHECKING([if we need -no-undefined])
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
need_no_undefined=yes
|
||||
;;
|
||||
*)
|
||||
need_no_undefined=no
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT($need_no_undefined)
|
||||
AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
|
||||
|
||||
AC_MSG_CHECKING([if we need -mimpure-text])
|
||||
mimpure=no
|
||||
case $host in
|
||||
@@ -270,6 +257,12 @@ esac
|
||||
CURL_CHECK_COMPILER_HALT_ON_ERROR
|
||||
CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
|
||||
CURL_CHECK_NO_UNDEFINED
|
||||
AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)
|
||||
|
||||
CURL_CHECK_CURLDEBUG
|
||||
AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Compilation based checks should not be done before this point.
|
||||
dnl **********************************************************************
|
||||
@@ -663,8 +656,7 @@ if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
|
||||
fi
|
||||
ac_cv_func_strcasecmp="no"
|
||||
|
||||
dnl socket lib?
|
||||
AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ])
|
||||
CURL_CHECK_LIBS_CONNECT
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl In case that function clock_gettime with monotonic timer is available,
|
||||
@@ -1554,25 +1546,9 @@ if test "$OPENSSL_ENABLED" != "1"; then
|
||||
|
||||
if test X"$OPT_GNUTLS" != Xno; then
|
||||
|
||||
AC_MSG_NOTICE([OPT_GNUTLS is $OPT_GNUTLS])
|
||||
|
||||
addld=""
|
||||
if test "x$OPT_GNUTLS" = "xyes"; then
|
||||
check=`libgnutls-config --version 2>/dev/null`
|
||||
if test -n "$check"; then
|
||||
addlib=`libgnutls-config --libs`
|
||||
addcflags=`libgnutls-config --cflags`
|
||||
version=`libgnutls-config --version`
|
||||
gtlslib=`libgnutls-config --prefix`/lib$libsuff
|
||||
fi
|
||||
else
|
||||
addlib=`$OPT_GNUTLS/bin/libgnutls-config --libs`
|
||||
addcflags=`$OPT_GNUTLS/bin/libgnutls-config --cflags`
|
||||
version=`$OPT_GNUTLS/bin/libgnutls-config --version 2>/dev/null`
|
||||
gtlslib=$OPT_GNUTLS/lib$libsuff
|
||||
fi
|
||||
|
||||
if test -z "$version"; then
|
||||
dnl this is with no partiular path given
|
||||
CURL_CHECK_PKGCONFIG(gnutls)
|
||||
|
||||
if test "$PKGCONFIG" != "no" ; then
|
||||
@@ -1581,8 +1557,34 @@ if test "$OPENSSL_ENABLED" != "1"; then
|
||||
addcflags=`$PKGCONFIG --cflags-only-I gnutls`
|
||||
version=`$PKGCONFIG --modversion gnutls`
|
||||
gtlslib=`echo $addld | $SED -e 's/-L//'`
|
||||
else
|
||||
dnl without pkg-config, we try libgnutls-config as that was how it
|
||||
dnl used to be done
|
||||
check=`libgnutls-config --version 2>/dev/null`
|
||||
if test -n "$check"; then
|
||||
addlib=`libgnutls-config --libs`
|
||||
addcflags=`libgnutls-config --cflags`
|
||||
version=`libgnutls-config --version`
|
||||
gtlslib=`libgnutls-config --prefix`/lib$libsuff
|
||||
fi
|
||||
fi
|
||||
else
|
||||
dnl this is with a given path, first check if there's a libgnutls-config
|
||||
dnl there and if not, make an educated guess
|
||||
check=`$OPT_GNUTLS/libgnutls-config --version 2>/dev/null`
|
||||
if test -n "$check"; then
|
||||
addlib=`$OPT_GNUTLS/libgnutls-config --libs`
|
||||
addcflags=`$OPT_GNUTLS/libgnutls-config --cflags`
|
||||
version=`$OPT_GNUTLS/libgnutls-config --version`
|
||||
gtlslib=`$OPT_GNUTLS/libgnutls-config --prefix`/lib$libsuff
|
||||
else
|
||||
dnl without pkg-config and libgnutls-config, we guess a lot!
|
||||
addlib=-lgnutls
|
||||
addld=-L$OPT_GNUTLS/lib$libsuff
|
||||
addcflags=-I$OPT_GNUTLS/include
|
||||
version="" # we just don't know
|
||||
gtlslib=$OPT_GNUTLS/lib$libsuff
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test -z "$version"; then
|
||||
@@ -1663,10 +1665,10 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
|
||||
fi
|
||||
else
|
||||
# Without pkg-config, we'll kludge in some defaults
|
||||
addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
|
||||
addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
|
||||
addcflags="-I$OPT_NSS/include"
|
||||
version="unknown"
|
||||
gtlsprefix=$OPT_GNUTLS
|
||||
nssprefix=$OPT_NSS
|
||||
fi
|
||||
|
||||
dnl Check for functionPK11_CreateGenericObject
|
||||
@@ -1907,6 +1909,7 @@ AC_CHECK_HEADERS(
|
||||
sys/utime.h \
|
||||
sys/poll.h \
|
||||
poll.h \
|
||||
socket.h \
|
||||
sys/resource.h \
|
||||
libgen.h \
|
||||
locale.h \
|
||||
@@ -2017,6 +2020,9 @@ CURL_CHECK_FUNC_SEND
|
||||
CURL_CHECK_MSG_NOSIGNAL
|
||||
|
||||
CURL_CHECK_FUNC_ALARM
|
||||
CURL_CHECK_FUNC_CLOSESOCKET
|
||||
CURL_CHECK_FUNC_CLOSESOCKET_CAMEL
|
||||
CURL_CHECK_FUNC_CONNECT
|
||||
CURL_CHECK_FUNC_FCNTL
|
||||
CURL_CHECK_FUNC_FDOPEN
|
||||
CURL_CHECK_FUNC_FREEADDRINFO
|
||||
@@ -2044,6 +2050,7 @@ CURL_CHECK_FUNC_SIGACTION
|
||||
CURL_CHECK_FUNC_SIGINTERRUPT
|
||||
CURL_CHECK_FUNC_SIGNAL
|
||||
CURL_CHECK_FUNC_SIGSETJMP
|
||||
CURL_CHECK_FUNC_SOCKET
|
||||
CURL_CHECK_FUNC_STRCASECMP
|
||||
CURL_CHECK_FUNC_STRCASESTR
|
||||
CURL_CHECK_FUNC_STRCMPI
|
||||
@@ -2072,7 +2079,6 @@ case $host in
|
||||
esac
|
||||
|
||||
AC_CHECK_FUNCS([basename \
|
||||
closesocket \
|
||||
fork \
|
||||
geteuid \
|
||||
getpass_r \
|
||||
@@ -2087,7 +2093,6 @@ AC_CHECK_FUNCS([basename \
|
||||
setlocale \
|
||||
setmode \
|
||||
setrlimit \
|
||||
socket \
|
||||
uname \
|
||||
utime
|
||||
],[
|
||||
@@ -2200,6 +2205,9 @@ fi
|
||||
dnl set variable for use in automakefile(s)
|
||||
AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
|
||||
|
||||
aresembedded="unknown"
|
||||
configure_rundir=`pwd`
|
||||
embedded_ares_builddir="$configure_rundir/ares"
|
||||
AC_MSG_CHECKING([whether to enable c-ares])
|
||||
AC_ARG_ENABLE(ares,
|
||||
AC_HELP_STRING([--enable-ares=PATH],[Enable c-ares for name lookups])
|
||||
@@ -2230,14 +2238,9 @@ AC_HELP_STRING([--disable-ares],[Disable c-ares for name lookups]),
|
||||
if test -d "$srcdir/ares"; then
|
||||
aresembedded="yes"
|
||||
AC_CONFIG_SUBDIRS(ares)
|
||||
aresinc=`cd $srcdir/ares && pwd`
|
||||
CPPFLAGS="$CPPFLAGS -I$aresinc"
|
||||
|
||||
dnl the pwd= below cannot 'cd' into the ares dir to get the full
|
||||
dnl path to it, since it may not exist yet if we build outside of
|
||||
dnl the source tree
|
||||
pwd=`pwd`
|
||||
LDFLAGS="$LDFLAGS -L$pwd/ares"
|
||||
dnl Since c-ares has installable configured header files, path
|
||||
dnl inclusion is fully done in makefiles for in-tree builds.
|
||||
LDFLAGS="$LDFLAGS -L$embedded_ares_builddir"
|
||||
fi
|
||||
else
|
||||
CPPFLAGS="$CPPFLAGS -I$enableval/include"
|
||||
@@ -2275,6 +2278,9 @@ AC_HELP_STRING([--disable-ares],[Disable c-ares for name lookups]),
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
dnl set variable for use in automakefile(s)
|
||||
AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$aresembedded = xyes)
|
||||
|
||||
dnl ************************************************************
|
||||
dnl disable verbose text strings
|
||||
dnl
|
||||
@@ -2399,7 +2405,7 @@ AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibi
|
||||
|
||||
dnl ************************************************************
|
||||
dnl enforce SONAME bump
|
||||
dnl
|
||||
dnl
|
||||
|
||||
AC_MSG_CHECKING([whether to enforce SONAME bump])
|
||||
AC_ARG_ENABLE(soname-bump,
|
||||
@@ -2530,6 +2536,11 @@ squeeze CURL_LIBS
|
||||
squeeze LIBCURL_LIBS
|
||||
squeeze TEST_SERVER_LIBS
|
||||
|
||||
if test "x$want_curldebug_assumed" = "xyes" &&
|
||||
test "x$want_curldebug" = "xyes" && test "x$HAVE_ARES" = "x1"; then
|
||||
ac_configure_args="$ac_configure_args --enable-curldebug"
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES([Makefile \
|
||||
docs/Makefile \
|
||||
docs/examples/Makefile \
|
||||
@@ -2583,7 +2594,7 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
|
||||
ca cert bundle: ${ca}
|
||||
ca cert path: ${capath}
|
||||
LDAP support: ${curl_ldap_msg}
|
||||
LDAPS support: ${curl_ldaps_msg}
|
||||
LDAPS support: ${curl_ldaps_msg}
|
||||
])
|
||||
|
||||
if test "x$soname_bump" = "xyes"; then
|
||||
|
@@ -18,7 +18,7 @@ autom4te.cache
|
||||
*.patch
|
||||
CVS
|
||||
*.asc
|
||||
config.h
|
||||
curl_config.h
|
||||
*.la
|
||||
*.lai
|
||||
libtool
|
||||
|
31
docs/FAQ
31
docs/FAQ
@@ -1,4 +1,4 @@
|
||||
Updated: Feb 23, 2009 (http://curl.haxx.se/docs/faq.html)
|
||||
Updated: Jun 9, 2009 (http://curl.haxx.se/docs/faq.html)
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
@@ -19,6 +19,7 @@ FAQ
|
||||
1.9 Where do I buy commercial support for curl?
|
||||
1.10 How many are using curl?
|
||||
1.11 Why don't you update ca-bundle.crt
|
||||
1.12 I have a problem who can I chat with?
|
||||
|
||||
2. Install Related Problems
|
||||
2.1 configure doesn't find OpenSSL even when it is installed
|
||||
@@ -88,6 +89,7 @@ FAQ
|
||||
5.12 Can I make libcurl fake or hide my real IP address?
|
||||
5.13 How do I stop an ongoing transfer?
|
||||
5.14 Using C++ non-static functions for callbacks?
|
||||
5.15 How do I get an FTP directory listing?
|
||||
|
||||
6. License Issues
|
||||
6.1 I have a GPL program, can I use the libcurl library?
|
||||
@@ -344,6 +346,12 @@ FAQ
|
||||
Firefox (by running 'make ca-bundle), or by using our online service setup
|
||||
for this purpose: http://curl.haxx.se/docs/caextract.html
|
||||
|
||||
1.12 I have a problem who can I chat with?
|
||||
|
||||
There's a bunch of friendly people hanging out in the #curl channel on the
|
||||
IRC network irc.freenode.net. If you're polite and nice, chances are big
|
||||
that you can get -- or provide -- help instantly.
|
||||
|
||||
|
||||
2. Install Related Problems
|
||||
|
||||
@@ -1123,6 +1131,27 @@ FAQ
|
||||
curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:staticFunction);
|
||||
curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, this);
|
||||
|
||||
5.15 How do I get an FTP directory listing?
|
||||
|
||||
If you end the FTP URL you request with a slash, libcurl will provide you
|
||||
with a directory listing of that given directory. You can also set
|
||||
CURLOPT_CUSTOMREQUEST to alter what exact listing command libcurl would use
|
||||
to list the files.
|
||||
|
||||
The follow-up question that tend to follow the previous one, is how a
|
||||
program is supposed to parse the directory listing. How does it know what's
|
||||
a file and what's a dir and what's a symlink etc. The harsh reality is that
|
||||
FTP provides no such fine and easy-to-parse output. The output format FTP
|
||||
servers respond to LIST commands are entirely at the server's own liking and
|
||||
the NLST output doesn't reveal any types and in many cases don't even
|
||||
include all the directory entries. Also, both LIST and NLST tend to hide
|
||||
unix-style hidden files (those that start with a dot) by default so you need
|
||||
to do "LIST -a" or similar to see them.
|
||||
|
||||
The application thus needs to parse the LIST output. One such existing
|
||||
list parser is available at http://cr.yp.to/ftpparse.html
|
||||
|
||||
|
||||
6. License Issues
|
||||
|
||||
Curl and libcurl are released under a MIT/X derivate license. The license is
|
||||
|
37
docs/INSTALL
37
docs/INSTALL
@@ -206,8 +206,8 @@ Win32
|
||||
environment variables, for example:
|
||||
|
||||
set ZLIB_PATH=c:\zlib-1.2.3
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8g
|
||||
set LIBSSH2_PATH=c:\libssh2-0.17
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8k
|
||||
set LIBSSH2_PATH=c:\libssh2-1.1
|
||||
|
||||
ATTENTION: if you want to build with libssh2 support you have to use latest
|
||||
version 0.17 - previous versions will NOT work with 7.17.0 and later!
|
||||
@@ -275,7 +275,7 @@ Win32
|
||||
Before running nmake define the OPENSSL_PATH environment variable with
|
||||
the root/base directory of OpenSSL, for example:
|
||||
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8g
|
||||
set OPENSSL_PATH=c:\openssl-0.9.8k
|
||||
|
||||
Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root
|
||||
directory. 'nmake vc-ssl' will create a libcurl static and dynamic
|
||||
@@ -566,9 +566,8 @@ NetWare
|
||||
- optional OpenSSL sources (version 0.9.8 or later build with BSD sockets);
|
||||
you can find precompiled packages at:
|
||||
http://www.gknw.net/development/ossl/netware/
|
||||
for CLIB-based builds OpenSSL needs to be patched to build with BSD
|
||||
sockets (currently only a winsock-based CLIB build is supported):
|
||||
http://www.gknw.net/development/ossl/netware/patches/v_0.9.8g/openssl-0.9.8g.diff
|
||||
for CLIB-based builds OpenSSL 0.9.8h or later is required - earlier versions
|
||||
dont support buildunf with CLIB BSD sockets.
|
||||
- optional SSH2 sources (version 0.17 or later);
|
||||
|
||||
Set a search path to your compiler, linker and tools; on Linux make
|
||||
@@ -706,6 +705,32 @@ Symbian OS
|
||||
to obtain that first.
|
||||
|
||||
|
||||
VxWorks
|
||||
========
|
||||
Build for VxWorks is performed using cross compilation.
|
||||
That means you build on Windows machine using VxWorks tools and
|
||||
run the built image on the VxWorks device.
|
||||
|
||||
To build libcurl for VxWorks you need:
|
||||
|
||||
- CYGWIN (free, http://cygwin.com/)
|
||||
- Wind River Workbench (commercial)
|
||||
|
||||
If you have CYGWIN and Workbench installed on you machine
|
||||
follow after next steps:
|
||||
|
||||
1. Open the Command Prompt window and change directory ('cd')
|
||||
to the libcurl 'lib' folder.
|
||||
2. Add CYGWIN 'bin' folder to the PATH environment variable.
|
||||
For example, type 'set PATH=C:/embedded/cygwin/bin;%PATH%'.
|
||||
3. Adjust environment variables defined in 'Environment' section
|
||||
of the Makefile.vxworks file to point to your software folders.
|
||||
4. Build the libcurl by typing 'make -f ./Makefile.vxworks'
|
||||
|
||||
As a result the libcurl.a library should be created in the 'lib' folder.
|
||||
To clean the build results type 'make -f ./Makefile.vxworks clean'.
|
||||
|
||||
|
||||
CROSS COMPILE
|
||||
=============
|
||||
(This section was graciously brought to us by Jim Duey, with additions by
|
||||
|
65
docs/INSTALL.cmake
Executable file
65
docs/INSTALL.cmake
Executable file
@@ -0,0 +1,65 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
How To Compile with CMake
|
||||
|
||||
Building with CMake
|
||||
==========================
|
||||
This document describes how to compile, build and install curl and libcurl
|
||||
from source code using the CMake build tool. To build with CMake, you will
|
||||
of course have to first install CMake. The minimum required version of
|
||||
CMake is specifed in the file CMakeLists.txt found in the top of the curl
|
||||
source tree. Once the correct version of CMake is installed you can follow
|
||||
the instructions below for the platform you are building on.
|
||||
|
||||
CMake builds can be configured either from the command line, or from one
|
||||
of CMake's GUI's.
|
||||
|
||||
Command Line CMake
|
||||
==================
|
||||
A command line build of Curl is similar to the autotools build of Curl. It
|
||||
consists of the following steps after you have unpacked the source.
|
||||
# 1st create an out of source build tree parallel to the curl source
|
||||
# tree and change into that directory
|
||||
mkdir curl-build
|
||||
cd curl-build
|
||||
# now run CMake from the build tree, giving it the path to the top of
|
||||
# the Curl source tree. CMake will pick a compiler for you. If you
|
||||
# want to specifiy the compile, you can set the CC environment
|
||||
# variable prior to running CMake.
|
||||
cmake ../curl
|
||||
make
|
||||
# currently make test and make install are not implemented
|
||||
#make test
|
||||
#make install
|
||||
|
||||
ccmake
|
||||
=========
|
||||
CMake comes with a curses based interface called ccmake. To run ccmake on
|
||||
a curl use the instructions for the command line cmake, but substitue
|
||||
ccmake ../curl for cmake ../curl. This will bring up a curses interface
|
||||
with instructions on the bottom of the screen. You can press the "c" key
|
||||
to configure the project, and the "g" key to generate the project. After
|
||||
the project is generated, you can run make.
|
||||
|
||||
cmake-gui
|
||||
=========
|
||||
CMake also comes with a Qt based GUI called cmake-gui. To configure with
|
||||
cmake-gui, you run cmake-gui and follow these steps:
|
||||
1. Fill in the "Where is the source code" combo box with the path to
|
||||
the curl source tree.
|
||||
2. Fill in the "Where to build the binaries" combo box with the path
|
||||
to the directory for your build tree, ideally this should not be the
|
||||
same as the source tree, but a parallel diretory called curl-build or
|
||||
something similar.
|
||||
3. Once the source and binary directories are specified, press the
|
||||
"Configure" button.
|
||||
4. Select the native build tool that you want to use.
|
||||
5. At this point you can change any of the options presented in the
|
||||
GUI. Once you have selected all the options you want, click the
|
||||
"Generate" button.
|
||||
6. Run the native build tool that you used CMake to genratate.
|
||||
|
@@ -103,9 +103,9 @@ Windows vs Unix
|
||||
Inside the source code, We make an effort to avoid '#ifdef [Your OS]'. All
|
||||
conditionals that deal with features *should* instead be in the format
|
||||
'#ifdef HAVE_THAT_WEIRD_FUNCTION'. Since Windows can't run configure scripts,
|
||||
we maintain two config-win32.h files (one in lib/ and one in src/) that are
|
||||
supposed to look exactly as a config.h file would have looked like on a
|
||||
Windows machine!
|
||||
we maintain two curl_config-win32.h files (one in lib/ and one in src/) that
|
||||
are supposed to look exactly as a curl_config.h file would have looked like on
|
||||
a Windows machine!
|
||||
|
||||
Generally speaking: always remember that this will be compiled on dozens of
|
||||
operating systems. Don't walk on the edge.
|
||||
|
@@ -3,6 +3,30 @@ 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!
|
||||
|
||||
72. "Pausing pipeline problems."
|
||||
http://curl.haxx.se/mail/lib-2009-07/0214.html
|
||||
|
||||
71. TFTP block size / better integration in transfer
|
||||
http://curl.haxx.se/mail/lib-2009-08/0028.html
|
||||
|
||||
70. Problem re-using easy handle after call to curl_multi_remove_handle
|
||||
http://curl.haxx.se/mail/lib-2009-07/0249.html
|
||||
|
||||
69. debugging a crash in Curl_pgrsTime/checkPendPipeline?
|
||||
http://curl.haxx.se/mail/lib-2009-08/0066.html
|
||||
|
||||
68. "More questions about ares behavior".
|
||||
http://curl.haxx.se/mail/lib-2009-08/0012.html
|
||||
|
||||
67. When creating multipart formposts. The file name part can be encoded with
|
||||
something beyond ascii but currently libcurl will only pass in the verbatim
|
||||
string the app provides. There are several browsers that already do this
|
||||
encoding. The key seems to be the updated draft to RFC2231:
|
||||
http://tools.ietf.org/html/draft-reschke-rfc2231-in-http-02
|
||||
|
||||
66. When using telnet, the time limitation options don't work.
|
||||
http://curl.haxx.se/bug/view.cgi?id=2818950
|
||||
|
||||
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
|
||||
|
16
docs/README.cmake
Executable file
16
docs/README.cmake
Executable file
@@ -0,0 +1,16 @@
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
README.cmake
|
||||
Read the README file first.
|
||||
|
||||
Curl contains CMake build files that provide a way to build Curl with the
|
||||
CMake build tool (www.cmake.org). CMake is a cross platform meta build tool
|
||||
that generates native makefiles and IDE project files. The CMake build
|
||||
system can be used to build Curl on any of its supported platforms.
|
||||
|
||||
Read the INSTALL.cmake file for instructions on how to compile curl with
|
||||
CMake.
|
16
docs/THANKS
16
docs/THANKS
@@ -33,6 +33,7 @@ Andi Jahja
|
||||
Andre Guibert de Bruet
|
||||
Andreas Damm
|
||||
Andreas Faerber
|
||||
Andreas Farber
|
||||
Andreas Ntaflos
|
||||
Andreas Olsson
|
||||
Andreas Rieke
|
||||
@@ -63,6 +64,7 @@ Ates Goral
|
||||
Augustus Saunders
|
||||
Avery Fay
|
||||
Axel Tillequin
|
||||
Balint Szilakszi
|
||||
Bart Whiteley
|
||||
Bas Mevissen
|
||||
Ben Greear
|
||||
@@ -71,6 +73,7 @@ Ben Van Hof
|
||||
Benjamin Gerard
|
||||
Bernard Leak
|
||||
Bertrand Demiddelaer
|
||||
Bill Egert
|
||||
Bjorn Reese
|
||||
Bj<EFBFBD>rn Stenberg
|
||||
Bob Schader
|
||||
@@ -94,6 +97,7 @@ Chad Monroe
|
||||
Chih-Chung Chang
|
||||
Chris "Bob Bob"
|
||||
Chris Combes
|
||||
Chris Deidun
|
||||
Chris Flerackers
|
||||
Chris Gaukroger
|
||||
Chris Maltby
|
||||
@@ -188,6 +192,7 @@ Dustin Boswell
|
||||
Dylan Ellicott
|
||||
Dylan Salisbury
|
||||
Early Ehlinger
|
||||
Ebenezer Ikonne
|
||||
Edin Kadribasic
|
||||
Eduard Bloch
|
||||
Eetu Ojanen
|
||||
@@ -322,6 +327,7 @@ Jes Badwal
|
||||
Jesper Jensen
|
||||
Jesse Noller
|
||||
Jim Drash
|
||||
Jim Freeman
|
||||
Jim Meyering
|
||||
Jocelyn Jaubert
|
||||
Joe Halpin
|
||||
@@ -397,9 +403,11 @@ Lars J. Aas
|
||||
Lars Nilsson
|
||||
Lars Torben Wilson
|
||||
Lau Hang Kin
|
||||
Laurent Rabret
|
||||
Legoff Vincent
|
||||
Lehel Bernadt
|
||||
Len Krause
|
||||
Lenaic Lefever
|
||||
Lenny Rachitsky
|
||||
Liam Healy
|
||||
Linas Vepstas
|
||||
@@ -437,6 +445,7 @@ Martin C. Martin
|
||||
Martin Drasar
|
||||
Martin Hedenfalk
|
||||
Martin Skinner
|
||||
Martin Storsjo
|
||||
Marty Kuhrt
|
||||
Maruko
|
||||
Massimiliano Ziccardi
|
||||
@@ -456,11 +465,13 @@ Mekonikum
|
||||
Mettgut Jamalla
|
||||
Michael Benedict
|
||||
Michael Calmer
|
||||
Michael Cronenworth
|
||||
Michael Curtis
|
||||
Michael Goffioul
|
||||
Michael Jahn
|
||||
Michael Jerris
|
||||
Michael Mealling
|
||||
Michael Smith
|
||||
Michael Wallner
|
||||
Michal Bonino
|
||||
Michal Marek
|
||||
@@ -547,12 +558,14 @@ Philippe Hameau
|
||||
Philippe Raoult
|
||||
Philippe Vaucher
|
||||
Pierre
|
||||
Pierre Brico
|
||||
Pooyan McSporran
|
||||
Pramod Sharma
|
||||
Puneet Pawaia
|
||||
Quagmire
|
||||
Rafa Muyo
|
||||
Rafael Sagula
|
||||
Rainer Koenig
|
||||
Ralf S. Engelschall
|
||||
Ralph Beckmann
|
||||
Ralph Mitchell
|
||||
@@ -651,6 +664,7 @@ Steven Bazyl
|
||||
Steven G. Johnson
|
||||
Stoned Elipot
|
||||
Sven Neuhaus
|
||||
Sven Wegener
|
||||
S<EFBFBD>bastien Willemijns
|
||||
T. Bharath
|
||||
T. Yamada
|
||||
@@ -662,6 +676,7 @@ Thomas Tonino
|
||||
Tim Ansell
|
||||
Tim Baker
|
||||
Tim Bartley
|
||||
Tim Chen
|
||||
Tim Costello
|
||||
Tim Sneddon
|
||||
Tobias Rundstr<74>m
|
||||
@@ -682,6 +697,7 @@ Ton Voon
|
||||
Toon Verwaest
|
||||
Tor Arntsen
|
||||
Torsten Foertsch
|
||||
Toshio Kuratomi
|
||||
Toshiyuki Maezawa
|
||||
Traian Nicolescu
|
||||
Troels Walsted Hansen
|
||||
|
@@ -480,7 +480,7 @@ waits for a reply from the server.
|
||||
.IP "-F/--form <name=content>"
|
||||
(HTTP) This lets curl emulate a filled-in form in which a user has pressed the
|
||||
submit button. This causes curl to POST data using the Content-Type
|
||||
multipart/form-data according to RFC1867. This enables uploading of binary
|
||||
multipart/form-data according to RFC2388. This enables uploading of binary
|
||||
files etc. To force the 'content' part to be a file, prefix the file name
|
||||
with an @ sign. To just get the content part from a file, prefix the file name
|
||||
with the symbol <. The difference between @ and < is then that @ makes a file
|
||||
@@ -953,6 +953,12 @@ connection
|
||||
If this option is used several times, the last one will be used. Disable the
|
||||
use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command
|
||||
instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++.
|
||||
|
||||
Starting in 7.19.5, you can append \&":[start]-[end]\&" to the right of the
|
||||
address, to tell curl what TCP port range to use. That means you specify a
|
||||
port range, from a lower to a higher number. A single number works as well,
|
||||
but do note that it increases the risk of failure since the port may not be
|
||||
available.
|
||||
.IP "-q"
|
||||
If used as the first parameter on the command line, the \fIcurlrc\fP config
|
||||
file will not be read and used. See the \fI-K/--config\fP for details on the
|
||||
|
@@ -13,7 +13,11 @@
|
||||
#ifdef WIN32
|
||||
# include <io.h>
|
||||
#else
|
||||
# include <stdint.h>
|
||||
# ifdef __VMS
|
||||
typedef int intptr_t;
|
||||
# else
|
||||
# include <stdint.h>
|
||||
# endif
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
@@ -29,11 +29,12 @@ void dump(const char *text,
|
||||
/* without the hex output, we can fit more on screen */
|
||||
width = 0x40;
|
||||
|
||||
fprintf(stream, "%s, %zd bytes (0x%zx)\n", text, size, size);
|
||||
fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
|
||||
text, (long)size, (long)size);
|
||||
|
||||
for(i=0; i<size; i+= width) {
|
||||
|
||||
fprintf(stream, "%04zx: ", i);
|
||||
fprintf(stream, "%04.4lx: ", (long)i);
|
||||
|
||||
if(!nohex) {
|
||||
/* hex not disabled, show it */
|
||||
|
@@ -55,6 +55,7 @@ int main(int argc, char **argv)
|
||||
CURLcode res;
|
||||
FILE *hd_src;
|
||||
struct stat file_info;
|
||||
curl_off_t fsize;
|
||||
|
||||
struct curl_slist *headerlist=NULL;
|
||||
static const char buf_1 [] = "RNFR " UPLOAD_FILE_AS;
|
||||
@@ -65,7 +66,9 @@ int main(int argc, char **argv)
|
||||
printf("Couldnt open '%s': %s\n", LOCAL_FILE, strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
printf("Local file size: %ld bytes.\n", file_info.st_size);
|
||||
fsize = (curl_off_t)file_info.st_size;
|
||||
|
||||
printf("Local file size: %" CURL_FORMAT_CURL_OFF_T " bytes.\n", fsize);
|
||||
|
||||
/* get a FILE * of the same file */
|
||||
hd_src = fopen(LOCAL_FILE, "rb");
|
||||
@@ -100,7 +103,7 @@ int main(int argc, char **argv)
|
||||
curl_off_t. If you use CURLOPT_INFILESIZE (without _LARGE) you must
|
||||
make sure that to pass in a type 'long' argument. */
|
||||
curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
|
||||
(curl_off_t)file_info.st_size);
|
||||
(curl_off_t)fsize);
|
||||
|
||||
/* Now run off and do what you've been told! */
|
||||
res = curl_easy_perform(curl);
|
||||
|
@@ -38,11 +38,12 @@ void dump(const char *text,
|
||||
/* without the hex output, we can fit more on screen */
|
||||
width = 0x40;
|
||||
|
||||
fprintf(stream, "%s, %zd bytes (0x%zx)\n", text, size, size);
|
||||
fprintf(stream, "%s, %010.10ld bytes (0x%08.8lx)\n",
|
||||
text, (long)size, (long)size);
|
||||
|
||||
for(i=0; i<size; i+= width) {
|
||||
|
||||
fprintf(stream, "%04zx: ", i);
|
||||
fprintf(stream, "%04.4lx: ", (long)i);
|
||||
|
||||
if(!nohex) {
|
||||
/* hex not disabled, show it */
|
||||
@@ -74,7 +75,7 @@ void dump(const char *text,
|
||||
|
||||
static
|
||||
int my_trace(CURL *handle, curl_infotype type,
|
||||
char *data, size_t size,
|
||||
unsigned char *data, size_t size,
|
||||
void *userp)
|
||||
{
|
||||
const char *text;
|
||||
|
@@ -1,47 +1,47 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * 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$
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH curl_easy_escape 3 "7 April 2006" "libcurl 7.15.4" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_escape - URL encodes the given string
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "char *curl_easy_escape( CURL *" curl ", char *" url ", int "length " );"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
This function converts the given input string to an URL encoded string and
|
||||
returns that as a new allocated string. All input characters that are not a-z,
|
||||
A-Z or 0-9 are converted to their "URL escaped" version (%NN where NN is a
|
||||
two-digit hexadecimal number).
|
||||
|
||||
If the \fBlength\fP argument is set to 0 (zero), \fIcurl_easy_escape(3)\fP
|
||||
uses strlen() on the input \fBurl\fP to find out the size.
|
||||
|
||||
You must \fIcurl_free(3)\fP the returned string when you're done with it.
|
||||
.SH AVAILABILITY
|
||||
Added in 7.15.4 and replaces the old \fIcurl_escape(3)\fP function.
|
||||
.SH RETURN VALUE
|
||||
A pointer to a zero terminated string or NULL if it failed.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_unescape "(3), " curl_free "(3), " RFC 2396
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * 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$
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH curl_easy_escape 3 "7 April 2006" "libcurl 7.15.4" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_escape - URL encodes the given string
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "char *curl_easy_escape( CURL *" curl ", char *" url ", int "length " );"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
This function converts the given input string to an URL encoded string and
|
||||
returns that as a new allocated string. All input characters that are not a-z,
|
||||
A-Z or 0-9 are converted to their "URL escaped" version (%NN where NN is a
|
||||
two-digit hexadecimal number).
|
||||
|
||||
If the \fBlength\fP argument is set to 0 (zero), \fIcurl_easy_escape(3)\fP
|
||||
uses strlen() on the input \fBurl\fP to find out the size.
|
||||
|
||||
You must \fIcurl_free(3)\fP the returned string when you're done with it.
|
||||
.SH AVAILABILITY
|
||||
Added in 7.15.4 and replaces the old \fIcurl_escape(3)\fP function.
|
||||
.SH RETURN VALUE
|
||||
A pointer to a zero terminated string or NULL if it failed.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_unescape "(3), " curl_free "(3), " RFC 2396
|
||||
|
@@ -159,7 +159,8 @@ Pass a pointer to a long to receive a bitmask indicating the authentication
|
||||
method(s) available for your proxy authentication. (Added in 7.10.8)
|
||||
.IP CURLINFO_OS_ERRNO
|
||||
Pass a pointer to a long to receive the errno variable from a connect failure.
|
||||
(Added in 7.12.2)
|
||||
Note that the value is only set on failure, it is not reset upon a
|
||||
successfull operation. (Added in 7.12.2)
|
||||
.IP CURLINFO_NUM_CONNECTS
|
||||
Pass a pointer to a long to receive how many new connections libcurl had to
|
||||
create to achieve the previous transfer (only the successful connects are
|
||||
|
@@ -282,6 +282,13 @@ NULL, the function used to accept response data will be used instead. That is,
|
||||
it will be the function specified with \fICURLOPT_WRITEFUNCTION\fP, or if it
|
||||
is not specified or NULL - the default, stream-writing function.
|
||||
|
||||
It's important to note that the callback will be invoked for the headers of
|
||||
all responses received after initiating a request and not just the final
|
||||
response. This includes all responses which occur during authentication
|
||||
negotiation. If you need to operate on only the headers from the final
|
||||
response, you will need to collect headers in the callback yourself and use
|
||||
HTTP status lines, for example, to delimit response boundaries.
|
||||
|
||||
Since 7.14.1: When a server sends a chunked encoded transfer, it may contain a
|
||||
trailer. That trailer is identical to a HTTP header and if such a trailer is
|
||||
received it is passed to the application using this callback as well. There
|
||||
@@ -863,7 +870,7 @@ data using the read callback!
|
||||
Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue" header.
|
||||
You can disable this header with \fICURLOPT_HTTPHEADER\fP as usual.
|
||||
|
||||
To make multipart/formdata posts (aka rfc1867-posts), check out the
|
||||
To make multipart/formdata posts (aka RFC2388-posts), check out the
|
||||
\fICURLOPT_HTTPPOST\fP option.
|
||||
.IP CURLOPT_POSTFIELDSIZE
|
||||
If you want to post data to the server without letting libcurl do a strlen()
|
||||
@@ -1063,6 +1070,23 @@ be a plain IP address, a host name, a network interface name (under Unix) or
|
||||
just a '-' symbol to let the library use your system's default IP
|
||||
address. Default FTP operations are passive, and thus won't use PORT.
|
||||
|
||||
The address can be followed by a ':' to specify a port, optionally followed by
|
||||
a '-' to specify a port range. If the port specified is 0, the operating
|
||||
system will pick a free port. If a range is provided and all ports in the
|
||||
range are not available, libcurl will report CURLE_FTP_PORT_FAILED for the
|
||||
handle. Invalid port/range settings are ignored. IPv6 addresses followed by
|
||||
a port or portrange have to be in brackets. IPv6 addresses without port/range
|
||||
specifier can be in brackets. (added in 7.19.5)
|
||||
|
||||
Examples with specified ports:
|
||||
|
||||
.nf
|
||||
eth0:0
|
||||
192.168.1.2:32000-33000
|
||||
curl.se:32123
|
||||
[::1]:1234-4567
|
||||
.fi
|
||||
|
||||
You disable PORT again and go back to using the passive version by setting
|
||||
this option to NULL.
|
||||
.IP CURLOPT_QUOTE
|
||||
@@ -1719,6 +1743,44 @@ Pass a char * pointing to a file name for your private key. If not used,
|
||||
libcurl defaults to using \fB~/.ssh/id_dsa\fP.
|
||||
If the file is password-protected, set the password with \fICURLOPT_KEYPASSWD\fP.
|
||||
(Added in 7.16.1)
|
||||
.IP CURLOPT_SSH_KNOWNHOSTS
|
||||
Pass a pointer to a zero terminated string holding the file name of the
|
||||
known_host file to use. The known_hosts file should use the OpenSSH file
|
||||
format as supported by libssh2. If this file is specified, libcurl will only
|
||||
accept connections with hosts that are known and present in that file, with a
|
||||
matching public key. Use \fICURLOPT_SSH_KEYFUNCTION\fP to alter the default
|
||||
behavior on host and key (mis)matching. (Added in 7.19.6)
|
||||
.IP CURLOPT_SSH_KEYFUNCTION
|
||||
Pass a pointer to a curl_sshkeycallback function. It gets called when the
|
||||
known_host matching has been done, to allow the application to act and decide
|
||||
for libcurl how to proceed. It gets passed the CURL handle, the key from the
|
||||
known_hosts file, the key from the remote site, info from libcurl on the
|
||||
matching status and a custom pointer (set with \fICURLOPT_SSH_KEYDATA\fP). It
|
||||
MUST return one of the following return codes to tell libcurl how to act:
|
||||
.RS
|
||||
.IP CURLKHSTAT_FINE_ADD_TO_FILE
|
||||
The host+key is accepted and libcurl will append it to the known_hosts file
|
||||
before continuing with the connection. This will also add the host+key combo
|
||||
to the known_host pool kept in memory if it wasn't already present there. Note
|
||||
that the adding of data to the file is done by completely replacing the file
|
||||
with a new copy, so the permissions of the file must allow this.
|
||||
.IP CURLKHSTAT_FINE
|
||||
The host+key is accepted libcurl will continue with the connection. This will
|
||||
also add the host+key combo to the known_host pool kept in memory if it wasn't
|
||||
already present there.
|
||||
.IP CURLKHSTAT_REJECT
|
||||
The host+key is rejected. libcurl will deny the connection to continue and it
|
||||
will be closed.
|
||||
.IP CURLKHSTAT_DEFER
|
||||
The host+key is rejected, but the SSH connection is asked to be kept alive.
|
||||
This feature could be used when the app wants to somehow return back and act
|
||||
on the host+key situation and then retry without needing the overhead of
|
||||
setting it up from scratch again.
|
||||
.RE
|
||||
(Added in 7.19.6)
|
||||
.IP CURLOPT_SSH_KEYDATA
|
||||
Pass a void * as parameter. This pointer will be passed along verbatim to the
|
||||
callback set with \fICURLOPT_SSH_KEYFUNCTION\fP. (Added in 7.19.6)
|
||||
.SH OTHER OPTIONS
|
||||
.IP CURLOPT_PRIVATE
|
||||
Pass a void * as parameter, pointing to data that should be associated with
|
||||
|
@@ -1,52 +1,52 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * 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$
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH curl_easy_unescape 3 "7 April 2006" "libcurl 7.15.4" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_unescape - URL decodes the given string
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "char *curl_easy_unescape( CURL *" curl ", char *" url ", int "inlength
|
||||
.BI ", int *" outlength " );"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
This function converts the given URL encoded input string to a "plain string"
|
||||
and returns that in an allocated memory area. All input characters that are
|
||||
URL encoded (%XX where XX is a two-digit hexadecimal number) are converted to
|
||||
their binary versions.
|
||||
|
||||
If the \fBlength\fP argument is set to 0 (zero), \fIcurl_easy_unescape(3)\fP
|
||||
will use strlen() on the input \fIurl\fP string to find out the size.
|
||||
|
||||
If \fBoutlength\fP is non-NULL, the function will write the length of the
|
||||
returned string in the integer it points to. This allows an escaped string
|
||||
containing %00 to still get used properly after unescaping.
|
||||
|
||||
You must \fIcurl_free(3)\fP the returned string when you're done with it.
|
||||
.SH AVAILABILITY
|
||||
Added in 7.15.4 and replaces the old \fIcurl_unescape(3)\fP function.
|
||||
.SH RETURN VALUE
|
||||
A pointer to a zero terminated string or NULL if it failed.
|
||||
.SH "SEE ALSO"
|
||||
.I curl_easy_escape(3), curl_free(3), RFC 2396
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * 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$
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH curl_easy_unescape 3 "7 April 2006" "libcurl 7.15.4" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_unescape - URL decodes the given string
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "char *curl_easy_unescape( CURL *" curl ", char *" url ", int "inlength
|
||||
.BI ", int *" outlength " );"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
This function converts the given URL encoded input string to a "plain string"
|
||||
and returns that in an allocated memory area. All input characters that are
|
||||
URL encoded (%XX where XX is a two-digit hexadecimal number) are converted to
|
||||
their binary versions.
|
||||
|
||||
If the \fBlength\fP argument is set to 0 (zero), \fIcurl_easy_unescape(3)\fP
|
||||
will use strlen() on the input \fIurl\fP string to find out the size.
|
||||
|
||||
If \fBoutlength\fP is non-NULL, the function will write the length of the
|
||||
returned string in the integer it points to. This allows an escaped string
|
||||
containing %00 to still get used properly after unescaping.
|
||||
|
||||
You must \fIcurl_free(3)\fP the returned string when you're done with it.
|
||||
.SH AVAILABILITY
|
||||
Added in 7.15.4 and replaces the old \fIcurl_unescape(3)\fP function.
|
||||
.SH RETURN VALUE
|
||||
A pointer to a zero terminated string or NULL if it failed.
|
||||
.SH "SEE ALSO"
|
||||
.I curl_easy_escape(3), curl_free(3), RFC 2396
|
||||
|
@@ -1,31 +1,31 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_escape 3 "6 March 2002" "libcurl 7.9" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_escape - URL encodes the given string
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "char *curl_escape( char *" url ", int "length " );"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
Obsolete function. Use \fIcurl_easy_escape(3)\fP instead!
|
||||
|
||||
This function will convert the given input string to an URL encoded string and
|
||||
return that as a new allocated string. All input characters that are not a-z,
|
||||
A-Z or 0-9 will be converted to their "URL escaped" version (%NN where NN is a
|
||||
two-digit hexadecimal number).
|
||||
|
||||
If the 'length' argument is set to 0, curl_escape() will use strlen() on the
|
||||
input 'url' string to find out the size.
|
||||
|
||||
You must curl_free() the returned string when you're done with it.
|
||||
.SH AVAILABILITY
|
||||
Since 7.15.4, \fIcurl_easy_escape(3)\fP should be used. This function will
|
||||
be removed in a future release.
|
||||
.SH RETURN VALUE
|
||||
A pointer to a zero terminated string or NULL if it failed.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_unescape "(3), " curl_free "(3), " RFC 2396
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_escape 3 "6 March 2002" "libcurl 7.9" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_escape - URL encodes the given string
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "char *curl_escape( char *" url ", int "length " );"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
Obsolete function. Use \fIcurl_easy_escape(3)\fP instead!
|
||||
|
||||
This function will convert the given input string to an URL encoded string and
|
||||
return that as a new allocated string. All input characters that are not a-z,
|
||||
A-Z or 0-9 will be converted to their "URL escaped" version (%NN where NN is a
|
||||
two-digit hexadecimal number).
|
||||
|
||||
If the 'length' argument is set to 0, curl_escape() will use strlen() on the
|
||||
input 'url' string to find out the size.
|
||||
|
||||
You must curl_free() the returned string when you're done with it.
|
||||
.SH AVAILABILITY
|
||||
Since 7.15.4, \fIcurl_easy_escape(3)\fP should be used. This function will
|
||||
be removed in a future release.
|
||||
.SH RETURN VALUE
|
||||
A pointer to a zero terminated string or NULL if it failed.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_unescape "(3), " curl_free "(3), " RFC 2396
|
||||
|
@@ -13,7 +13,7 @@ curl_formadd - add a section to a multipart/formdata HTTP POST
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
curl_formadd() is used to append sections when building a multipart/formdata
|
||||
HTTP POST (sometimes referred to as rfc1867-style posts). Append one section at
|
||||
HTTP POST (sometimes referred to as RFC2388-style posts). Append one section at
|
||||
a time until you've added all the sections you want included and then you pass
|
||||
the \fIfirstitem\fP pointer as parameter to \fBCURLOPT_HTTPPOST\fP.
|
||||
\fIlastitem\fP is set after each call and on repeated invokes it should be
|
||||
|
@@ -1,31 +1,31 @@
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_unescape 3 "22 March 2001" "libcurl 7.7" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_unescape - URL decodes the given string
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "char *curl_unescape( char *" url ", int "length " );"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
Obsolete function. Use \fIcurl_easy_unescape(3)\fP instead!
|
||||
|
||||
This function will convert the given URL encoded input string to a "plain
|
||||
string" and return that as a new allocated string. All input characters that
|
||||
are URL encoded (%XX where XX is a two-digit hexadecimal number) will be
|
||||
converted to their plain text versions.
|
||||
|
||||
If the 'length' argument is set to 0, curl_unescape() will use strlen() on the
|
||||
input 'url' string to find out the size.
|
||||
|
||||
You must curl_free() the returned string when you're done with it.
|
||||
.SH AVAILABILITY
|
||||
Since 7.15.4, \fIcurl_easy_unescape(3)\fP should be used. This function will
|
||||
be removed in a future release.
|
||||
.SH RETURN VALUE
|
||||
A pointer to a zero terminated string or NULL if it failed.
|
||||
.SH "SEE ALSO"
|
||||
.I curl_easy_escape(3), curl_easy_unescape(3), curl_free(3), RFC 2396
|
||||
.\" You can view this file with:
|
||||
.\" nroff -man [file]
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH curl_unescape 3 "22 March 2001" "libcurl 7.7" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_unescape - URL decodes the given string
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
.BI "char *curl_unescape( char *" url ", int "length " );"
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
Obsolete function. Use \fIcurl_easy_unescape(3)\fP instead!
|
||||
|
||||
This function will convert the given URL encoded input string to a "plain
|
||||
string" and return that as a new allocated string. All input characters that
|
||||
are URL encoded (%XX where XX is a two-digit hexadecimal number) will be
|
||||
converted to their plain text versions.
|
||||
|
||||
If the 'length' argument is set to 0, curl_unescape() will use strlen() on the
|
||||
input 'url' string to find out the size.
|
||||
|
||||
You must curl_free() the returned string when you're done with it.
|
||||
.SH AVAILABILITY
|
||||
Since 7.15.4, \fIcurl_easy_unescape(3)\fP should be used. This function will
|
||||
be removed in a future release.
|
||||
.SH RETURN VALUE
|
||||
A pointer to a zero terminated string or NULL if it failed.
|
||||
.SH "SEE ALSO"
|
||||
.I curl_easy_escape(3), curl_easy_unescape(3), curl_free(3), RFC 2396
|
||||
|
@@ -5,7 +5,7 @@
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) 1998 - 2006, 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 curl_version_info 3 "2 Nov 2006" "libcurl 7.16.1" "libcurl Manual"
|
||||
.TH curl_version_info 3 "10 June 2009" "libcurl 7.19.6" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_version_info - returns run-time libcurl version info
|
||||
.SH SYNOPSIS
|
||||
@@ -105,8 +105,10 @@ supports HTTP NTLM (added in 7.10.6)
|
||||
.IP CURL_VERSION_GSSNEGOTIATE
|
||||
supports HTTP GSS-Negotiate (added in 7.10.6)
|
||||
.IP CURL_VERSION_DEBUG
|
||||
libcurl was built with extra debug capabilities built-in. This is mainly of
|
||||
interest for libcurl hackers. (added in 7.10.6)
|
||||
libcurl was built with debug capabilities (added in 7.10.6)
|
||||
.IP CURL_VERSION_CURLDEBUG
|
||||
libcurl was built with memory tracking debug capabilities. This is mainly of
|
||||
interest for libcurl hackers. (added in 7.19.6)
|
||||
.IP CURL_VERSION_ASYNCHDNS
|
||||
libcurl was built with support for asynchronous name lookups, which allows
|
||||
more exact timeouts (even on Windows) and less blocking when using the multi
|
||||
|
@@ -119,10 +119,10 @@ If you want to re-use an easy handle that was added to the multi handle for
|
||||
transfer, you must first remove it from the multi stack and then re-add it
|
||||
again (possibly after having altered some options at your own choice).
|
||||
.SH "MULTI_SOCKET"
|
||||
Since 7.16.0, the \fIcurl_multi_socket(3)\fP function offers a way for
|
||||
Since 7.16.0, the \fIcurl_multi_socket_action(3)\fP function offers a way for
|
||||
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.
|
||||
offers a much more high-performance API that will make a significant
|
||||
difference for applications using large numbers of simultaneous connections.
|
||||
|
||||
\fIcurl_multi_socket_action(3)\fP is then used
|
||||
instead of \fIcurl_multi_perform(3)\fP.
|
||||
|
@@ -502,13 +502,14 @@ then passing that list to libcurl.
|
||||
While the simple examples above cover the majority of all cases where HTTP
|
||||
POST operations are required, they don't do multi-part formposts. Multi-part
|
||||
formposts were introduced as a better way to post (possibly large) binary data
|
||||
and were first documented in the RFC1867. They're called multi-part because
|
||||
they're built by a chain of parts, each being a single unit. Each part has its
|
||||
own name and contents. You can in fact create and post a multi-part formpost
|
||||
with the regular libcurl POST support described above, but that would require
|
||||
that you build a formpost yourself and provide to libcurl. To make that
|
||||
easier, libcurl provides \fIcurl_formadd(3)\fP. Using this function, you add
|
||||
parts to the form. When you're done adding parts, you post the whole form.
|
||||
and were first documented in the RFC1867 (updated in RFC2388). They're called
|
||||
multi-part because they're built by a chain of parts, each part being a single
|
||||
unit of data. Each part has its own name and contents. You can in fact create
|
||||
and post a multi-part formpost with the regular libcurl POST support described
|
||||
above, but that would require that you build a formpost yourself and provide
|
||||
to libcurl. To make that easier, libcurl provides \fIcurl_formadd(3)\fP. Using
|
||||
this function, you add parts to the form. When you're done adding parts, you
|
||||
post the whole form.
|
||||
|
||||
The following example sets two simple text parts with plain textual contents,
|
||||
and then a file with binary contents and uploads the whole thing.
|
||||
@@ -754,7 +755,7 @@ to another language and execute that.
|
||||
|
||||
- Read the Javascript code and rewrite the same logic in another language.
|
||||
|
||||
- Implement a Javascript interpreted, people have successfully used the
|
||||
- Implement a Javascript interpreter; people have successfully used the
|
||||
Mozilla Javascript engine in the past.
|
||||
|
||||
- Ask your admins to stop this, for a static proxy setup or similar.
|
||||
|
@@ -425,6 +425,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_CURLDEBUG 7.19.6
|
||||
CURL_VERSION_DEBUG 7.10.6
|
||||
CURL_VERSION_GSSNEGOTIATE 7.10.6
|
||||
CURL_VERSION_IDN 7.12.0
|
||||
|
@@ -48,13 +48,8 @@
|
||||
#include <limits.h>
|
||||
|
||||
/* The include stuff here below is mainly for time_t! */
|
||||
#ifdef vms
|
||||
# include <types.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# include <sys/types.h>
|
||||
# include <time.h>
|
||||
#endif /* defined (vms) */
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
|
||||
#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \
|
||||
!defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
@@ -70,14 +65,15 @@
|
||||
libc5-based Linux systems. Only include it on system that are known to
|
||||
require it! */
|
||||
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
|
||||
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY)
|
||||
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
|
||||
defined(ANDROID)
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WCE
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#if !defined(WIN32) && !defined(__WATCOMC__)
|
||||
#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__)
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
@@ -186,7 +182,7 @@ typedef size_t (*curl_write_callback)(char *buffer,
|
||||
size_t nitems,
|
||||
void *outstream);
|
||||
|
||||
/* this is the return codes for the seek callbacks */
|
||||
/* These are 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
|
||||
@@ -497,6 +493,45 @@ typedef enum {
|
||||
|
||||
#define CURL_ERROR_SIZE 256
|
||||
|
||||
struct curl_khkey {
|
||||
const char *key; /* points to a zero-terminated string encoded with base64
|
||||
if len is zero, otherwise to the "raw" data */
|
||||
size_t len;
|
||||
enum type {
|
||||
CURLKHTYPE_UNKNOWN,
|
||||
CURLKHTYPE_RSA1,
|
||||
CURLKHTYPE_RSA,
|
||||
CURLKHTYPE_DSS
|
||||
} keytype;
|
||||
};
|
||||
|
||||
/* this is the set of return values expected from the curl_sshkeycallback
|
||||
callback */
|
||||
enum curl_khstat {
|
||||
CURLKHSTAT_FINE_ADD_TO_FILE,
|
||||
CURLKHSTAT_FINE,
|
||||
CURLKHSTAT_REJECT, /* reject the connection, return an error */
|
||||
CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so
|
||||
this causes a CURLE_DEFER error but otherwise the
|
||||
connection will be left intact etc */
|
||||
CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */
|
||||
};
|
||||
|
||||
/* this is the set of status codes pass in to the callback */
|
||||
enum curl_khmatch {
|
||||
CURLKHMATCH_OK, /* match */
|
||||
CURLKHMATCH_MISMATCH, /* host found, key mismatch! */
|
||||
CURLKHMATCH_MISSING, /* no matching host/key found */
|
||||
CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */
|
||||
};
|
||||
|
||||
typedef int
|
||||
(*curl_sshkeycallback) (CURL *easy, /* easy handle */
|
||||
const struct curl_khkey *knownkey, /* known */
|
||||
const struct curl_khkey *foundkey, /* found */
|
||||
enum curl_khmatch, /* libcurl's view on the keys */
|
||||
void *clientp); /* custom pointer passed from app */
|
||||
|
||||
/* parameter for the CURLOPT_USE_SSL option */
|
||||
typedef enum {
|
||||
CURLUSESSL_NONE, /* do not attempt to use SSL */
|
||||
@@ -1201,7 +1236,7 @@ typedef enum {
|
||||
CINIT(TFTP_BLKSIZE, LONG, 178),
|
||||
|
||||
/* Socks Service */
|
||||
CINIT(SOCKS5_GSSAPI_SERVICE, LONG, 179),
|
||||
CINIT(SOCKS5_GSSAPI_SERVICE, OBJECTPOINT, 179),
|
||||
|
||||
/* Socks Service */
|
||||
CINIT(SOCKS5_GSSAPI_NEC, LONG, 180),
|
||||
@@ -1218,6 +1253,16 @@ typedef enum {
|
||||
to all protocols except FILE and SCP. */
|
||||
CINIT(REDIR_PROTOCOLS, LONG, 182),
|
||||
|
||||
/* set the SSH knownhost file name to use */
|
||||
CINIT(SSH_KNOWNHOSTS, OBJECTPOINT, 183),
|
||||
|
||||
/* set the SSH host key callback, must point to a curl_sshkeycallback
|
||||
function */
|
||||
CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184),
|
||||
|
||||
/* set the SSH host key callback custom pointer */
|
||||
CINIT(SSH_KEYDATA, OBJECTPOINT, 185),
|
||||
|
||||
CURLOPT_LASTENTRY /* the last unused */
|
||||
} CURLoption;
|
||||
|
||||
@@ -1516,7 +1561,7 @@ CURL_EXTERN void curl_free(void *p);
|
||||
* DESCRIPTION
|
||||
*
|
||||
* curl_global_init() should be invoked exactly once for each application that
|
||||
* uses libcurl and before any call of other libcurl function.
|
||||
* uses libcurl and before any call of other libcurl functions.
|
||||
*
|
||||
* This function is not thread-safe!
|
||||
*/
|
||||
@@ -1790,8 +1835,8 @@ typedef struct {
|
||||
#define CURL_VERSION_LARGEFILE (1<<9) /* supports files bigger than 2GB */
|
||||
#define CURL_VERSION_IDN (1<<10) /* International Domain Names support */
|
||||
#define CURL_VERSION_SSPI (1<<11) /* SSPI is supported */
|
||||
#define CURL_VERSION_CONV (1<<12) /* character conversions are
|
||||
supported */
|
||||
#define CURL_VERSION_CONV (1<<12) /* character conversions supported */
|
||||
#define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */
|
||||
|
||||
/*
|
||||
* NAME curl_version_info()
|
||||
|
@@ -63,6 +63,15 @@
|
||||
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
|
||||
@@ -126,6 +135,21 @@
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#cmakedefine CURL_SIZEOF_LONG ${CURL_SIZEOF_LONG}
|
||||
|
||||
/* Integral data type used for curl_socklen_t. */
|
||||
#cmakedefine CURL_TYPEOF_CURL_SOCKLEN_T ${CURL_TYPEOF_CURL_SOCKLEN_T}
|
||||
|
||||
/* on windows socklen_t is in here */
|
||||
#ifdef _WIN32
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
/* Data type definition of curl_socklen_t. */
|
||||
typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
|
||||
|
||||
/* The size of `curl_socklen_t', as computed by sizeof. */
|
||||
#cmakedefine CURL_SIZEOF_CURL_SOCKLEN_T ${CURL_SIZEOF_CURL_SOCKLEN_T}
|
||||
|
||||
/* Signed integral data type used for curl_off_t. */
|
||||
#cmakedefine CURL_TYPEOF_CURL_OFF_T ${CURL_TYPEOF_CURL_OFF_T}
|
||||
|
||||
|
@@ -31,13 +31,13 @@
|
||||
|
||||
/* This is the version number of the libcurl package from which this header
|
||||
file origins: */
|
||||
#define LIBCURL_VERSION "7.19.5-CVS"
|
||||
#define LIBCURL_VERSION "7.19.6-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 5
|
||||
#define LIBCURL_VERSION_PATCH 6
|
||||
|
||||
/* 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 0x071305
|
||||
#define LIBCURL_VERSION_NUM 0x071306
|
||||
|
||||
/*
|
||||
* This is the date and time when the full source package was created. The
|
||||
|
@@ -7,7 +7,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, 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
|
||||
|
@@ -9,7 +9,7 @@ DLL-Release
|
||||
LIB-Debug
|
||||
LIB-Release
|
||||
Makefile
|
||||
config.h
|
||||
curl_config.h
|
||||
getdate.c
|
||||
libcurl.dsp
|
||||
libcurl.vcproj
|
||||
|
@@ -1,60 +1,60 @@
|
||||
SET(LIB_NAME libcurl)
|
||||
set(LIB_NAME libcurl)
|
||||
|
||||
CONFIGURE_FILE(${CURL_SOURCE_DIR}/include/curl/curlbuild.h.cmake
|
||||
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)
|
||||
configure_file(curl_config.h.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/curl_config.h)
|
||||
|
||||
transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
||||
include(${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake)
|
||||
|
||||
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}/curl_config.h
|
||||
${CURL_BINARY_DIR}/include/curl/curlbuild.h
|
||||
)
|
||||
|
||||
LIST(APPEND HHEADERS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config.h
|
||||
${CURL_BINARY_DIR}/include/curl/curlbuild.h
|
||||
)
|
||||
|
||||
IF(MSVC)
|
||||
LIST(APPEND CSOURCES libcurl.rc)
|
||||
ENDIF()
|
||||
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
|
||||
# # 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
|
||||
# )
|
||||
# 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
|
||||
# )
|
||||
# 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
|
||||
# )
|
||||
# SET(CSOURCES ${CSOURCES}
|
||||
# strtoofft.c
|
||||
# )
|
||||
# ENDIF(NOT HAVE_STRTOLL AND NOT HAVE__STRTOI64)
|
||||
|
||||
IF(HAVE_FEATURES_H)
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
if(HAVE_FEATURES_H)
|
||||
set_source_files_properties(
|
||||
cookie.c
|
||||
easy.c
|
||||
formdata.c
|
||||
getenv.c
|
||||
nonblock.c
|
||||
hash.c
|
||||
http.c
|
||||
if2ip.c
|
||||
@@ -65,57 +65,60 @@ IF(HAVE_FEATURES_H)
|
||||
transfer.c
|
||||
url.c
|
||||
COMPILE_FLAGS -D_BSD_SOURCE)
|
||||
ENDIF(HAVE_FEATURES_H)
|
||||
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})
|
||||
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_USE_ARES)
|
||||
include_directories(${CARES_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
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()
|
||||
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}
|
||||
)
|
||||
add_library(
|
||||
${LIB_NAME}
|
||||
${CURL_USER_DEFINED_DYNAMIC_OR_STATIC}
|
||||
${HHEADERS} ${CSOURCES}
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(${LIB_NAME} ${CURL_LIBS})
|
||||
target_link_libraries(${LIB_NAME} ${CURL_LIBS})
|
||||
|
||||
IF(WIN32)
|
||||
ADD_DEFINITIONS( -D_USRDLL )
|
||||
ENDIF()
|
||||
if(WIN32)
|
||||
add_definitions( -D_USRDLL )
|
||||
endif()
|
||||
|
||||
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES COMPILE_DEFINITIONS BUILDING_LIBCURL)
|
||||
set_target_properties(${LIB_NAME} PROPERTIES COMPILE_DEFINITIONS BUILDING_LIBCURL)
|
||||
|
||||
SETUP_CURL_DEPENDENCIES(${LIB_NAME})
|
||||
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 "")
|
||||
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(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()
|
||||
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()
|
||||
|
@@ -11,7 +11,7 @@ CC = wcc386
|
||||
CFLAGS = -3s -mf -d3 -hc -zff -zgf -zq -zm -zc -s -fr=con -w2 -fpi -oilrtfm -bt=nt &
|
||||
-bd -d+ -dWIN32 -dCURL_CA_BUNDLE=getenv("CURL_CA_BUNDLE") &
|
||||
-dBUILDING_LIBCURL -dHAVE_SPNEGO=1 -dENABLE_IPV6 &
|
||||
-dDEBUG=1 -dCURLDEBUG -d_WIN32_WINNT=0x0501 -dWINBERAPI=__declspec(cdecl) &
|
||||
-dDEBUG=1 -dDEBUGBUILD -d_WIN32_WINNT=0x0501 -dWINBERAPI=__declspec(cdecl) &
|
||||
-dWINLDAPAPI=__declspec(cdecl) -I. -I..\include
|
||||
|
||||
#
|
||||
@@ -69,7 +69,7 @@ OBJS = $(OBJ_DIR)\base64.obj $(OBJ_DIR)\connect.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)\slist.obj
|
||||
$(OBJ_DIR)\slist.obj $(OBJ_DIR)\nonblock.obj
|
||||
|
||||
#
|
||||
# Use $(OBJS) as a template to generate $(OBJS_STAT) and $(OBJS_DYN).
|
||||
@@ -107,7 +107,7 @@ vclean realclean: clean .SYMBOLIC
|
||||
|
||||
.ERASE
|
||||
$(RESOURCE): libcurl.rc
|
||||
wrc -dCURLDEBUG=1 -q -r -zm -I..\include -fo=$@ libcurl.rc
|
||||
wrc -dDEBUGBUILD=1 -q -r -zm -I..\include -fo=$@ libcurl.rc
|
||||
|
||||
.ERASE
|
||||
.c{$(OBJ_BASE)\dyn}.obj:
|
||||
@@ -525,6 +525,11 @@ $(OBJ_DIR)\nss.obj: nss.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
url.h connect.h strequal.h select.h sslgen.h ..\include\curl\mprintf.h
|
||||
$(OBJ_DIR)\qssl.obj: qssl.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h
|
||||
$(OBJ_DIR)\nonblock.obj: nonblock.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h nonblock.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
||||
..\include\curl\multi.h ..\include\curl\curl.h
|
||||
$(OBJ_DIR)\rawstr.obj: rawstr.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
||||
..\include\curl\curlrules.h setup_once.h rawstr.h &
|
||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
||||
|
@@ -29,16 +29,16 @@ 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
|
||||
CMAKE_DIST = CMakeLists.txt curl_config.h.cmake
|
||||
|
||||
EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 Makefile.riscos $(DSP) \
|
||||
vc6libcurl.dsw config-win32.h config-win32ce.h config-riscos.h \
|
||||
config-mac.h config.h.in makefile.dj config.dos libcurl.plist \
|
||||
config-mac.h curl_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 $(CMAKE_DIST)
|
||||
firefox-db2pem.sh $(CMAKE_DIST) config-vxworks.h Makefile.vxworks
|
||||
|
||||
CLEANFILES = $(DSP) $(VCPROJ)
|
||||
|
||||
@@ -52,17 +52,24 @@ LIBCURL_LIBS = @LIBCURL_LIBS@
|
||||
#
|
||||
# $(top_builddir)/include is for libcurl's generated curl/curlbuild.h file
|
||||
# $(top_srcdir)/include is for libcurl's external include files
|
||||
# $(top_builddir)/lib is for libcurl's generated lib/config.h file
|
||||
# $(top_builddir)/lib is for libcurl's generated lib/curl_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
|
||||
|
||||
if USE_EMBEDDED_ARES
|
||||
INCLUDES = -I$(top_builddir)/include \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/lib \
|
||||
-I$(top_builddir)/ares \
|
||||
-I$(top_srcdir)/ares
|
||||
else
|
||||
INCLUDES = -I$(top_builddir)/include \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/lib
|
||||
endif
|
||||
|
||||
if SONAME_BUMP
|
||||
#
|
||||
|
@@ -10,7 +10,7 @@ CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c \
|
||||
hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c \
|
||||
inet_ntop.c parsedate.c select.c gtls.c sslgen.c tftp.c splay.c \
|
||||
strdup.c socks.c ssh.c nss.c qssl.c rawstr.c curl_addrinfo.c \
|
||||
socks_gssapi.c socks_sspi.c curl_sspi.c slist.c
|
||||
socks_gssapi.c socks_sspi.c curl_sspi.c slist.c nonblock.c
|
||||
|
||||
HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \
|
||||
progress.h formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h \
|
||||
@@ -21,4 +21,4 @@ HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \
|
||||
strtoofft.h strerror.h inet_ntop.h curlx.h curl_memory.h setup.h \
|
||||
transfer.h select.h easyif.h multiif.h parsedate.h sslgen.h gtls.h \
|
||||
tftp.h sockaddr.h splay.h strdup.h setup_once.h socks.h ssh.h nssg.h \
|
||||
curl_base64.h rawstr.h curl_addrinfo.h curl_sspi.h slist.h
|
||||
curl_base64.h rawstr.h curl_addrinfo.h curl_sspi.h slist.h nonblock.h
|
||||
|
@@ -44,7 +44,7 @@ AR = ar
|
||||
LDFLAGS = -s
|
||||
RANLIB = ranlib
|
||||
RC = windres
|
||||
RCFLAGS = --include-dir=../include -DCURLDEBUG=0 -O COFF -i
|
||||
RCFLAGS = --include-dir=../include -DDEBUGBUILD=0 -O COFF -i
|
||||
RM = del /q /f > NUL 2>&1
|
||||
STRIP = strip -g
|
||||
|
||||
|
@@ -241,7 +241,7 @@ nlm: prebuild $(TARGET).nlm
|
||||
|
||||
lib: prebuild $(TARGET).$(LIBEXT)
|
||||
|
||||
prebuild: $(OBJDIR) $(CURL_INC)/curl/curlbuild.h $(OBJDIR)/version.inc config.h
|
||||
prebuild: $(OBJDIR) $(CURL_INC)/curl/curlbuild.h $(OBJDIR)/version.inc curl_config.h
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
# @echo Compiling $<
|
||||
@@ -263,7 +263,7 @@ ifdef WITH_SSL
|
||||
endif
|
||||
|
||||
clean:
|
||||
-$(RM) config.h
|
||||
-$(RM) curl_config.h
|
||||
-$(RM) -r $(OBJDIR)
|
||||
|
||||
distclean: clean
|
||||
@@ -373,7 +373,7 @@ ifeq ($(findstring nlmconv,$(LD)),nlmconv)
|
||||
@echo $(DL)output $(TARGET).nlm$(DL) >> $@
|
||||
endif
|
||||
|
||||
config.h: Makefile.netware
|
||||
curl_config.h: Makefile.netware
|
||||
@echo Creating $@
|
||||
@echo $(DL)/* $@ for NetWare target.$(DL) > $@
|
||||
@echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
|
||||
|
@@ -13,7 +13,7 @@ objs = o.base64 o.connect o.cookie o.dict \
|
||||
o.security o.select o.sendf o.speedcheck o.ssluse \
|
||||
o.strequal o.strtok o.telnet o.timeval \
|
||||
o.transfer o.url o.version o.strtoofft o.sslgen o.gtls \
|
||||
o.rawstr o.curl_addrinfo o.slist
|
||||
o.rawstr o.curl_addrinfo o.slist o.nonblock
|
||||
|
||||
# Compile options:
|
||||
linkopts = -o libcurl
|
||||
@@ -135,6 +135,9 @@ o.sslgen: c.sslgen
|
||||
o.ssluse: c.ssluse
|
||||
gcc $(compileropts) -c -o ssluse.o c.ssluse
|
||||
|
||||
o.nonblock: c.nonblock
|
||||
gcc $(compileropts) -c -o nonblock.o c.nonblock
|
||||
|
||||
o.rawstr: c.rawstr
|
||||
gcc $(compileropts) -c -o rawstr.o c.rawstr
|
||||
|
||||
|
@@ -537,11 +537,11 @@ debug-dll\libcurl.res \
|
||||
debug-dll-ssl-dll\libcurl.res \
|
||||
debug-dll-zlib-dll\libcurl.res \
|
||||
debug-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc
|
||||
rc /dCURLDEBUG=1 /Fo $@ libcurl.rc
|
||||
rc /dDEBUGBUILD=1 /Fo $@ libcurl.rc
|
||||
|
||||
release-dll\libcurl.res \
|
||||
release-dll-ssl-dll\libcurl.res \
|
||||
release-dll-zlib-dll\libcurl.res \
|
||||
release-dll-ssl-dll-zlib-dll\libcurl.res: libcurl.rc
|
||||
rc /dCURLDEBUG=0 /Fo $@ libcurl.rc
|
||||
rc /dDEBUGBUILD=0 /Fo $@ libcurl.rc
|
||||
!ENDIF # End of case where a config was provided.
|
||||
|
178
lib/Makefile.vxworks
Normal file
178
lib/Makefile.vxworks
Normal file
@@ -0,0 +1,178 @@
|
||||
#*****************************************************************************
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
#Filename : Makefile.vxworks
|
||||
#Description: makefile to be used in order to compile libcurl for VxWoorks 6.3.
|
||||
#
|
||||
#How to use:
|
||||
# 1. Adjust environment variables at the file begining
|
||||
# 2. Open the Command Prompt window and change directory ('cd')
|
||||
# into the 'lib' folder
|
||||
# 3. Add <CYGWIN>/bin folder to the PATH environment variable
|
||||
# For example type 'set PATH=C:/embedded/cygwin/bin;%PATH%'
|
||||
# 4. Build the library by typing 'make -f ./Makefile.vxworks'
|
||||
# As a result the libcurl.a should be created in the 'lib' folder.
|
||||
# To clean package use 'make -f ./Makefile.vxworks clean'
|
||||
#Requirements:
|
||||
# 1. WinXP machine
|
||||
# 2. Full CYGWIN installation (open source) with GNU make version
|
||||
# v3.78 or higher
|
||||
# 3. WindRiver Workbench with vxWorks 6.3 (commercial)
|
||||
#*****************************************************************************
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Environment
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
export WIND_HOME := C:/embedded/Workbench2.5.0.1
|
||||
export WIND_BASE := $(WIND_HOME)/vxworks-6.3
|
||||
export WIND_HOST_TYPE := x86-win32
|
||||
|
||||
# BUILD_TYE:= <debug>|<release> (build with debugging info or optimized)
|
||||
BUILD_TYPE := debug
|
||||
USER_CFLAGS:=
|
||||
|
||||
# directories where to seek for includes and libraries
|
||||
OPENSSL_INC := D:/libraries/openssl/openssl-0.9.8a-vxWorks6.3/include
|
||||
OPENSSL_LIB := D:/libraries/openssl/openssl-0.9.8a-vxWorks6.3
|
||||
ZLIB_INC := D:/libraries/zlib/zlib-1.2.3-VxWorks6.3/zlib-1.2.3
|
||||
ZLIB_LIB := D:/libraries/zlib/zlib-1.2.3-VxWorks6.3/binaries/vxworks_3.1_gnu/Debug/lib
|
||||
ARES_INC :=
|
||||
ARES_LIB :=
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Compiler
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
CC := ccppc
|
||||
AR := arppc
|
||||
LINK := ccppc
|
||||
CFLAGS := -D__GNUC__ -D__ppc__ -msoft-float -fno-builtin -mcpu=604 -mlongcall -DCPU=PPC604 -D_GNU_TOOL -Wall -W -Winline $(USER_CFLAGS)
|
||||
LDFLAGS := -nostdlib -Wl,-i -Wl,-X
|
||||
INCLUDE_FLAG := -I
|
||||
C_DEBUGFLAG := -g
|
||||
C_OPTFLAG := -O2
|
||||
COMPILE_ONLY_FLAG := -c
|
||||
OBJ_EXTENSION := .o
|
||||
CC_OBJ_OUTPUT = -o $@
|
||||
ARFLAGS := -rc
|
||||
LIBS_FLAG := -l
|
||||
LIBS_DIRFLAG:= -L
|
||||
LD_DEBUGFLAG := $(C_DEBUGFLAG)
|
||||
EXECUTE_EXTENSION := .out
|
||||
TOOL_CHAIN_BIN := $(WIND_HOME)/gnu/3.4.4-vxworks-6.3/$(WIND_HOST_TYPE)/bin/
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Add -DINET6 if the OS kernel image was built with IPv6 support
|
||||
# CFLAGS += -DINET6
|
||||
|
||||
# Set up compiler and linker flags for debug or optimization
|
||||
ifeq ($(BUILD_TYPE), debug)
|
||||
CFLAGS += $(C_DEBUGFLAG)
|
||||
LDFLAGS += $(LD_DEBUGFLAG)
|
||||
else
|
||||
CFLAGS += $(C_OPTFLAG)
|
||||
endif
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# Main Makefile and possible sub-make files
|
||||
MAKEFILES := Makefile.vxworks
|
||||
|
||||
# List of external include directories
|
||||
#-----
|
||||
# IMPORTANT: include OPENSSL directories before system
|
||||
# in order to prevent WindRiver OpenSSL to be used.
|
||||
#-----
|
||||
INCLUDE_DIRS := ../include $(OPENSSL_INC) $(ZLIB_INC) $(ARES_INC) $(WIND_BASE)/target/h $(WIND_BASE)/target/h/wrn/coreip
|
||||
|
||||
# List of external libraries and their directories
|
||||
LIBS_LIST := .
|
||||
LIB_DIRS := .
|
||||
ifneq ($(OPENSSL_LIB), )
|
||||
LIBS_LIST += crypto ssl
|
||||
LIB_DIRS += $(OPENSSL_LIB)
|
||||
endif
|
||||
ifneq ($(ZLIB_LIB), )
|
||||
LIBS_LIST += z
|
||||
LIB_DIRS += $(ZLIB_LIB)
|
||||
endif
|
||||
ifneq ($(ARES_LIB), )
|
||||
LIBS_LIST += ares
|
||||
LIB_DIRS += $(ARES_LIB)
|
||||
endif
|
||||
|
||||
# Add include and library directories and libraries
|
||||
CFLAGS += $(INCLUDE_DIRS:%=$(INCLUDE_FLAG)%)
|
||||
LDFLAGS += $(LIB_DIRS:%=$(LIBS_DIRFLAG)%)
|
||||
|
||||
# List of targets to make for libs target
|
||||
LIBS_TARGET_LIST := libcurl.a
|
||||
|
||||
# List of execuatble applications to make in addition to libs for all target
|
||||
EXE_TARGET_LIST :=
|
||||
|
||||
# Support for echoing rules
|
||||
# If ECHORULES variable was set (for example, using 'make' command line)
|
||||
# some shell commands in the rules will be echoed
|
||||
ifneq ($(strip $(findstring $(ECHORULES), yes YES 1 true TRUE)),)
|
||||
_@_ :=
|
||||
else
|
||||
_@_ := @
|
||||
endif
|
||||
|
||||
# Directory to hold compilation intermediate files
|
||||
TMP_DIR := tmp
|
||||
|
||||
# Get sources and headers to be compiled
|
||||
include Makefile.inc
|
||||
|
||||
# List of headers
|
||||
INCLUDE_FILES := $(HHEADERS)
|
||||
INCLUDE_FILES += $(shell find ../include -name \*.h)
|
||||
|
||||
# List of sources
|
||||
OBJLIST := $(CSOURCES:%.c=$(TMP_DIR)/%$(OBJ_EXTENSION))
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
#### default rule
|
||||
# It should be first rule in this file
|
||||
.PHONY: default
|
||||
default: libcurl.a
|
||||
|
||||
#### Compiling C files
|
||||
$(TMP_DIR)/%$(OBJ_EXTENSION): %.c $(MAKEFILES)
|
||||
@echo Compiling C file $< $(ECHO_STDOUT)
|
||||
@[ -d $(@D) ] || mkdir -p $(@D)
|
||||
$(_@_) $(TOOL_CHAIN_BIN)$(CC) $(COMPILE_ONLY_FLAG) $(CFLAGS) $< $(CC_OBJ_OUTPUT)
|
||||
|
||||
#### Creating library
|
||||
$(LIBS_TARGET_LIST): $(INCLUDE_FILES) $(MAKEFILES) $(OBJLIST)
|
||||
@echo Creating library $@ $(ECHO_STDOUT)
|
||||
$(_@_) [ -d $(@D) ] || mkdir -p $(@D)
|
||||
$(_@_) rm -f $@
|
||||
$(_@_) $(TOOL_CHAIN_BIN)$(AR) $(ARFLAGS) $@ $(filter %$(OBJ_EXTENSION), $^)
|
||||
|
||||
#### Creating application
|
||||
$(EXE_TARGET_LIST): $(INCLUDE_FILES) $(MAKEFILES) $(LIBS_TARGET_LIST)
|
||||
@echo Creating application $@
|
||||
@[ -d $(@D) ] || mkdir -p $(@D)
|
||||
$(_@_) $(TOOL_CHAIN_BIN)$(LINK) $(CC_OBJ_OUTPUT) $($(@)_EXE_OBJ_LIST) $(LDFLAGS) $($(@)_EXE_LIBS_NEEDED:%=$(LIBS_FLAG)%) $(LIBS_LIST:%=$(LIBS_FLAG)%) $(USER_LIBS_LIST) $(USER_LIBS_LIST)
|
||||
|
||||
#### Master Targets
|
||||
libs: $(LIBS_TARGET_LIST)
|
||||
@echo All libs made.
|
||||
|
||||
all: $(LIBS_TARGET_LIST) $(EXE_TARGET_LIST) $(INCLUDE_TARGET_LIST)
|
||||
@echo All targets made.
|
||||
|
||||
# Clean up
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(_@_) rm -rf $(TMP_DIR)
|
||||
@echo libcurl was cleaned.
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user