Compare commits
62 Commits
cares-1_1_
...
curl-7_11_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5b206f398 | ||
|
|
306a05f9ff | ||
|
|
81f8350616 | ||
|
|
760ca6adc4 | ||
|
|
ffb35ff5c3 | ||
|
|
8eda06131b | ||
|
|
5b55f9ecb3 | ||
|
|
3417e0b0fc | ||
|
|
79ed144b0f | ||
|
|
8e5cf6589c | ||
|
|
fc67cca882 | ||
|
|
eea2287068 | ||
|
|
5fe5de7511 | ||
|
|
4a6b9972dd | ||
|
|
256a16a8a3 | ||
|
|
30e0891d3d | ||
|
|
8147ccdf76 | ||
|
|
26ab286630 | ||
|
|
738807883e | ||
|
|
03a0988ce8 | ||
|
|
7de892eeb4 | ||
|
|
8c4e91a653 | ||
|
|
8f77030473 | ||
|
|
546d0bd3d1 | ||
|
|
5d53b544d3 | ||
|
|
6dc8fac122 | ||
|
|
8114f8562b | ||
|
|
c79fa187b9 | ||
|
|
237ec68b0e | ||
|
|
4ebf4f6e55 | ||
|
|
4d86593f3c | ||
|
|
ec050ccbc4 | ||
|
|
f19cade50f | ||
|
|
a2f35aaf67 | ||
|
|
e5c4b6b345 | ||
|
|
bad978feb2 | ||
|
|
bea9152aa8 | ||
|
|
f788f988ea | ||
|
|
d04ffd258b | ||
|
|
24cfa7f1bb | ||
|
|
94a1d09ac7 | ||
|
|
230a75091b | ||
|
|
4ad68ec305 | ||
|
|
ef776ab893 | ||
|
|
f8ff0f6bef | ||
|
|
bc7122f6e2 | ||
|
|
e5963dae48 | ||
|
|
1ebda8fa0e | ||
|
|
9af532e662 | ||
|
|
9d064a3927 | ||
|
|
d6edcfb486 | ||
|
|
1d5a914c1c | ||
|
|
666bc9ee4e | ||
|
|
e545e33d5f | ||
|
|
326e8b9fc1 | ||
|
|
0d1fc73f21 | ||
|
|
50a1853560 | ||
|
|
35e158d80b | ||
|
|
7225b14002 | ||
|
|
85838a8966 | ||
|
|
d29590f583 | ||
|
|
467c3e3a1f |
44
CHANGES
44
CHANGES
@@ -6,6 +6,50 @@
|
||||
|
||||
Changelog
|
||||
|
||||
Daniel (18 March 2004)
|
||||
- Tor Arntsen brought some info about SGI IRIX:
|
||||
|
||||
IRIX supports 3 different executable/object formats, -32, -n32 and -64.
|
||||
-n32 is default 32-bit format, -32 is the "old" 32-bit format, and -64 is
|
||||
the 64-bit format. Libraries for the different formats are in lib, lib32
|
||||
and lib64 respectively.
|
||||
|
||||
We've now adjusted the configure script to adapt to this when scanning for
|
||||
3rd party libs, such as OpenSSL.
|
||||
|
||||
Daniel (17 March 2004)
|
||||
- Watz pointed out a few missing files in the MSVC project description file.
|
||||
|
||||
- G<>nter Knauf brought patches, code and makefiles to build curl on Novell
|
||||
NetWare.
|
||||
|
||||
Daniel (15 March 2004)
|
||||
- Lots of libcurl man pages were updated to contain references to other man
|
||||
pages the recognized way so that they appear as nice hyperlinks in the HTML
|
||||
versions.
|
||||
|
||||
- buildconf now checks the m4 version too, since autoconf requires a GNU m4
|
||||
version to build proper configure scripts.
|
||||
|
||||
Daniel (12 March 2004)
|
||||
- Added CURLOPT_POSTFIELDSIZE_LARGE, the large file version of
|
||||
CURLOPT_POSTFIELDSIZE to allow POSTs larger than 2GB.
|
||||
|
||||
- David Byron fixed an uninitialized variable case/crash.
|
||||
|
||||
Daniel (10 March 2004)
|
||||
- Jeff Lawson fixed the SSL connection to deal with received signals during the
|
||||
connect.
|
||||
|
||||
- Changed the OS string for win32 to become "i386-pc-win32".
|
||||
|
||||
Daniel (9 March 2004)
|
||||
- Changed the internals to use curl_socket_t for socket variable type. This
|
||||
should enable us to build with less warnings on Windows, where SOCKET is
|
||||
used which is an unsigned int, while most other platforms use a mere int.
|
||||
|
||||
- Modified lib/config-win32.h to build fine on MSVC again.
|
||||
|
||||
Version 7.11.1-pre1 (8 March 2004)
|
||||
|
||||
Daniel (8 March 2004)
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist \
|
||||
curl-config.in build_vms.com curl-style.el sample.emacs testcurl.sh \
|
||||
RELEASE-NOTES
|
||||
curl-config.in curl-style.el sample.emacs testcurl.sh RELEASE-NOTES
|
||||
|
||||
bin_SCRIPTS = curl-config
|
||||
|
||||
|
||||
@@ -81,7 +81,9 @@ amiga:
|
||||
cd ./lib && make -f makefile.amiga
|
||||
cd ./src && make -f makefile.amiga
|
||||
|
||||
|
||||
netware:
|
||||
cd lib && make -f Makefile.netware
|
||||
cd src && make -f Makefile.netware
|
||||
|
||||
unix: all
|
||||
|
||||
|
||||
4
README
4
README
@@ -32,17 +32,18 @@ WEB SITE
|
||||
|
||||
Sweden -- http://curl.haxx.se/
|
||||
Australia -- http://curl.planetmirror.com/
|
||||
Estonia -- http://curl.dope-brothers.com/
|
||||
Germany -- http://curl.mirror.at.stealer.net/
|
||||
Russia -- http://curl.tsuren.net/
|
||||
Thailand -- http://curl.siamu.ac.th/
|
||||
US (CA) -- http://curl.mirror.redwire.net/
|
||||
US (TX) -- http://curl.cyberservers.net/
|
||||
|
||||
DOWNLOAD
|
||||
|
||||
The official download mirror sites are:
|
||||
|
||||
Australia -- http://curl.planetmirror.com/download/
|
||||
Estonia -- http://curl.dope-brothers.com/download/
|
||||
Germany -- ftp://ftp.fu-berlin.de/pub/unix/network/curl/
|
||||
Hongkong -- http://www.execve.net/curl/
|
||||
Russia -- http://curl.tsuren.net/download/
|
||||
@@ -50,7 +51,6 @@ DOWNLOAD
|
||||
Sweden -- http://cool.haxx.se/curl/
|
||||
Thailand -- http://curl.siamu.ac.th/download/
|
||||
US (CA) -- http://curl.mirror.redwire.net/download/
|
||||
US (TX) -- http://curl.cyberservers.net/download/
|
||||
|
||||
CVS
|
||||
|
||||
|
||||
@@ -3,10 +3,11 @@ Curl and libcurl 7.11.1. A bugfix release.
|
||||
Public curl release number: 79
|
||||
Releases counted from the very beginning: 106
|
||||
Available command line options: 94
|
||||
Available curl_easy_setopt() options: 111
|
||||
Available curl_easy_setopt() options: 112
|
||||
|
||||
This release includes the following changes:
|
||||
|
||||
o CURLOPT_POSTFIELDSIZE_LARGE added to offer POSTs larger than 2GB
|
||||
o CURL_VERSION_LARGEFILE is a feature bit returned by libcurls that feature
|
||||
large file support
|
||||
o libcurl only requires winsock 1.1 on windows now
|
||||
@@ -25,7 +26,10 @@ This release includes the following changes:
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
o Improved PUT/POST with NTLM/Digest authentication
|
||||
o builds and runs on Novell NetWare
|
||||
o Windows builds now report OS as "i386-pc-win32"
|
||||
o received signals during SSL connect is handled better
|
||||
o improved PUT/POST with NTLM/Digest authentication
|
||||
o following redirects and doing NTLM/Digest (where the first connection gets
|
||||
closed) with the multi interface work better now
|
||||
o file: progress meter and getinfo variables work now
|
||||
@@ -65,7 +69,7 @@ Other curl-related news since the previous public release:
|
||||
http://curl.haxx.se/auto/
|
||||
o the curl mailing lists moved, (re-)subscribe to the new ones from here:
|
||||
http://curl.haxx.se/mail/
|
||||
o c-ares 1.0.0 was relased: http://daniel.haxx.se/projects/c-ares/
|
||||
o c-ares 1.1.0 was relased: http://daniel.haxx.se/projects/c-ares/
|
||||
o TclCurl 0.11.0 was released:
|
||||
http://personal1.iddeo.es/andresgarci/tclcurl/english/
|
||||
o PycURL 7.11.0 was released: http://pycurl.sourceforge.net/
|
||||
@@ -80,6 +84,6 @@ advice from friends like these:
|
||||
Ken Hirsch, Stadler Stephan, Domenico Andreoli, Patrick Smith, Tor Arntsen,
|
||||
Andr<64>s Garc<72>a, Tim Baker, Len Krause, Gilad, Ken Rastatter, P R Schaffner,
|
||||
Greg Hewgill, Ben Greear, Jeff Lawson, Grigory Entin, Doug Porter, David
|
||||
Byron, Andy Serpa, Joe Halpin, Christopher R. Palmer
|
||||
Byron, Andy Serpa, Joe Halpin, Christopher R. Palmer, G<>nter Knauf
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
||||
|
||||
26
TODO-RELEASE
26
TODO-RELEASE
@@ -14,20 +14,40 @@ To get fixed in 7.11.2 (planned release May/June 2004)
|
||||
part is to figure out if the server did the right thing or not.
|
||||
UNASSIGNED
|
||||
|
||||
10. Anton Fedorov's "dumpcert" patch (only mailed to me privately) UNASSIGNED
|
||||
10. Anton Fedorov's "dumpcert" patch UNASSIGNED
|
||||
http://curl.haxx.se/mail/lib-2004-03/0088.html
|
||||
|
||||
14. Evaluate/apply Gertjan van Wingerde's SSL patches, UNASSIGNED
|
||||
http://curl.haxx.se/mail/lib-2004-03/0087.html
|
||||
|
||||
23. Peter Sylvester's "Most Significant Common Name" patch. Feedback welcome.
|
||||
23. Peter Sylvester's "Most Significant Common Name" change. Feedback welcome.
|
||||
At least the UTF8 conversion and comparison should be done. Patch?
|
||||
UNASSIGNED
|
||||
|
||||
24. Make the progress meter use one digit more for the hour time fields.
|
||||
Accomplish this by removing one of the times displayed.
|
||||
|
||||
27. Put the version defines in their own header file, so that lib/libcurl.rc
|
||||
can include only that to reduce problems with MSVC.
|
||||
|
||||
28. Optimize the way libcurl uses CWD on each new request over a persistent
|
||||
connection (on FTP) even if it doesn't have to.
|
||||
|
||||
29. Define USE_NTRESPONSES in the NTLM code to work properly with >14 letter
|
||||
passwords against IIS servers. Requires test cases to be updated
|
||||
accordingly. #915609
|
||||
|
||||
30. Digest re-negotiation is not supported, we wrongly assume a new 401
|
||||
response to signify an authenticaion error. We need to detect the
|
||||
difference between a 401 due to a bad Digest authorization header and a
|
||||
401 because the server wants to re-negotiate.
|
||||
|
||||
Mitz Wark provided details and traces here:
|
||||
http://curl.haxx.se/mail/lib-2004-03/0299.html
|
||||
|
||||
To get fixed in 7.12.0
|
||||
======================
|
||||
|
||||
25. curl_strerror()
|
||||
25. curl_easy_strerror() curl_multi_strerror() curl_share_strerror()
|
||||
|
||||
26. i18n of error messages
|
||||
|
||||
@@ -5,3 +5,4 @@ adig
|
||||
ahost
|
||||
config.log
|
||||
config.status
|
||||
aclocal.m4
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
$!
|
||||
$
|
||||
$ on control_y then goto Common_Exit!
|
||||
$ orig = f$environment("DEFAULT")
|
||||
$ loc = f$environment("PROCEDURE")
|
||||
$ def = f$parse("X.X;1",loc) - "X.X;1"
|
||||
$
|
||||
$ set def 'def'
|
||||
$ cc_qual = "/define=HAVE_CONFIG_H=1/include=(""../include/"",""../"",""../../openssl-0_9_7/include/"")"
|
||||
$ if p1 .eqs. "LISTING" then cc_qual = cc_qual + "/LIST/MACHINE"
|
||||
$ if p1 .eqs. "DEBUG" then cc_qual = cc_qual + "/LIST/MACHINE/DEBUG"
|
||||
$ msg_qual = ""
|
||||
$ call build "[.lib]" "*.c"
|
||||
$ call build "[.src]" "*.c"
|
||||
$ call build "[.src]" "*.msg"
|
||||
$ link /exe=curl.exe [.src]curl/lib/include=main,[.lib]curl/lib, -
|
||||
[-.openssl-0_9_7.axp.exe.ssl]libssl/lib, -
|
||||
[-.openssl-0_9_7.axp.exe.crypto]libcrypto/lib
|
||||
$
|
||||
$
|
||||
$ goto Common_Exit
|
||||
$build: subroutine
|
||||
$ set noon
|
||||
$ set default 'p1'
|
||||
$ search = p2
|
||||
$ reset = f$search("reset")
|
||||
$ if f$search("CURL.OLB") .eqs. ""
|
||||
$ then
|
||||
$ LIB/CREATE/OBJECT CURL.OLB
|
||||
$ endif
|
||||
$ reset = f$search("reset",1)
|
||||
$Loop:
|
||||
$ file = f$search(search,1)
|
||||
$ if file .eqs. "" then goto EndLoop
|
||||
$ obj = f$search(f$parse(".OBJ;",file),2)
|
||||
$ if (obj .nes. "")
|
||||
$ then
|
||||
$ if (f$cvtime(f$file(file,"rdt")) .gts. f$cvtime(f$file(obj,"rdt")))
|
||||
$ then
|
||||
$ call compile 'file'
|
||||
$ lib/object curl.OLB 'f$parse(".obj;",file)'
|
||||
$ else
|
||||
$! write sys$output "File: ''file' is up to date"
|
||||
$ endif
|
||||
$ else
|
||||
$! write sys$output "Object for file: ''file' does not exist"
|
||||
$ call compile 'file'
|
||||
$ lib/object curl.OLB 'f$parse(".obj;",file)'
|
||||
$ endif
|
||||
$ goto Loop
|
||||
$EndLoop:
|
||||
$ purge
|
||||
$ set def 'def'
|
||||
$ endsubroutine ! Build
|
||||
$
|
||||
$compile: subroutine
|
||||
$ set noon
|
||||
$ file = p1
|
||||
$ qual = p2+p3+p4+p5+p6+p7+p8
|
||||
$ typ = f$parse(file,,,"TYPE") - "."
|
||||
$ cmd_c = "CC "+cc_qual
|
||||
$ cmd_msg = "MESSAGE "+msg_qual
|
||||
$ x = cmd_'typ'
|
||||
$ 'x' 'file'
|
||||
$ ENDSUBROUTINE ! Compile
|
||||
$
|
||||
$Common_Exit:
|
||||
$ set default 'orig'
|
||||
$ exit
|
||||
14
buildconf
14
buildconf
@@ -138,6 +138,20 @@ fi
|
||||
|
||||
echo "buildconf: libtool version $lt_version (ok)"
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# m4 check
|
||||
#
|
||||
m4=`${M4:-m4} --version 2>/dev/null|head -1`;
|
||||
m4_version=`echo $m4 | sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//'`
|
||||
|
||||
if { echo $m4 | grep "GNU" >/dev/null 2>&1; } then
|
||||
echo "buildconf: GNU m4 version $m4_version (ok)"
|
||||
else
|
||||
echo "buildconf: m4 version $m4 found. You need a GNU m4 installed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
|
||||
# run the correct scripts now
|
||||
|
||||
13
configure.ac
13
configure.ac
@@ -490,8 +490,8 @@ AC_HELP_STRING([--with-krb4=DIR],[where to look for Kerberos4]),[
|
||||
OPT_KRB4="$withval"
|
||||
if test X"$OPT_KRB4" != Xyes
|
||||
then
|
||||
LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib"
|
||||
KRB4LIB="$OPT_KRB4/lib"
|
||||
LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib$libsuff"
|
||||
KRB4LIB="$OPT_KRB4/lib$libsuff"
|
||||
CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include"
|
||||
KRB4INC="$OPT_KRB4/include"
|
||||
fi
|
||||
@@ -627,7 +627,7 @@ if test x"$want_gss" = xyes; then
|
||||
gss_ldflags=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
|
||||
LDFLAGS="$LDFLAGS $gss_ldflags"
|
||||
else
|
||||
LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib -lgssapi"
|
||||
LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff -lgssapi"
|
||||
fi
|
||||
else
|
||||
LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
|
||||
@@ -710,7 +710,7 @@ else
|
||||
*)
|
||||
dnl check the given spot right away!
|
||||
EXTRA_SSL=$OPT_SSL
|
||||
LDFLAGS="$LDFLAGS -L$EXTRA_SSL/lib"
|
||||
LDFLAGS="$LDFLAGS -L$EXTRA_SSL/lib$libsuff"
|
||||
CPPFLAGS="$CPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
|
||||
;;
|
||||
esac
|
||||
@@ -720,7 +720,7 @@ else
|
||||
],[
|
||||
OLDLDFLAGS="$LDFLAGS"
|
||||
OLDCPPFLAGS="$CPPFLAGS"
|
||||
LDFLAGS="$CLEANLDFLAGS -L$EXTRA_SSL/lib"
|
||||
LDFLAGS="$CLEANLDFLAGS -L$EXTRA_SSL/lib$libsuff"
|
||||
CPPFLAGS="$CLEANCPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
|
||||
AC_CHECK_LIB(crypto, CRYPTO_add_lock,[
|
||||
HAVECRYPTO="yes" ], [
|
||||
@@ -852,7 +852,7 @@ case "$OPT_ZLIB" in
|
||||
dnl if no lib found, try to add the given library
|
||||
[if test -d "$OPT_ZLIB"; then
|
||||
CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
|
||||
LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib"
|
||||
LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
|
||||
fi])
|
||||
|
||||
AC_CHECK_HEADER(zlib.h,
|
||||
@@ -1268,6 +1268,7 @@ AC_CONFIG_FILES([Makefile \
|
||||
packages/DOS/Makefile \
|
||||
packages/EPM/curl.list \
|
||||
packages/EPM/Makefile \
|
||||
packages/vms/Makefile \
|
||||
curl-config
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
||||
43
docs/FAQ
43
docs/FAQ
@@ -1,4 +1,4 @@
|
||||
Updated: December 22, 2003 (http://curl.haxx.se/docs/faq.html)
|
||||
Updated: March 16, 2004 (http://curl.haxx.se/docs/faq.html)
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
@@ -90,7 +90,7 @@ FAQ
|
||||
with URL spelled in uppercase to make it obvious it deals with URLs. The
|
||||
fact it can also be pronounced 'see URL' also helped, it works as an
|
||||
abbrivation for "Client URL Request Library" or why not the recursive
|
||||
version: "Curl is a URL Request Library".
|
||||
version: "Curl URL Request Library".
|
||||
|
||||
Curl supports a range of common Internet protocols, currently including
|
||||
HTTP, HTTPS, FTP, FTPS, GOPHER, LDAP, DICT, TELNET and FILE.
|
||||
@@ -101,7 +101,7 @@ FAQ
|
||||
NOTE: there are numerous sub-projects and related projects that also use the
|
||||
word curl in the project names in various combinations, but you should take
|
||||
notice that this FAQ is directed at the command-line tool named curl (and
|
||||
libcurl the library), and may therefore not be valid for other curl
|
||||
libcurl the library), and may therefore not be valid for other curl-related
|
||||
projects.
|
||||
|
||||
1.2 What is libcurl?
|
||||
@@ -109,16 +109,16 @@ FAQ
|
||||
libcurl is a reliable and portable library which provides you with an easy
|
||||
interface to a range of common Internet protocols.
|
||||
|
||||
You can use libcurl for free in your application even if it is commercial
|
||||
or closed-source.
|
||||
You can use libcurl for free in your application, be it open source,
|
||||
commercial or closed-source.
|
||||
|
||||
1.3 What is cURL not?
|
||||
|
||||
Curl is *not* a wget clone even though that is a very common misconception.
|
||||
Never, during curl's development, have we intended curl to replace wget or
|
||||
compete on its market. Curl is targeted at single-shot file transfers.
|
||||
Curl is *not* a wget clone. That is a common misconception. Never, during
|
||||
curl's development, have we intended curl to replace wget or compete on its
|
||||
market. Curl is targeted at single-shot file transfers.
|
||||
|
||||
Curl is not a web site mirroring program. If you wanna use curl to mirror
|
||||
Curl is not a web site mirroring program. If you want to use curl to mirror
|
||||
something: fine, go ahead and write a script that wraps around curl to make
|
||||
it reality (like curlmirror.pl does).
|
||||
|
||||
@@ -181,9 +181,8 @@ FAQ
|
||||
curl. We do this voluntarily on our spare time.
|
||||
|
||||
We get some help from companies. Contactor Data hosts the curl web site,
|
||||
Haxx owns the curl web site's domain and sourceforge.net hosts several
|
||||
project services we take advantage from, like the bug tracker, mailing lists
|
||||
and more.
|
||||
Haxx owns the curl web site's domain and sourceforge.net hosts project
|
||||
services we take advantage from, like the bug tracker.
|
||||
|
||||
If you want to support our project with a donation or similar, one way of
|
||||
doing that would be to buy "gift certificates" at useful online shopping
|
||||
@@ -281,8 +280,7 @@ FAQ
|
||||
|
||||
2.4. Does cURL support Socks (RFC 1928) ?
|
||||
|
||||
There is limited support for SOCKS5 for curl built with IPv6 support
|
||||
disabled.
|
||||
Yes, SOCKS5 is supported when curl is built with IPv6 support disabled.
|
||||
|
||||
|
||||
3. Usage problems
|
||||
@@ -478,7 +476,7 @@ FAQ
|
||||
requests properly. To correct this problem, tell curl to select SSLv2 from
|
||||
the command line (-2/--sslv2).
|
||||
|
||||
There has also been examples where the remote server didn't like the SSLv2
|
||||
There have also been examples where the remote server didn't like the SSLv2
|
||||
request and instead you had to force curl to use SSLv3 with -3/--sslv3.
|
||||
|
||||
4.2. Why do I get problems when I use & or % in the URL?
|
||||
@@ -577,21 +575,26 @@ FAQ
|
||||
|
||||
The first part is to avoid having clear-text passwords in the command line
|
||||
so that they don't appear in 'ps' outputs and similar. That is easily
|
||||
avoided by using the "-K" option to tell curl to read parameters from a
|
||||
file or stdin to which you can pass the secret info.
|
||||
avoided by using the "-K" option to tell curl to read parameters from a file
|
||||
or stdin to which you can pass the secret info. curl itself will also
|
||||
attempt to "hide" the given password by blanking out the option - this
|
||||
doesn't work on all platforms.
|
||||
|
||||
To keep the passwords in your account secret from the rest of the world is
|
||||
not a task that curl addresses. You could of course encrypt them somehow to
|
||||
at least hide them from being read by human eyes, but that is not what
|
||||
anyone would call security.
|
||||
|
||||
Also note that regular HTTP and FTP passwords are sent in clear across the
|
||||
network. All it takes for anyone to fetch them is to listen on the network.
|
||||
Eavesdropping is very easy.
|
||||
Also note that regular HTTP (using Basic authentication) and FTP passwords
|
||||
are sent in clear across the network. All it takes for anyone to fetch them
|
||||
is to listen on the network. Eavesdropping is very easy. Use more secure
|
||||
authentication methods (like Digest, Negotiate or even NTLM) or consider the
|
||||
SSL-based alternatives HTTPS and FTPS.
|
||||
|
||||
4.8 I found a bug!
|
||||
|
||||
It is not a bug if the behavior is documented. Read the docs first.
|
||||
Especially check out the KNOWN_BUGS file, it may be a documented bug!
|
||||
|
||||
If it is a problem with a binary you've downloaded or a package for your
|
||||
particular platform, try contacting the person who built the package/archive
|
||||
|
||||
@@ -511,6 +511,7 @@ PORTS
|
||||
- i386 HURD
|
||||
- i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4
|
||||
- i386 NetBSD
|
||||
- i386 Novell NetWare
|
||||
- i386 OS/2
|
||||
- i386 OpenBSD
|
||||
- i386 SCO unix
|
||||
|
||||
@@ -3,6 +3,9 @@ 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!
|
||||
|
||||
* NTLM authentication with passwords longer than 14 letters fail. There is
|
||||
a known fix for this, planned to come in curl 7.11.2
|
||||
|
||||
* Doing resumed upload over HTTP does not work with '-C -', because curl
|
||||
doesn't do a HEAD first to get the initial size. This needs to be done
|
||||
manually for HTTP PUT resume to work, and then '-C [index]'.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Peer SSL Certificate Verification
|
||||
=================================
|
||||
|
||||
Starting in 7.10, libcurl performs peer SSL certificate verification by
|
||||
Since version 7.10, libcurl performs peer SSL certificate verification by
|
||||
default. This is done by installing a default CA cert bundle on 'make install'
|
||||
(or similar), that CA bundle package is used by default on operations against
|
||||
SSL servers.
|
||||
@@ -11,9 +11,11 @@ by CAs present in the bundle, you will not notice any changed behavior and you
|
||||
will seamlessly get a higher security level on your SSL connections since you
|
||||
can be sure that the remote server really is the one it claims to be.
|
||||
|
||||
If the remote server uses a self-signed certificate, or if you don't install
|
||||
curl's CA cert bundle or if it uses a certificate signed by a CA that isn't
|
||||
included in the bundle, then you need to do one of the following:
|
||||
If the remote server uses a self-signed certificate, if you don't install
|
||||
curl's CA cert bundle, if the server uses a certificate signed by a CA that
|
||||
isn't included in the bundle or if the remoste host is an imposter
|
||||
impersonating your favourite site, and you want to transfer files from this
|
||||
server, do one of the following:
|
||||
|
||||
1. Tell libcurl to *not* verify the peer. With libcurl you disable with with
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
@@ -37,3 +39,8 @@ trouble for some users, since it adds security to a majority of the SSL
|
||||
connections that previously weren't really secure. It turned out many people
|
||||
were using previous versions of curl/libcurl without realizing the need for
|
||||
the CA cert options to get truly secure SSL connections.
|
||||
|
||||
The default path of the CA bundle installed with the curl package is:
|
||||
/usr/local/share/curl/curl-ca-bundle.crt, which can be changed by running
|
||||
configure with the --with-ca-bundle option pointing out the path of your
|
||||
choice.
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
.\" * $Id$
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH curl_easy_setopt 3 "27 Feb 2004" "libcurl 7.11.1" "libcurl Manual"
|
||||
.TH curl_easy_setopt 3 "12 Mar 2004" "libcurl 7.11.1" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_easy_setopt - set options for a curl easy handle
|
||||
.SH SYNOPSIS
|
||||
@@ -464,6 +464,11 @@ If you want to post data to the server without letting libcurl do a strlen()
|
||||
to measure the data size, this option must be used. When this option is used
|
||||
you can post fully binary data, which otherwise is likely to fail. If this
|
||||
size is set to zero, the library will use strlen() to get the size.
|
||||
.IP CURLOPT_POSTFIELDSIZE_LARGE
|
||||
Pass a curl_off_t as parameter. Use this to set the size of the
|
||||
\fICURLOPT_POSTFIELDS\fP data to prevent libcurl from doing strlen() on the
|
||||
data to figure out the size. This is the large file version of the
|
||||
\fICURLOPT_POSTFIELDSIZE\fP option. (Added in 7.11.1)
|
||||
.IP CURLOPT_HTTPPOST
|
||||
Tells libcurl you want a multipart/formdata HTTP POST to be made and you
|
||||
instruct what data to pass on to the server. Pass a pointer to a linked list
|
||||
|
||||
@@ -9,11 +9,11 @@ curl_multi_add_handle - add an easy handle to a multi session
|
||||
CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle);
|
||||
.ad
|
||||
.SH DESCRIPTION
|
||||
Adds a standard easy handle to the multi stack. This will make this multi
|
||||
handle control the specified easy handle.
|
||||
Adds a standard easy handle to the multi stack. This function call will make
|
||||
this \fImulti_handle\fP control the specified \fIeasy_handle\fP.
|
||||
|
||||
When an easy handle has been added to a multi stack, you can not and you must
|
||||
not use curl_easy_perform() on that handle!
|
||||
not use \fIcurl_easy_perform(3)\fP on that handle!
|
||||
.SH RETURN VALUE
|
||||
CURLMcode type, general libcurl multi interface error code.
|
||||
.SH "SEE ALSO"
|
||||
|
||||
@@ -11,7 +11,7 @@ curl_multi_cleanup - close down a multi session
|
||||
.SH DESCRIPTION
|
||||
Cleans up and removes a whole multi stack. It does not free or touch any
|
||||
individual easy handles in any way - they still need to be closed
|
||||
individually, using the usual curl_easy_cleanup() way.
|
||||
individually, using the usual \fIcurl_easy_cleanup(3)\fP way.
|
||||
.SH RETURN VALUE
|
||||
CURLMcode type, general libcurl multi interface error code.
|
||||
.SH "SEE ALSO"
|
||||
|
||||
@@ -22,6 +22,7 @@ NOTE that once this call is made, you must not remove the sets you point to,
|
||||
as libcurl will need to be able to read them. It needs them after select()
|
||||
calls, to know if certain sockets are readable or writable.
|
||||
.SH RETURN VALUE
|
||||
CURLMcode type, general libcurl multi interface error code.
|
||||
CURLMcode type, general libcurl multi interface error code. See
|
||||
\fIlibcurl-errors.3\fP
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_multi_cleanup "(3)," curl_multi_init "(3)"
|
||||
|
||||
@@ -21,13 +21,14 @@ integer pointed to with \fImsgs_in_queue\fP will contain the number of
|
||||
remaining messages after this function was called.
|
||||
|
||||
The data the returned pointer points to will not survive calling
|
||||
curl_multi_cleanup().
|
||||
\fIcurl_multi_cleanup(3)\fP.
|
||||
|
||||
The 'CURLMsg' struct is very simple and only contain very basic informations.
|
||||
If more involved information is wanted, the particular "easy handle" in
|
||||
present in that struct and can thus be used in subsequent regular
|
||||
curl_easy_getinfo() calls (or similar):
|
||||
\fIcurl_easy_getinfo(3)\fP calls (or similar):
|
||||
|
||||
.NF
|
||||
struct CURLMsg {
|
||||
CURLMSG msg; /* what this message means */
|
||||
CURL *easy_handle; /* the handle it concerns */
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.\"
|
||||
.TH curl_multi_init 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
|
||||
.SH NAME
|
||||
curl_multi_init - Start a multi session
|
||||
curl_multi_init - create a multi handle
|
||||
.SH SYNOPSIS
|
||||
.B #include <curl/curl.h>
|
||||
.sp
|
||||
@@ -12,11 +12,10 @@ curl_multi_init - Start a multi session
|
||||
This function returns a CURLM handle to be used as input to all the other
|
||||
multi-functions, sometimes refered to as a multi handle on some places in the
|
||||
documentation. This init call MUST have a corresponding call to
|
||||
\fIcurl_multi_cleanup\fP when the operation is complete.
|
||||
\fIcurl_multi_cleanup(3)\fP when the operation is complete.
|
||||
.SH RETURN VALUE
|
||||
If this function returns NULL, something went wrong and you cannot use the
|
||||
other curl functions.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_multi_cleanup "(3)," curl_global_init "(3)," curl_easy_init "(3)"
|
||||
.SH BUGS
|
||||
Surely there are some, you tell me!
|
||||
|
||||
|
||||
@@ -29,8 +29,9 @@ NOTE that this only returns errors etc regarding the whole multi stack. There
|
||||
might still have occurred problems on invidual transfers even when this
|
||||
function returns OK.
|
||||
.SH "TYPICAL USAGE"
|
||||
Most application will use \fIcurl_multi_fdset\fP to get the multi_handle's
|
||||
Most application will use \fIcurl_multi_fdset(3)\fP to get the multi_handle's
|
||||
file descriptors, then it'll wait for action on them using select() and as
|
||||
soon as one or more of them are ready, \fIcurl_multi_perform\fP gets called.
|
||||
soon as one or more of them are ready, \fIcurl_multi_perform(3)\fP gets
|
||||
called.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_multi_cleanup "(3)," curl_multi_init "(3)"
|
||||
.BR curl_multi_cleanup "(3)," curl_multi_init "(3)," curl_multi_fdset "(3)"
|
||||
|
||||
@@ -9,21 +9,21 @@ libcurl-easy \- easy interface overview
|
||||
When using libcurl's "easy" interface you init your session and get a handle
|
||||
(often referred to as an "easy handle" in various docs and sources), which you
|
||||
use as input to the easy interface functions you use. Use
|
||||
\fIcurl_easy_init()\fP to get the handle.
|
||||
\fIcurl_easy_init(3)\fP to get the handle.
|
||||
|
||||
You continue by setting all the options you want in the upcoming transfer, the
|
||||
most important among them is the URL itself (you can't transfer anything
|
||||
without a specified URL as you may have figured out yourself). You might want
|
||||
to set some callbacks as well that will be called from the library when data
|
||||
is available etc. \fIcurl_easy_setopt()\fP is used for all this.
|
||||
is available etc. \fIcurl_easy_setopt(3)\fP is used for all this.
|
||||
|
||||
When all is setup, you tell libcurl to perform the transfer using
|
||||
\fIcurl_easy_perform()\fP. It will then do the entire operation and won't
|
||||
\fIcurl_easy_perform(3)\fP. It will then do the entire operation and won't
|
||||
return until it is done (successfully or not).
|
||||
|
||||
After the transfer has been made, you can set new options and make another
|
||||
transfer, or if you're done, cleanup the session by calling
|
||||
\fIcurl_easy_cleanup()\fP. If you want persistant connections, you don't
|
||||
\fIcurl_easy_cleanup(3)\fP. If you want persistant connections, you don't
|
||||
cleanup immediately, but instead run ahead and perform other transfers using
|
||||
the same easy handle.
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ complicated for the application.
|
||||
file descriptors simultaneous easily.
|
||||
.SH "ONE MULTI HANDLE MANY EASY HANDLES"
|
||||
To use the multi interface, you must first create a 'multi handle' with
|
||||
\fIcurl_multi_init\fP. This handle is then used as input to all further
|
||||
\fIcurl_multi_init(3)\fP. This handle is then used as input to all further
|
||||
curl_multi_* functions.
|
||||
|
||||
Each single transfer is built up with an easy handle. You must create them,
|
||||
@@ -40,29 +40,29 @@ and setup the appropriate options for each easy handle, as outlined in the
|
||||
\fIlibcurl(3)\fP man page, using \fIcurl_easy_setopt(3)\fP.
|
||||
|
||||
When the easy handle is setup for a transfer, then instead of using
|
||||
\fIcurl_easy_perform\fP (as when using the easy interface for transfers), you
|
||||
should instead add the easy handle to the multi handle using
|
||||
\fIcurl_easy_add_handl\fP. The multi handle is sometimes referred to as a
|
||||
\fIcurl_easy_perform(3)\fP (as when using the easy interface for transfers),
|
||||
you should instead add the easy handle to the multi handle using
|
||||
\fIcurl_multi_add_handle(3)\fP. The multi handle is sometimes referred to as a
|
||||
\'multi stack\' because of the fact that it may hold a large amount of easy
|
||||
handles.
|
||||
|
||||
Should you change your mind, the easy handle is again removed from the multi
|
||||
stack using \fIcurl_multi_remove_handle\fP. Once removed from the multi
|
||||
stack using \fIcurl_multi_remove_handle(3)\fP. Once removed from the multi
|
||||
handle, you can again use other easy interface functions like
|
||||
\fIcurl_easy_perform\fP on the handle or whatever you think is necessary.
|
||||
\fIcurl_easy_perform(3)\fP on the handle or whatever you think is necessary.
|
||||
|
||||
Adding the easy handle to the multi handle does not start the transfer.
|
||||
Remember that one of the main ideas with this interface is to let your
|
||||
application drive. You drive the transfers by invoking
|
||||
\fIcurl_multi_perform\fP. libcurl will then transfer data if there is anything
|
||||
available to transfer. It'll use the callbacks and everything else you have
|
||||
setup in the individual easy handles. It'll transfer data on all current
|
||||
transfers in the multi stack that are ready to transfer anything. It may be
|
||||
all, it may be none.
|
||||
\fIcurl_multi_perform(3)\fP. libcurl will then transfer data if there is
|
||||
anything available to transfer. It'll use the callbacks and everything else
|
||||
you have setup in the individual easy handles. It'll transfer data on all
|
||||
current transfers in the multi stack that are ready to transfer anything. It
|
||||
may be all, it may be none.
|
||||
|
||||
Your application can acquire knowledge from libcurl when it would like to get
|
||||
invoked to transfer data, so that you don't have to busy-loop and call that
|
||||
\fIcurl_multi_perform\fP like crazy. \fIcurl_multi_fdset\fP offers an
|
||||
\fIcurl_multi_perform(3)\fP like crazy. \fIcurl_multi_fdset(3)\fP offers an
|
||||
interface using which you can extract fd_sets from libcurl to use in select()
|
||||
or poll() calls in order to get to know when the transfers in the multi stack
|
||||
might need attention. This also makes it very easy for your program to wait
|
||||
@@ -70,30 +70,30 @@ for input on your own private file descriptors at the same time or perhaps
|
||||
timeout every now and then, should you want that.
|
||||
|
||||
A little note here about the return codes from the multi functions, and
|
||||
especially the \fIcurl_multi_perform\fP: if you receive
|
||||
especially the \fIcurl_multi_perform(3)\fP: if you receive
|
||||
\fICURLM_CALL_MULTI_PERFORM\fP, this basicly means that you should call
|
||||
\fIcurl_multi_perform\fP again, before you select() on more actions. You don't
|
||||
have to do it immediately, but the return code means that libcurl may have
|
||||
more data available to return or that there may be more data to send off
|
||||
\fIcurl_multi_perform(3)\fP again, before you select() on more actions. You
|
||||
don't have to do it immediately, but the return code means that libcurl may
|
||||
have more data available to return or that there may be more data to send off
|
||||
before it is "satisfied".
|
||||
|
||||
\fIcurl_multi_perform\fP stores the number of still running transfers in one
|
||||
of its input arguments, and by reading that you can figure out when all the
|
||||
transfers in the multi handles are done. 'done' does not mean successful. One
|
||||
or more of the transfers may have failed. Tracking when this number changes,
|
||||
you know when one or more transfers are done.
|
||||
\fIcurl_multi_perform(3)\fP stores the number of still running transfers in
|
||||
one of its input arguments, and by reading that you can figure out when all
|
||||
the transfers in the multi handles are done. 'done' does not mean
|
||||
successful. One or more of the transfers may have failed. Tracking when this
|
||||
number changes, you know when one or more transfers are done.
|
||||
|
||||
To get information about completed transfers, to figure out success or not and
|
||||
similar, \fIcurl_multi_info_read\fP should be called. It can return a message
|
||||
about a current or previous transfer. Repeated invokes of the function get
|
||||
more messages until the message queue is empty. The information you receive
|
||||
there includes an easy handle pointer which you may use to identify which easy
|
||||
handle the information regards.
|
||||
similar, \fIcurl_multi_info_read(3)\fP should be called. It can return a
|
||||
message about a current or previous transfer. Repeated invokes of the function
|
||||
get more messages until the message queue is empty. The information you
|
||||
receive there includes an easy handle pointer which you may use to identify
|
||||
which easy handle the information regards.
|
||||
|
||||
When all transfers in the multi stack are done, cleanup the multi handle with
|
||||
\fIcurl_multi_cleanup\fP. Be careful and please note that you \fBMUST\fP
|
||||
invoke separate \fIcurl_easy_cleanup\fP calls on every single easy handle to
|
||||
clean them up properly.
|
||||
\fIcurl_multi_cleanup(3)\fP. Be careful and please note that you \fBMUST\fP
|
||||
invoke separate \fIcurl_easy_cleanup(3)\fP calls on every single easy handle
|
||||
to clean them up properly.
|
||||
|
||||
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
|
||||
|
||||
@@ -20,27 +20,27 @@ You can have multiple easy handles share data between them. Have them update
|
||||
and use the \fBsame\fP cookie database or DNS cache! This way, each single
|
||||
transfer will take advantage from data updates made by the other transfer(s).
|
||||
.SH "SHARE OBJECT"
|
||||
You create a shared object with \fIcurl_share_init()\fP. It returns a handle
|
||||
You create a shared object with \fIcurl_share_init(3)\fP. It returns a handle
|
||||
for a newly created one.
|
||||
|
||||
You tell the shared object what data you want it to share by using
|
||||
\fIcurl_share_setopt()\fP. Currently you can only share DNS and/or COOKIE
|
||||
\fIcurl_share_setopt(3)\fP. Currently you can only share DNS and/or COOKIE
|
||||
data.
|
||||
|
||||
Since you can use this share from multiple threads, and libcurl has no
|
||||
internal thread synchronization, you must provide mutex callbacks if you're
|
||||
using this multi-threaded. You set lock and unlock functions with
|
||||
\fIcurl_share_setopt()\fP too.
|
||||
\fIcurl_share_setopt(3)\fP too.
|
||||
|
||||
Then, you make an easy handle to use this share, you set the CURLOPT_SHARE
|
||||
option with \fIcurl_easy_setopt\fP, and pass in share handle. You can make any
|
||||
number of easy handles share the same share handle.
|
||||
Then, you make an easy handle to use this share, you set the
|
||||
\fICURLOPT_SHARE\fP option with \fIcurl_easy_setopt(3)\fP, and pass in share
|
||||
handle. You can make any number of easy handles share the same share handle.
|
||||
|
||||
To make an easy handle stop using that particular share, you set CURLOPT_SHARE
|
||||
to NULL for that easy handle. To make a handle stop sharing a particular data,
|
||||
you can CURLSHOPT_UNSHARE it.
|
||||
To make an easy handle stop using that particular share, you set
|
||||
\fICURLOPT_SHARE\fP to NULL for that easy handle. To make a handle stop
|
||||
sharing a particular data, you can \fICURLSHOPT_UNSHARE\fP it.
|
||||
|
||||
When you're done using the share, make sure that no easy handle is still using
|
||||
it, and call \fIcurl_share_cleanup()\fP on the handle.
|
||||
it, and call \fIcurl_share_cleanup(3)\fP on the handle.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_share_init "(3), " curl_share_setopt "(3), " curl_share_cleanup "(3)"
|
||||
|
||||
@@ -8,27 +8,26 @@ libcurl \- client-side URL transfers
|
||||
.SH DESCRIPTION
|
||||
This is an overview on how to use libcurl in your C programs. There are
|
||||
specific man pages for each function mentioned in here. There are also the
|
||||
\fIlibcurl-easy\fP man page, the \fIlibcurl-multi\fP man page, the
|
||||
\fIlibcurl-share\fP man page and the \fIlibcurl-the-guide\fP document for
|
||||
\fIlibcurl-easy(3)\fP man page, the \fIlibcurl-multi(3)\fP man page, the
|
||||
\fIlibcurl-share(3)\fP man page and the \fIlibcurl-the-guide\fP document for
|
||||
further reading on how to do programming with libcurl.
|
||||
|
||||
There exist more than a dozen custom bindings that bring libcurl access to
|
||||
your favourite language. Look elsewhere for documentation on those.
|
||||
|
||||
All applications that use libcurl should call \fIcurl_global_init()\fP exactly
|
||||
once before any libcurl function can be used. After all usage of libcurl is
|
||||
complete, it \fBmust\fP call \fIcurl_global_cleanup()\fP. In between those two
|
||||
calls, you can use libcurl as described below.
|
||||
All applications that use libcurl should call \fIcurl_global_init(3)\fP
|
||||
exactly once before any libcurl function can be used. After all usage of
|
||||
libcurl is complete, it \fBmust\fP call \fIcurl_global_cleanup(3)\fP. In
|
||||
between those two calls, you can use libcurl as described below.
|
||||
|
||||
To transfer files, you always set up an "easy handle" using
|
||||
\fIcurl_easy_init()\fP, but when you want the file(s) transfered you have the
|
||||
\fIcurl_easy_init(3)\fP, but when you want the file(s) transfered you have the
|
||||
option of using the "easy" interface, or the "multi" interface.
|
||||
|
||||
The easy interface is a synchronous interface with which you call
|
||||
\fIcurl_easy_perform\fP and let it perform the transfer. When it is completed,
|
||||
the function return and you can continue. More details are found in the
|
||||
.BR "libcurl-easy (3)"
|
||||
man page.
|
||||
\fIcurl_easy_perform(3)\fP and let it perform the transfer. When it is
|
||||
completed, the function return and you can continue. More details are found in
|
||||
the \fIlibcurl-easy(3)\fP man page.
|
||||
|
||||
The multi interface on the other hand is an asynchronous interface, that you
|
||||
call and that performs only a little piece of the tranfer on each invoke. It
|
||||
@@ -38,7 +37,7 @@ even to easily download multiple files simultaneously using a single thread.
|
||||
|
||||
You can have multiple easy handles share certain data, even if they are used
|
||||
in different threads. This magic is setup using the share interface, as
|
||||
described in the \fIlibcurl-share\fP man page.
|
||||
described in the \fIlibcurl-share(3)\fP man page.
|
||||
|
||||
There is also a series of other helpful functions to use. They are:
|
||||
|
||||
@@ -60,7 +59,7 @@ get information about a performed transfer
|
||||
helps building a HTTP form POST
|
||||
.TP
|
||||
.B curl_formfree()
|
||||
free a list built with curl_formparse()/curl_formadd()
|
||||
free a list built with \fIcurl_formadd(3)\fP
|
||||
.TP
|
||||
.B curl_slist_append()
|
||||
builds a linked list
|
||||
@@ -102,20 +101,20 @@ Never ever call curl-functions simultaneously using the same handle from
|
||||
several threads. libcurl is thread-safe and can be used in any number of
|
||||
threads, but you must use separate curl handles if you want to use libcurl in
|
||||
more than one thread simultaneously.
|
||||
.SH "PERSISTANT CONNECTIONS"
|
||||
.SH "PERSISTENT CONNECTIONS"
|
||||
Persistent connections means that libcurl can re-use the same connection for
|
||||
several transfers, if the conditions are right.
|
||||
|
||||
libcurl will *always* attempt to use persistent connections. Whenever you use
|
||||
\fIcurl_easy_perform()\fP or \fIcurl_multi_perform()\fP, libcurl will attempt
|
||||
to use an existing connection to do the transfer, and if none exists it'll
|
||||
open a new one that will be subject for re-use on a possible following call to
|
||||
\fIcurl_easy_perform()\fP or \fIcurl_multi_perform()\fP.
|
||||
libcurl will \fBalways\fP attempt to use persistent connections. Whenever you
|
||||
use \fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP, libcurl will
|
||||
attempt to use an existing connection to do the transfer, and if none exists
|
||||
it'll open a new one that will be subject for re-use on a possible following
|
||||
call to \fIcurl_easy_perform(3)\fP or \fIcurl_multi_perform(3)\fP.
|
||||
|
||||
To allow libcurl to take full advantage of persistent connections, you should
|
||||
do as many of your file transfers as possible using the same curl handle. When
|
||||
you call \fIcurl_easy_cleanup()\fP, all the possibly open connections held by
|
||||
you call \fIcurl_easy_cleanup(3)\fP, all the possibly open connections held by
|
||||
libcurl will be closed and forgotten.
|
||||
|
||||
Note that the options set with \fIcurl_easy_setopt()\fP will be used in on
|
||||
every repeated \fIcurl_easy_perform()\fP call.
|
||||
Note that the options set with \fIcurl_easy_setopt(3)\fP will be used in on
|
||||
every repeated \fIcurl_easy_perform(3)\fP call.
|
||||
|
||||
@@ -783,6 +783,9 @@ typedef enum {
|
||||
*/
|
||||
CINIT(FTP_SSL, LONG, 119),
|
||||
|
||||
/* The _LARGE version of the standard POSTFIELDSIZE option */
|
||||
CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120),
|
||||
|
||||
CURLOPT_LASTENTRY /* the last unused */
|
||||
} CURLoption;
|
||||
|
||||
|
||||
@@ -55,10 +55,10 @@
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
|
||||
#ifdef _AIX
|
||||
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
|
||||
libc5-based Linux systems. Only include it on system that are known to
|
||||
require it! */
|
||||
#if defined(_AIX) || defined(NETWARE)
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ EXTRA_DIST = getdate.y Makefile.b32 Makefile.b32.resp Makefile.m32 \
|
||||
config.h.in ca-bundle.crt README.encoding README.memoryleak \
|
||||
README.ares makefile.dj config.dj \
|
||||
libcurl.framework.make libcurl.plist libcurl.rc \
|
||||
config-amigaos.h amigaos.c amigaos.h makefile.amiga
|
||||
config-amigaos.h amigaos.c amigaos.h makefile.amiga config-netware.h \
|
||||
Makefile.netware nwlib.c libcurl.imp
|
||||
|
||||
lib_LTLIBRARIES = libcurl.la
|
||||
|
||||
|
||||
277
lib/Makefile.netware
Normal file
277
lib/Makefile.netware
Normal file
@@ -0,0 +1,277 @@
|
||||
#################################################################
|
||||
#
|
||||
## Makefile for building libcurl.nlm (NetWare version - gnu make)
|
||||
## Use: make -f Makefile.netware
|
||||
##
|
||||
## Comments to: Guenter Knauf <eflash@gmx.net>
|
||||
#
|
||||
#################################################################
|
||||
|
||||
# Edit the path below to point to the base of your Novell NDK.
|
||||
BASE = c:/novell
|
||||
INSTDIR = s:/libcurl
|
||||
|
||||
# Edit the path below to point to the base of your Zlib sources.
|
||||
ZLIB_PATH = ../../../cw/zlib-src-1.1.4
|
||||
|
||||
# Edit the vars below to change NLM target settings.
|
||||
TARGET = libcurl
|
||||
VERSION = $(LIBCURL_VERSION)
|
||||
COPYR = Copyright (c) 1996 - 2004, Daniel Stenberg, <daniel@haxx.se>
|
||||
DESCR = cURL libcurl $(LIBCURL_VERSION_STR) - http://curl.haxx.se
|
||||
MTSAFE = YES
|
||||
STACK = 64000
|
||||
SCREEN = none
|
||||
#MODULES = libz.nlm
|
||||
EXPORTS = @libcurl.imp
|
||||
|
||||
# Edit the var below to point to your lib architecture.
|
||||
ifndef LIBARCH
|
||||
LIBARCH = LIBC
|
||||
endif
|
||||
|
||||
# must be equal to DEBUG or NDEBUG
|
||||
DB = NDEBUG
|
||||
# DB = DEBUG
|
||||
# Optimization: -O<n> or debugging: -g
|
||||
ifeq ($(DB),NDEBUG)
|
||||
OPT = -O2
|
||||
OBJDIR = release
|
||||
else
|
||||
OPT = -g
|
||||
OBJDIR = debug
|
||||
endif
|
||||
|
||||
# Include the version info retrieved from jk_version.h
|
||||
-include $(OBJDIR)/version.inc
|
||||
|
||||
# The following line defines your compiler.
|
||||
ifdef METROWERKS
|
||||
CC = mwccnlm
|
||||
else
|
||||
CC = gcc
|
||||
endif
|
||||
# RM = rm -f
|
||||
# CP = cp -fv
|
||||
# if you want to mark the target as MTSAFE you will need a tool for
|
||||
# generating the xdc data for the linker; here's a minimal tool:
|
||||
# http://www.gknw.de/development/prgtools/mkxdc.zip
|
||||
MPKXDC = mkxdc
|
||||
|
||||
# Global flags for all compilers
|
||||
CFLAGS = $(OPT) -D$(DB) -DNETWARE -nostdinc
|
||||
#CFLAGS += -DHAVE_LIBZ
|
||||
|
||||
ifeq ($(CC),mwccnlm)
|
||||
LD = mwldnlm
|
||||
LDFLAGS = -nostdlib $(PRELUDE) $(OBJDIR)/*.o -o $(OBJDIR)/$(TARGET).nlm -commandfile
|
||||
CFLAGS += -gccinc -inline off -opt nointrinsics
|
||||
CFLAGS += -relax_pointers
|
||||
#CFLAGS += -w on
|
||||
ifeq ($(LIBARCH),LIBC)
|
||||
PRELUDE = $(SDK_LIBC)/imports/libcpre.o
|
||||
CFLAGS += -align 4 -inst mmx -proc 686
|
||||
CFLAGS += -D_POSIX_SOURCE
|
||||
# CFLAGS += -D__ANSIC__
|
||||
else
|
||||
PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"
|
||||
# CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"
|
||||
CFLAGS += -align 1 -proc 586
|
||||
endif
|
||||
else
|
||||
LD = nlmconv
|
||||
LDFLAGS = -T
|
||||
CFLAGS += -fno-builtin -fpack-struct -fpcc-struct-return
|
||||
CFLAGS += -Wall # -pedantic
|
||||
ifeq ($(LIBARCH),LIBC)
|
||||
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
|
||||
CFLAGS += -D_POSIX_SOURCE
|
||||
# CFLAGS += -D__ANSIC__
|
||||
else
|
||||
PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
|
||||
CFLAGS += -include $(BASE)/nlmconv/genlm.h
|
||||
endif
|
||||
endif
|
||||
|
||||
LDLIBS =
|
||||
|
||||
NDK_ROOT = $(BASE)/ndk
|
||||
SDK_CLIB = $(NDK_ROOT)/nwsdk
|
||||
SDK_LIBC = $(NDK_ROOT)/libc
|
||||
SDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
|
||||
CURL_INC = ../include
|
||||
|
||||
INCLUDES = -I$(CURL_INC)
|
||||
INCLUDES += -I$(ZLIB_PATH)
|
||||
|
||||
ifeq ($(LIBARCH),LIBC)
|
||||
INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
|
||||
INCLUDES += -I$(SDK_LIBC)/include/winsock
|
||||
INCLUDES += -I$(SDK_LDAP)/libc/inc
|
||||
else
|
||||
INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include
|
||||
# INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
|
||||
INCLUDES += -I$(SDK_LDAP)/clib/inc
|
||||
CFLAGS += -DNETDB_USE_INTERNET
|
||||
endif
|
||||
CFLAGS += $(INCLUDES)
|
||||
|
||||
ifeq ($(MTSAFE),YES)
|
||||
XDCDATA = $(OBJDIR)/$(TARGET).xdc
|
||||
endif
|
||||
|
||||
ifeq ($(OSTYPE),linux)
|
||||
DL = '
|
||||
-include $(BASE)/nlmconv/ncpfs.inc
|
||||
endif
|
||||
|
||||
OBJS = \
|
||||
$(OBJDIR)/file.o \
|
||||
$(OBJDIR)/timeval.o \
|
||||
$(OBJDIR)/base64.o \
|
||||
$(OBJDIR)/hostip.o \
|
||||
$(OBJDIR)/progress.o \
|
||||
$(OBJDIR)/formdata.o \
|
||||
$(OBJDIR)/cookie.o \
|
||||
$(OBJDIR)/http.o \
|
||||
$(OBJDIR)/sendf.o \
|
||||
$(OBJDIR)/ftp.o \
|
||||
$(OBJDIR)/url.o \
|
||||
$(OBJDIR)/dict.o \
|
||||
$(OBJDIR)/if2ip.o \
|
||||
$(OBJDIR)/speedcheck.o \
|
||||
$(OBJDIR)/getdate.o \
|
||||
$(OBJDIR)/transfer.o \
|
||||
$(OBJDIR)/ldap.o \
|
||||
$(OBJDIR)/ssluse.o \
|
||||
$(OBJDIR)/version.o \
|
||||
$(OBJDIR)/getenv.o \
|
||||
$(OBJDIR)/escape.o \
|
||||
$(OBJDIR)/mprintf.o \
|
||||
$(OBJDIR)/telnet.o \
|
||||
$(OBJDIR)/netrc.o \
|
||||
$(OBJDIR)/getinfo.o \
|
||||
$(OBJDIR)/strequal.o \
|
||||
$(OBJDIR)/easy.o \
|
||||
$(OBJDIR)/security.o \
|
||||
$(OBJDIR)/krb4.o \
|
||||
$(OBJDIR)/memdebug.o \
|
||||
$(OBJDIR)/http_chunks.o \
|
||||
$(OBJDIR)/strtok.o \
|
||||
$(OBJDIR)/connect.o \
|
||||
$(OBJDIR)/hash.o \
|
||||
$(OBJDIR)/llist.o \
|
||||
$(OBJDIR)/multi.o \
|
||||
$(OBJDIR)/share.o \
|
||||
$(OBJDIR)/content_encoding.o \
|
||||
$(OBJDIR)/http_digest.o \
|
||||
$(OBJDIR)/http_negotiate.o \
|
||||
$(OBJDIR)/http_ntlm.o \
|
||||
$(OBJDIR)/md5.o \
|
||||
$(OBJDIR)/strtoofft.o \
|
||||
$(OBJDIR)/nwlib.o
|
||||
|
||||
|
||||
all: $(OBJDIR) $(OBJDIR)/version.inc $(OBJDIR)/$(TARGET).nlm
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@echo Compiling $<
|
||||
@$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(OBJDIR)/version.inc: $(CURL_INC)/curl/curl.h $(OBJDIR)
|
||||
@echo Creating $@
|
||||
@awk -f ../packages/netware/get_ver.awk $< > $@
|
||||
|
||||
dist: all
|
||||
-$(RM) $(OBJDIR)/*.o $(OBJDIR)/$(TARGET).map $(OBJDIR)/$(TARGET).ncv
|
||||
-$(RM) $(OBJDIR)/$(TARGET).def $(OBJDIR)/version.inc $(XDCDATA)
|
||||
# -$(CP) ../changes.txt $(OBJDIR)/
|
||||
|
||||
install: all
|
||||
@[ -d $(INSTDIR) ] || mkdir $(INSTDIR)
|
||||
@$(CP) $(TARGET).nlm $(INSTDIR)
|
||||
|
||||
clean:
|
||||
-$(RM) -r $(OBJDIR)
|
||||
|
||||
$(OBJDIR):
|
||||
@mkdir $(OBJDIR)
|
||||
|
||||
$(OBJDIR)/$(TARGET).nlm: $(OBJS) $(OBJDIR)/$(TARGET).def $(XDCDATA)
|
||||
@echo Linking $@
|
||||
@-$(RM) $@
|
||||
@$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
|
||||
|
||||
$(OBJDIR)/%.xdc: Makefile.netware
|
||||
@echo Creating $@
|
||||
@$(MPKXDC) $(XDCOPT) $@
|
||||
|
||||
$(OBJDIR)/%.def: Makefile.netware
|
||||
@echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
|
||||
@echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
|
||||
@echo $(DL)# All your changes will be lost!!$(DL) >> $@
|
||||
@echo $(DL)#$(DL) >> $@
|
||||
@echo $(DL)copyright "$(COPYR)"$(DL) >> $@
|
||||
@echo $(DL)description "$(DESCR)"$(DL) >> $@
|
||||
@echo $(DL)version $(VERSION)$(DL) >> $@
|
||||
ifdef NLMTYPE
|
||||
@echo $(DL)type $(NLMTYPE)$(DL) >> $@
|
||||
endif
|
||||
ifdef STACK
|
||||
@echo $(DL)stack $(STACK)$(DL) >> $@
|
||||
endif
|
||||
ifdef SCREEN
|
||||
@echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
|
||||
else
|
||||
@echo $(DL)screenname "DEFAULT"$(DL) >> $@
|
||||
endif
|
||||
ifeq ($(DB),DEBUG)
|
||||
@echo $(DL)debug$(DL) >> $@
|
||||
endif
|
||||
@echo $(DL)threadname "$(TARGET)"$(DL) >> $@
|
||||
ifdef XDCDATA
|
||||
@echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
|
||||
endif
|
||||
ifeq ($(LIBARCH),CLIB)
|
||||
@echo $(DL)start _Prelude$(DL) >> $@
|
||||
@echo $(DL)exit _Stop$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/clib.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/threads.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/socklib.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
|
||||
@echo $(DL)module clib$(DL) >> $@
|
||||
else
|
||||
ifeq ($(LD),nlmconv)
|
||||
@echo $(DL)flag_on 64$(DL) >> $@
|
||||
else
|
||||
@echo $(DL)autounload$(DL) >> $@
|
||||
endif
|
||||
@echo $(DL)pseudopreemption$(DL) >> $@
|
||||
@echo $(DL)start _LibCPrelude$(DL) >> $@
|
||||
@echo $(DL)exit _LibCPostlude$(DL) >> $@
|
||||
@echo $(DL)check _LibCCheckUnload$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LIBC)/imports/libc.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LIBC)/imports/netware.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@
|
||||
@echo $(DL)module libc$(DL) >> $@
|
||||
endif
|
||||
ifdef MODULES
|
||||
@echo $(DL)module $(MODULES)$(DL) >> $@
|
||||
endif
|
||||
ifdef EXPORTS
|
||||
@echo $(DL)export $(EXPORTS)$(DL) >> $@
|
||||
endif
|
||||
ifdef IMPORTS
|
||||
@echo $(DL)import $(IMPORTS)$(DL) >> $@
|
||||
endif
|
||||
ifeq ($(LD),nlmconv)
|
||||
@echo $(DL)input $(OBJS)$(DL) >> $@
|
||||
@echo $(DL)input $(PRELUDE)$(DL) >> $@
|
||||
@echo $(DL)output $(TARGET).nlm$(DL) >> $@
|
||||
endif
|
||||
|
||||
485
lib/config-netware.h
Normal file
485
lib/config-netware.h
Normal file
@@ -0,0 +1,485 @@
|
||||
/* lib/config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* to disable DICT */
|
||||
#undef CURL_DISABLE_DICT
|
||||
|
||||
/* to disable FILE */
|
||||
#undef CURL_DISABLE_FILE
|
||||
|
||||
/* to disable FTP */
|
||||
#undef CURL_DISABLE_FTP
|
||||
|
||||
/* to disable GOPHER */
|
||||
#undef CURL_DISABLE_GOPHER
|
||||
|
||||
/* to disable HTTP */
|
||||
#undef CURL_DISABLE_HTTP
|
||||
|
||||
/* to disable LDAP */
|
||||
#undef CURL_DISABLE_LDAP
|
||||
|
||||
/* to disable TELNET */
|
||||
#undef CURL_DISABLE_TELNET
|
||||
|
||||
/* Set to explicitly specify we don't want to use thread-safe functions */
|
||||
#undef DISABLED_THREADSAFE
|
||||
|
||||
/* your Entropy Gathering Daemon socket pathname */
|
||||
#undef EGD_SOCKET
|
||||
|
||||
/* Define if you want to enable IPv6 support */
|
||||
#undef ENABLE_IPV6
|
||||
|
||||
/* Define to 1 if you have the <alloca.h> header file. */
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
|
||||
/* Define to 1 if you have the <assert.h> header file. */
|
||||
#define HAVE_ASSERT_H 1
|
||||
|
||||
/* Define to 1 if you have the `closesocket' function. */
|
||||
#undef HAVE_CLOSESOCKET
|
||||
|
||||
/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
|
||||
#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
|
||||
|
||||
/* Define to 1 if you have the <crypto.h> header file. */
|
||||
#undef HAVE_CRYPTO_H
|
||||
|
||||
/* Define to 1 if you have the <des.h> header file. */
|
||||
#undef HAVE_DES_H
|
||||
|
||||
/* disabled non-blocking sockets */
|
||||
#undef HAVE_DISABLED_NONBLOCKING
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
/* XXX: #undef HAVE_DLFCN_H */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the `dlopen' function. */
|
||||
#define HAVE_DLOPEN 1
|
||||
|
||||
/* Define to 1 if you have the <err.h> header file. */
|
||||
#define HAVE_ERR_H 1
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* use FIONBIO for non-blocking sockets */
|
||||
/* XXX: #undef HAVE_FIONBIO */
|
||||
#define HAVE_FIONBIO 1
|
||||
|
||||
/* Define if getaddrinfo exists and works */
|
||||
#undef HAVE_GETADDRINFO
|
||||
|
||||
/* Define to 1 if you have the `geteuid' function. */
|
||||
#undef HAVE_GETEUID
|
||||
|
||||
/* Define to 1 if you have the `gethostbyaddr' function. */
|
||||
#define HAVE_GETHOSTBYADDR 1
|
||||
|
||||
/* Define to 1 if you have the `gethostbyaddr_r' function. */
|
||||
#undef HAVE_GETHOSTBYADDR_R
|
||||
|
||||
/* gethostbyaddr_r() takes 5 args */
|
||||
#undef HAVE_GETHOSTBYADDR_R_5
|
||||
|
||||
/* gethostbyaddr_r() takes 7 args */
|
||||
#undef HAVE_GETHOSTBYADDR_R_7
|
||||
|
||||
/* gethostbyaddr_r() takes 8 args */
|
||||
#undef HAVE_GETHOSTBYADDR_R_8
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname_r' function. */
|
||||
#undef HAVE_GETHOSTBYNAME_R
|
||||
|
||||
/* gethostbyname_r() takes 3 args */
|
||||
#undef HAVE_GETHOSTBYNAME_R_3
|
||||
|
||||
/* gethostbyname_r() takes 5 args */
|
||||
#undef HAVE_GETHOSTBYNAME_R_5
|
||||
|
||||
/* gethostbyname_r() takes 6 args */
|
||||
#undef HAVE_GETHOSTBYNAME_R_6
|
||||
|
||||
/* Define to 1 if you have the `getpass_r' function. */
|
||||
#undef HAVE_GETPASS_R
|
||||
|
||||
/* Define to 1 if you have the `getpwuid' function. */
|
||||
#undef HAVE_GETPWUID
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have the `gmtime_r' function. */
|
||||
#undef HAVE_GMTIME_R
|
||||
|
||||
/* if you have the gssapi libraries */
|
||||
#undef HAVE_GSSAPI
|
||||
|
||||
/* if you have the Heimdal gssapi libraries */
|
||||
#undef HAVE_GSSHEIMDAL
|
||||
|
||||
/* if you have the MIT gssapi libraries */
|
||||
#undef HAVE_GSSMIT
|
||||
|
||||
/* Define to 1 if you have the `inet_addr' function. */
|
||||
#define HAVE_INET_ADDR 1
|
||||
|
||||
/* Define to 1 if you have the `inet_ntoa' function. */
|
||||
#define HAVE_INET_NTOA 1
|
||||
|
||||
/* Define to 1 if you have the `inet_ntoa_r' function. */
|
||||
#undef HAVE_INET_NTOA_R
|
||||
|
||||
/* inet_ntoa_r() is declared */
|
||||
#undef HAVE_INET_NTOA_R_DECL
|
||||
|
||||
/* Define to 1 if you have the `inet_pton' function. */
|
||||
#define HAVE_INET_PTON 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* use ioctlsocket() for non-blocking sockets */
|
||||
#undef HAVE_IOCTLSOCKET
|
||||
|
||||
/* use Ioctlsocket() for non-blocking sockets */
|
||||
#undef HAVE_IOCTLSOCKET_CASE
|
||||
|
||||
/* Define to 1 if you have the <io.h> header file. */
|
||||
#undef HAVE_IO_H
|
||||
|
||||
/* if you have the Kerberos4 libraries (including -ldes) */
|
||||
#undef HAVE_KRB4
|
||||
|
||||
/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */
|
||||
#undef HAVE_KRB_GET_OUR_IP_FOR_REALM
|
||||
|
||||
/* Define to 1 if you have the <krb.h> header file. */
|
||||
#undef HAVE_KRB_H
|
||||
|
||||
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
||||
#undef HAVE_LIBCRYPTO
|
||||
|
||||
/* Define to 1 if you have the `dl' library (-ldl). */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
/* Define to 1 if you have the `nsl' library (-lnsl). */
|
||||
#undef HAVE_LIBNSL
|
||||
|
||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
||||
#undef HAVE_LIBRESOLV
|
||||
|
||||
/* Define to 1 if you have the `resolve' library (-lresolve). */
|
||||
#undef HAVE_LIBRESOLVE
|
||||
|
||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||
#undef HAVE_LIBSOCKET
|
||||
|
||||
/* Define to 1 if you have the `ssl' library (-lssl). */
|
||||
#undef HAVE_LIBSSL
|
||||
|
||||
/* If zlib is available */
|
||||
#undef HAVE_LIBZ
|
||||
//#define HAVE_LIBZ 1
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
#undef HAVE_LOCALTIME_R
|
||||
|
||||
/* if your compiler supports 'long long' */
|
||||
#define HAVE_LONGLONG 1
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#define HAVE_NETDB_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
#undef HAVE_NET_IF_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/crypto.h> header file. */
|
||||
#undef HAVE_OPENSSL_CRYPTO_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/engine.h> header file. */
|
||||
#undef HAVE_OPENSSL_ENGINE_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/err.h> header file. */
|
||||
#undef HAVE_OPENSSL_ERR_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/pem.h> header file. */
|
||||
#undef HAVE_OPENSSL_PEM_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/rsa.h> header file. */
|
||||
#undef HAVE_OPENSSL_RSA_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/ssl.h> header file. */
|
||||
#undef HAVE_OPENSSL_SSL_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/x509.h> header file. */
|
||||
#undef HAVE_OPENSSL_X509_H
|
||||
|
||||
/* use O_NONBLOCK for non-blocking sockets */
|
||||
#undef HAVE_O_NONBLOCK
|
||||
|
||||
/* Define to 1 if you have the <pem.h> header file. */
|
||||
#undef HAVE_PEM_H
|
||||
|
||||
/* Define to 1 if you have the `perror' function. */
|
||||
#undef HAVE_PERROR
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
#undef HAVE_POLL
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#undef HAVE_PWD_H
|
||||
|
||||
/* Define to 1 if you have the `RAND_egd' function. */
|
||||
#undef HAVE_RAND_EGD
|
||||
|
||||
/* Define to 1 if you have the `RAND_screen' function. */
|
||||
#undef HAVE_RAND_SCREEN
|
||||
|
||||
/* Define to 1 if you have the `RAND_status' function. */
|
||||
#undef HAVE_RAND_STATUS
|
||||
|
||||
/* Define to 1 if you have the <rsa.h> header file. */
|
||||
#undef HAVE_RSA_H
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define to 1 if you have the <setjmp.h> header file. */
|
||||
#define HAVE_SETJMP_H 1
|
||||
|
||||
/* Define to 1 if you have the <sgtty.h> header file. */
|
||||
#undef HAVE_SGTTY_H
|
||||
|
||||
/* Define to 1 if you have the `sigaction' function. */
|
||||
#undef HAVE_SIGACTION
|
||||
|
||||
/* Define to 1 if you have the `siginterrupt' function. */
|
||||
#undef HAVE_SIGINTERRUPT
|
||||
|
||||
/* Define to 1 if you have the `signal' function. */
|
||||
#define HAVE_SIGNAL 1
|
||||
|
||||
/* If you have sigsetjmp */
|
||||
#undef HAVE_SIGSETJMP
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* use SO_NONBLOCK for non-blocking sockets */
|
||||
#undef HAVE_SO_NONBLOCK
|
||||
|
||||
/* Define this if you have the SPNEGO library fbopenssl */
|
||||
#undef HAVE_SPNEGO
|
||||
|
||||
/* Define to 1 if you have the <ssl.h> header file. */
|
||||
#undef HAVE_SSL_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the `strcmpi' function. */
|
||||
#undef HAVE_STRCMPI
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the `strftime' function. */
|
||||
#define HAVE_STRFTIME 1
|
||||
|
||||
/* Define to 1 if you have the `stricmp' function. */
|
||||
#undef HAVE_STRICMP
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strlcat' function. */
|
||||
#define HAVE_STRLCAT 1
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
#define HAVE_STRLCPY 1
|
||||
|
||||
/* Define to 1 if you have the `strstr' function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define to 1 if you have the `strtok_r' function. */
|
||||
#undef HAVE_STRTOK_R
|
||||
|
||||
/* Define to 1 if you have the `strtoll' function. */
|
||||
#undef HAVE_STRTOLL
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#undef HAVE_SYS_POLL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/sockio.h> header file. */
|
||||
#define HAVE_SYS_SOCKIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/utime.h> header file. */
|
||||
#undef HAVE_SYS_UTIME_H
|
||||
|
||||
/* Define to 1 if you have the `tcgetattr' function. */
|
||||
#undef HAVE_TCGETATTR
|
||||
|
||||
/* Define to 1 if you have the `tcsetattr' function. */
|
||||
#undef HAVE_TCSETATTR
|
||||
|
||||
/* Define to 1 if you have the <termios.h> header file. */
|
||||
#define HAVE_TERMIOS_H 1
|
||||
|
||||
/* Define to 1 if you have the <termio.h> header file. */
|
||||
#undef HAVE_TERMIO_H
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the `uname' function. */
|
||||
#define HAVE_UNAME 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the `utime' function. */
|
||||
#undef HAVE_UTIME
|
||||
|
||||
/* Define to 1 if you have the <utime.h> header file. */
|
||||
#undef HAVE_UTIME_H
|
||||
|
||||
/* Define to 1 if you have the <winsock.h> header file. */
|
||||
#undef HAVE_WINSOCK_H
|
||||
|
||||
/* Define this symbol if your OS supports changing the contents of argv */
|
||||
#undef HAVE_WRITABLE_ARGV
|
||||
|
||||
/* Define to 1 if you have the <x509.h> header file. */
|
||||
#undef HAVE_X509_H
|
||||
|
||||
/* if you have the zlib.h header file */
|
||||
#define HAVE_ZLIB_H 1
|
||||
|
||||
/* need REENTRANT defined */
|
||||
#undef NEED_REENTRANT
|
||||
|
||||
/* cpu-machine-OS */
|
||||
#define OS "i386-pc-NetWare"
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* a suitable file to read random data from */
|
||||
#undef RANDOM_FILE
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define to the type of arg 1 for `select'. */
|
||||
#undef SELECT_TYPE_ARG1
|
||||
|
||||
/* Define to the type of args 2, 3 and 4 for `select'. */
|
||||
#undef SELECT_TYPE_ARG234
|
||||
|
||||
/* Define to the type of arg 5 for `select'. */
|
||||
#undef SELECT_TYPE_ARG5
|
||||
|
||||
/* The size of a `curl_off_t', as computed by sizeof. */
|
||||
#define SIZEOF_CURL_OFF_T 4
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
/* XXX: #undef STDC_HEADERS */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define if you want to enable ares support */
|
||||
#undef USE_ARES
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to 1 if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* type to use in place of in_addr_t if not defined */
|
||||
#undef in_addr_t
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* type to use in place of socklen_t if not defined */
|
||||
#define socklen_t int
|
||||
|
||||
/* the signed version of size_t */
|
||||
#undef ssize_t
|
||||
|
||||
|
||||
@@ -52,6 +52,13 @@
|
||||
#include <stdlib.h> /* required for free() prototype, without it, this crashes
|
||||
on macos 68K */
|
||||
#endif
|
||||
#if (defined(HAVE_FIONBIO) && defined(__NOVELL_LIBC__))
|
||||
#include <sys/filio.h>
|
||||
#endif
|
||||
#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
|
||||
#undef in_addr_t
|
||||
#define in_addr_t unsigned long
|
||||
#endif
|
||||
#ifdef VMS
|
||||
#include <in.h>
|
||||
#include <inet.h>
|
||||
@@ -417,6 +424,7 @@ static bool verifyconnect(curl_socket_t sockfd)
|
||||
/* This wasn't a successful connect */
|
||||
return FALSE;
|
||||
#else
|
||||
(void)sockfd;
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
@@ -571,7 +579,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
|
||||
*/
|
||||
for (ai = remotehost->addr; ai; ai = ai->ai_next, aliasindex++) {
|
||||
sockfd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
|
||||
if (sockfd < 0)
|
||||
if (sockfd == CURL_SOCKET_BAD)
|
||||
continue;
|
||||
#else
|
||||
/*
|
||||
@@ -681,7 +689,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
|
||||
}
|
||||
before = after;
|
||||
}
|
||||
if (sockfd < 0) {
|
||||
if (sockfd == CURL_SOCKET_BAD) {
|
||||
/* no good connect was made */
|
||||
*sockconn = -1;
|
||||
failf(data, "Connect failed");
|
||||
|
||||
296
lib/curl_strerror.c
Normal file
296
lib/curl_strerror.c
Normal file
@@ -0,0 +1,296 @@
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2004, 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.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
const char *
|
||||
curl_easy_strerror(CURLcode error)
|
||||
{
|
||||
switch (error) {
|
||||
case CURLE_OK:
|
||||
return "no error";
|
||||
|
||||
case CURLE_UNSUPPORTED_PROTOCOL:
|
||||
return "unsupported protocol";
|
||||
|
||||
case CURLE_FAILED_INIT:
|
||||
return "failed init";
|
||||
|
||||
case CURLE_URL_MALFORMAT:
|
||||
return "url malformat";
|
||||
|
||||
case CURLE_URL_MALFORMAT_USER:
|
||||
return "url malformat user";
|
||||
|
||||
case CURLE_COULDNT_RESOLVE_PROXY:
|
||||
return "couldnt resolve proxy";
|
||||
|
||||
case CURLE_COULDNT_RESOLVE_HOST:
|
||||
return "couldnt resolve host";
|
||||
|
||||
case CURLE_COULDNT_CONNECT:
|
||||
return "couldn't connect";
|
||||
|
||||
case CURLE_FTP_WEIRD_SERVER_REPLY:
|
||||
return "ftp weird server reply";
|
||||
|
||||
case CURLE_FTP_ACCESS_DENIED:
|
||||
return "ftp access denied";
|
||||
|
||||
case CURLE_FTP_USER_PASSWORD_INCORRECT:
|
||||
return "ftp user password incorrect";
|
||||
|
||||
case CURLE_FTP_WEIRD_PASS_REPLY:
|
||||
return "ftp weird pass reply";
|
||||
|
||||
case CURLE_FTP_WEIRD_USER_REPLY:
|
||||
return "ftp weird user reply";
|
||||
|
||||
case CURLE_FTP_WEIRD_PASV_REPLY:
|
||||
return "ftp weird pasv reply";
|
||||
|
||||
case CURLE_FTP_WEIRD_227_FORMAT:
|
||||
return "ftp weird 227 format";
|
||||
|
||||
case CURLE_FTP_CANT_GET_HOST:
|
||||
return "ftp cant get host";
|
||||
|
||||
case CURLE_FTP_CANT_RECONNECT:
|
||||
return "ftp can't reconnect";
|
||||
|
||||
case CURLE_FTP_COULDNT_SET_BINARY:
|
||||
return "ftp couldn't set binary";
|
||||
|
||||
case CURLE_PARTIAL_FILE:
|
||||
return "partial file";
|
||||
|
||||
case CURLE_FTP_COULDNT_RETR_FILE:
|
||||
return "ftp couldn't retr file";
|
||||
|
||||
case CURLE_FTP_WRITE_ERROR:
|
||||
return "ftp write error";
|
||||
|
||||
case CURLE_FTP_QUOTE_ERROR:
|
||||
return "ftp quote error";
|
||||
|
||||
case CURLE_HTTP_NOT_FOUND:
|
||||
return "http not found";
|
||||
|
||||
case CURLE_WRITE_ERROR:
|
||||
return "write error";
|
||||
|
||||
case CURLE_MALFORMAT_USER:
|
||||
return "user name is illegally specified";
|
||||
|
||||
case CURLE_FTP_COULDNT_STOR_FILE:
|
||||
return "failed FTP upload";
|
||||
|
||||
case CURLE_READ_ERROR:
|
||||
return "could open/read from file";
|
||||
|
||||
case CURLE_OUT_OF_MEMORY:
|
||||
return "out of memory";
|
||||
|
||||
case CURLE_OPERATION_TIMEOUTED:
|
||||
return "the timeout time was reached";
|
||||
|
||||
case CURLE_FTP_COULDNT_SET_ASCII:
|
||||
return "TYPE A failed";
|
||||
|
||||
case CURLE_FTP_PORT_FAILED:
|
||||
return "FTP PORT operation failed";
|
||||
|
||||
case CURLE_FTP_COULDNT_USE_REST:
|
||||
return "the REST command failed";
|
||||
|
||||
case CURLE_FTP_COULDNT_GET_SIZE:
|
||||
return "the SIZE command failed";
|
||||
|
||||
case CURLE_HTTP_RANGE_ERROR:
|
||||
return "RANGE \"command\" didn't work";
|
||||
|
||||
case CURLE_HTTP_POST_ERROR:
|
||||
return "http post error";
|
||||
|
||||
case CURLE_SSL_CONNECT_ERROR:
|
||||
return "wrong when connecting with SSL";
|
||||
|
||||
case CURLE_FTP_BAD_DOWNLOAD_RESUME:
|
||||
return "couldn't resume download";
|
||||
|
||||
case CURLE_FILE_COULDNT_READ_FILE:
|
||||
return "file couldn't read file";
|
||||
|
||||
case CURLE_LDAP_CANNOT_BIND:
|
||||
return "ldap cannot bind";
|
||||
|
||||
case CURLE_LDAP_SEARCH_FAILED:
|
||||
return "ldap search failed";
|
||||
|
||||
case CURLE_LIBRARY_NOT_FOUND:
|
||||
return "library not found";
|
||||
|
||||
case CURLE_FUNCTION_NOT_FOUND:
|
||||
return "function not found";
|
||||
|
||||
case CURLE_ABORTED_BY_CALLBACK:
|
||||
return "aborted by callback";
|
||||
|
||||
case CURLE_BAD_FUNCTION_ARGUMENT:
|
||||
return "bad function argument";
|
||||
|
||||
case CURLE_BAD_CALLING_ORDER:
|
||||
return "bad calling order";
|
||||
|
||||
case CURLE_HTTP_PORT_FAILED:
|
||||
return "HTTP Interface operation failed";
|
||||
|
||||
case CURLE_BAD_PASSWORD_ENTERED:
|
||||
return "my getpass() returns fail";
|
||||
|
||||
case CURLE_TOO_MANY_REDIRECTS :
|
||||
return "catch endless re-direct loops";
|
||||
|
||||
case CURLE_UNKNOWN_TELNET_OPTION:
|
||||
return "User specified an unknown option";
|
||||
|
||||
case CURLE_TELNET_OPTION_SYNTAX :
|
||||
return "Malformed telnet option";
|
||||
|
||||
case CURLE_OBSOLETE:
|
||||
return "obsolete";
|
||||
|
||||
case CURLE_SSL_PEER_CERTIFICATE:
|
||||
return "peer's certificate wasn't ok";
|
||||
|
||||
case CURLE_GOT_NOTHING:
|
||||
return "when this is a specific error";
|
||||
|
||||
case CURLE_SSL_ENGINE_NOTFOUND:
|
||||
return "SSL crypto engine not found";
|
||||
|
||||
case CURLE_SSL_ENGINE_SETFAILED:
|
||||
return "can not set SSL crypto engine as default";
|
||||
|
||||
case CURLE_SEND_ERROR:
|
||||
return "failed sending network data";
|
||||
|
||||
case CURLE_RECV_ERROR:
|
||||
return "failure in receiving network data";
|
||||
|
||||
case CURLE_SHARE_IN_USE:
|
||||
return "CURLE_SHARE_IN_USER";
|
||||
|
||||
case CURLE_SSL_CERTPROBLEM:
|
||||
return "problem with the local certificate";
|
||||
|
||||
case CURLE_SSL_CIPHER:
|
||||
return "couldn't use specified cipher";
|
||||
|
||||
case CURLE_SSL_CACERT:
|
||||
return "problem with the CA cert (path? access rights?)";
|
||||
|
||||
case CURLE_BAD_CONTENT_ENCODING:
|
||||
return "Unrecognized transfer encoding";
|
||||
|
||||
case CURLE_LDAP_INVALID_URL:
|
||||
return "Invalid LDAP URL";
|
||||
|
||||
case CURLE_FILESIZE_EXCEEDED:
|
||||
return "Maximum file size exceeded";
|
||||
|
||||
case CURLE_FTP_SSL_FAILED:
|
||||
return "Requested FTP SSL level failed";
|
||||
|
||||
case CURL_LAST:
|
||||
break;
|
||||
}
|
||||
/*
|
||||
* By using a switch, gcc -Wall will complain about enum values
|
||||
* which do not appear, helping keep this function up-to-date.
|
||||
* By using gcc -Wall -Werror, you can't forget.
|
||||
*
|
||||
* A table would not have the same benefit. Most compilers will
|
||||
* generate code very similar to a table in any case, so there
|
||||
* is little performance gain from a table. And something is broken
|
||||
* for the user's application, anyways, so does it matter how fast
|
||||
* it _doesn't_ work?
|
||||
*
|
||||
* The line number for the error will be near this comment, which
|
||||
* is why it is here, and not at the start of the switch.
|
||||
*/
|
||||
return "CURLcode unknown";
|
||||
}
|
||||
|
||||
const char *
|
||||
curl_multi_strerror(CURLMcode error)
|
||||
{
|
||||
switch (error)
|
||||
{
|
||||
case CURLM_CALL_MULTI_PERFORM:
|
||||
return "please call curl_multi_perform() soon";
|
||||
|
||||
case CURLM_OK:
|
||||
return "no error";
|
||||
|
||||
case CURLM_BAD_HANDLE:
|
||||
return "CURLM not valid multi handle";
|
||||
|
||||
case CURLM_BAD_EASY_HANDLE:
|
||||
return "CURLM not valid easy handle";
|
||||
|
||||
case CURLM_OUT_OF_MEMORY:
|
||||
return "CURLM libcurl out of memory";
|
||||
|
||||
case CURLM_INTERNAL_ERROR:
|
||||
return "CURLM libcurl internal bug";
|
||||
|
||||
case CURLM_LAST:
|
||||
break;
|
||||
}
|
||||
|
||||
return "CURLMcode unknown";
|
||||
}
|
||||
|
||||
const char *
|
||||
curl_share_strerror(CURLSHcode error)
|
||||
{
|
||||
switch (error)
|
||||
{
|
||||
case CURLSHE_OK:
|
||||
return "no error";
|
||||
|
||||
case CURLSHE_BAD_OPTION:
|
||||
return "CURLSH bad option";
|
||||
|
||||
case CURLSHE_IN_USE:
|
||||
return "CURLSH in use";
|
||||
|
||||
case CURLSHE_INVALID:
|
||||
return "CURLSH invalid";
|
||||
|
||||
case CURLSHE_LAST:
|
||||
break;
|
||||
}
|
||||
|
||||
return "CURLSH unknown";
|
||||
}
|
||||
@@ -387,6 +387,22 @@ SOURCE=.\http_digest.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\http_ntlm.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\http_ntlm.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inet_pton.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inet_pton.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\md5.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -198,8 +198,12 @@ CURL *curl_easy_init(void)
|
||||
struct SessionHandle *data;
|
||||
|
||||
/* Make sure we inited the global SSL stuff */
|
||||
if (!initialized)
|
||||
curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||
if (!initialized) {
|
||||
res = curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||
if(res)
|
||||
/* something in the global init failed, return nothing */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* We use curl_open() with undefined URL so far */
|
||||
res = Curl_open(&data);
|
||||
|
||||
@@ -242,7 +242,7 @@ CURLcode Curl_file(struct connectdata *conn)
|
||||
it avoids problems with select() and recv() on file descriptors
|
||||
in Winsock */
|
||||
if(fstated)
|
||||
Curl_pgrsSetDownloadSize(data, (double)expected_size);
|
||||
Curl_pgrsSetDownloadSize(data, expected_size);
|
||||
|
||||
if(conn->resume_from)
|
||||
lseek(fd, conn->resume_from, SEEK_SET);
|
||||
@@ -268,7 +268,7 @@ CURLcode Curl_file(struct connectdata *conn)
|
||||
if(res)
|
||||
return res;
|
||||
|
||||
Curl_pgrsSetDownloadCounter(data, (double)bytecount);
|
||||
Curl_pgrsSetDownloadCounter(data, bytecount);
|
||||
|
||||
if(Curl_pgrsUpdate(conn))
|
||||
res = CURLE_ABORTED_BY_CALLBACK;
|
||||
|
||||
@@ -1100,7 +1100,7 @@ void curl_formfree(struct curl_httppost *form)
|
||||
|
||||
CURLcode Curl_getFormData(struct FormData **finalform,
|
||||
struct curl_httppost *post,
|
||||
size_t *sizep)
|
||||
curl_off_t *sizep)
|
||||
{
|
||||
struct FormData *form = NULL;
|
||||
struct FormData *firstform;
|
||||
|
||||
@@ -57,7 +57,7 @@ int Curl_FormInit(struct Form *form, struct FormData *formdata );
|
||||
CURLcode
|
||||
Curl_getFormData(struct FormData **,
|
||||
struct curl_httppost *post,
|
||||
size_t *size);
|
||||
curl_off_t *size);
|
||||
|
||||
/* fread() emulation */
|
||||
size_t Curl_FormReader(char *buffer,
|
||||
|
||||
26
lib/ftp.c
26
lib/ftp.c
@@ -65,6 +65,11 @@
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
|
||||
#undef in_addr_t
|
||||
#define in_addr_t unsigned long
|
||||
#endif
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include "urldata.h"
|
||||
#include "sendf.h"
|
||||
@@ -166,7 +171,7 @@ static CURLcode AllowServerConnect(struct connectdata *conn)
|
||||
default:
|
||||
/* we have received data here */
|
||||
{
|
||||
int s;
|
||||
curl_socket_t s;
|
||||
size_t size = sizeof(struct sockaddr_in);
|
||||
struct sockaddr_in add;
|
||||
|
||||
@@ -175,7 +180,7 @@ static CURLcode AllowServerConnect(struct connectdata *conn)
|
||||
|
||||
sclose(sock); /* close the first socket */
|
||||
|
||||
if (-1 == s) {
|
||||
if (CURL_SOCKET_BAD == s) {
|
||||
/* DIE! */
|
||||
failf(data, "Error accept()ing server connect");
|
||||
return CURLE_FTP_PORT_FAILED;
|
||||
@@ -766,7 +771,7 @@ CURLcode Curl_ftp_done(struct connectdata *conn)
|
||||
#endif
|
||||
/* shut down the socket to inform the server we're done */
|
||||
sclose(conn->sock[SECONDARYSOCKET]);
|
||||
conn->sock[SECONDARYSOCKET] = -1;
|
||||
conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
|
||||
|
||||
if(!ftp->no_transfer) {
|
||||
/* Let's see what the server says about the transfer we just performed,
|
||||
@@ -1122,9 +1127,9 @@ CURLcode ftp_use_port(struct connectdata *conn)
|
||||
|
||||
struct sockaddr *sa=(struct sockaddr *)&ss;
|
||||
#ifdef NI_WITHSCOPEID
|
||||
const int niflags = NI_NUMERICHOST | NI_NUMERICSERV | NI_WITHSCOPEID;
|
||||
#define NIFLAGS NI_NUMERICHOST | NI_NUMERICSERV | NI_WITHSCOPEID
|
||||
#else
|
||||
const int niflags = NI_NUMERICHOST | NI_NUMERICSERV;
|
||||
#define NIFLAGS NI_NUMERICHOST | NI_NUMERICSERV
|
||||
#endif
|
||||
unsigned char *ap;
|
||||
unsigned char *pp;
|
||||
@@ -1146,7 +1151,7 @@ CURLcode ftp_use_port(struct connectdata *conn)
|
||||
}
|
||||
|
||||
rc = getnameinfo((struct sockaddr *)&ss, sslen, hbuf, sizeof(hbuf), NULL, 0,
|
||||
niflags);
|
||||
NIFLAGS);
|
||||
if(rc) {
|
||||
failf(data, "getnameinfo() returned %d\n", rc);
|
||||
return CURLE_FTP_PORT_FAILED;
|
||||
@@ -1236,7 +1241,8 @@ CURLcode ftp_use_port(struct connectdata *conn)
|
||||
if (eprtaf < 0)
|
||||
continue;
|
||||
if (getnameinfo((struct sockaddr *)&ss, sslen,
|
||||
portmsgbuf, sizeof(portmsgbuf), tmp, sizeof(tmp), niflags))
|
||||
portmsgbuf, sizeof(portmsgbuf), tmp, sizeof(tmp),
|
||||
NIFLAGS))
|
||||
continue;
|
||||
|
||||
/* do not transmit IPv6 scope identifier to the wire */
|
||||
@@ -1820,7 +1826,7 @@ CURLcode Curl_ftp_nextconnect(struct connectdata *conn)
|
||||
/* When we know we're uploading a specified file, we can get the file
|
||||
size prior to the actual upload. */
|
||||
|
||||
Curl_pgrsSetUploadSize(data, (double)data->set.infilesize);
|
||||
Curl_pgrsSetUploadSize(data, data->set.infilesize);
|
||||
|
||||
result = Curl_Transfer(conn, -1, -1, FALSE, NULL, /* no download */
|
||||
SECONDARYSOCKET, bytecountp);
|
||||
@@ -2378,10 +2384,10 @@ CURLcode Curl_ftp(struct connectdata *conn)
|
||||
if(connected)
|
||||
retcode = Curl_ftp_nextconnect(conn);
|
||||
|
||||
if(retcode && (conn->sock[SECONDARYSOCKET] >= 0)) {
|
||||
if(retcode && (conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD)) {
|
||||
/* Failure detected, close the second socket if it was created already */
|
||||
sclose(conn->sock[SECONDARYSOCKET]);
|
||||
conn->sock[SECONDARYSOCKET] = -1;
|
||||
conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
|
||||
}
|
||||
|
||||
if(ftp->no_transfer)
|
||||
|
||||
@@ -135,25 +135,25 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
|
||||
*param_doublep = data->progress.t_starttransfer;
|
||||
break;
|
||||
case CURLINFO_SIZE_UPLOAD:
|
||||
*param_doublep = data->progress.uploaded;
|
||||
*param_doublep = (double)data->progress.uploaded;
|
||||
break;
|
||||
case CURLINFO_SIZE_DOWNLOAD:
|
||||
*param_doublep = data->progress.downloaded;
|
||||
*param_doublep = (double)data->progress.downloaded;
|
||||
break;
|
||||
case CURLINFO_SPEED_DOWNLOAD:
|
||||
*param_doublep = data->progress.dlspeed;
|
||||
*param_doublep = (double)data->progress.dlspeed;
|
||||
break;
|
||||
case CURLINFO_SPEED_UPLOAD:
|
||||
*param_doublep = data->progress.ulspeed;
|
||||
*param_doublep = (double)data->progress.ulspeed;
|
||||
break;
|
||||
case CURLINFO_SSL_VERIFYRESULT:
|
||||
*param_longp = data->set.ssl.certverifyresult;
|
||||
break;
|
||||
case CURLINFO_CONTENT_LENGTH_DOWNLOAD:
|
||||
*param_doublep = data->progress.size_dl;
|
||||
*param_doublep = (double)data->progress.size_dl;
|
||||
break;
|
||||
case CURLINFO_CONTENT_LENGTH_UPLOAD:
|
||||
*param_doublep = data->progress.size_ul;
|
||||
*param_doublep = (double)data->progress.size_ul;
|
||||
break;
|
||||
case CURLINFO_REDIRECT_TIME:
|
||||
*param_doublep = data->progress.t_redirect;
|
||||
|
||||
@@ -60,6 +60,11 @@
|
||||
#include <setjmp.h>
|
||||
#endif
|
||||
|
||||
#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
|
||||
#undef in_addr_t
|
||||
#define in_addr_t unsigned long
|
||||
#endif
|
||||
|
||||
#include "urldata.h"
|
||||
#include "sendf.h"
|
||||
#include "hostip.h"
|
||||
|
||||
27
lib/http.c
27
lib/http.c
@@ -456,9 +456,9 @@ static size_t readmoredata(char *buffer,
|
||||
/* make sure that a HTTP request is never sent away chunked! */
|
||||
conn->bits.forbidchunk= (http->sending == HTTPSEND_REQUEST)?TRUE:FALSE;
|
||||
|
||||
if(http->postsize <= fullsize) {
|
||||
memcpy(buffer, http->postdata, http->postsize);
|
||||
fullsize = http->postsize;
|
||||
if(http->postsize <= (curl_off_t)fullsize) {
|
||||
memcpy(buffer, http->postdata, (size_t)http->postsize);
|
||||
fullsize = (size_t)http->postsize;
|
||||
|
||||
if(http->backup.postsize) {
|
||||
/* move backup data into focus and continue on that */
|
||||
@@ -750,7 +750,7 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn,
|
||||
fd_set readfd;
|
||||
char *line_start;
|
||||
char *host_port;
|
||||
int tunnelsocket = conn->sock[sockindex];
|
||||
curl_socket_t tunnelsocket = conn->sock[sockindex];
|
||||
|
||||
#define SELECT_OK 0
|
||||
#define SELECT_ERROR 1
|
||||
@@ -1333,7 +1333,7 @@ CURLcode Curl_http(struct connectdata *conn)
|
||||
|
||||
send_buffer *req_buffer;
|
||||
struct curl_slist *headers=data->set.headers;
|
||||
size_t postsize;
|
||||
curl_off_t postsize; /* off_t type to be able to hold a large file size */
|
||||
|
||||
/* initialize a dynamic send-buffer */
|
||||
req_buffer = add_buffer_init();
|
||||
@@ -1487,7 +1487,7 @@ CURLcode Curl_http(struct connectdata *conn)
|
||||
if(!conn->bits.upload_chunky)
|
||||
/* only add Content-Length if not uploading chunked */
|
||||
add_bufferf(req_buffer,
|
||||
"Content-Length: %d\r\n", http->postsize);
|
||||
"Content-Length: %" FORMAT_OFF_T "\r\n", http->postsize);
|
||||
|
||||
if(!checkheaders(data, "Expect:")) {
|
||||
/* if not disabled explicitly we add a Expect: 100-continue
|
||||
@@ -1563,7 +1563,7 @@ CURLcode Curl_http(struct connectdata *conn)
|
||||
add_buffer(req_buffer, "\r\n", 2); /* end of headers */
|
||||
|
||||
/* set the upload size to the progress meter */
|
||||
Curl_pgrsSetUploadSize(data, (double)data->set.infilesize);
|
||||
Curl_pgrsSetUploadSize(data, data->set.infilesize);
|
||||
|
||||
/* this sends the buffer and frees all the buffer resources */
|
||||
result = add_buffer_send(req_buffer, conn,
|
||||
@@ -1586,7 +1586,7 @@ CURLcode Curl_http(struct connectdata *conn)
|
||||
/* store the size of the postfields */
|
||||
postsize = data->set.postfieldsize?
|
||||
data->set.postfieldsize:
|
||||
(data->set.postfields?strlen(data->set.postfields):0);
|
||||
(data->set.postfields?(curl_off_t)strlen(data->set.postfields):0);
|
||||
|
||||
if(!conn->bits.upload_chunky) {
|
||||
/* We only set Content-Length and allow a custom Content-Length if
|
||||
@@ -1596,7 +1596,8 @@ CURLcode Curl_http(struct connectdata *conn)
|
||||
if(!checkheaders(data, "Content-Length:"))
|
||||
/* we allow replacing this header, although it isn't very wise to
|
||||
actually set your own */
|
||||
add_bufferf(req_buffer, "Content-Length: %d\r\n", postsize);
|
||||
add_bufferf(req_buffer, "Content-Length: %" FORMAT_OFF_T"\r\n",
|
||||
postsize);
|
||||
}
|
||||
|
||||
if(!checkheaders(data, "Content-Type:"))
|
||||
@@ -1619,11 +1620,11 @@ CURLcode Curl_http(struct connectdata *conn)
|
||||
if(!conn->bits.upload_chunky)
|
||||
/* We're not sending it 'chunked', append it to the request
|
||||
already now to reduce the number if send() calls */
|
||||
add_buffer(req_buffer, data->set.postfields, postsize);
|
||||
add_buffer(req_buffer, data->set.postfields, (size_t)postsize);
|
||||
else {
|
||||
/* Append the POST data chunky-style */
|
||||
add_bufferf(req_buffer, "%x\r\n", postsize);
|
||||
add_buffer(req_buffer, data->set.postfields, postsize);
|
||||
add_bufferf(req_buffer, "%x\r\n", (int)postsize);
|
||||
add_buffer(req_buffer, data->set.postfields, (size_t)postsize);
|
||||
add_buffer(req_buffer, "\r\n0\r\n\r\n", 7); /* end of a chunked
|
||||
transfer stream */
|
||||
}
|
||||
@@ -1657,7 +1658,7 @@ CURLcode Curl_http(struct connectdata *conn)
|
||||
add_buffer(req_buffer, "\r\n", 2); /* end of headers! */
|
||||
|
||||
/* set the upload size to the progress meter */
|
||||
Curl_pgrsSetUploadSize(data, (double)data->set.infilesize);
|
||||
Curl_pgrsSetUploadSize(data, data->set.infilesize);
|
||||
|
||||
/* set the pointer to mark that we will send the post body using
|
||||
the read callback */
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#endif
|
||||
|
||||
#if !defined(WIN32) && !defined(__BEOS__) && !defined(__CYGWIN32__) && \
|
||||
!defined(__riscos__) && !defined(__INTERIX)
|
||||
!defined(__riscos__) && !defined(__INTERIX) && !defined(NETWARE)
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
@@ -125,5 +125,8 @@ char *Curl_if2ip(char *interface, char *buf, int buf_size)
|
||||
|
||||
/* -- end of if2ip() -- */
|
||||
#else
|
||||
#define if2ip(x) NULL
|
||||
char *Curl_if2ip(char *interface, char *buf, int buf_size)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
44
lib/libcurl.imp
Normal file
44
lib/libcurl.imp
Normal file
@@ -0,0 +1,44 @@
|
||||
#
|
||||
# Definition file for the NLM version of the LIBCURL library from curl
|
||||
#
|
||||
# (LIBCURL)
|
||||
curl_easy_cleanup,
|
||||
curl_easy_getinfo,
|
||||
curl_easy_init,
|
||||
curl_easy_perform,
|
||||
curl_easy_setopt,
|
||||
curl_escape,
|
||||
curl_unescape,
|
||||
curl_formparse,
|
||||
curl_formfree,
|
||||
curl_getdate,
|
||||
curl_getenv,
|
||||
curl_global_cleanup,
|
||||
curl_global_init,
|
||||
curl_slist_append,
|
||||
curl_slist_free_all,
|
||||
curl_version,
|
||||
curl_maprintf,
|
||||
curl_mfprintf,
|
||||
curl_mprintf,
|
||||
curl_msprintf,
|
||||
curl_msnprintf,
|
||||
curl_mvfprintf,
|
||||
curl_strequal,
|
||||
curl_strnequal,
|
||||
curl_easy_duphandle,
|
||||
curl_formadd,
|
||||
curl_multi_init,
|
||||
curl_multi_add_handle,
|
||||
curl_multi_remove_handle,
|
||||
curl_multi_fdset,
|
||||
curl_multi_perform,
|
||||
curl_multi_cleanup,
|
||||
curl_multi_info_read,
|
||||
curl_free,
|
||||
curl_version_info,
|
||||
curl_share_init,
|
||||
curl_share_setopt,
|
||||
curl_share_cleanup
|
||||
|
||||
|
||||
@@ -279,8 +279,8 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle,
|
||||
FD_SET(sockfd, write_fd_set);
|
||||
}
|
||||
|
||||
if(sockfd > *max_fd)
|
||||
*max_fd = sockfd;
|
||||
if((int)sockfd > *max_fd)
|
||||
*max_fd = (int)sockfd;
|
||||
}
|
||||
break;
|
||||
case CURLM_STATE_PERFORM:
|
||||
@@ -486,7 +486,7 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
|
||||
* possibly know if the connection is in a good shape or not now. */
|
||||
easy->easy_conn->bits.close = TRUE;
|
||||
|
||||
if(-1 !=easy->easy_conn->sock[SECONDARYSOCKET]) {
|
||||
if(CURL_SOCKET_BAD != easy->easy_conn->sock[SECONDARYSOCKET]) {
|
||||
/* if we failed anywhere, we must clean up the secondary socket if
|
||||
it was used */
|
||||
sclose(easy->easy_conn->sock[SECONDARYSOCKET]);
|
||||
|
||||
326
lib/nwlib.c
Normal file
326
lib/nwlib.c
Normal file
@@ -0,0 +1,326 @@
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, 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$
|
||||
***************************************************************************/
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <library.h>
|
||||
#include <netware.h>
|
||||
#include <screen.h>
|
||||
#include <nks/thread.h>
|
||||
#include <nks/synch.h>
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int _errno;
|
||||
void *twentybytes;
|
||||
} libthreaddata_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
void *tenbytes;
|
||||
NXKey_t perthreadkey; /* if -1, no key obtained... */
|
||||
NXMutex_t *lock;
|
||||
} libdata_t;
|
||||
|
||||
int gLibId = -1;
|
||||
void *gLibHandle = (void *) NULL;
|
||||
rtag_t gAllocTag = (rtag_t) NULL;
|
||||
NXMutex_t *gLibLock = (NXMutex_t *) NULL;
|
||||
|
||||
/* internal library function prototypes... */
|
||||
int DisposeLibraryData ( void * );
|
||||
void DisposeThreadData ( void * );
|
||||
int GetOrSetUpData ( int id, libdata_t **data, libthreaddata_t **threaddata );
|
||||
|
||||
|
||||
int _NonAppStart
|
||||
(
|
||||
void *NLMHandle,
|
||||
void *errorScreen,
|
||||
const char *cmdLine,
|
||||
const char *loadDirPath,
|
||||
size_t uninitializedDataLength,
|
||||
void *NLMFileHandle,
|
||||
int (*readRoutineP)( int conn, void *fileHandle, size_t offset,
|
||||
size_t nbytes, size_t *bytesRead, void *buffer ),
|
||||
size_t customDataOffset,
|
||||
size_t customDataSize,
|
||||
int messageCount,
|
||||
const char **messages
|
||||
)
|
||||
{
|
||||
NX_LOCK_INFO_ALLOC(liblock, "Per-Application Data Lock", 0);
|
||||
|
||||
#ifndef __GNUC__
|
||||
#pragma unused(cmdLine)
|
||||
#pragma unused(loadDirPath)
|
||||
#pragma unused(uninitializedDataLength)
|
||||
#pragma unused(NLMFileHandle)
|
||||
#pragma unused(readRoutineP)
|
||||
#pragma unused(customDataOffset)
|
||||
#pragma unused(customDataSize)
|
||||
#pragma unused(messageCount)
|
||||
#pragma unused(messages)
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Here we process our command line, post errors (to the error screen),
|
||||
** perform initializations and anything else we need to do before being able
|
||||
** to accept calls into us. If we succeed, we return non-zero and the NetWare
|
||||
** Loader will leave us up, otherwise we fail to load and get dumped.
|
||||
*/
|
||||
gAllocTag = AllocateResourceTag(NLMHandle,
|
||||
"<library-name> memory allocations", AllocSignature);
|
||||
|
||||
if (!gAllocTag)
|
||||
{
|
||||
OutputToScreen(errorScreen, "Unable to allocate resource tag for "
|
||||
"library memory allocations.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
gLibId = register_library(DisposeLibraryData);
|
||||
|
||||
if (gLibId < -1)
|
||||
{
|
||||
OutputToScreen(errorScreen, "Unable to register library with kernel.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
gLibHandle = NLMHandle;
|
||||
|
||||
gLibLock = NXMutexAlloc(0, 0, &liblock);
|
||||
|
||||
if (!gLibLock)
|
||||
{
|
||||
OutputToScreen(errorScreen, "Unable to allocate library data lock.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
** Here we clean up any resources we allocated. Resource tags is a big part
|
||||
** of what we created, but NetWare doesn't ask us to free those.
|
||||
*/
|
||||
void _NonAppStop( void )
|
||||
{
|
||||
(void) unregister_library(gLibId);
|
||||
NXMutexFree(gLibLock);
|
||||
}
|
||||
|
||||
/*
|
||||
** This function cannot be the first in the file for if the file is linked
|
||||
** first, then the check-unload function's offset will be nlmname.nlm+0
|
||||
** which is how to tell that there isn't one. When the check function is
|
||||
** first in the linked objects, it is ambiguous. For this reason, we will
|
||||
** put it inside this file after the stop function.
|
||||
**
|
||||
** Here we check to see if it's alright to ourselves to be unloaded. If not,
|
||||
** we return a non-zero value. Right now, there isn't any reason not to allow
|
||||
** it.
|
||||
*/
|
||||
int _NonAppCheckUnload( void )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int GetOrSetUpData
|
||||
(
|
||||
int id,
|
||||
libdata_t **appData,
|
||||
libthreaddata_t **threadData
|
||||
)
|
||||
{
|
||||
int err;
|
||||
libdata_t *app_data;
|
||||
libthreaddata_t *thread_data;
|
||||
NXKey_t key;
|
||||
NX_LOCK_INFO_ALLOC(liblock, "Application Data Lock", 0);
|
||||
|
||||
err = 0;
|
||||
thread_data = (libthreaddata_t *) NULL;
|
||||
|
||||
/*
|
||||
** Attempt to get our data for the application calling us. This is where we
|
||||
** store whatever application-specific information we need to carry in support
|
||||
** of calling applications.
|
||||
*/
|
||||
app_data = (libdata_t *) get_app_data(id);
|
||||
|
||||
if (!app_data)
|
||||
{
|
||||
/*
|
||||
** This application hasn't called us before; set up application AND per-thread
|
||||
** data. Of course, just in case a thread from this same application is calling
|
||||
** us simultaneously, we better lock our application data-creation mutex. We
|
||||
** also need to recheck for data after we acquire the lock because WE might be
|
||||
** that other thread that was too late to create the data and the first thread
|
||||
** in will have created it.
|
||||
*/
|
||||
NXLock(gLibLock);
|
||||
|
||||
if (!(app_data = (libdata_t *) get_app_data(id)))
|
||||
{
|
||||
app_data = (libdata_t *) malloc(sizeof(libdata_t));
|
||||
|
||||
if (app_data)
|
||||
{
|
||||
memset(app_data, 0, sizeof(libdata_t));
|
||||
|
||||
app_data->tenbytes = malloc(10);
|
||||
app_data->lock = NXMutexAlloc(0, 0, &liblock);
|
||||
|
||||
if (!app_data->tenbytes || !app_data->lock)
|
||||
{
|
||||
if (app_data->lock)
|
||||
NXMutexFree(app_data->lock);
|
||||
|
||||
free(app_data);
|
||||
app_data = (libdata_t *) NULL;
|
||||
err = ENOMEM;
|
||||
}
|
||||
|
||||
if (app_data)
|
||||
{
|
||||
/*
|
||||
** Here we burn in the application data that we were trying to get by calling
|
||||
** get_app_data(). Next time we call the first function, we'll get this data
|
||||
** we're just now setting. We also go on here to establish the per-thread data
|
||||
** for the calling thread, something we'll have to do on each application
|
||||
** thread the first time it calls us.
|
||||
*/
|
||||
err = set_app_data(gLibId, app_data);
|
||||
|
||||
if (err)
|
||||
{
|
||||
free(app_data);
|
||||
app_data = (libdata_t *) NULL;
|
||||
err = ENOMEM;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* create key for thread-specific data... */
|
||||
err = NXKeyCreate(DisposeThreadData, (void *) NULL, &key);
|
||||
|
||||
if (err) /* (no more keys left?) */
|
||||
key = -1;
|
||||
|
||||
app_data->perthreadkey = key;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NXUnlock(gLibLock);
|
||||
}
|
||||
|
||||
if (app_data)
|
||||
{
|
||||
key = app_data->perthreadkey;
|
||||
|
||||
if ( key != -1 /* couldn't create a key? no thread data */
|
||||
&& !(err = NXKeyGetValue(key, (void **) &thread_data))
|
||||
&& !thread_data)
|
||||
{
|
||||
/*
|
||||
** Allocate the per-thread data for the calling thread. Regardless of whether
|
||||
** there was already application data or not, this may be the first call by a
|
||||
** a new thread. The fact that we allocation 20 bytes on a pointer is not very
|
||||
** important, this just helps to demonstrate that we can have arbitrarily
|
||||
** complex per-thread data.
|
||||
*/
|
||||
thread_data = (libthreaddata_t *) malloc(sizeof(libthreaddata_t));
|
||||
|
||||
if (thread_data)
|
||||
{
|
||||
thread_data->_errno = 0;
|
||||
thread_data->twentybytes = malloc(20);
|
||||
|
||||
if (!thread_data->twentybytes)
|
||||
{
|
||||
free(thread_data);
|
||||
thread_data = (libthreaddata_t *) NULL;
|
||||
err = ENOMEM;
|
||||
}
|
||||
|
||||
if ((err = NXKeySetValue(key, thread_data)))
|
||||
{
|
||||
free(thread_data->twentybytes);
|
||||
free(thread_data);
|
||||
thread_data = (libthreaddata_t *) NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (appData)
|
||||
*appData = app_data;
|
||||
|
||||
if (threadData)
|
||||
*threadData = thread_data;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
int DisposeLibraryData
|
||||
(
|
||||
void *data
|
||||
)
|
||||
{
|
||||
if (data)
|
||||
{
|
||||
void *tenbytes = ((libdata_t *) data)->tenbytes;
|
||||
|
||||
if (tenbytes)
|
||||
free(tenbytes);
|
||||
|
||||
free(data);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DisposeThreadData
|
||||
(
|
||||
void *data
|
||||
)
|
||||
{
|
||||
if (data)
|
||||
{
|
||||
void *twentybytes = ((libthreaddata_t *) data)->twentybytes;
|
||||
|
||||
if (twentybytes)
|
||||
free(twentybytes);
|
||||
|
||||
free(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,34 +53,36 @@ static void time2str(char *r, int t)
|
||||
|
||||
/* The point of this function would be to return a string of the input data,
|
||||
but never longer than 5 columns. Add suffix k, M, G when suitable... */
|
||||
static char *max5data(double bytes, char *max5)
|
||||
static char *max5data(curl_off_t bytes, char *max5)
|
||||
{
|
||||
#define ONE_KILOBYTE 1024
|
||||
#define ONE_MEGABYTE (1024*1024)
|
||||
#define ONE_GIGABYTE (1024*1024*1024)
|
||||
|
||||
if(bytes < 100000) {
|
||||
sprintf(max5, "%5" FORMAT_OFF_T, (curl_off_t)bytes);
|
||||
return max5;
|
||||
sprintf(max5, "%5" FORMAT_OFF_T, bytes);
|
||||
}
|
||||
if(bytes < (10000*ONE_KILOBYTE)) {
|
||||
sprintf(max5, "%4" FORMAT_OFF_T "k", (curl_off_t)bytes/ONE_KILOBYTE);
|
||||
return max5;
|
||||
else if(bytes < (10000*ONE_KILOBYTE)) {
|
||||
sprintf(max5, "%4" FORMAT_OFF_T "k", (curl_off_t)(bytes/ONE_KILOBYTE));
|
||||
}
|
||||
if(bytes < (100*ONE_MEGABYTE)) {
|
||||
else if(bytes < (100*ONE_MEGABYTE)) {
|
||||
/* 'XX.XM' is good as long as we're less than 100 megs */
|
||||
sprintf(max5, "%4.1fM", bytes/ONE_MEGABYTE);
|
||||
return max5;
|
||||
sprintf(max5, "%2d.%0dM",
|
||||
(int)(bytes/ONE_MEGABYTE),
|
||||
(int)(bytes%ONE_MEGABYTE)/(ONE_MEGABYTE/10) );
|
||||
}
|
||||
#if SIZEOF_CURL_OFF_T > 4
|
||||
if((curl_off_t)bytes < ((curl_off_t)10000*ONE_MEGABYTE)) {
|
||||
sprintf(max5, "%4" FORMAT_OFF_T "M", (curl_off_t)bytes/ONE_MEGABYTE);
|
||||
return max5;
|
||||
else if(bytes < ((curl_off_t)10000*ONE_MEGABYTE)) {
|
||||
sprintf(max5, "%4" FORMAT_OFF_T "M", (curl_off_t)(bytes/ONE_MEGABYTE));
|
||||
}
|
||||
else
|
||||
/* 10000 MB - 8589934587 GB !! */
|
||||
sprintf(max5, "%4.1fG", bytes/ONE_GIGABYTE);
|
||||
sprintf(max5, "%2d.%0dG",
|
||||
(int)(bytes/ONE_GIGABYTE),
|
||||
(int)(bytes%ONE_GIGABYTE)/(ONE_GIGABYTE/10) );
|
||||
#else
|
||||
sprintf(max5, "%4" FORMAT_OFF_T "M", (curl_off_t)bytes/ONE_MEGABYTE);
|
||||
else
|
||||
sprintf(max5, "%4" FORMAT_OFF_T "M", (curl_off_t)(bytes/ONE_MEGABYTE));
|
||||
#endif
|
||||
|
||||
return max5;
|
||||
@@ -165,17 +167,17 @@ void Curl_pgrsStartNow(struct SessionHandle *data)
|
||||
data->progress.start = Curl_tvnow();
|
||||
}
|
||||
|
||||
void Curl_pgrsSetDownloadCounter(struct SessionHandle *data, double size)
|
||||
void Curl_pgrsSetDownloadCounter(struct SessionHandle *data, curl_off_t size)
|
||||
{
|
||||
data->progress.downloaded = size;
|
||||
}
|
||||
|
||||
void Curl_pgrsSetUploadCounter(struct SessionHandle *data, double size)
|
||||
void Curl_pgrsSetUploadCounter(struct SessionHandle *data, curl_off_t size)
|
||||
{
|
||||
data->progress.uploaded = size;
|
||||
}
|
||||
|
||||
void Curl_pgrsSetDownloadSize(struct SessionHandle *data, double size)
|
||||
void Curl_pgrsSetDownloadSize(struct SessionHandle *data, curl_off_t size)
|
||||
{
|
||||
data->progress.size_dl = size;
|
||||
if(size > 0)
|
||||
@@ -184,7 +186,7 @@ void Curl_pgrsSetDownloadSize(struct SessionHandle *data, double size)
|
||||
data->progress.flags &= ~PGRS_DL_SIZE_KNOWN;
|
||||
}
|
||||
|
||||
void Curl_pgrsSetUploadSize(struct SessionHandle *data, double size)
|
||||
void Curl_pgrsSetUploadSize(struct SessionHandle *data, curl_off_t size)
|
||||
{
|
||||
data->progress.size_ul = size;
|
||||
if(size > 0)
|
||||
@@ -211,8 +213,8 @@ int Curl_pgrsUpdate(struct connectdata *conn)
|
||||
double ulpercen=0;
|
||||
double total_percen=0;
|
||||
|
||||
double total_transfer;
|
||||
double total_expected_transfer;
|
||||
curl_off_t total_transfer;
|
||||
curl_off_t total_expected_transfer;
|
||||
double timespent;
|
||||
|
||||
struct SessionHandle *data = conn->data;
|
||||
@@ -324,10 +326,10 @@ int Curl_pgrsUpdate(struct connectdata *conn)
|
||||
/* There's a callback set, so we call that instead of writing
|
||||
anything ourselves. This really is the way to go. */
|
||||
result= data->set.fprogress(data->set.progress_client,
|
||||
data->progress.size_dl,
|
||||
data->progress.downloaded,
|
||||
data->progress.size_ul,
|
||||
data->progress.uploaded);
|
||||
(double)data->progress.size_dl,
|
||||
(double)data->progress.downloaded,
|
||||
(double)data->progress.size_ul,
|
||||
(double)data->progress.uploaded);
|
||||
if(result)
|
||||
failf(data, "Callback aborted");
|
||||
return result;
|
||||
@@ -336,15 +338,15 @@ int Curl_pgrsUpdate(struct connectdata *conn)
|
||||
/* Figure out the estimated time of arrival for the upload */
|
||||
if((data->progress.flags & PGRS_UL_SIZE_KNOWN) &&
|
||||
(data->progress.ulspeed > 0)) {
|
||||
ulestimate = data->progress.size_ul / data->progress.ulspeed;
|
||||
ulpercen = (data->progress.uploaded / data->progress.size_ul)*100;
|
||||
ulestimate = (double)data->progress.size_ul / data->progress.ulspeed;
|
||||
ulpercen = ((double)data->progress.uploaded / data->progress.size_ul)*100;
|
||||
}
|
||||
|
||||
/* ... and the download */
|
||||
if((data->progress.flags & PGRS_DL_SIZE_KNOWN) &&
|
||||
(data->progress.dlspeed > 0)) {
|
||||
dlestimate = data->progress.size_dl / data->progress.dlspeed;
|
||||
dlpercen = (data->progress.downloaded / data->progress.size_dl)*100;
|
||||
dlestimate = (double)data->progress.size_dl / data->progress.dlspeed;
|
||||
dlpercen = ((double)data->progress.downloaded / data->progress.size_dl)*100;
|
||||
}
|
||||
|
||||
/* Now figure out which of them that is slower and use for the for
|
||||
@@ -378,7 +380,7 @@ int Curl_pgrsUpdate(struct connectdata *conn)
|
||||
|
||||
/* Get the percentage of data transfered so far */
|
||||
if(total_expected_transfer > 0)
|
||||
total_percen=(double)(total_transfer/total_expected_transfer)*100;
|
||||
total_percen=((double)total_transfer/total_expected_transfer)*100;
|
||||
|
||||
fprintf(data->set.err,
|
||||
"\r%3d %s %3d %s %3d %s %s %s %s %s %s %s",
|
||||
|
||||
@@ -40,10 +40,10 @@ typedef enum {
|
||||
|
||||
void Curl_pgrsDone(struct connectdata *);
|
||||
void Curl_pgrsStartNow(struct SessionHandle *data);
|
||||
void Curl_pgrsSetDownloadSize(struct SessionHandle *data, double size);
|
||||
void Curl_pgrsSetUploadSize(struct SessionHandle *data, double size);
|
||||
void Curl_pgrsSetDownloadCounter(struct SessionHandle *data, double size);
|
||||
void Curl_pgrsSetUploadCounter(struct SessionHandle *data, double size);
|
||||
void Curl_pgrsSetDownloadSize(struct SessionHandle *data, curl_off_t size);
|
||||
void Curl_pgrsSetUploadSize(struct SessionHandle *data, curl_off_t size);
|
||||
void Curl_pgrsSetDownloadCounter(struct SessionHandle *data, curl_off_t size);
|
||||
void Curl_pgrsSetUploadCounter(struct SessionHandle *data, curl_off_t size);
|
||||
int Curl_pgrsUpdate(struct connectdata *);
|
||||
void Curl_pgrsResetTimes(struct SessionHandle *data);
|
||||
void Curl_pgrsTime(struct SessionHandle *data, timerid timer);
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
* $Id$
|
||||
***************************************************************************/
|
||||
|
||||
CURLcode Curl_sendf(int fd, struct connectdata *, const char *fmt, ...);
|
||||
CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *,
|
||||
const char *fmt, ...);
|
||||
void Curl_infof(struct SessionHandle *, const char *fmt, ...);
|
||||
void Curl_failf(struct SessionHandle *, const char *fmt, ...);
|
||||
|
||||
@@ -42,7 +43,8 @@ int Curl_read(struct connectdata *conn, curl_socket_t sockfd,
|
||||
char *buf, size_t buffersize,
|
||||
ssize_t *n);
|
||||
/* internal write-function, does plain socket, SSL and krb4 */
|
||||
CURLcode Curl_write(struct connectdata *conn, int sockfd,
|
||||
CURLcode Curl_write(struct connectdata *conn,
|
||||
curl_socket_t sockfd,
|
||||
void *mem, size_t len,
|
||||
ssize_t *written);
|
||||
|
||||
|
||||
@@ -50,6 +50,10 @@
|
||||
/* hand-modified VMS config.h! */
|
||||
#include "config-vms.h"
|
||||
#endif
|
||||
#ifdef NETWARE
|
||||
/* hand-modified NetWare config.h! */
|
||||
#include "config-netware.h"
|
||||
#endif
|
||||
#ifdef macintosh
|
||||
/* hand-modified MacOS config.h! */
|
||||
#include "config-mac.h"
|
||||
@@ -290,4 +294,8 @@ typedef struct in_addr Curl_ipconnect;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef NETWARE
|
||||
#undef HAVE_ALARM
|
||||
#endif
|
||||
|
||||
#endif /* __CONFIG_H */
|
||||
|
||||
@@ -1169,7 +1169,7 @@ Curl_SSLConnect(struct connectdata *conn,
|
||||
return CURLE_OPERATION_TIMEDOUT;
|
||||
}
|
||||
else {
|
||||
#ifdef EINTR
|
||||
#if !defined(WIN32) && defined(EINTR)
|
||||
/* For platforms without EINTR all errnos are bad */
|
||||
if (errno == EINTR)
|
||||
continue; /* retry the select() */
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* $Id$
|
||||
***************************************************************************/
|
||||
#include "urldata.h"
|
||||
CURLcode Curl_SSLConnect(struct connectdata *conn, curl_socket_t sockfd);
|
||||
CURLcode Curl_SSLConnect(struct connectdata *conn, int sockindex);
|
||||
|
||||
void Curl_SSL_init(void); /* Global SSL init */
|
||||
void Curl_SSL_cleanup(void); /* Global SSL cleanup */
|
||||
|
||||
@@ -1091,12 +1091,12 @@ CURLcode Curl_telnet(struct connectdata *conn)
|
||||
HANDLE stdin_handle;
|
||||
HANDLE objs[2];
|
||||
DWORD waitret;
|
||||
DWORD nread;
|
||||
DWORD readfile_read;
|
||||
#else
|
||||
fd_set readfd;
|
||||
fd_set keepfd;
|
||||
ssize_t nread;
|
||||
#endif
|
||||
ssize_t nread;
|
||||
bool keepon = TRUE;
|
||||
char *buf = data->state.buffer;
|
||||
struct TELNET *tn;
|
||||
@@ -1203,10 +1203,11 @@ CURLcode Curl_telnet(struct connectdata *conn)
|
||||
char *buffer = buf;
|
||||
|
||||
if(!ReadFile(stdin_handle, buf, sizeof(data->state.buffer),
|
||||
(LPDWORD)&nread, NULL)) {
|
||||
&readfile_read, NULL)) {
|
||||
keepon = FALSE;
|
||||
break;
|
||||
}
|
||||
nread = readfile_read;
|
||||
|
||||
while(nread--) {
|
||||
outbuf[0] = *buffer++;
|
||||
|
||||
@@ -63,6 +63,7 @@ static int gettimeofday(struct timeval *tp, void *nothing)
|
||||
tp->tv_sec = Sec;
|
||||
tp->tv_usec = Usec;
|
||||
#endif /* WITHOUT_MM_LIB */
|
||||
(void)nothing;
|
||||
return 0;
|
||||
}
|
||||
#else /* WIN32 */
|
||||
|
||||
@@ -111,10 +111,6 @@
|
||||
#include "memdebug.h"
|
||||
#endif
|
||||
|
||||
#ifndef min
|
||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#define CURL_TIMEOUT_EXPECT_100 1000 /* counting ms here */
|
||||
|
||||
enum {
|
||||
@@ -985,7 +981,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
||||
|
||||
k->bytecount += nread;
|
||||
|
||||
Curl_pgrsSetDownloadCounter(data, (double)k->bytecount);
|
||||
Curl_pgrsSetDownloadCounter(data, k->bytecount);
|
||||
|
||||
if(!conn->bits.chunk && (nread || k->badheader)) {
|
||||
/* If this is chunky transfer, it was already written */
|
||||
@@ -1188,7 +1184,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
||||
}
|
||||
|
||||
k->writebytecount += bytes_written;
|
||||
Curl_pgrsSetUploadCounter(data, (double)k->writebytecount);
|
||||
Curl_pgrsSetUploadCounter(data, k->writebytecount);
|
||||
|
||||
} while(!writedone); /* loop until we're done writing! */
|
||||
|
||||
@@ -1306,19 +1302,19 @@ CURLcode Curl_readwrite_init(struct connectdata *conn)
|
||||
if (!conn->bits.getheader) {
|
||||
k->header = FALSE;
|
||||
if(conn->size > 0)
|
||||
Curl_pgrsSetDownloadSize(data, (double)conn->size);
|
||||
Curl_pgrsSetDownloadSize(data, conn->size);
|
||||
}
|
||||
/* we want header and/or body, if neither then don't do this! */
|
||||
if(conn->bits.getheader || !data->set.no_body) {
|
||||
|
||||
FD_ZERO (&k->readfd); /* clear it */
|
||||
if(conn->sockfd != -1) {
|
||||
if(conn->sockfd != CURL_SOCKET_BAD) {
|
||||
FD_SET (conn->sockfd, &k->readfd); /* read socket */
|
||||
k->keepon |= KEEP_READ;
|
||||
}
|
||||
|
||||
FD_ZERO (&k->writefd); /* clear it */
|
||||
if(conn->writesockfd != -1) {
|
||||
if(conn->writesockfd != CURL_SOCKET_BAD) {
|
||||
/* HTTP 1.1 magic:
|
||||
|
||||
Even if we require a 100-return code before uploading data, we might
|
||||
@@ -1368,7 +1364,10 @@ void Curl_single_fdset(struct connectdata *conn,
|
||||
}
|
||||
if(conn->keep.keepon & KEEP_WRITE) {
|
||||
FD_SET(conn->writesockfd, write_fd_set);
|
||||
if(conn->writesockfd > *max_fd)
|
||||
|
||||
/* since sockets are curl_socket_t nowadays, we typecast it to int here
|
||||
to compare it nicely */
|
||||
if((int)conn->writesockfd > *max_fd)
|
||||
*max_fd = conn->writesockfd;
|
||||
conn->keep.writefdp = write_fd_set; /* store the address of the set */
|
||||
}
|
||||
@@ -1405,7 +1404,7 @@ Transfer(struct connectdata *conn)
|
||||
is different*/
|
||||
Curl_readwrite_init(conn);
|
||||
|
||||
if((conn->sockfd == -1) && (conn->writesockfd == -1))
|
||||
if((conn->sockfd == CURL_SOCKET_BAD) && (conn->writesockfd == CURL_SOCKET_BAD))
|
||||
/* nothing to read, nothing to write, we're already OK! */
|
||||
return CURLE_OK;
|
||||
|
||||
@@ -1950,11 +1949,11 @@ CURLcode Curl_perform(struct SessionHandle *data)
|
||||
* possibly know if the connection is in a good shape or not now. */
|
||||
conn->bits.close = TRUE;
|
||||
|
||||
if(-1 != conn->sock[SECONDARYSOCKET]) {
|
||||
if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET]) {
|
||||
/* if we failed anywhere, we must clean up the secondary socket if
|
||||
it was used */
|
||||
sclose(conn->sock[SECONDARYSOCKET]);
|
||||
conn->sock[SECONDARYSOCKET]=-1;
|
||||
conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,14 +37,13 @@ CURLcode Curl_readwrite_init(struct connectdata *conn);
|
||||
/* This sets up a forthcoming transfer */
|
||||
CURLcode
|
||||
Curl_Transfer (struct connectdata *data,
|
||||
curl_socket_t sockfd, /* socket to read from or
|
||||
CURL_SOCKET_BAD */
|
||||
int sockindex, /* socket index to read from or -1 */
|
||||
curl_off_t size, /* -1 if unknown at this point */
|
||||
bool getheader, /* TRUE if header parsing is wanted */
|
||||
curl_off_t *bytecountp, /* return number of bytes read */
|
||||
curl_socket_t writesockfd, /* socket to write to, it may very
|
||||
well be the same we read from.
|
||||
CURL_SOCKET_BAD disables */
|
||||
int writesockindex, /* socket index to write to, it may
|
||||
very well be the same we read from.
|
||||
-1 disables */
|
||||
curl_off_t *writecountp /* return number of bytes written */
|
||||
);
|
||||
#endif
|
||||
|
||||
25
lib/url.c
25
lib/url.c
@@ -782,11 +782,18 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
|
||||
break;
|
||||
case CURLOPT_POSTFIELDSIZE:
|
||||
/*
|
||||
* The size of the POSTFIELD data, if curl should now do a strlen
|
||||
* to find out. Enables binary posts.
|
||||
* The size of the POSTFIELD data to prevent libcurl to do strlen() to
|
||||
* figure it out. Enables binary posts.
|
||||
*/
|
||||
data->set.postfieldsize = va_arg(param, long);
|
||||
break;
|
||||
case CURLOPT_POSTFIELDSIZE_LARGE:
|
||||
/*
|
||||
* The size of the POSTFIELD data to prevent libcurl to do strlen() to
|
||||
* figure it out. Enables binary posts.
|
||||
*/
|
||||
data->set.postfieldsize = va_arg(param, curl_off_t);
|
||||
break;
|
||||
case CURLOPT_REFERER:
|
||||
/*
|
||||
* String to set in the HTTP Referer: field.
|
||||
@@ -1341,9 +1348,9 @@ CURLcode Curl_disconnect(struct connectdata *conn)
|
||||
Curl_SSL_Close(conn);
|
||||
|
||||
/* close possibly still open sockets */
|
||||
if(-1 != conn->sock[SECONDARYSOCKET])
|
||||
if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET])
|
||||
sclose(conn->sock[SECONDARYSOCKET]);
|
||||
if(-1 != conn->sock[FIRSTSOCKET])
|
||||
if(CURL_SOCKET_BAD != conn->sock[FIRSTSOCKET])
|
||||
sclose(conn->sock[FIRSTSOCKET]);
|
||||
|
||||
Curl_safefree(conn->user);
|
||||
@@ -1378,7 +1385,7 @@ CURLcode Curl_disconnect(struct connectdata *conn)
|
||||
* be dead. Most commonly this happens when the server has closed the
|
||||
* connection due to inactivity.
|
||||
*/
|
||||
static bool SocketIsDead(int sock)
|
||||
static bool SocketIsDead(curl_socket_t sock)
|
||||
{
|
||||
int sval;
|
||||
bool ret_val = TRUE;
|
||||
@@ -1386,7 +1393,7 @@ static bool SocketIsDead(int sock)
|
||||
struct timeval to;
|
||||
|
||||
FD_ZERO(&check_set);
|
||||
FD_SET(sock,&check_set);
|
||||
FD_SET(sock, &check_set);
|
||||
|
||||
to.tv_sec = 0;
|
||||
to.tv_usec = 0;
|
||||
@@ -2022,8 +2029,8 @@ static CURLcode CreateConnection(struct SessionHandle *data,
|
||||
|
||||
/* and we setup a few fields in case we end up actually using this struct */
|
||||
conn->data = data; /* remember our daddy */
|
||||
conn->sock[FIRSTSOCKET] = -1; /* no file descriptor */
|
||||
conn->sock[SECONDARYSOCKET] = -1; /* no file descriptor */
|
||||
conn->sock[FIRSTSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
|
||||
conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; /* no file descriptor */
|
||||
conn->connectindex = -1; /* no index */
|
||||
conn->bits.httpproxy = (data->change.proxy && *data->change.proxy &&
|
||||
(data->set.proxytype == CURLPROXY_HTTP))?
|
||||
@@ -3164,7 +3171,7 @@ static CURLcode SetupConnection(struct connectdata *conn,
|
||||
conn->bytecount = 0;
|
||||
conn->headerbytecount = 0;
|
||||
|
||||
if(-1 == conn->sock[FIRSTSOCKET]) {
|
||||
if(CURL_SOCKET_BAD == conn->sock[FIRSTSOCKET]) {
|
||||
bool connected;
|
||||
|
||||
/* Connect only if not already connected! */
|
||||
|
||||
@@ -205,7 +205,7 @@ struct negotiatedata {
|
||||
***************************************************************************/
|
||||
struct HTTP {
|
||||
struct FormData *sendit;
|
||||
size_t postsize;
|
||||
curl_off_t postsize; /* off_t to handle large file sizes */
|
||||
char *postdata;
|
||||
|
||||
const char *p_pragma; /* Pragma: string */
|
||||
@@ -221,7 +221,7 @@ struct HTTP {
|
||||
curl_read_callback fread; /* backup storage for fread pointer */
|
||||
void *fread_in; /* backup storage for fread_in pointer */
|
||||
char *postdata;
|
||||
size_t postsize;
|
||||
curl_off_t postsize;
|
||||
} backup;
|
||||
|
||||
enum {
|
||||
@@ -604,12 +604,12 @@ struct PureInfo {
|
||||
struct Progress {
|
||||
long lastshow; /* time() of the last displayed progress meter or NULL to
|
||||
force redraw at next call */
|
||||
double size_dl;
|
||||
double size_ul;
|
||||
double downloaded;
|
||||
double uploaded;
|
||||
curl_off_t size_dl; /* total expected size */
|
||||
curl_off_t size_ul; /* total expected size */
|
||||
curl_off_t downloaded; /* transfered so far */
|
||||
curl_off_t uploaded; /* transfered so far */
|
||||
|
||||
double current_speed; /* uses the currently fastest transfer */
|
||||
curl_off_t current_speed; /* uses the currently fastest transfer */
|
||||
|
||||
bool callback; /* set when progress callback is used */
|
||||
int width; /* screen width at download start */
|
||||
@@ -617,8 +617,8 @@ struct Progress {
|
||||
|
||||
double timespent;
|
||||
|
||||
double dlspeed;
|
||||
double ulspeed;
|
||||
curl_off_t dlspeed;
|
||||
curl_off_t ulspeed;
|
||||
|
||||
double t_nslookup;
|
||||
double t_connect;
|
||||
@@ -630,7 +630,7 @@ struct Progress {
|
||||
struct timeval t_startsingle;
|
||||
#define CURR_TIME (5+1) /* 6 entries for 5 seconds */
|
||||
|
||||
double speeder[ CURR_TIME ];
|
||||
curl_off_t speeder[ CURR_TIME ];
|
||||
struct timeval speeder_time[ CURR_TIME ];
|
||||
int speeder_c;
|
||||
};
|
||||
@@ -780,9 +780,9 @@ struct UserDefined {
|
||||
char *useragent; /* User-Agent string */
|
||||
char *encoding; /* Accept-Encoding string */
|
||||
char *postfields; /* if POST, set the fields' values here */
|
||||
size_t postfieldsize; /* if POST, this might have a size to use instead of
|
||||
strlen(), and then the data *may* be binary (contain
|
||||
zero bytes) */
|
||||
curl_off_t postfieldsize; /* if POST, this might have a size to use instead
|
||||
of strlen(), and then the data *may* be binary
|
||||
(contain zero bytes) */
|
||||
char *ftpport; /* port to send with the FTP PORT command */
|
||||
char *device; /* network interface to use */
|
||||
curl_write_callback fwrite; /* function that stores the output */
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
SUBDIRS = Win32 Linux Solaris EPM DOS
|
||||
SUBDIRS = Win32 Linux Solaris EPM DOS vms
|
||||
|
||||
EXTRA_DIST = README
|
||||
EXTRA_DIST = README NetWare/get_ver.awk
|
||||
|
||||
20
packages/NetWare/get_ver.awk
Normal file
20
packages/NetWare/get_ver.awk
Normal file
@@ -0,0 +1,20 @@
|
||||
# fetch libcurl version number from input file and write them to STDOUT
|
||||
BEGIN {
|
||||
while ((getline < ARGV[1]) > 0) {
|
||||
if (match ($0, /^#define LIBCURL_VERSION_MAJOR [^"]+/)) {
|
||||
libcurl_ver_major = substr($3, 1, length($3));
|
||||
}
|
||||
else if (match ($0, /^#define LIBCURL_VERSION_MINOR [^"]+/)) {
|
||||
libcurl_ver_minor = substr($3, 1, length($3));
|
||||
}
|
||||
else if (match ($0, /^#define LIBCURL_VERSION_PATCH [^"]+/)) {
|
||||
libcurl_ver_patch = substr($3, 1, length($3));
|
||||
}
|
||||
}
|
||||
libcurl_ver = libcurl_ver_major "," libcurl_ver_minor "," libcurl_ver_patch;
|
||||
libcurl_ver_str = libcurl_ver_major "." libcurl_ver_minor "." libcurl_ver_patch;
|
||||
|
||||
print "LIBCURL_VERSION = " libcurl_ver "";
|
||||
print "LIBCURL_VERSION_STR = " libcurl_ver_str "";
|
||||
|
||||
}
|
||||
2
packages/vms/.cvsignore
Normal file
2
packages/vms/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
4
packages/vms/Makefile.am
Normal file
4
packages/vms/Makefile.am
Normal file
@@ -0,0 +1,4 @@
|
||||
EXTRA_DIST = Makefile.am batch_compile.com build_vms.com \
|
||||
config-vms.h_with_ssl config-vms.h_without_ssl defines.com \
|
||||
hpssl_alpha.opt hpssl_ia64.opt hpssl_vax.opt readme
|
||||
|
||||
BIN
packages/vms/batch_compile.com
Executable file
BIN
packages/vms/batch_compile.com
Executable file
Binary file not shown.
206
packages/vms/build_vms.com
Executable file
206
packages/vms/build_vms.com
Executable file
@@ -0,0 +1,206 @@
|
||||
$! BUILD_VMS.COM
|
||||
$!
|
||||
$! I've taken the original build_vms.com, supplied by Nico Baggus, if
|
||||
$! memory serves me correctly, and made some modifications.
|
||||
$!
|
||||
$! SSL support is based on logicals, or lack thereof. If SSL$INCLUDE
|
||||
$! is defined, then it assumed that hp's SSL product has been installed.
|
||||
$! If OPENSSL is defined, but SSL$INCLUDE isn't, then the OpenSSL defined
|
||||
$! via the defines.com procedure will be used. If neither logical is
|
||||
$! defined, then SSL support will not be compiled/linked in.
|
||||
$!
|
||||
$! If CURL_BUILD_NOSSL is defined to anything, then no SSL support will
|
||||
$! be built in. This way you can build without SSL support on systems
|
||||
$! that have it without the "automatic" build/link "features".
|
||||
$!
|
||||
$! If CURL_BUILD_NOHPSSL is defined to anything, it will override the
|
||||
$! SSL$INCLUDE check. This way you can build against OpenSSL, even if
|
||||
$! you have hp SSL installed.
|
||||
$!
|
||||
$! Parameter(s):
|
||||
$!
|
||||
$! P1 - LISTING will create .lis files during the C compile
|
||||
$! DEBUG will compile and link with debug
|
||||
$!
|
||||
$! Revisions:
|
||||
$!
|
||||
$! 2-DEC-2003, MSK, the "original" version. <marty@barra.com>
|
||||
$! It works for me. Your mileage may vary.
|
||||
$! 13-JAN-2004, MSK, moved this procedure to the [.packages.vms] directory
|
||||
$! and updated it to do hardware dependant builds.
|
||||
$! 29-JAN-2004, MSK, moved logical defines into defines.com
|
||||
$! 6-FEB-2004, MSK, put in various SSL support bits
|
||||
$! 9-MAR-2004, MSK, the config-vms.h* files are now copied to the lib and
|
||||
$! src directories as config.h.
|
||||
$!
|
||||
$ on control_y then goto Common_Exit
|
||||
$ origdir = f$environment("DEFAULT")
|
||||
$ proc = f$environment("PROCEDURE")
|
||||
$ thisdir = f$parse( proc,,,"DEVICE") + f$parse( proc,,,"DIRECTORY")
|
||||
$!
|
||||
$! Verbose output message stuff. Define symbol to "write sys$output" or "!".
|
||||
$! vo_c - verbose output for compile
|
||||
$! vo_l - link
|
||||
$! vo_o - object check
|
||||
$!
|
||||
$ vo_c = "write sys$output"
|
||||
$ vo_l = "write sys$output"
|
||||
$ vo_o = "!"
|
||||
$!
|
||||
$ defines = thisdir + "defines.com"
|
||||
$ if f$search( defines) .eqs. ""
|
||||
$ then
|
||||
$ write sys$output "%CURL-F-DEFFNF, cannot find defines.com procedure"
|
||||
$ exit %X18290 ! FNF
|
||||
$ endif
|
||||
$ set def 'thisdir'
|
||||
$ cc_qual = "/define=HAVE_CONFIG_H=1/OBJ=OBJDIR:"
|
||||
$ link_qual = ""
|
||||
$ if p1 .eqs. "LISTING" then cc_qual = cc_qual + "/LIST/MACHINE"
|
||||
$ if p1 .eqs. "DEBUG"
|
||||
$ then
|
||||
$ cc_qual = cc_qual + "/LIST/MACHINE/DEBUG/NOOPT"
|
||||
$ link_qual = "/DEBUG"
|
||||
$ endif
|
||||
$ msg_qual = "/OBJ=OBJDIR:"
|
||||
$!
|
||||
$ hpssl = 0
|
||||
$ openssl = 0
|
||||
$ if f$trnlnm( "CURL_BUILD_NOSSL") .eqs. ""
|
||||
$ then
|
||||
$ if f$trnlnm( "OPENSSL") .nes. ""
|
||||
$ then
|
||||
$ openssl = 1
|
||||
$ if ( f$trnlnm( "SSL$INCLUDE") .nes. "") .and. -
|
||||
( f$trnlnm( "CURL_BUILD_NOHPSSL") .eqs. "")
|
||||
$ then hpssl = 1
|
||||
$ endif
|
||||
$ endif
|
||||
$ endif
|
||||
$!
|
||||
$! Put the right main config file in the two source directories for the build.
|
||||
$!
|
||||
$ if ( openssl .eq. 1) .or. ( hpssl .eq. 1)
|
||||
$ then
|
||||
$ 'vo_c' "%CURL-I-BLDSSL, building with SSL support"
|
||||
$ source_h = "CONFIG-VMS.H_WITH_SSL"
|
||||
$ else
|
||||
$ 'vo_c' "%CURL-I-BLDNOSSL, building without SSL support"
|
||||
$ source_h = "CONFIG-VMS.H_WITHOUT_SSL"
|
||||
$ endif
|
||||
$!
|
||||
$! Only do the copy if the source and destination files are different.
|
||||
$! Put this block into Set NoOn mode so that if the diff command triggers
|
||||
$! an error while error message reporting is turned off, then it won't
|
||||
$! just exit the command procedure mysteriously.
|
||||
$!
|
||||
$ set noon
|
||||
$ set message/nof/noi/nos/not
|
||||
$ diff/out=nla0: 'source_h' [--.SRC]CONFIG.H
|
||||
$ status = $status
|
||||
$ set message/f/i/s/t
|
||||
$ if ( status .ne. %X006C8009) ! if status is not "no diff"
|
||||
$ then
|
||||
$ copy 'source_h' [--.SRC]CONFIG.H
|
||||
$ purge/nolog [--.SRC]CONFIG.H
|
||||
$ endif
|
||||
$ set message/nof/noi/nos/not
|
||||
$ diff/out=nla0: 'source_h' [--.LIB]CONFIG.H
|
||||
$ status = $status
|
||||
$ set message/f/i/s/t
|
||||
$ if ( status .ne. %X006C8009) ! if status is not "no diff"
|
||||
$ then
|
||||
$ copy 'source_h' [--.LIB]CONFIG.H
|
||||
$ purge/nolog [--.LIB]CONFIG.H
|
||||
$ endif
|
||||
$ on control_y then goto Common_Exit
|
||||
$!
|
||||
$ call build "[--.lib]" "*.c" "objdir:curllib.olb"
|
||||
$ call build "[--.src]" "*.c" "objdir:curlsrc.olb"
|
||||
$ call build "[--.src]" "*.msg" "objdir:curlsrc.olb"
|
||||
$ if ( openssl .eq. 1) .and. ( hpssl .eq. 0)
|
||||
$ then
|
||||
$ 'vo_l' "%CURL-I-LINK_OSSL, linking with OpenSSL"
|
||||
$ link 'link_qual'/exe=exedir:curl.exe -
|
||||
objdir:curlsrc/lib/include=(main,curlmsg),-
|
||||
objdir:curllib/lib, libssl/lib, libcrypto/lib
|
||||
$ endif
|
||||
$ if ( openssl .eq. 1) .and. ( hpssl .eq. 1)
|
||||
$ then
|
||||
$ 'vo_l' "%CURL-I-LINK_HPSSL, linking with hp SSL option"
|
||||
$ optfile = "[]hpssl_" + f$getsyi("ARCH_NAME") + ".opt/opt"
|
||||
$ link 'link_qual'/exe=exedir:curl.exe -
|
||||
objdir:curlsrc/lib/include=(main,curlmsg),-
|
||||
objdir:curllib/lib, 'optfile'
|
||||
$ endif
|
||||
$ if ( openssl .eq. 0) .and. ( hpssl .eq. 0)
|
||||
$ then
|
||||
$ 'vo_l' "%CURL-I-LINK_NOSSL, linking without SSL support"
|
||||
$ link 'link_qual'/exe=exedir:curl.exe -
|
||||
objdir:curlsrc/lib/include=(main,curlmsg),-
|
||||
objdir:curllib/lib
|
||||
$ endif
|
||||
$!
|
||||
$ goto Common_Exit
|
||||
$!
|
||||
$! Subroutine to build everything with a filetype passed in via P2 in
|
||||
$! the directory passed in via P1 and put it in the object library named
|
||||
$! via P3
|
||||
$!
|
||||
$build: subroutine
|
||||
$ on control_y then exit 2
|
||||
$ set noon
|
||||
$ set default 'p1'
|
||||
$ search = p2
|
||||
$ reset = f$search("reset")
|
||||
$ if f$search( p3) .eqs. ""
|
||||
$ then
|
||||
$ LIB/CREATE/OBJECT 'p3'
|
||||
$ endif
|
||||
$ reset = f$search("reset",1)
|
||||
$Loop:
|
||||
$ file = f$search(search,1)
|
||||
$ if file .eqs. "" then goto EndLoop
|
||||
$ objfile = f$parse("objdir:.OBJ;",file)
|
||||
$ obj = f$search( objfile, 2)
|
||||
$ if (obj .nes. "")
|
||||
$ then
|
||||
$ if (f$cvtime(f$file(file,"rdt")) .gts. f$cvtime(f$file(obj,"rdt")))
|
||||
$ then
|
||||
$ call compile 'file'
|
||||
$ if .not. $status then exit $status
|
||||
$ lib/object 'p3' 'objfile'
|
||||
$ else
|
||||
$ 'vo_o' "%CURL-I-OBJUTD, ", objfile, " is up to date"
|
||||
$ endif
|
||||
$ else
|
||||
$ 'vo_o' "%CURL-I-OBJDNE, ", file, " does not exist"
|
||||
$ call compile 'file'
|
||||
$ if .not. $status then exit $status
|
||||
$ lib/object 'p3' 'objfile'
|
||||
$ endif
|
||||
$ goto Loop
|
||||
$EndLoop:
|
||||
$ !purge
|
||||
$ set def 'origdir'
|
||||
$ endsubroutine ! Build
|
||||
$!
|
||||
$! Based on the file TYPE, do the right compile command.
|
||||
$! Only C and MSG supported.
|
||||
$!
|
||||
$compile: subroutine
|
||||
$ on control_y then exit 2
|
||||
$ set noon
|
||||
$ file = p1
|
||||
$ qual = p2+p3+p4+p5+p6+p7+p8
|
||||
$ typ = f$parse(file,,,"TYPE") - "."
|
||||
$ cmd_c = "CC "+cc_qual
|
||||
$ cmd_msg = "MESSAGE "+msg_qual
|
||||
$ x = cmd_'typ'
|
||||
$ 'vo_c' x," ",file
|
||||
$ 'x' 'file'
|
||||
$ ENDSUBROUTINE ! Compile
|
||||
$!
|
||||
$Common_Exit:
|
||||
$ set default 'origdir'
|
||||
$ exit
|
||||
BIN
packages/vms/config-vms.h_with_ssl
Executable file
BIN
packages/vms/config-vms.h_with_ssl
Executable file
Binary file not shown.
BIN
packages/vms/config-vms.h_without_ssl
Executable file
BIN
packages/vms/config-vms.h_without_ssl
Executable file
Binary file not shown.
BIN
packages/vms/defines.com
Executable file
BIN
packages/vms/defines.com
Executable file
Binary file not shown.
BIN
packages/vms/hpssl_alpha.opt
Normal file
BIN
packages/vms/hpssl_alpha.opt
Normal file
Binary file not shown.
BIN
packages/vms/hpssl_ia64.opt
Normal file
BIN
packages/vms/hpssl_ia64.opt
Normal file
Binary file not shown.
BIN
packages/vms/hpssl_vax.opt
Normal file
BIN
packages/vms/hpssl_vax.opt
Normal file
Binary file not shown.
BIN
packages/vms/readme
Normal file
BIN
packages/vms/readme
Normal file
Binary file not shown.
@@ -48,7 +48,8 @@ EXTRA_DIST = mkhelp.pl curlmsg.msg makefile.dj \
|
||||
macos/MACINSTALL.TXT \
|
||||
macos/src/curl_GUSIConfig.cpp \
|
||||
macos/src/macos_main.cpp curlmsg.h curlmsg.sdl curlmsg_vms.h \
|
||||
config-amigaos.h makefile.amiga curl.rc
|
||||
config-amigaos.h makefile.amiga curl.rc \
|
||||
Makefile.netware config-netware.h
|
||||
|
||||
MANPAGE=$(top_srcdir)/docs/curl.1
|
||||
README=$(top_srcdir)/docs/MANUAL
|
||||
|
||||
240
src/Makefile.netware
Normal file
240
src/Makefile.netware
Normal file
@@ -0,0 +1,240 @@
|
||||
#################################################################
|
||||
#
|
||||
## Makefile for building curl.nlm (NetWare version - gnu make)
|
||||
## Use: make -f Makefile.netware
|
||||
##
|
||||
## Comments to: Guenter Knauf <eflash@gmx.net>
|
||||
#
|
||||
#################################################################
|
||||
|
||||
# Edit the path below to point to the base of your Novell NDK.
|
||||
BASE = c:/novell
|
||||
INSTDIR = s:/libcurl
|
||||
|
||||
# Edit the path below to point to the base of your Zlib sources.
|
||||
ZLIB_PATH = ../../../cw/zlib-src-1.1.4
|
||||
|
||||
# Edit the vars below to change NLM target settings.
|
||||
TARGET = curl
|
||||
VERSION = $(LIBCURL_VERSION)
|
||||
COPYR = Copyright (c) 1996 - 2004, Daniel Stenberg, <daniel@haxx.se>
|
||||
DESCR = cURL $(LIBCURL_VERSION_STR) - http://curl.haxx.se
|
||||
MTSAFE = YES
|
||||
STACK = 64000
|
||||
SCREEN = $(TARGET) commandline utility
|
||||
MODULES = libcurl.nlm
|
||||
IMPORTS = @../lib/libcurl.imp
|
||||
|
||||
# Edit the var below to point to your lib architecture.
|
||||
ifndef LIBARCH
|
||||
LIBARCH = LIBC
|
||||
endif
|
||||
|
||||
# must be equal to DEBUG or NDEBUG
|
||||
DB = NDEBUG
|
||||
# DB = DEBUG
|
||||
# Optimization: -O<n> or debugging: -g
|
||||
ifeq ($(DB),NDEBUG)
|
||||
OPT = -O2
|
||||
OBJDIR = release
|
||||
else
|
||||
OPT = -g
|
||||
OBJDIR = debug
|
||||
endif
|
||||
|
||||
# Include the version info retrieved from jk_version.h
|
||||
-include $(OBJDIR)/version.inc
|
||||
|
||||
# The following line defines your compiler.
|
||||
ifdef METROWERKS
|
||||
CC = mwccnlm
|
||||
else
|
||||
CC = gcc
|
||||
endif
|
||||
# RM = rm -f
|
||||
# CP = cp -fv
|
||||
# if you want to mark the target as MTSAFE you will need a tool for
|
||||
# generating the xdc data for the linker; here's a minimal tool:
|
||||
# http://www.gknw.de/development/prgtools/mkxdc.zip
|
||||
MPKXDC = mkxdc
|
||||
|
||||
# Global flags for all compilers
|
||||
CFLAGS = $(OPT) -D$(DB) -DNETWARE -nostdinc
|
||||
CFLAGS += -DUSE_MANUAL
|
||||
#CFLAGS += -DHAVE_LIBZ
|
||||
|
||||
ifeq ($(CC),mwccnlm)
|
||||
LD = mwldnlm
|
||||
LDFLAGS = -nostdlib $(PRELUDE) $(OBJDIR)/*.o -o $(OBJDIR)/$(TARGET).nlm -commandfile
|
||||
CFLAGS += -gccinc -inline off -opt nointrinsics
|
||||
CFLAGS += -relax_pointers
|
||||
#CFLAGS += -w on
|
||||
ifeq ($(LIBARCH),LIBC)
|
||||
PRELUDE = $(SDK_LIBC)/imports/libcpre.o
|
||||
CFLAGS += -align 4 -inst mmx -proc 686
|
||||
CFLAGS += -D_POSIX_SOURCE
|
||||
# CFLAGS += -D__ANSIC__
|
||||
else
|
||||
PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"
|
||||
# CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"
|
||||
CFLAGS += -align 1 -proc 586
|
||||
endif
|
||||
else
|
||||
LD = nlmconv
|
||||
LDFLAGS = -T
|
||||
CFLAGS += -fno-builtin -fpack-struct -fpcc-struct-return
|
||||
CFLAGS += -Wall #-Wno-main # -pedantic
|
||||
ifeq ($(LIBARCH),LIBC)
|
||||
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
|
||||
CFLAGS += -D_POSIX_SOURCE
|
||||
# CFLAGS += -D__ANSIC__
|
||||
else
|
||||
PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
|
||||
CFLAGS += -include $(BASE)/nlmconv/genlm.h
|
||||
endif
|
||||
endif
|
||||
|
||||
LDLIBS =
|
||||
|
||||
NDK_ROOT = $(BASE)/ndk
|
||||
SDK_CLIB = $(NDK_ROOT)/nwsdk
|
||||
SDK_LIBC = $(NDK_ROOT)/libc
|
||||
SDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
|
||||
CURL_INC = ../include
|
||||
CURL_LIB = ../lib
|
||||
|
||||
INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
|
||||
INCLUDES += -I$(ZLIB_PATH)
|
||||
|
||||
ifeq ($(LIBARCH),LIBC)
|
||||
INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
|
||||
INCLUDES += -I$(SDK_LIBC)/include/winsock
|
||||
INCLUDES += -I$(SDK_LDAP)/libc/inc
|
||||
else
|
||||
INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include
|
||||
INCLUDES += -I$(SDK_LDAP)/clib/inc
|
||||
CFLAGS += -DNETDB_USE_INTERNET
|
||||
endif
|
||||
CFLAGS += $(INCLUDES)
|
||||
|
||||
ifeq ($(MTSAFE),YES)
|
||||
XDCDATA = $(OBJDIR)/$(TARGET).xdc
|
||||
endif
|
||||
|
||||
ifeq ($(OSTYPE),linux)
|
||||
DL = '
|
||||
-include $(BASE)/nlmconv/ncpfs.inc
|
||||
endif
|
||||
|
||||
OBJS = \
|
||||
$(OBJDIR)/main.o \
|
||||
$(OBJDIR)/hugehelp.o \
|
||||
$(OBJDIR)/urlglob.o \
|
||||
$(OBJDIR)/writeout.o \
|
||||
$(OBJDIR)/getpass.o \
|
||||
$(OBJDIR)/homedir.o
|
||||
|
||||
|
||||
all: $(OBJDIR) $(OBJDIR)/version.inc $(OBJDIR)/$(TARGET).nlm
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@echo Compiling $<
|
||||
@$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(OBJDIR)/version.inc: $(CURL_INC)/curl/curl.h $(OBJDIR)
|
||||
@echo Creating $@
|
||||
@awk -f ../packages/netware/get_ver.awk $< > $@
|
||||
|
||||
dist: all
|
||||
-$(RM) $(OBJDIR)/*.o $(OBJDIR)/$(TARGET).map $(OBJDIR)/$(TARGET).ncv
|
||||
-$(RM) $(OBJDIR)/$(TARGET).def $(OBJDIR)/version.inc $(XDCDATA)
|
||||
# -$(CP) ../changes.txt $(OBJDIR)/
|
||||
|
||||
install: all
|
||||
@[ -d $(INSTDIR) ] || mkdir $(INSTDIR)
|
||||
@$(CP) $(TARGET).nlm $(INSTDIR)
|
||||
|
||||
clean:
|
||||
-$(RM) -r $(OBJDIR)
|
||||
|
||||
$(OBJDIR):
|
||||
@mkdir $(OBJDIR)
|
||||
|
||||
$(OBJDIR)/$(TARGET).nlm: $(OBJS) $(OBJDIR)/$(TARGET).def $(XDCDATA)
|
||||
@echo Linking $@
|
||||
@-$(RM) $@
|
||||
@$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
|
||||
|
||||
$(OBJDIR)/%.xdc: Makefile.netware
|
||||
@echo Creating $@
|
||||
@$(MPKXDC) $(XDCOPT) $@
|
||||
|
||||
$(OBJDIR)/%.def: Makefile.netware
|
||||
@echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
|
||||
@echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
|
||||
@echo $(DL)# All your changes will be lost!!$(DL) >> $@
|
||||
@echo $(DL)#$(DL) >> $@
|
||||
@echo $(DL)copyright "$(COPYR)"$(DL) >> $@
|
||||
@echo $(DL)description "$(DESCR)"$(DL) >> $@
|
||||
@echo $(DL)version $(VERSION)$(DL) >> $@
|
||||
ifdef NLMTYPE
|
||||
@echo $(DL)type $(NLMTYPE)$(DL) >> $@
|
||||
endif
|
||||
ifdef STACK
|
||||
@echo $(DL)stack $(STACK)$(DL) >> $@
|
||||
endif
|
||||
ifdef SCREEN
|
||||
@echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
|
||||
else
|
||||
@echo $(DL)screenname "DEFAULT"$(DL) >> $@
|
||||
endif
|
||||
ifeq ($(DB),DEBUG)
|
||||
@echo $(DL)debug$(DL) >> $@
|
||||
endif
|
||||
@echo $(DL)threadname "$(TARGET)"$(DL) >> $@
|
||||
ifdef XDCDATA
|
||||
@echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
|
||||
endif
|
||||
ifeq ($(LIBARCH),CLIB)
|
||||
@echo $(DL)start _Prelude$(DL) >> $@
|
||||
@echo $(DL)exit _Stop$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/clib.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/threads.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/socklib.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
|
||||
@echo $(DL)module clib$(DL) >> $@
|
||||
else
|
||||
ifeq ($(LD),nlmconv)
|
||||
@echo $(DL)flag_on 64$(DL) >> $@
|
||||
else
|
||||
@echo $(DL)autounload$(DL) >> $@
|
||||
endif
|
||||
@echo $(DL)pseudopreemption$(DL) >> $@
|
||||
@echo $(DL)start _LibCPrelude$(DL) >> $@
|
||||
@echo $(DL)exit _LibCPostlude$(DL) >> $@
|
||||
@echo $(DL)check _LibCCheckUnload$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LIBC)/imports/libc.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LIBC)/imports/netware.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@
|
||||
@echo $(DL)module libc$(DL) >> $@
|
||||
endif
|
||||
ifdef MODULES
|
||||
@echo $(DL)module $(MODULES)$(DL) >> $@
|
||||
endif
|
||||
ifdef EXPORTS
|
||||
@echo $(DL)export $(EXPORTS)$(DL) >> $@
|
||||
endif
|
||||
ifdef IMPORTS
|
||||
@echo $(DL)import $(IMPORTS)$(DL) >> $@
|
||||
endif
|
||||
ifeq ($(LD),nlmconv)
|
||||
@echo $(DL)input $(OBJS)$(DL) >> $@
|
||||
@echo $(DL)input $(PRELUDE)$(DL) >> $@
|
||||
@echo $(DL)output $(TARGET).nlm$(DL) >> $@
|
||||
endif
|
||||
|
||||
485
src/config-netware.h
Normal file
485
src/config-netware.h
Normal file
@@ -0,0 +1,485 @@
|
||||
/* lib/config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* to disable DICT */
|
||||
#undef CURL_DISABLE_DICT
|
||||
|
||||
/* to disable FILE */
|
||||
#undef CURL_DISABLE_FILE
|
||||
|
||||
/* to disable FTP */
|
||||
#undef CURL_DISABLE_FTP
|
||||
|
||||
/* to disable GOPHER */
|
||||
#undef CURL_DISABLE_GOPHER
|
||||
|
||||
/* to disable HTTP */
|
||||
#undef CURL_DISABLE_HTTP
|
||||
|
||||
/* to disable LDAP */
|
||||
#undef CURL_DISABLE_LDAP
|
||||
|
||||
/* to disable TELNET */
|
||||
#undef CURL_DISABLE_TELNET
|
||||
|
||||
/* Set to explicitly specify we don't want to use thread-safe functions */
|
||||
#undef DISABLED_THREADSAFE
|
||||
|
||||
/* your Entropy Gathering Daemon socket pathname */
|
||||
#undef EGD_SOCKET
|
||||
|
||||
/* Define if you want to enable IPv6 support */
|
||||
#undef ENABLE_IPV6
|
||||
|
||||
/* Define to 1 if you have the <alloca.h> header file. */
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
|
||||
/* Define to 1 if you have the <assert.h> header file. */
|
||||
#define HAVE_ASSERT_H 1
|
||||
|
||||
/* Define to 1 if you have the `closesocket' function. */
|
||||
#undef HAVE_CLOSESOCKET
|
||||
|
||||
/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
|
||||
#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
|
||||
|
||||
/* Define to 1 if you have the <crypto.h> header file. */
|
||||
#undef HAVE_CRYPTO_H
|
||||
|
||||
/* Define to 1 if you have the <des.h> header file. */
|
||||
#undef HAVE_DES_H
|
||||
|
||||
/* disabled non-blocking sockets */
|
||||
#undef HAVE_DISABLED_NONBLOCKING
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
/* XXX: #undef HAVE_DLFCN_H */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the `dlopen' function. */
|
||||
#define HAVE_DLOPEN 1
|
||||
|
||||
/* Define to 1 if you have the <err.h> header file. */
|
||||
#define HAVE_ERR_H 1
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* use FIONBIO for non-blocking sockets */
|
||||
/* XXX: #undef HAVE_FIONBIO */
|
||||
#define HAVE_FIONBIO 1
|
||||
|
||||
/* Define if getaddrinfo exists and works */
|
||||
#undef HAVE_GETADDRINFO
|
||||
|
||||
/* Define to 1 if you have the `geteuid' function. */
|
||||
#undef HAVE_GETEUID
|
||||
|
||||
/* Define to 1 if you have the `gethostbyaddr' function. */
|
||||
#define HAVE_GETHOSTBYADDR 1
|
||||
|
||||
/* Define to 1 if you have the `gethostbyaddr_r' function. */
|
||||
#undef HAVE_GETHOSTBYADDR_R
|
||||
|
||||
/* gethostbyaddr_r() takes 5 args */
|
||||
#undef HAVE_GETHOSTBYADDR_R_5
|
||||
|
||||
/* gethostbyaddr_r() takes 7 args */
|
||||
#undef HAVE_GETHOSTBYADDR_R_7
|
||||
|
||||
/* gethostbyaddr_r() takes 8 args */
|
||||
#undef HAVE_GETHOSTBYADDR_R_8
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname_r' function. */
|
||||
#undef HAVE_GETHOSTBYNAME_R
|
||||
|
||||
/* gethostbyname_r() takes 3 args */
|
||||
#undef HAVE_GETHOSTBYNAME_R_3
|
||||
|
||||
/* gethostbyname_r() takes 5 args */
|
||||
#undef HAVE_GETHOSTBYNAME_R_5
|
||||
|
||||
/* gethostbyname_r() takes 6 args */
|
||||
#undef HAVE_GETHOSTBYNAME_R_6
|
||||
|
||||
/* Define to 1 if you have the `getpass_r' function. */
|
||||
#undef HAVE_GETPASS_R
|
||||
|
||||
/* Define to 1 if you have the `getpwuid' function. */
|
||||
#undef HAVE_GETPWUID
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have the `gmtime_r' function. */
|
||||
#undef HAVE_GMTIME_R
|
||||
|
||||
/* if you have the gssapi libraries */
|
||||
#undef HAVE_GSSAPI
|
||||
|
||||
/* if you have the Heimdal gssapi libraries */
|
||||
#undef HAVE_GSSHEIMDAL
|
||||
|
||||
/* if you have the MIT gssapi libraries */
|
||||
#undef HAVE_GSSMIT
|
||||
|
||||
/* Define to 1 if you have the `inet_addr' function. */
|
||||
#define HAVE_INET_ADDR 1
|
||||
|
||||
/* Define to 1 if you have the `inet_ntoa' function. */
|
||||
#define HAVE_INET_NTOA 1
|
||||
|
||||
/* Define to 1 if you have the `inet_ntoa_r' function. */
|
||||
#undef HAVE_INET_NTOA_R
|
||||
|
||||
/* inet_ntoa_r() is declared */
|
||||
#undef HAVE_INET_NTOA_R_DECL
|
||||
|
||||
/* Define to 1 if you have the `inet_pton' function. */
|
||||
#define HAVE_INET_PTON 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* use ioctlsocket() for non-blocking sockets */
|
||||
#undef HAVE_IOCTLSOCKET
|
||||
|
||||
/* use Ioctlsocket() for non-blocking sockets */
|
||||
#undef HAVE_IOCTLSOCKET_CASE
|
||||
|
||||
/* Define to 1 if you have the <io.h> header file. */
|
||||
#undef HAVE_IO_H
|
||||
|
||||
/* if you have the Kerberos4 libraries (including -ldes) */
|
||||
#undef HAVE_KRB4
|
||||
|
||||
/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */
|
||||
#undef HAVE_KRB_GET_OUR_IP_FOR_REALM
|
||||
|
||||
/* Define to 1 if you have the <krb.h> header file. */
|
||||
#undef HAVE_KRB_H
|
||||
|
||||
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
||||
#undef HAVE_LIBCRYPTO
|
||||
|
||||
/* Define to 1 if you have the `dl' library (-ldl). */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
/* Define to 1 if you have the `nsl' library (-lnsl). */
|
||||
#undef HAVE_LIBNSL
|
||||
|
||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
||||
#undef HAVE_LIBRESOLV
|
||||
|
||||
/* Define to 1 if you have the `resolve' library (-lresolve). */
|
||||
#undef HAVE_LIBRESOLVE
|
||||
|
||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||
#undef HAVE_LIBSOCKET
|
||||
|
||||
/* Define to 1 if you have the `ssl' library (-lssl). */
|
||||
#undef HAVE_LIBSSL
|
||||
|
||||
/* If zlib is available */
|
||||
#undef HAVE_LIBZ
|
||||
//#define HAVE_LIBZ 1
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
#undef HAVE_LOCALTIME_R
|
||||
|
||||
/* if your compiler supports 'long long' */
|
||||
#define HAVE_LONGLONG 1
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#define HAVE_NETDB_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
#undef HAVE_NET_IF_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/crypto.h> header file. */
|
||||
#undef HAVE_OPENSSL_CRYPTO_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/engine.h> header file. */
|
||||
#undef HAVE_OPENSSL_ENGINE_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/err.h> header file. */
|
||||
#undef HAVE_OPENSSL_ERR_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/pem.h> header file. */
|
||||
#undef HAVE_OPENSSL_PEM_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/rsa.h> header file. */
|
||||
#undef HAVE_OPENSSL_RSA_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/ssl.h> header file. */
|
||||
#undef HAVE_OPENSSL_SSL_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/x509.h> header file. */
|
||||
#undef HAVE_OPENSSL_X509_H
|
||||
|
||||
/* use O_NONBLOCK for non-blocking sockets */
|
||||
#undef HAVE_O_NONBLOCK
|
||||
|
||||
/* Define to 1 if you have the <pem.h> header file. */
|
||||
#undef HAVE_PEM_H
|
||||
|
||||
/* Define to 1 if you have the `perror' function. */
|
||||
#undef HAVE_PERROR
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
#undef HAVE_POLL
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#undef HAVE_PWD_H
|
||||
|
||||
/* Define to 1 if you have the `RAND_egd' function. */
|
||||
#undef HAVE_RAND_EGD
|
||||
|
||||
/* Define to 1 if you have the `RAND_screen' function. */
|
||||
#undef HAVE_RAND_SCREEN
|
||||
|
||||
/* Define to 1 if you have the `RAND_status' function. */
|
||||
#undef HAVE_RAND_STATUS
|
||||
|
||||
/* Define to 1 if you have the <rsa.h> header file. */
|
||||
#undef HAVE_RSA_H
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define to 1 if you have the <setjmp.h> header file. */
|
||||
#define HAVE_SETJMP_H 1
|
||||
|
||||
/* Define to 1 if you have the <sgtty.h> header file. */
|
||||
#undef HAVE_SGTTY_H
|
||||
|
||||
/* Define to 1 if you have the `sigaction' function. */
|
||||
#undef HAVE_SIGACTION
|
||||
|
||||
/* Define to 1 if you have the `siginterrupt' function. */
|
||||
#undef HAVE_SIGINTERRUPT
|
||||
|
||||
/* Define to 1 if you have the `signal' function. */
|
||||
#define HAVE_SIGNAL 1
|
||||
|
||||
/* If you have sigsetjmp */
|
||||
#undef HAVE_SIGSETJMP
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* use SO_NONBLOCK for non-blocking sockets */
|
||||
#undef HAVE_SO_NONBLOCK
|
||||
|
||||
/* Define this if you have the SPNEGO library fbopenssl */
|
||||
#undef HAVE_SPNEGO
|
||||
|
||||
/* Define to 1 if you have the <ssl.h> header file. */
|
||||
#undef HAVE_SSL_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the `strcmpi' function. */
|
||||
#undef HAVE_STRCMPI
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the `strftime' function. */
|
||||
#define HAVE_STRFTIME 1
|
||||
|
||||
/* Define to 1 if you have the `stricmp' function. */
|
||||
#undef HAVE_STRICMP
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strlcat' function. */
|
||||
#define HAVE_STRLCAT 1
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
#define HAVE_STRLCPY 1
|
||||
|
||||
/* Define to 1 if you have the `strstr' function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define to 1 if you have the `strtok_r' function. */
|
||||
#undef HAVE_STRTOK_R
|
||||
|
||||
/* Define to 1 if you have the `strtoll' function. */
|
||||
#undef HAVE_STRTOLL
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#undef HAVE_SYS_POLL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/sockio.h> header file. */
|
||||
#define HAVE_SYS_SOCKIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/utime.h> header file. */
|
||||
#undef HAVE_SYS_UTIME_H
|
||||
|
||||
/* Define to 1 if you have the `tcgetattr' function. */
|
||||
#undef HAVE_TCGETATTR
|
||||
|
||||
/* Define to 1 if you have the `tcsetattr' function. */
|
||||
#undef HAVE_TCSETATTR
|
||||
|
||||
/* Define to 1 if you have the <termios.h> header file. */
|
||||
#define HAVE_TERMIOS_H 1
|
||||
|
||||
/* Define to 1 if you have the <termio.h> header file. */
|
||||
#undef HAVE_TERMIO_H
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the `uname' function. */
|
||||
#define HAVE_UNAME 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the `utime' function. */
|
||||
#define HAVE_UTIME 1
|
||||
|
||||
/* Define to 1 if you have the <utime.h> header file. */
|
||||
#define HAVE_UTIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <winsock.h> header file. */
|
||||
#undef HAVE_WINSOCK_H
|
||||
|
||||
/* Define this symbol if your OS supports changing the contents of argv */
|
||||
#undef HAVE_WRITABLE_ARGV
|
||||
|
||||
/* Define to 1 if you have the <x509.h> header file. */
|
||||
#undef HAVE_X509_H
|
||||
|
||||
/* if you have the zlib.h header file */
|
||||
#define HAVE_ZLIB_H 1
|
||||
|
||||
/* need REENTRANT defined */
|
||||
#undef NEED_REENTRANT
|
||||
|
||||
/* cpu-machine-OS */
|
||||
#define OS "i386-pc-NetWare"
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* a suitable file to read random data from */
|
||||
#undef RANDOM_FILE
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define to the type of arg 1 for `select'. */
|
||||
#undef SELECT_TYPE_ARG1
|
||||
|
||||
/* Define to the type of args 2, 3 and 4 for `select'. */
|
||||
#undef SELECT_TYPE_ARG234
|
||||
|
||||
/* Define to the type of arg 5 for `select'. */
|
||||
#undef SELECT_TYPE_ARG5
|
||||
|
||||
/* The size of a `curl_off_t', as computed by sizeof. */
|
||||
#define SIZEOF_CURL_OFF_T 4
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
/* XXX: #undef STDC_HEADERS */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define if you want to enable ares support */
|
||||
#undef USE_ARES
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to 1 if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* type to use in place of in_addr_t if not defined */
|
||||
#undef in_addr_t
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* type to use in place of socklen_t if not defined */
|
||||
#define socklen_t int
|
||||
|
||||
/* the signed version of size_t */
|
||||
#undef ssize_t
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#define HAVE_STRICMP 1
|
||||
|
||||
/* Define cpu-machine-OS */
|
||||
#define OS "win32"
|
||||
#define OS "i386-pc-win32"
|
||||
|
||||
/* Define if you have the <io.h> header file. */
|
||||
#define HAVE_IO_H 1
|
||||
|
||||
BIN
src/curlmsg.h
BIN
src/curlmsg.h
Binary file not shown.
@@ -1,10 +1,15 @@
|
||||
!
|
||||
! VMS error codes are generated by editing the curl.h file and putting all the
|
||||
! CURLE_* enum stuff into this file. With the exception of CURLE_OK, all
|
||||
! of the messages are at the error severity level. With the exception of
|
||||
! These VMS error codes are generated by taking apart the curl.h
|
||||
! file and putting all the CURLE_* enum stuff into this file,
|
||||
! CURLMSG.MSG. An .SDL file is created from this file with
|
||||
! MESSAGE/SDL. The .H file is created using the freeware SDL tool
|
||||
! against the .SDL file.
|
||||
!
|
||||
! With the exception of CURLE_OK, all of the messages are at
|
||||
! the error severity level. With the exception of
|
||||
! FTP_USER_PWD_INCORRECT, which is a shortened form of
|
||||
! FTP_USER_PASSWORD_INCORRECT, these are the same names as the CURLE_ ones
|
||||
! in include/curl.h
|
||||
! FTP_USER_PASSWORD_INCORRECT, these are the same names as the
|
||||
! CURLE_ ones in include/curl.h
|
||||
!
|
||||
.TITLE CURLMSG Message files
|
||||
.FACILITY CURL,1793 /PREFIX=CURL_
|
||||
@@ -76,6 +81,7 @@ SSL_CACERT <SSL CACERT, problem with the CA cert (path?)>
|
||||
BAD_CONTENT_ENCODING <unrecognized transfer encoding>
|
||||
LDAP_INVALID_URL <LDAP invalid url>
|
||||
FILESIZE_EXCEEDED <maximum file size exceeded>
|
||||
FTP_SSL_FAILED <requested FTP SSL level failed>
|
||||
CURL_LAST <CURLMSG.MSG is out of sync with the source code>
|
||||
|
||||
.END
|
||||
|
||||
BIN
src/curlmsg.sdl
BIN
src/curlmsg.sdl
Binary file not shown.
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 5.3 KiB |
@@ -199,7 +199,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
|
||||
#include <conio.h>
|
||||
char *getpass_r(const char *prompt, char *buffer, size_t buflen)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
printf("%s", prompt);
|
||||
|
||||
for(i=0; i<buflen; i++) {
|
||||
|
||||
23
src/main.c
23
src/main.c
@@ -55,6 +55,10 @@
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#ifdef __NOVELL_LIBC__
|
||||
#include <screen.h>
|
||||
#endif
|
||||
|
||||
#ifdef TIME_WITH_SYS_TIME
|
||||
/* We can include both fine */
|
||||
#include <sys/time.h>
|
||||
@@ -124,11 +128,11 @@ struct pollfd {
|
||||
int poll (struct pollfd *, int, int);
|
||||
#endif /* __DJGPP__ */
|
||||
|
||||
#ifndef __cplusplus /* (rabe) */
|
||||
#ifndef __cplusplus
|
||||
#ifndef typedef_bool
|
||||
typedef char bool;
|
||||
#endif
|
||||
#endif /* (rabe) */
|
||||
#endif
|
||||
|
||||
#define CURL_PROGRESS_STATS 0 /* default progress display */
|
||||
#define CURL_PROGRESS_BAR 1
|
||||
@@ -379,8 +383,13 @@ static void help(void)
|
||||
" -#/--progress-bar Display transfer progress as a progress bar",
|
||||
NULL
|
||||
};
|
||||
for(i=0; helptext[i]; i++)
|
||||
for(i=0; helptext[i]; i++) {
|
||||
puts(helptext[i]);
|
||||
#ifdef __NOVELL_LIBC__
|
||||
if (i && ((i % 23) == 0))
|
||||
pressanykey();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
struct LongShort {
|
||||
@@ -2642,6 +2651,8 @@ operate(struct Configurable *config, int argc, char *argv[])
|
||||
}
|
||||
#endif
|
||||
|
||||
memset(&outs,0,sizeof(outs));
|
||||
|
||||
/* we get libcurl info right away */
|
||||
curlinfo = curl_version_info(CURLVERSION_NOW);
|
||||
|
||||
@@ -2946,6 +2957,8 @@ operate(struct Configurable *config, int argc, char *argv[])
|
||||
config->resume_from = 0;
|
||||
}
|
||||
|
||||
outs.filename = outfile;
|
||||
|
||||
if(config->resume_from) {
|
||||
/* open file for output: */
|
||||
outs.stream=(FILE *) fopen(outfile, config->resume_from?"ab":"wb");
|
||||
@@ -2955,7 +2968,6 @@ operate(struct Configurable *config, int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
else {
|
||||
outs.filename = outfile;
|
||||
outs.stream = NULL; /* open when needed */
|
||||
}
|
||||
}
|
||||
@@ -3447,6 +3459,9 @@ int main(int argc, char *argv[])
|
||||
res = operate(&config, argc, argv);
|
||||
free_config_fields(&config);
|
||||
|
||||
#ifdef __NOVELL_LIBC__
|
||||
pressanykey();
|
||||
#endif
|
||||
#ifdef VMS
|
||||
if (res > CURL_LAST) res = CURL_LAST; /* If CURL_LAST exceeded then */
|
||||
return (vms_cond[res]|vms_show); /* curlmsg.h is out of sync. */
|
||||
|
||||
@@ -41,6 +41,10 @@
|
||||
/* include the hand-modified win32 adjusted config.h! */
|
||||
#include "config-win32.h"
|
||||
#endif
|
||||
#ifdef NETWARE
|
||||
/* hand-modified NetWare config.h! */
|
||||
#include "config-netware.h"
|
||||
#endif
|
||||
#ifdef macintosh
|
||||
/* this is not the same as Mac OS X */
|
||||
#include "config-mac.h"
|
||||
|
||||
@@ -4,7 +4,7 @@ static char data[]="this is what we post to the silly web server\n";
|
||||
|
||||
struct WriteThis {
|
||||
char *readptr;
|
||||
int sizeleft;
|
||||
size_t sizeleft;
|
||||
};
|
||||
|
||||
static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp)
|
||||
@@ -43,7 +43,7 @@ int test(char *URL)
|
||||
curl_easy_setopt(curl, CURLOPT_POST, TRUE);
|
||||
|
||||
/* Set the expected POST size */
|
||||
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, pooh.sizeleft);
|
||||
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)pooh.sizeleft);
|
||||
|
||||
/* we want to use our own read function */
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
|
||||
|
||||
Reference in New Issue
Block a user